🚸(app-desk) footer legales pages

- Add legales pages.
- Add links to the footer for the new pages.

Legales pages are based from
https://lasuite.numerique.gouv.fr/
This commit is contained in:
Anthony LC
2024-05-03 15:02:24 +02:00
committed by Anthony LC
parent 51c4a29751
commit 980c6ee1a4
7 changed files with 388 additions and 1 deletions

View File

@@ -33,10 +33,56 @@ test.describe('Footer', () => {
footer.getByRole('link', { name: 'data.gouv.fr' }),
).toBeVisible();
await expect(
footer.getByRole('link', { name: 'Legal Notice' }),
).toBeVisible();
await expect(
footer.getByRole('link', { name: 'Personal data and cookies' }),
).toBeVisible();
await expect(
footer.getByRole('link', { name: 'Accessibility' }),
).toBeVisible();
await expect(
footer.getByText(
'Unless otherwise stated, all content on this site is under',
),
).toBeVisible();
});
const legalPages = [
{
linkName: 'Legal Notice',
pageName: 'Legal Notice',
url: '/legal-notice',
},
{
linkName: 'Personal data and cookies',
pageName: 'Personal data and cookies',
url: '/personal-data-cookies',
},
{
linkName: 'Accessibility: non-compliant',
pageName: 'Accessibility statement',
url: '/accessibility',
},
];
for (const { linkName, url, pageName } of legalPages) {
test(`checks ${linkName} page`, async ({ page }) => {
const footer = page.locator('footer').first();
await footer.getByRole('link', { name: linkName }).click();
await expect(
page
.getByRole('heading', {
name: pageName,
})
.first(),
).toBeVisible();
await expect(page).toHaveURL(url);
});
}
});