Skip to content

Commit

Permalink
Expander & Expander Group test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chromaticWaster committed Aug 17, 2023
1 parent 4130935 commit 2ddbfc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/expander/Expander.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ test(`Expander - Expand Slotted Icon Behaviour`, async ({ page }) => {

const expandIconContainer = header.locator('.expand-icon-container');
await expect(expandIconContainer).toHaveCount(1);

const slotElement = expander.locator('slot[name="expand-icon"]');
await expect(slotElement).toHaveCount(1);
});
});

Expand All @@ -100,5 +103,8 @@ test(`Expander - Header Slotted Icon Behaviour`, async ({ page }) => {

const headerIconContainer = header.locator('.header-icon-container');
await expect(headerIconContainer).toHaveCount(1);

const slotElement = expander.locator('slot[name="header-icon"]');
await expect(slotElement).toHaveCount(1);
});
});
4 changes: 2 additions & 2 deletions src/expander/ExpanderGroup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ test(`Expander Group - Expand Mode Behaviour`, async ({ page }) => {
await page.goto('/components/expander-group/');
const expanderGroup = page.locator('.Expand_Mode').getByTestId('test-expander-group');
await expect(expanderGroup).toHaveCount(1);

// Check that the expander group has the expand-mode attribute set to multiple.
await expect(expanderGroup).toHaveAttribute('expand-mode', 'multiple');

// Get all the omni-expanders
// Get all the omni-expanders.
const nestedExpanders = expanderGroup.locator('omni-expander');
await expect(nestedExpanders).toHaveCount(2);

Expand Down

0 comments on commit 2ddbfc4

Please sign in to comment.