From 2e9e90b2f73194519879d0011fc02df9620571ce Mon Sep 17 00:00:00 2001 From: Shawn Taylor Date: Thu, 2 Nov 2023 12:50:48 -0400 Subject: [PATCH] fix(test): reduce flakiness of picker internal screenshot test --- .../picker-internal/test/basic/picker-internal.e2e.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/components/picker-internal/test/basic/picker-internal.e2e.ts b/core/src/components/picker-internal/test/basic/picker-internal.e2e.ts index 63e079e59ca..13847442e67 100644 --- a/core/src/components/picker-internal/test/basic/picker-internal.e2e.ts +++ b/core/src/components/picker-internal/test/basic/picker-internal.e2e.ts @@ -9,6 +9,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { test('inline pickers should not have visual regression', async ({ page }) => { await page.goto(`/src/components/picker-internal/test/basic`, config); + const fullStack = page.locator('#inline button[data-value="full-stack"]'); + const onion = page.locator('#inline button[data-value="onion"]'); + + await expect(fullStack).toHaveClass(/picker-item-active/); + await expect(onion).toHaveClass(/picker-item-active/); + + await page.waitForChanges(); + await expect(page.locator('#inline')).toHaveScreenshot(screenshot(`picker-internal-inline-diff`)); }); });