@@ -37,31 +37,31 @@ describe("smoke-tests", () => {
3737 const animationBuilder = new AnimationBuilderPage ( driver ) ;
3838 await animationBuilder . enterExample ( ) ;
3939 await animationBuilder . executeAnimation ( ) ;
40- await animationBuilder . waitElementToHide ( 3000 ) ;
41- assert . isFalse ( await animationBuilder . isBtnDisplayed ( ) , "The btn should disappear" ) ;
40+ const result = await animationBuilder . waitElementToHide ( 3000 ) ;
41+ assert . isFalse ( result . isVisible , "The btn should disappear" ) ;
4242 } ) ;
4343
4444 it ( "external animation - visibility" , async ( ) => {
4545 const externalAnimationPage = new ExternalAnimationPage ( driver ) ;
4646 await externalAnimationPage . enterExample ( ) ;
4747 await externalAnimationPage . toggleAnimation ( ) ;
48- await externalAnimationPage . waitElementTo ( 10000 , false ) ;
49- assert . isFalse ( await externalAnimationPage . isBtnDisplayed ( ) , "The button should disappear!" ) ;
48+ let result = await externalAnimationPage . waitElementToToggleVisibilityTo ( false ) ;
49+ assert . isFalse ( result . isVisible , "The button should disappear!" ) ;
5050
5151 await externalAnimationPage . toggleAnimation ( ) ;
52- await externalAnimationPage . waitElementTo ( 10000 , true ) ;
53- assert . isTrue ( await externalAnimationPage . isBtnDisplayed ( ) , "The button should appear!" ) ;
52+ result = await externalAnimationPage . waitElementToToggleVisibilityTo ( true ) ;
53+ assert . isTrue ( result . isVisible , "The button should appear!" ) ;
5454 } ) ;
5555
5656 it ( "selector" , async ( ) => {
5757 const selectorPage = new SelectorPage ( driver ) ;
5858 await selectorPage . enterExample ( ) ;
5959 await selectorPage . addItem ( ) ;
60- await selectorPage . awaitItemToApear ( "Item No.2" ) ;
60+ await selectorPage . waitItemToToggleVisibility ( "Item No.2" , true ) ;
6161 await selectorPage . assertElementPossition ( 4 ) ;
6262
6363 await selectorPage . clickOnItem ( "second" ) ;
64- await selectorPage . awaitItemToDissapear ( "second" ) ;
64+ await selectorPage . waitItemToToggleVisibility ( "second" , false ) ;
6565 await selectorPage . assertElementPossition ( 3 ) ;
6666 } ) ;
6767
@@ -76,20 +76,20 @@ describe("smoke-tests", () => {
7676 const fadeInOutPage = new FadeInOutPage ( driver ) ;
7777 await fadeInOutPage . enterExample ( ) ;
7878 await fadeInOutPage . toggleAnimation ( ) ;
79- await fadeInOutPage . waitElementTo ( 3000 , false ) ;
80- assert . isFalse ( await fadeInOutPage . isBtnDisplayed ( ) , "The button should disappear!" ) ;
79+ let result = await fadeInOutPage . waitElementToToggleVisibility ( false ) ;
80+ assert . isFalse ( result . isVisible , "The button should disappear!" ) ;
8181
8282 await fadeInOutPage . toggleAnimation ( ) ;
83- await fadeInOutPage . waitElementTo ( 3000 , false ) ;
84- assert . isTrue ( await fadeInOutPage . isBtnDisplayed ( ) , "The button should appear!" ) ;
83+ result = await fadeInOutPage . waitElementToToggleVisibility ( true ) ;
84+ assert . isTrue ( result . isVisible , "The button should appear!" ) ;
8585 } ) ;
8686
8787 it ( "animation with options" , async ( ) => {
8888 const animationWithOptionsPage = new AnimationWithOptionsPage ( driver ) ;
8989 await animationWithOptionsPage . enterExample ( ) ;
9090 await animationWithOptionsPage . toggleAnimation ( ) ;
91- await animationWithOptionsPage . waitElementTo ( 3000 ) ;
92- assert . isFalse ( await animationWithOptionsPage . isBtnDisplayed ( ) , "The button should disappear!" ) ;
91+ const result = await animationWithOptionsPage . waitElementToHide ( ) ;
92+ assert . isFalse ( result . isVisible , "The button should disappear!" ) ;
9393
9494 await animationWithOptionsPage . assertPositionOfToggleAnimationBtn ( ) ;
9595 } ) ;
0 commit comments