(e2e) adapt tests to impress app

Adapt e2e test to works with Impress.
This commit is contained in:
Anthony LC
2024-04-03 11:49:14 +02:00
committed by Anthony LC
parent cad206cccf
commit 1d3f1f793e
14 changed files with 146 additions and 682 deletions

View File

@@ -0,0 +1,29 @@
import { expect, test } from '@playwright/test';
import { keyCloakSignIn } from './common';
test.beforeEach(async ({ page, browserName }) => {
await page.goto('/');
await keyCloakSignIn(page, browserName);
});
test.describe('Language', () => {
test('checks the language picker', async ({ page }) => {
await expect(
page.getByRole('button', {
name: 'Create a new pad',
}),
).toBeVisible();
const header = page.locator('header').first();
await header.getByRole('combobox').getByText('EN').click();
await header.getByRole('option', { name: 'FR' }).click();
await expect(header.getByRole('combobox').getByText('FR')).toBeVisible();
await expect(
page.getByRole('button', {
name: 'Créer un nouveau pad',
}),
).toBeVisible();
});
});