@@ -9,21 +9,30 @@ describe("Sidebar Navigation", () => {
99 } ) ;
1010
1111 it ( "links are working" , ( ) => {
12- // check that issues link leads to the right page
12+ // check that each link leads to the correct page
1313 cy . get ( "nav" ) . contains ( "Issues" ) . click ( ) ;
1414 cy . url ( ) . should ( "eq" , "http://localhost:3000/issues" ) ;
1515
16- // check that projects link leads to the right page
1716 cy . get ( "nav" ) . contains ( "Projects" ) . click ( ) ;
1817 cy . url ( ) . should ( "eq" , "http://localhost:3000/" ) ;
18+
19+ cy . get ( "nav" ) . contains ( "Alerts" ) . click ( ) ;
20+ cy . url ( ) . should ( "eq" , "http://localhost:3000/alerts" ) ;
21+
22+ cy . get ( "nav" ) . contains ( "Users" ) . click ( ) ;
23+ cy . url ( ) . should ( "eq" , "http://localhost:3000/users" ) ;
24+
25+ cy . get ( "nav" ) . contains ( "Settings" ) . click ( ) ;
26+ cy . url ( ) . should ( "eq" , "http://localhost:3000/settings" ) ;
1927 } ) ;
2028
2129 it ( "is collapsible" , ( ) => {
2230 // collapse navigation
2331 cy . get ( "nav" ) . contains ( "Collapse" ) . click ( ) ;
2432
25- // check that links still exist
26- cy . get ( "nav" ) . find ( "a" ) . should ( "have.length" , 5 ) ;
33+ // check that links still exist and are functionable
34+ cy . get ( "nav" ) . find ( "a" ) . should ( "have.length" , 5 ) . eq ( 1 ) . click ( ) ;
35+ cy . url ( ) . should ( "eq" , "http://localhost:3000/issues" ) ;
2736
2837 // check that text is not rendered
2938 cy . get ( "nav" ) . contains ( "Issues" ) . should ( "not.exist" ) ;
0 commit comments