Skip to content

Commit 271cf78

Browse files
committed
add select focus test and snapshots
1 parent c0c8394 commit 271cf78

7 files changed

+34
-0
lines changed

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,37 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
5656
});
5757
});
5858
});
59+
60+
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
61+
test.describe(title('select: focus'), () => {
62+
test('should render with focus styles', async ({ page }) => {
63+
await page.setContent(
64+
`
65+
<div class="container ion-padding">
66+
<ion-select class="ion-focused" label="Favorite Fruit" placeholder="Select a fruit"></ion-select>
67+
</div>
68+
`,
69+
config
70+
);
71+
72+
const container = page.locator('.container');
73+
74+
await expect(container).toHaveScreenshot(screenshot(`select-focus`));
75+
});
76+
77+
test('should render with focus and invalid styles', async ({ page }) => {
78+
await page.setContent(
79+
`
80+
<div class="container ion-padding">
81+
<ion-select class="ion-focused ion-invalid" label="Favorite Fruit" placeholder="Select a fruit"></ion-select>
82+
</div>
83+
`,
84+
config
85+
);
86+
87+
const container = page.locator('.container');
88+
89+
await expect(container).toHaveScreenshot(screenshot(`select-invalid-focus`));
90+
});
91+
});
92+
});
3.81 KB
Loading
5 KB
Loading
3.81 KB
Loading
3.84 KB
Loading
4.92 KB
Loading
3.81 KB
Loading

0 commit comments

Comments
 (0)