🚸(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:
@@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user