Skip to content

Commit f4ee2bb

Browse files
authored
test(modal): allow animation and add updated snapshots (#29861)
Adds `{ animations: 'allow' }` to the sheet modal tests to allow the sheet modal animations to execute before capturing their respective screenshots.
1 parent 88b7013 commit f4ee2bb

7 files changed

+10
-1
lines changed

core/src/components/modal/test/sheet/modal.e2e.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
1111

1212
await ionModalDidPresent.next();
1313

14-
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`));
14+
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
15+
/**
16+
* Animations must be enabled to capture the screenshot.
17+
* By default, animations are disabled with toHaveScreenshot,
18+
* and when capturing the screenshot will call animation.finish().
19+
* This will cause the modal to close and the screenshot capture
20+
* to be invalid.
21+
*/
22+
animations: 'allow',
23+
});
1524
});
1625
});
1726
});

0 commit comments

Comments
 (0)