Skip to content

Commit dda4489

Browse files
- add states test;
1 parent 25a9464 commit dda4489

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
1515
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-disabled`));
1616
});
1717

18+
test('should render disabled invalid checkbox correctly', async ({ page }) => {
19+
await page.setContent(
20+
`
21+
<ion-checkbox disabled="true" error-text="Error text" class="ion-invalid">Label</ion-checkbox>
22+
`,
23+
config
24+
);
25+
26+
const checkbox = page.locator('ion-checkbox');
27+
await expect(checkbox).toHaveScreenshot(screenshot(`invalid-checkbox-disabled`));
28+
});
29+
1830
test('should render disabled checked checkbox correctly', async ({ page }) => {
1931
await page.setContent(
2032
`
@@ -57,6 +69,7 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
5769
<div id="checkboxes" style="padding: 8px">
5870
<ion-checkbox class="ion-focused">Label</ion-checkbox>
5971
<ion-checkbox class="ion-focused" checked>Label</ion-checkbox>
72+
<ion-checkbox class="ion-invalid ion-focused">Label</ion-checkbox>
6073
</div>
6174
`,
6275
config

0 commit comments

Comments
 (0)