By default Docs will not be on the dsfr theme but on the generic theme. La Gaufre is part of the dsfr theme and is removed from the generic theme. Same for the "beta" keyword and the "proconnect" buttons.
28 lines
772 B
TypeScript
28 lines
772 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(
|
|
page.locator('header').first().locator('h2').getByText('Docs'),
|
|
).toBeVisible();
|
|
await page.goto('unknown-page404');
|
|
});
|
|
|
|
test.describe('404', () => {
|
|
test('Checks all the elements are visible', async ({ page }) => {
|
|
await expect(
|
|
page.getByText(
|
|
'It seems that the page you are looking for does not exist or cannot be displayed correctly.',
|
|
),
|
|
).toBeVisible();
|
|
await expect(page.getByText('Home')).toBeVisible();
|
|
});
|
|
|
|
test('checks go back to home page redirects to home page', async ({
|
|
page,
|
|
}) => {
|
|
await page.getByText('Home').click();
|
|
await expect(page).toHaveURL('/');
|
|
});
|
|
});
|