File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
cypress/integration/routing Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,33 @@ context('routing.indexFile', () => {
66
77 cy . get ( '#main' ) . should ( 'contain' , 'Bug Fixes' ) ;
88 } )
9+
10+ it ( 'handles index file routing with fragments' , ( ) => {
11+ cy . visit ( 'http://localhost:3000/index.html#/' ) ;
12+
13+ cy . get ( '.sidebar-nav' ) . contains ( 'Changelog' ) . click ( ) ;
14+
15+ cy . get ( '#main' ) . should ( 'contain' , 'Bug Fixes' ) ;
16+ } )
17+
18+ it ( 'returns 404 for index file with leading fragment' , ( ) => {
19+ cy . visit ( 'http://localhost:3000/#/index.html/' ) ;
20+
21+ cy . get ( '#main' ) . should ( 'contain' , '404' ) ;
22+ } )
23+
24+ it ( 'returns 500 for index file as folder' , ( ) => {
25+ cy . request ( {
26+ url : 'http://localhost:3000/index.html/#/' ,
27+ failOnStatusCode : false
28+ } ) . then ( ( resp ) => expect ( 500 ) . to . eq ( resp . status ) )
29+ } )
30+
31+
32+ it ( 'does not serve shadowing index markdown file' , ( ) => {
33+ cy . request ( {
34+ url : 'http://localhost:3000/index.md' ,
35+ failOnStatusCode : false
36+ } ) . then ( ( resp ) => expect ( 404 ) . to . eq ( resp . status ) )
37+ } )
938} ) ;
You can’t perform that action at this time.
0 commit comments