Skip to content

Commit 67b8afe

Browse files
committed
add focus test for ionic theme
1 parent 953f2bc commit 67b8afe

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,27 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
7272
});
7373
});
7474
});
75+
76+
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
77+
test.describe(title('range: focus'), () => {
78+
test('should render focus state', async ({ page }) => {
79+
await page.setContent(
80+
`
81+
<ion-range>
82+
<ion-icon name="volume-off" slot="start"></ion-icon>
83+
<ion-icon name="volume-high" slot="end"></ion-icon>
84+
</ion-range>
85+
`,
86+
config
87+
);
88+
89+
const range = page.locator('ion-range');
90+
91+
const handle = await range.locator('.range-knob-handle');
92+
93+
handle?.focus();
94+
95+
await expect(range).toHaveScreenshot(screenshot(`range-focus`));
96+
});
97+
});
98+
});
2.41 KB
Loading
3.21 KB
Loading
2.5 KB
Loading

0 commit comments

Comments
 (0)