Repository navigation
chore: test the CLI with Playwright 1.65, and pin it in the Copy prompt - #431
Merged
Merged
Conversation
Playwright 1.65.1 brings Chromium 159. The prompt of a snippet page installs and runs the same version the CLI is tested with, so PLAYWRIGHT goes from 1.63 to 1.65. Chromium 159 does not register an unload handler unless the page sends Permissions-Policy: unload=(self), and a frame also needs allow="unload" from the page that embeds it. Two tests of Back-Forward-Cache failed because their pages no longer had the handler they test: the fixture sends the header and allows the frame. The snippet does not change: without a handler there is nothing that blocks the bfcache.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 of 5 tasks
This branch was successfully deployed
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.
Summary
PLAYWRIGHTinlib/snippet-prompt.mjsgoes from1.63to1.65: the prompt of a snippet page installs and runs the version the CLI is tested with. The tests that spell the version change with it.unloadhandler unless the page sendsPermissions-Policy: unload=(self), and a frame also needsallow="unload"from the page that embeds it.window.onunload = fnleaveswindow.onunloadatnull, andnotRestoredReasonsgives onlymasked. The pages ofcli/tests/e2e/bfcache.test.jsthat test anunloadhandler send the header, and the frame is allowed.## [Unreleased].The snippet does not change. Without a registered handler nothing blocks the bfcache, so there is nothing to report.
Test plan
On macOS with Node 26.13.1 and Playwright 1.65.1:
npm testnpm run buildandnpm run check:built-snippets(59 snippets); the generatedpublic/CoreWebVitals/LCP.mdhasplaywright@1.65npm run test:extension:e2e: 93 of 93npm run test:e2e --prefix cli: 795 of 795cli/tests/e2e/bfcache.test.json its own, 3 times: 6 of 6. Without the change to the fixture, 2 of its 6 tests fail the 3 timesallow="unload",Page.backForwardCacheNotUsedgivesUnloadHandlerExistsInMainFrameandUnloadHandlerExistsInSubFrame, andnotRestoredReasonsgivesunload-listenerfor the page and for the framenpm run lintandnpm run check:emoji