Skip to content

Stabilize playground save-shortcut e2e by removing navigation-based URL wait#10868

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/investigate-fix-e2e-test-failure
Draft

Stabilize playground save-shortcut e2e by removing navigation-based URL wait#10868
Copilot wants to merge 3 commits into
mainfrom
copilot/investigate-fix-e2e-test-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

The playground website e2e test for Ctrl/Cmd+S intermittently timed out waiting on page.waitForURL(...). The save flow updates query params via same-document URL mutation, so waiting on navigation/load semantics is flaky.

  • Root cause addressed: URL update is not a full navigation

    • Replaced waitForURL in ui.e2e.ts with URL polling, which matches the app behavior (history.pushState-style updates).
  • E2E assertion update

    • Trigger save first, then assert the encoded c= payload appears in page.url() using expect.poll(...).
    • Preserves the existing encoded-content expectation while removing dependence on load events.
await page.keyboard.press(`${ctrlOrCmd}+KeyS`);
// cspell:disable-next-line
await expect
  .poll(() => page.url())
  .toMatch(new RegExp(`${host}/\\?.*c=b3Agc2hhcmVkQ29kZSgpOiBzdHJpbmc7.*`));

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
@timotheeguerin
Copy link
Copy Markdown
Member

@copilot format

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 2, 2026

@copilot format

Done in b3b5993.

@timotheeguerin
Copy link
Copy Markdown
Member

@copilot fix spellcheck

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 2, 2026

@copilot fix spellcheck

Fixed in f50a06b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants