mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
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  when it should be  <!-- 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. -->
This commit is contained in:
committed by
Liam DeBeasi
parent
ed040b09e9
commit
00c3a4431a
@ -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`));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user