Skip to content

Commit

Permalink
Merge pull request #20060 from storybookjs/fix/flaky-e2e-tests
Browse files Browse the repository at this point in the history
Build: revamp interactions e2e test
  • Loading branch information
yannbf authored Dec 2, 2022
2 parents 2d4150c + b9c8200 commit 276add3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/e2e-tests/addon-interactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ test.describe('addon-interactions', () => {
const rerunInteractionButton = await panel.locator('[aria-label="Rerun"]');
await rerunInteractionButton.click();
await interactionsRow.first().isVisible();
await expect(await interactionsRow.count()).toEqual(3);
await interactionsRow.nth(1).isVisible();
await interactionsRow.nth(2).isVisible();
await expect(interactionsTab).toContainText(/(3)/);
await expect(interactionsTab).toBeVisible();

// Test remount state (from toolbar) - Interactions have rerun, count is correct and values are as expected
const remountComponentButton = await page.locator('[title="Remount component"]');
await remountComponentButton.click();
await interactionsRow.first().isVisible();
await expect(await interactionsRow.count()).toEqual(3);
await interactionsRow.nth(1).isVisible();
await interactionsRow.nth(2).isVisible();
await expect(interactionsTab).toContainText(/(3)/);
await expect(interactionsTab).toBeVisible();
});
});

0 comments on commit 276add3

Please sign in to comment.