File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 11describe ( "Unit page users" , ( ) => {
2- it ( "can click and go to the second exercise" , ( ) => {
2+ it ( "can click and go to the exercise" , ( ) => {
33 const user = cy ;
44 user
5- . visit ( "/basics" )
6- . get ( ":nth-child(2) > .e7 > .b0.ai > .ek" )
5+ . visit ( "/functional-programming" )
6+ . get ( "li" )
7+ . findByRole ( "button" , { name : / S o l v e / i } )
78 . click ( )
8- . wait ( 6000 )
99 . location ( )
1010 . should ( ( location ) => {
1111 // eslint-disable-next-line jest/valid-expect
1212 expect ( location . pathname ) . to . eq (
13- "/basics/what-will-be-the-output-of-the-code "
13+ "/functional-programming/shopping-challenge "
1414 ) ;
1515 } ) ;
1616 } ) ;
17+ it ( "can click and go to another unit" , ( ) => {
18+ const user = cy ;
19+ user
20+ . visit ( "/functional-programming" )
21+ . wait ( 1000 )
22+ . get ( "ul" )
23+ . findByText ( "Speaking JavaScript" )
24+ . click ( )
25+ . location ( )
26+ . should ( ( location ) => {
27+ // eslint-disable-next-line jest/valid-expect
28+ expect ( location . pathname ) . to . eq ( "/speaking-javascript" ) ;
29+ } ) ;
30+ } ) ;
1731} ) ;
You can’t perform that action at this time.
0 commit comments