Skip to content

Commit

Permalink
Build: Refactor e2e test for composition to make it more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Dec 15, 2024
1 parent 4192dde commit 8686c4e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/e2e-tests/composition.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ test.describe('composition', () => {

await page.locator('[id="storybook\\@7\\.6\\.18_components-badge"]').click();
await expect(
page.locator('[id="storybook\\@7\\.6\\.18_components-badge--default"]')
).toBeVisible();
page
.locator('iframe[title="storybook-ref-storybook\\@7\\.6\\.18"]')
.contentFrame()
.locator('#storybook-root')
.getByText('Default')
).toBeVisible({ timeout: 15000 });

// Expect composed stories `to be available in the search
await page.getByPlaceholder('Find components').fill('Button');
Expand Down

0 comments on commit 8686c4e

Please sign in to comment.