diff --git a/src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts index 4f65aaf0..34cede2f 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts @@ -35,5 +35,40 @@ test.describe('Header', () => { name: 'profile picture', }), ).toBeVisible(); + + await expect( + header.getByRole('button', { + name: 'Les services de La Suite numérique', + }), + ).toBeVisible(); + }); + + test('checks La Gauffre interaction', async ({ page }) => { + const header = page.locator('header').first(); + + await expect( + header.getByRole('button', { + name: 'Les services de La Suite numérique', + }), + ).toBeVisible(); + + /** + * La gaufre load a js file from a remote server, + * it takes some time to load the file and have the interaction available + */ + // eslint-disable-next-line playwright/no-wait-for-timeout + await page.waitForTimeout(1500); + + await header + .getByRole('button', { + name: 'Les services de La Suite numérique', + }) + .click(); + + await expect( + page.getByRole('link', { name: 'France Transfert' }), + ).toBeVisible(); + + await expect(page.getByRole('link', { name: 'Grist' })).toBeVisible(); }); }); diff --git a/src/frontend/apps/impress/package.json b/src/frontend/apps/impress/package.json index ff9bb916..019ffeb1 100644 --- a/src/frontend/apps/impress/package.json +++ b/src/frontend/apps/impress/package.json @@ -18,6 +18,7 @@ "@blocknote/core": "0.13.2", "@blocknote/mantine": "0.13.2", "@blocknote/react": "0.13.2", + "@gouvfr-lasuite/integration": "0.1.3", "@openfun/cunningham-react": "2.9.0", "@tanstack/react-query": "5.36.0", "grapesjs-blocks-basic": "1.0.2", diff --git a/src/frontend/apps/impress/src/features/header/ApplicationsMenu.tsx b/src/frontend/apps/impress/src/features/header/ApplicationsMenu.tsx deleted file mode 100644 index ca777561..00000000 --- a/src/frontend/apps/impress/src/features/header/ApplicationsMenu.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import Script from 'next/script'; -import React from 'react'; - -/** - * ApplicationsMenu Component - * - * This component is a work in progress (WIP) and serves as a proof of concept (POC) to showcase a future advanced feature. - * The purpose of this component is to render an applications menu for La Suite, allowing users to switch between different La Suite apps seamlessly. - * To ensure synchronized content across applications, it utilizes an iframe hosted on Scalingo. - * - * This PoC has been created by @manuhabitela. - * - * It includes external CSS and JavaScript files for styling and functionality. - * - * Style has to be included as well: https://suite-numerique-gaufre.osc-fr1.scalingo.io/public/styles/gaufre-vanilla.css \ - * To respect next.js standards, the css is included using the `_document.ts` component. - * @see https://github.com/numerique-gouv/impress/blob/main/src/frontend/apps/impress/src/pages/_document.tsx#L8 - */ -export const ApplicationsMenu = () => ( - <> -