diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-routing.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-routing.spec.ts index 2c084eec..5800a66b 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-routing.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-routing.spec.ts @@ -93,6 +93,12 @@ test.describe('Doc Routing', () => { await expect(page.getByText('Log in to access the document.')).toBeVisible({ timeout: 10000, }); + + await expect(page.locator('meta[name="robots"]')).toHaveAttribute( + 'content', + 'noindex', + ); + await expect(page).toHaveTitle(/401 Unauthorized - Docs/); }); }); diff --git a/src/frontend/apps/impress/src/pages/401.tsx b/src/frontend/apps/impress/src/pages/401.tsx index f6cab406..ac9eb50c 100644 --- a/src/frontend/apps/impress/src/pages/401.tsx +++ b/src/frontend/apps/impress/src/pages/401.tsx @@ -1,4 +1,5 @@ import { Button } from '@openfun/cunningham-react'; +import Head from 'next/head'; import Image from 'next/image'; import { useRouter } from 'next/router'; import { ReactElement, useEffect } from 'react'; @@ -22,32 +23,43 @@ const Page: NextPageWithLayout = () => { }, [authenticated, replace]); return ( - - {t('Image + <> + + + {`${t('401 Unauthorized')} - ${t('Docs')}`} + + + + {t('Image - - - {t('Log in to access the document.')} - + + + {t('Log in to access the document.')} + - + + - + ); };