Skip to content

Commit 54e7629

Browse files
committed
chore: add more E2E tests for partial group icon
1 parent ea8aae8 commit 54e7629

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

playwright/e2e/example06.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test } from '@playwright/test';
1+
import { expect, test } from '@playwright/test';
22

33
test.describe('Example 06 - Disabled items', () => {
44
test('first select disabled selection February, March are shown but not clickable', async ({ page }) => {
@@ -14,11 +14,19 @@ test.describe('Example 06 - Disabled items', () => {
1414
test('second select disabled group selection Group1, Option1,2,3 should not be toggable', async ({ page }) => {
1515
await page.goto('#/example06');
1616
await page.getByRole('button', { name: '[Group 1: Option 1], [Group 2: Option 5]' }).click();
17+
const group1SelectAll = await page.locator('[data-key="group_0"] .icon-checkbox-container div');
18+
await expect(group1SelectAll).toHaveClass('ms-icon ms-icon-partial-group');
19+
let group2SelectAll = await page.locator('[data-key="group_1"] .icon-checkbox-container div');
20+
await expect(group2SelectAll).toHaveClass('ms-icon ms-icon-partial-group');
1721
await page.getByRole('option', { name: 'Group 2' }).click();
22+
group2SelectAll = await page.locator('[data-key="group_1"] .icon-checkbox-container div');
23+
await expect(group2SelectAll).toHaveClass('ms-icon ms-icon-check');
1824
await page.getByRole('button', { name: '[Group 1: Option 1], [Group 2: Option 5]' });
1925
await page.getByRole('button', { name: '4 of 9 selected' }).click();
2026
await page.getByRole('button', { name: '4 of 9 selected' }).click();
2127
await page.locator('label').filter({ hasText: 'Option 4' }).click();
2228
await page.getByRole('button', { name: '[Group 1: Option 1], [Group 2: Option 5, Option 6]' }).click();
29+
const group3SelectAll = await page.locator('[data-key="group_2"] .icon-checkbox-container div');
30+
await expect(group3SelectAll).toHaveClass('ms-icon ms-icon-uncheck');
2331
});
2432
});

0 commit comments

Comments
 (0)