File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,16 @@ export const testModal = async (
14
14
} ) ;
15
15
16
16
const screenshotCompares = [ ] ;
17
+ const ionModalWillPresent = await page . spyOnEvent ( 'ionModalWillPresent' ) ;
18
+ const ionModalDidPresent = await page . spyOnEvent ( 'ionModalDidPresent' ) ;
19
+ const ionModalWillDismiss = await page . spyOnEvent ( 'ionModalWillDismiss' ) ;
20
+ const ionModalDidDismiss = await page . spyOnEvent ( 'ionModalDidDismiss' ) ;
17
21
18
22
await page . click ( selector ) ;
23
+
24
+ await ionModalWillPresent . next ( ) ;
25
+ await ionModalDidPresent . next ( ) ;
26
+
19
27
await page . waitForSelector ( selector ) ;
20
28
21
29
let modal = await page . find ( 'ion-modal' ) ;
@@ -25,6 +33,10 @@ export const testModal = async (
25
33
screenshotCompares . push ( await page . compareScreenshot ( ) ) ;
26
34
27
35
await modal . callMethod ( 'dismiss' ) ;
36
+
37
+ await ionModalWillDismiss . next ( ) ;
38
+ await ionModalDidDismiss . next ( ) ;
39
+
28
40
await modal . waitForNotVisible ( ) ;
29
41
30
42
screenshotCompares . push ( await page . compareScreenshot ( 'dismiss' ) ) ;
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ const overlayAnimation = async (
221
221
/**
222
222
* TODO: Remove AnimationBuilder
223
223
*/
224
- const hasCompleted = ( typeof animationResult as any === 'boolean ' ) ? animationResult : ( animation as any ) . hasCompleted ;
224
+ const hasCompleted = ( typeof animationResult as any === 'undefined ' ) ? true : ( animation as any ) . hasCompleted ;
225
225
if ( isAnimationBuilder ) {
226
226
animation . destroy ( ) ;
227
227
}
You can’t perform that action at this time.
0 commit comments