Skip to content

Commit bb14c4f

Browse files
committed
test(select): add focus invalid screenshots
1 parent ed31a7c commit bb14c4f

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

core/src/components/select/test/highlight/select.e2e.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,34 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
6060
const container = page.locator('#container');
6161
await expect(container).toHaveScreenshot(screenshot(`select-no-fill-invalid`));
6262
});
63+
test('should render invalid with focus state correctly', async ({ page }) => {
64+
await page.setContent(
65+
`
66+
<style>
67+
#container {
68+
display: grid;
69+
gap: 5px;
70+
}
71+
</style>
72+
<div id="container">
73+
<ion-select value="apple" class="ion-touched ion-invalid has-focus" label="Favorite Fruit">
74+
<ion-select-option value="apple">Apple</ion-select-option>
75+
</ion-select>
76+
<ion-list>
77+
<ion-item>
78+
<ion-select value="apple" class="ion-touched ion-invalid has-focus" label="Favorite Fruit">
79+
<ion-select-option value="apple">Apple</ion-select-option>
80+
</ion-select>
81+
</ion-item>
82+
</ion-list>
83+
</div>
84+
`,
85+
config
86+
);
87+
88+
const container = page.locator('#container');
89+
await expect(container).toHaveScreenshot(screenshot(`select-no-fill-invalid-focus`));
90+
});
6391
test('should render focused state correctly', async ({ page }) => {
6492
await page.setContent(
6593
`
5.3 KB
Loading
5.49 KB
Loading
5.42 KB
Loading

0 commit comments

Comments
 (0)