Skip to content

Commit

Permalink
Expander story & test updates doc change
Browse files Browse the repository at this point in the history
  • Loading branch information
chromaticWaster committed Aug 16, 2023
1 parent 53ec5d9 commit 9030909
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/expander/Expander.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ test(`Expander - Visual and Behaviour`, async ({ page }) => {
const expander = page.locator('.Interactive').getByTestId('test-expander');

await expect(expander).toHaveScreenshot('expander-initial.png');

const animantionEnd = await mockEventListener(expander, 'animationend');
await expect(expander).not.toHaveAttribute('expanded', '');

const expanderHeader = expander.locator('.header');
await expanderHeader.click();
Expand All @@ -17,8 +16,8 @@ test(`Expander - Visual and Behaviour`, async ({ page }) => {
await expect(expander).toHaveScreenshot('expander-expanded.png');

await expanderHeader.click();
await page.waitForTimeout(600);
await expect(animantionEnd).toBeCalledTimes(2);

await expect(expander).not.toHaveAttribute('expanded', '');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/expander/Expander.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ import { OmniLabel } from "@capitec/omni-components-react/label";
const App = () =>
<OmniExpander${args.label ? ` label='${args.label}'` : ''}>
<svg slot="header-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100%" height="100%"><path d="m7.446 6.397.084.073L13 11.939l5.47-5.47a.75.75 0 0 1 1.133.977l-.073.084L14.061 13l5.47 5.47a.75.75 0 0 1-.977 1.133l-.084-.073L13 14.061l-5.47 5.47a.75.75 0 0 1-1.133-.977l.073-.084L11.939 13l-5.47-5.47a.75.75 0 0 1 .977-1.133Z"/></svg>
<svg slot="header-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="m7.446 6.397.084.073L13 11.939l5.47-5.47a.75.75 0 0 1 1.133.977l-.073.084L14.061 13l5.47 5.47a.75.75 0 0 1-.977 1.133l-.084-.073L13 14.061l-5.47 5.47a.75.75 0 0 1-1.133-.977l.073-.084L11.939 13l-5.47-5.47a.75.75 0 0 1 .977-1.133Z"/></svg>
<OmniLabel label="The content of the expander"></OmniLabel>
</OmniExpander>;`
}
Expand Down
2 changes: 1 addition & 1 deletion src/expander/ExpanderGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { OmniElement } from '../core/OmniElement.js';
* ```
*
* @element omni-expander-group
*
*
* @slot - Default slot to slot multiple expanders.
*
* @cssprop --omni-expander-group-container-min-width - Expander group min width.
Expand Down

0 comments on commit 9030909

Please sign in to comment.