✅(e2e) adapt tests to impress app
Adapt e2e test to works with Impress.
This commit is contained in:
43
src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts
Normal file
43
src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
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 }) => {
|
||||
const header = page.locator('header').first();
|
||||
|
||||
await expect(header.getByAltText('Marianne Logo')).toBeVisible();
|
||||
|
||||
await expect(
|
||||
header.getByAltText('Freedom Equality Fraternity Logo'),
|
||||
).toBeVisible();
|
||||
|
||||
await expect(header.getByAltText('Impress Logo')).toBeVisible();
|
||||
await expect(header.locator('h2').getByText('Impress')).toHaveCSS(
|
||||
'color',
|
||||
'rgb(0, 0, 145)',
|
||||
);
|
||||
await expect(header.locator('h2').getByText('Impress')).toHaveCSS(
|
||||
'font-family',
|
||||
/Marianne/i,
|
||||
);
|
||||
|
||||
await expect(
|
||||
header.getByText('Les applications de La Suite numérique'),
|
||||
).toBeVisible();
|
||||
|
||||
await expect(header.getByAltText('Language Icon')).toBeVisible();
|
||||
|
||||
await expect(header.getByText('John Doe')).toBeVisible();
|
||||
await expect(
|
||||
header.getByRole('img', {
|
||||
name: 'profile picture',
|
||||
}),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user