🎨(frontend) add dsfr proconnect homepage

If we are with the DSFR theme, we need to add the
proconnect button to the homepage.
We add an option in the cunningham theme to
display the proconnect section instead of the
opensource section.
This commit is contained in:
Anthony LC
2025-02-03 11:02:29 +01:00
committed by Anthony LC
parent 4bb9c092cb
commit 1aa4844eeb
18 changed files with 696 additions and 324 deletions

View File

@@ -1,6 +1,6 @@
import { expect, test } from '@playwright/test';
import { keyCloakSignIn, mockedDocument } from './common';
import { expectLoginPage, keyCloakSignIn, mockedDocument } from './common';
test.describe('Doc Routing', () => {
test.beforeEach(async ({ page }) => {
@@ -63,16 +63,13 @@ test.describe('Doc Routing: Not loggued', () => {
await page.goto('/docs/mocked-document-id/');
await expect(page.locator('h2').getByText('Mocked document')).toBeVisible();
await page.getByRole('button', { name: 'Login' }).click();
await keyCloakSignIn(page, browserName);
await keyCloakSignIn(page, browserName, false);
await expect(page.locator('h2').getByText('Mocked document')).toBeVisible();
});
// eslint-disable-next-line playwright/expect-expect
test('The homepage redirects to login.', async ({ page }) => {
await page.goto('/');
await expect(
page.getByRole('button', {
name: 'Sign In',
}),
).toBeVisible();
await expectLoginPage(page);
});
});