test(popover, item): fix flaky tests (#26415)
@ -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`
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@ -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`);
|
||||||
};
|
};
|
||||||
|