(frontend) update tests

Some minor changes have been integrated into the list of documents.
The tests must therefore be adapted accordingly.
This commit is contained in:
Nathan Panchout
2024-11-13 15:11:10 +01:00
committed by Anthony LC
parent 8d514bd571
commit ee937de2c4
8 changed files with 39 additions and 27 deletions

View File

@@ -0,0 +1,25 @@
import { expect, test } from '@playwright/test';
test.describe('Left panel desktop', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/');
});
test('checks all the elements are visible', async ({ page }) => {
await expect(page.getByTestId('left-panel-desktop')).toBeVisible();
await expect(page.getByRole('button', { name: 'house' })).toBeVisible();
await expect(page.getByRole('button', { name: 'New doc' })).toBeVisible();
});
});
test.describe('Left panel mobile', () => {
test.use({ viewport: { width: 500, height: 1200 } });
test.beforeEach(async ({ page }) => {
await page.goto('/');
});
test('checks all the desktop elements are hidden', async ({ page }) => {
await expect(page.getByTestId('left-panel-desktop')).toBeHidden();
});
});