chore: await web-first assertions in basics client tests#16068
Merged
elliott-with-the-longest-name-on-github merged 1 commit intoJun 17, 2026
Merged
Conversation
|
elliott-with-the-longest-name-on-github
approved these changes
Jun 17, 2026
elliott-with-the-longest-name-on-github
left a comment
Contributor
There was a problem hiding this comment.
Thank you!
elliott-with-the-longest-name-on-github
merged commit Jun 17, 2026
0d8ef59
into
sveltejs:main
23 of 24 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several Playwright assertions in
packages/kit/test/apps/basics/test/client.test.jsuse web-first matchers without awaiting them, so the returned promise floats and the assertion never actually runs. The affected tests pass regardless of the real page URL or text content, which means they provide no coverage today.Affected assertions:
expect(page).toHaveURL(...)in "data-sveltekit-preload-data network failure does not trigger navigation" (sole assertion of the test).expect(page).toHaveURL(...)calls in "data-sveltekit-preload-data error does not block user navigation" (the only assertions of the test).expect(page).toHaveURL(...)in "data-sveltekit-preload does not abort ongoing navigation" (sole assertion).expect(page).toHaveURL(...)in "data-sveltekit-preload does not abort ongoing navigation add create-svelte package #2".expect(await page.locator('h2')).toHaveText(...)in "uses correct dynamic env when navigating from prerendered page". Here the await is on the locator (a no-op) rather than on the assertion, so the matcher still floats. Sole assertion of the test.The fix adds the missing await (and moves it outside
expect()for the h2 case) so each matcher runs and can fail. No test titles, selectors, or expected values are changed; this only makes the existing assertions effective.Tests
awaits to existing assertions, with no behavior, selector, or expected-value change.Changesets
packages/kit/test/with no published-package changelog impact.Edits
Found while reviewing the test suite with e2e-skills/e2e-reviewer.