File tree 1 file changed +27
-1
lines changed
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,33 @@ describe("Blockly Editor Page Tests", () => {
25
25
cy . visit ( "/user/login" ) ;
26
26
} ) ;
27
27
28
- /// <reference types="cypress" />
28
+ it ( "[Blockly] navigates to tutorial and back" , ( ) => {
29
+ cy . visit ( "/" ) ;
30
+ cy . get ( 'img[alt="Sensebox ESP"]' ) . click ( ) ;
31
+
32
+ // get a button that has an SVG with the class "fa-bars" inside it
33
+ // this is the button that opens the menu
34
+ const menuButton = cy . get ( "button" ) . find ( "svg.fa-bars" ) . parents ( "button" ) ;
35
+
36
+ // click the button
37
+ menuButton . click ( ) ;
38
+
39
+ // click the a with href "/tutorial"
40
+ cy . get ( 'a[href="/tutorial"]' ) . click ( ) ;
41
+ cy . wait ( 1000 ) ;
42
+ cy . url ( ) . should ( "include" , "/tutorial" ) ;
43
+ cy . wait ( 1000 ) ;
44
+
45
+ // click the button
46
+ menuButton . click ( ) ;
47
+
48
+ // click the a with href "/" and deep inside it an span containing "Blockly"
49
+ cy . get ( 'a[href="/"]' ) . find ( "span" ) . contains ( "Blockly" ) . parents ( "a" ) . click ( ) ;
50
+ cy . wait ( 1000 ) ;
51
+ cy . url ( ) . should ( "include" , "/" ) ;
52
+
53
+ cy . get ( 'img[alt="Sensebox ESP"]' ) . should ( "exist" ) ;
54
+ } ) ;
29
55
30
56
it ( "[Blockly] selects senseBox ESP" , ( ) => {
31
57
cy . visit ( "/" ) ;
You can’t perform that action at this time.
0 commit comments