Skip to content

test: wait for cancelled popstate navigation - #16945

Merged
Rich-Harris merged 1 commit into
version-3from
flake/kit-pr-16900-before-navigate-back
Aug 26, 2026
Merged

test: wait for cancelled popstate navigation#16945
Rich-Harris merged 1 commit into
version-3from
flake/kit-pr-16900-before-navigate-back

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor

Fixes a flaky navigation lifecycle test observed in PR #16900 and CI run 32992201226.

When a popstate navigation is cancelled, SvelteKit performs a compensating history traversal. page.goBack() can resolve before that traversal and the resulting reactive DOM update have settled, causing the test to read the initial state. Use Playwright web-first assertions for both the rendered navigation state and restored URL.

Verification:

  • five separate focused runs passed
  • 200 dev-mode repeats with four workers passed
  • 100 build-mode repeats with four workers passed
  • 18 nearby navigation lifecycle tests passed
  • full cross-platform client spec passed with one worker (97 tests)

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from d9ec623:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/d9ec6235fdf843adf3c03fc712b0b99be7d65ad7

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16945

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d9ec623

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rich-Harris
Rich-Harris marked this pull request as ready for review August 26, 2026 17:39
@Rich-Harris
Rich-Harris merged commit 3b26117 into sveltejs:version-3 Aug 26, 2026
36 of 37 checks passed
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.

1 participant