@@ -86,42 +86,42 @@ describe('See shared folder with link share', function() {
8686
8787 it ( 'Open the viewer on file click' , function ( ) {
8888 cy . openFile ( 'image1.jpg' )
89- cy . get ( '# viewer-content ' ) . should ( 'be.visible' )
89+ cy . get ( 'body > . viewer' ) . should ( 'be.visible' )
9090 } )
9191
9292 it ( 'Does not see a loading animation' , function ( ) {
93- cy . get ( '# viewer-content ' , { timeout : 10000 } )
93+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
9494 . should ( 'be.visible' )
9595 . and ( 'have.class' , 'modal-mask' )
9696 . and ( 'not.have.class' , 'icon-loading' )
9797 } )
9898
9999 it ( 'See the menu icon and title on the viewer header' , function ( ) {
100- cy . get ( '# viewer-content .modal-title' ) . should ( 'contain' , 'image1.jpg' )
101- cy . get ( '# viewer-content .modal-header button.icon-menu-sidebar-white-forced' ) . should ( 'not.be.visible' )
102- cy . get ( '# viewer-content .modal-header button.icon-close' ) . should ( 'be.visible' )
100+ cy . get ( 'body > . viewer .modal-title' ) . should ( 'contain' , 'image1.jpg' )
101+ cy . get ( 'body > . viewer .modal-header button.icon-menu-sidebar-white-forced' ) . should ( 'not.be.visible' )
102+ cy . get ( 'body > . viewer .modal-header button.icon-close' ) . should ( 'be.visible' )
103103 } )
104104
105105 it ( 'Does see next navigation arrows' , function ( ) {
106- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 2 )
107- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.attr' , 'src' )
108- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
109- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
106+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 2 )
107+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.attr' , 'src' )
108+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
109+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
110110 } )
111111
112112 it ( 'Does not have any visual regression 4' , function ( ) {
113113 cy . matchImageSnapshot ( )
114114 } )
115115
116116 it ( 'Show image2 on next' , function ( ) {
117- cy . get ( '# viewer-content a.next' ) . click ( )
118- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 3 )
119- cy . get ( '# viewer-content a.prev' ) . should ( 'be.visible' )
120- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
117+ cy . get ( 'body > . viewer a.next' ) . click ( )
118+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 3 )
119+ cy . get ( 'body > . viewer a.prev' ) . should ( 'be.visible' )
120+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
121121 } )
122122
123123 it ( 'Does not see a loading animation' , function ( ) {
124- cy . get ( '# viewer-content ' , { timeout : 10000 } )
124+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
125125 . should ( 'be.visible' )
126126 . and ( 'have.class' , 'modal-mask' )
127127 . and ( 'not.have.class' , 'icon-loading' )
@@ -132,14 +132,14 @@ describe('See shared folder with link share', function() {
132132 } )
133133
134134 it ( 'Show image3 on next' , function ( ) {
135- cy . get ( '# viewer-content a.next' ) . click ( )
136- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 3 )
137- cy . get ( '# viewer-content a.prev' ) . should ( 'be.visible' )
138- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
135+ cy . get ( 'body > . viewer a.next' ) . click ( )
136+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 3 )
137+ cy . get ( 'body > . viewer a.prev' ) . should ( 'be.visible' )
138+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
139139 } )
140140
141141 it ( 'Does not see a loading animation' , function ( ) {
142- cy . get ( '# viewer-content ' , { timeout : 10000 } )
142+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
143143 . should ( 'be.visible' )
144144 . and ( 'have.class' , 'modal-mask' )
145145 . and ( 'not.have.class' , 'icon-loading' )
@@ -150,14 +150,14 @@ describe('See shared folder with link share', function() {
150150 } )
151151
152152 it ( 'Show image4 on next' , function ( ) {
153- cy . get ( '# viewer-content a.next' ) . click ( )
154- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 2 )
155- cy . get ( '# viewer-content a.prev' ) . should ( 'be.visible' )
156- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
153+ cy . get ( 'body > . viewer a.next' ) . click ( )
154+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 2 )
155+ cy . get ( 'body > . viewer a.prev' ) . should ( 'be.visible' )
156+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
157157 } )
158158
159159 it ( 'Does not see a loading animation' , function ( ) {
160- cy . get ( '# viewer-content ' , { timeout : 10000 } )
160+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
161161 . should ( 'be.visible' )
162162 . and ( 'have.class' , 'modal-mask' )
163163 . and ( 'not.have.class' , 'icon-loading' )
@@ -168,17 +168,17 @@ describe('See shared folder with link share', function() {
168168 } )
169169
170170 it ( 'Show video1 on next' , function ( ) {
171- cy . get ( '# viewer-content a.next' ) . click ( )
171+ cy . get ( 'body > . viewer a.next' ) . click ( )
172172 // only 2 because we don't know if we're at the end of the slideshow, current vid and prev img
173- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 1 )
174- cy . get ( '# viewer-content .modal-container video' ) . should ( 'have.length' , 1 )
175- cy . get ( '# viewer-content a.prev' ) . should ( 'be.visible' )
176- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
177- cy . get ( '# viewer-content .modal-title' ) . should ( 'contain' , 'video1.mp4' )
173+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 1 )
174+ cy . get ( 'body > . viewer .modal-container video' ) . should ( 'have.length' , 1 )
175+ cy . get ( 'body > . viewer a.prev' ) . should ( 'be.visible' )
176+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
177+ cy . get ( 'body > . viewer .modal-title' ) . should ( 'contain' , 'video1.mp4' )
178178 } )
179179
180180 it ( 'Does not see a loading animation' , function ( ) {
181- cy . get ( '# viewer-content ' , { timeout : 10000 } )
181+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
182182 . should ( 'be.visible' )
183183 . and ( 'have.class' , 'modal-mask' )
184184 . and ( 'not.have.class' , 'icon-loading' )
@@ -189,14 +189,14 @@ describe('See shared folder with link share', function() {
189189 } )
190190
191191 it ( 'Show image1 again on next' , function ( ) {
192- cy . get ( '# viewer-content a.next' ) . click ( )
193- cy . get ( '# viewer-content .modal-container img' ) . should ( 'have.length' , 2 )
194- cy . get ( '# viewer-content a.prev' ) . should ( 'be.visible' )
195- cy . get ( '# viewer-content a.next' ) . should ( 'be.visible' )
192+ cy . get ( 'body > . viewer a.next' ) . click ( )
193+ cy . get ( 'body > . viewer .modal-container img' ) . should ( 'have.length' , 2 )
194+ cy . get ( 'body > . viewer a.prev' ) . should ( 'be.visible' )
195+ cy . get ( 'body > . viewer a.next' ) . should ( 'be.visible' )
196196 } )
197197
198198 it ( 'Does not see a loading animation' , function ( ) {
199- cy . get ( '# viewer-content ' , { timeout : 10000 } )
199+ cy . get ( 'body > . viewer' , { timeout : 10000 } )
200200 . should ( 'be.visible' )
201201 . and ( 'have.class' , 'modal-mask' )
202202 . and ( 'not.have.class' , 'icon-loading' )
0 commit comments