@@ -695,24 +695,29 @@ describe('WebDriver', function () {
695695 } )
696696
697697 // TO-DO: those tests are flaky so skipping them for now
698- describe . skip ( 'popup : #acceptPopup, #seeInPopup, #cancelPopup' , async ( ) => {
698+ describe ( 'popup : #acceptPopup, #seeInPopup, #cancelPopup' , async ( ) => {
699699 it ( 'should accept popup window' , async ( ) => {
700700 await wd . amOnPage ( '/form/popup' )
701+ await wd . waitForText ( 'Confirm' , 5 )
701702 await wd . click ( 'Confirm' )
702703 await wd . acceptPopup ( )
704+ await wd . waitForElement ( { css : '#result' } , 5 )
703705 await wd . see ( 'Yes' , '#result' )
704706 } )
705707
706708 it ( 'should cancel popup' , async ( ) => {
707709 await wd . amOnPage ( '/form/popup' )
710+ await wd . waitForText ( 'Confirm' , 5 )
708711 await wd . click ( 'Confirm' )
709712 await wd . cancelPopup ( )
713+ await wd . waitForElement ( { css : '#result' } , 5 )
710714 await wd . see ( 'No' , '#result' )
711715 } )
712716
713717 it ( 'should check text in popup' , ( ) => {
714718 return wd
715719 . amOnPage ( '/form/popup' )
720+ . then ( ( ) => wd . waitForText ( 'Alert' , 5 ) )
716721 . then ( ( ) => wd . click ( 'Alert' ) )
717722 . then ( ( ) => wd . seeInPopup ( 'Really?' ) )
718723 . then ( ( ) => wd . cancelPopup ( ) )
0 commit comments