Skip to content

Commit

Permalink
test(modal): allow animation and add updated snapshots (#29861)
Browse files Browse the repository at this point in the history
Adds `{ animations: 'allow' }` to the sheet modal tests to allow the
sheet modal animations to execute before capturing their respective
screenshots.
  • Loading branch information
tanner-reits authored Sep 11, 2024
1 parent 88b7013 commit f4ee2bb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/components/modal/test/sheet/modal.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {

await ionModalDidPresent.next();

await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`));
await expect(page).toHaveScreenshot(screenshot(`modal-sheet-present`), {
/**
* Animations must be enabled to capture the screenshot.
* By default, animations are disabled with toHaveScreenshot,
* and when capturing the screenshot will call animation.finish().
* This will cause the modal to close and the screenshot capture
* to be invalid.
*/
animations: 'allow',
});
});
});
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f4ee2bb

Please sign in to comment.