Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ jobs:
test-remote:
docker:
- image: cimg/ruby:3.4
- image: mcr.microsoft.com/playwright:v1.64.0-noble
command: /bin/sh -c "cd /home/pwuser && npm install --no-save playwright-core@1.64.0 && ./node_modules/.bin/playwright-core install && ./node_modules/.bin/playwright-core run-server --port 8888 --host 0.0.0.0 --path /ws"
- image: mcr.microsoft.com/playwright:v1.64.1-noble
command: /bin/sh -c "cd /home/pwuser && npm install --no-save playwright-core@1.64.1 && ./node_modules/.bin/playwright-core install && ./node_modules/.bin/playwright-core run-server --port 8888 --host 0.0.0.0 --path /ws"
environment:
DEBUG: "pw:*"
user: pwuser
Expand Down
2 changes: 1 addition & 1 deletion development/CLI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.64.0
1.64.1
5 changes: 4 additions & 1 deletion development/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -128529,7 +128529,10 @@
"overloadIndex": 0
}
],
"expression": "[Object]"
"expression": "[Object]",
"langAliases": {
"default": "WebMCPToolAnnotations"
}
},
"spec": [
{
Expand Down
28 changes: 28 additions & 0 deletions development/upgrades/1.64.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Playwright 1.64.1 upstream review

Source: [v1.64.0...v1.64.1](https://github.com/microsoft/playwright/compare/v1.64.0...v1.64.1).
npm commit `cfe490d941f992655948eee8fd4fd94e1c4234bf`. Ruby gem: `1.64.0` → `1.64.1`.

This is a patch release of five cherry-picks. None of them touch
`packages/playwright-core/src/client/**` or `packages/protocol/**`, so no Ruby
implementation changes are needed. The server fixes ship in the 1.64.1 driver.

## Upstream PR review

| PR / behavior | Ruby action | Client changes | Upstream tests |
| --- | --- | --- | --- |
| [#43217](https://github.com/microsoft/playwright/pull/43217) chore(dotnet): fix async suffix of optional-arg overloads, alias WebMCPToolAnnotations | Generated API check only. `api.json` gains a `langAliases` entry on `WebMCPTool.annotations`, which the generated Ruby wrappers and docs ignore. | None. | None. |
| [#43249](https://github.com/microsoft/playwright/pull/43249) fix(chromium): disable AvoidCorsURLLoaderRestartOnRedirect (#43242) | Port the regression test. The fix is a Chromium launch switch carried by the driver. | None. | `page-route.spec.ts`: should not abort preflighted cross-origin redirect when a route is registered → `spec/integration/page/route_spec.rb` |
| [#43250](https://github.com/microsoft/playwright/pull/43250) fix(electron): do not drop windows that have not navigated while connecting (#43247) | No action; server-side fix carried by the driver. The Ruby client has no Electron specs. | None. | `electron-app.spec.ts` (not ported) |
| [#43354](https://github.com/microsoft/playwright/pull/43354) chore: mark v1.64.1 | Version bump only. | None. | None. |
| [#43353](https://github.com/microsoft/playwright/pull/43353) docs: release notes for v1.64 Python | No action. | None. | None. |

## Verification

- Clean regeneration (`generate_api_json.sh` + `generate_api.rb`) produces identical
wrappers, docs and `unimplemented_examples.md`. The only generated diff is the
`langAliases` entry in `development/api.json`.
- The new route spec fails on the 1.64.0 driver (`TypeError: Failed to fetch`) and
passes on 1.64.1.
- Full Chromium suite on Ruby 4.0: **1,291 examples, 0 failures, 29 pending**.
Run with `CI=1 PLAYWRIGHT_CLI_EXECUTABLE_PATH=./node_modules/.bin/playwright-core bundle exec rspec`.
4 changes: 2 additions & 2 deletions lib/playwright/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Playwright
VERSION = '1.64.0'
COMPATIBLE_PLAYWRIGHT_VERSION = '1.64.0'
VERSION = '1.64.1'
COMPATIBLE_PLAYWRIGHT_VERSION = '1.64.1'
end
28 changes: 28 additions & 0 deletions spec/integration/page/route_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,34 @@
# expect(resp).toEqual(['electric', 'gas']);
# });

# https://github.com/microsoft/playwright/issues/43242
it 'should not abort preflighted cross-origin redirect when a route is registered' do
allow_cors = ->(app) {
app.headers(
"Access-Control-Allow-Origin" => app.request.env["HTTP_ORIGIN"] || "*",
"Access-Control-Allow-Credentials" => "true",
"Access-Control-Allow-Headers" => "x-app-version",
)
}
file_url = "#{server_prefix}/file"
sinatra.options('/download') { allow_cors.call(self); status 204 }
sinatra.get('/download') { allow_cors.call(self); redirect file_url, 302 }
sinatra.options('/file') { allow_cors.call(self); status 204 }
sinatra.get('/file') { allow_cors.call(self); "file contents" }

with_page do |page|
page.goto(server_empty_page)
page.route('**/never-matches', ->(route, _) { route.continue })
result = page.evaluate(<<~JAVASCRIPT, arg: "#{server_cross_process_prefix}/download")
async (url) => {
const response = await fetch(url, { credentials: 'include', headers: { 'X-App-Version': '1.2.3' } });
return `${response.status} ${await response.text()}`;
}
JAVASCRIPT
expect(result).to eq("200 file contents")
end
end

# it('should reject cors with disallowed credentials', async ({page, server}) => {
# await page.goto(server.EMPTY_PAGE);
# await page.route('**/cars', async route => {
Expand Down