Skip to content

Commit

Permalink
Merge pull request #22022 from storybookjs/fix-e2e-tests
Browse files Browse the repository at this point in the history
Fix e2e tests failing in Firefox
  • Loading branch information
ndelangen authored and shilman committed Apr 12, 2023
1 parent 2fc71ea commit b10e092
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/e2e-tests/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export class SbPage {
// assert url changes
const viewMode = name === 'docs' ? 'docs' : 'story';

const url = this.page.url();
await expect(url).toContain(`path=/${viewMode}/${titleId}--${storyId}`);
await this.page.waitForURL((url) =>
url.search.includes(`path=/${viewMode}/${titleId}--${storyId}`)
);

const selected = await storyLink.getAttribute('data-selected');
await expect(selected).toBe('true');
Expand Down

0 comments on commit b10e092

Please sign in to comment.