This commit is the result of several squashed commits which were complicated to disjoin. This rewrites the base UI, and the mail management interfaces.
29 lines
767 B
TypeScript
29 lines
767 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('Header', () => {
|
|
test('checks all the elements are visible', async ({ page, browserName }) => {
|
|
const header = page.locator('header').first();
|
|
|
|
await expect(header.getByText('La Régie')).toBeVisible();
|
|
|
|
await expect(header.getByRole('combobox').getByText('EN')).toBeVisible();
|
|
});
|
|
|
|
test('checks logout button', async ({ page }) => {
|
|
await page
|
|
.getByRole('button', {
|
|
name: 'Logout',
|
|
})
|
|
.click();
|
|
|
|
await expect(page.getByRole('button', { name: 'Sign in' })).toBeVisible();
|
|
});
|
|
});
|