Skip to content

Commit 00c3a44

Browse files
mapsandappsliamdebeasi
authored andcommitted
test(picker-internal): reduce flakiness of picker internal screenshot test (#28456)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> <!-- Please describe the current behavior that you are modifying. --> Sometimes the screenshot gets captured as ![actual](https://github.com/ionic-team/ionic-framework/assets/14926794/dd596788-f871-45b8-ad0b-f8d3682404e4) when it should be ![expected](https://github.com/ionic-team/ionic-framework/assets/14926794/4807e447-3a02-44e5-95a3-04f1ee742072) <!-- Please describe the behavior or changes that are being added by this PR. --> - Hopefully the screenshot will be more consistent. - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent ed040b0 commit 00c3a44

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/src/components/picker-internal/test/basic/picker-internal.e2e.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
99
test('inline pickers should not have visual regression', async ({ page }) => {
1010
await page.goto(`/src/components/picker-internal/test/basic`, config);
1111

12+
const fullStack = page.locator('#inline button[data-value="full-stack"]');
13+
const onion = page.locator('#inline button[data-value="onion"]');
14+
15+
await expect(fullStack).toHaveClass(/picker-item-active/);
16+
await expect(onion).toHaveClass(/picker-item-active/);
17+
18+
await page.waitForChanges();
19+
1220
await expect(page.locator('#inline')).toHaveScreenshot(screenshot(`picker-internal-inline-diff`));
1321
});
1422
});

0 commit comments

Comments
 (0)