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.
@ -11,7 +11,16 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|||||||
|
|
||||||
await ionModalDidPresent.next();
|
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',
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 34 KiB |