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.
This commit is contained in:
Tanner Reits
2024-09-11 11:20:02 -04:00
committed by GitHub
parent 88b701363c
commit f4ee2bbfc4
7 changed files with 10 additions and 1 deletions

View File

@ -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',
});
}); });
}); });
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 34 KiB