@@ -170,23 +170,23 @@ module.exports.default = browser => {
170170 testplaneCtx . assertViewResults . add ( { stateName : state , refImg : refImg } ) ;
171171 } ;
172172
173- const waitSelectorsForDisplayed = async ( browser , selectors ) => {
173+ const waitSelectorsForExist = async ( browser , selectors ) => {
174174 await Promise . all (
175175 [ ] . concat ( selectors ) . map ( selector =>
176176 browser
177177 . $ ( selector )
178- . then ( el => el . waitForDisplayed ( ) )
178+ . then ( el => el . waitForExist ( ) )
179179 . catch ( ( ) => {
180180 throw new Error (
181- `element ("${ selector } ") still not displayed after ${ browser . options . waitforTimeout } ms` ,
181+ `element ("${ selector } ") still not existing after ${ browser . options . waitforTimeout } ms` ,
182182 ) ;
183183 } ) ,
184184 ) ,
185185 ) ;
186186 } ;
187187
188188 const assertViewBySelector = async ( browser , state , selectors , opts ) => {
189- await waitSelectorsForDisplayed ( browser , selectors ) ;
189+ await waitSelectorsForExist ( browser , selectors ) ;
190190
191191 return assertView ( state , selectors , opts ) ;
192192 } ;
@@ -214,9 +214,9 @@ module.exports.default = browser => {
214214 session . addCommand (
215215 "assertView" ,
216216 async function ( state , opts = { } ) {
217- await this . waitForDisplayed ( { timeoutMsg : "custom timeout msg" } ) . catch ( ( ) => {
217+ await this . waitForExist ( { timeoutMsg : "custom timeout msg" } ) . catch ( ( ) => {
218218 throw new Error (
219- `element ("${ this . selector } ") still not displayed after ${ this . options . waitforTimeout } ms` ,
219+ `element ("${ this . selector } ") still not existing after ${ this . options . waitforTimeout } ms` ,
220220 ) ;
221221 } ) ;
222222
0 commit comments