We have added workers to playwright to run tests in parallel, this will help us to run tests faster. The tests run on a commun database, so to keep the tests stable between browsers, we created 3 different users to run the tests, it will avoid to have commun data stepping on each other.
30 lines
818 B
TypeScript
30 lines
818 B
TypeScript
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 team',
|
|
}),
|
|
).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 groupe',
|
|
}),
|
|
).toBeVisible();
|
|
});
|
|
});
|