@@ -169,17 +169,23 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
169169 await openPage ( getPageURL ( 'profile' ) ) ;
170170
171171 await new Promise ( r => setTimeout ( r , 3000 ) ) ;
172- await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
172+ await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' , {
173+ visible : true
174+ } ) ;
173175
174176 const image = await takeScreenshot ( ) ;
175177
176178 compareSnapshot ( image , 'profile' ) ;
177179
178180 await switchTheme ( ) ;
179- await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
181+ await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' , {
182+ visible : true
183+ } ) ;
180184 await compareThemeModeSnapshot ( 'profile' , 'dark' ) ;
181185 await switchTheme ( ) ;
182- await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
186+ await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' , {
187+ visible : true
188+ } ) ;
183189
184190 await compareThemeModeSnapshot ( 'profile' , 'light' ) ;
185191 } ) ;
@@ -211,7 +217,9 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
211217
212218 // NOTE: Wait for animation complete
213219 await new Promise ( r => setTimeout ( r , 3000 ) ) ;
214- await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
220+ await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' , {
221+ visible : true
222+ } ) ;
215223 const image = await takeScreenshot ( ) ;
216224
217225 compareSnapshot ( image , 'toggle' ) ;
@@ -223,7 +231,9 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
223231 await page . click ( isCompact ? '.dx-dropdownmenu-button' : '.user-button' ) ;
224232 // NOTE: Wait for animation complete
225233 await new Promise ( r => setTimeout ( r , 2000 ) ) ;
226- await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
234+ await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' , {
235+ visible : true
236+ } ) ;
227237 const image = await takeScreenshot ( {
228238 clip : {
229239 x : viewport . width - 300 ,
0 commit comments