File tree Expand file tree Collapse file tree 2 files changed +43
-25
lines changed
e2e/__tests__/app-impress Expand file tree Collapse file tree 2 files changed +43
-25
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ test.describe('Doc Routing', () => {
9393 await expect ( page . getByText ( 'Log in to access the document.' ) ) . toBeVisible ( {
9494 timeout : 10000 ,
9595 } ) ;
96+
97+ await expect ( page . locator ( 'meta[name="robots"]' ) ) . toHaveAttribute (
98+ 'content' ,
99+ 'noindex' ,
100+ ) ;
101+ await expect ( page ) . toHaveTitle ( / 4 0 1 U n a u t h o r i z e d - D o c s / ) ;
96102 } ) ;
97103} ) ;
98104
Original file line number Diff line number Diff line change 11import { Button } from '@openfun/cunningham-react' ;
2+ import Head from 'next/head' ;
23import Image from 'next/image' ;
34import { useRouter } from 'next/router' ;
45import { ReactElement , useEffect } from 'react' ;
@@ -22,32 +23,43 @@ const Page: NextPageWithLayout = () => {
2223 } , [ authenticated , replace ] ) ;
2324
2425 return (
25- < Box
26- $align = "center"
27- $margin = "auto"
28- $gap = "1rem"
29- $padding = { { bottom : '2rem' } }
30- >
31- < Image
32- className = "c__image-system-filter"
33- src = { img401 }
34- alt = { t ( 'Image 401' ) }
35- style = { {
36- maxWidth : '100%' ,
37- height : 'auto' ,
38- } }
39- />
40-
41- < Box $align = "center" $gap = "0.8rem" >
42- < Text as = "p" $textAlign = "center" $maxWidth = "350px" $theme = "primary" >
43- { t ( 'Log in to access the document.' ) }
44- </ Text >
45-
46- < Button onClick = { ( ) => gotoLogin ( false ) } aria-label = { t ( 'Login' ) } >
47- { t ( 'Login' ) }
48- </ Button >
26+ < >
27+ < Head >
28+ < meta name = "robots" content = "noindex" />
29+ < title > { `${ t ( '401 Unauthorized' ) } - ${ t ( 'Docs' ) } ` } </ title >
30+ < meta
31+ property = "og:title"
32+ content = { `${ t ( '401 Unauthorized' ) } - ${ t ( 'Docs' ) } ` }
33+ key = "title"
34+ />
35+ </ Head >
36+ < Box
37+ $align = "center"
38+ $margin = "auto"
39+ $gap = "1rem"
40+ $padding = { { bottom : '2rem' } }
41+ >
42+ < Image
43+ className = "c__image-system-filter"
44+ src = { img401 }
45+ alt = { t ( 'Image 401' ) }
46+ style = { {
47+ maxWidth : '100%' ,
48+ height : 'auto' ,
49+ } }
50+ />
51+
52+ < Box $align = "center" $gap = "0.8rem" >
53+ < Text as = "p" $textAlign = "center" $maxWidth = "350px" $theme = "primary" >
54+ { t ( 'Log in to access the document.' ) }
55+ </ Text >
56+
57+ < Button onClick = { ( ) => gotoLogin ( false ) } aria-label = { t ( 'Login' ) } >
58+ { t ( 'Login' ) }
59+ </ Button >
60+ </ Box >
4961 </ Box >
50- </ Box >
62+ </ >
5163 ) ;
5264} ;
5365
You can’t perform that action at this time.
0 commit comments