test(popover, item): fix flaky tests (#26415)

This commit is contained in:
Liam DeBeasi
2022-12-05 13:42:26 -05:00
committed by GitHub
parent 1a5ee2f30f
commit c6353d4da7
10 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@ test.describe('item: highlight', () => {
await page.setIonViewport(); await page.setIonViewport();
expect(await page.screenshot()).toMatchSnapshot(`item-highlight-diff-${page.getSnapshotSettings()}.png`); expect(await page.screenshot({ animations: 'disabled' })).toMatchSnapshot(
`item-highlight-diff-${page.getSnapshotSettings()}.png`
);
}); });
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -33,8 +33,8 @@ export const closePopover = async (page: E2EPage, popover?: Locator) => {
export const screenshotPopover = async (page: E2EPage, buttonID: string, testName: string) => { export const screenshotPopover = async (page: E2EPage, buttonID: string, testName: string) => {
await page.goto(`src/components/popover/test/${testName}`); await page.goto(`src/components/popover/test/${testName}`);
await page.setIonViewport();
await openPopover(page, buttonID); await openPopover(page, buttonID);
await page.setIonViewport();
expect(await page.screenshot()).toMatchSnapshot(`popover-${testName}-${buttonID}-${page.getSnapshotSettings()}.png`); expect(await page.screenshot()).toMatchSnapshot(`popover-${testName}-${buttonID}-${page.getSnapshotSettings()}.png`);
}; };