diff --git a/.circleci/config.yml b/.circleci/config.yml index f37cb623..14dac9f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/development/CLI_VERSION b/development/CLI_VERSION index 94057304..0936d60d 100644 --- a/development/CLI_VERSION +++ b/development/CLI_VERSION @@ -1 +1 @@ -1.64.0 +1.64.1 diff --git a/development/api.json b/development/api.json index 6dd7362e..b80167bf 100644 --- a/development/api.json +++ b/development/api.json @@ -128529,7 +128529,10 @@ "overloadIndex": 0 } ], - "expression": "[Object]" + "expression": "[Object]", + "langAliases": { + "default": "WebMCPToolAnnotations" + } }, "spec": [ { diff --git a/development/upgrades/1.64.1.md b/development/upgrades/1.64.1.md new file mode 100644 index 00000000..d9b2d167 --- /dev/null +++ b/development/upgrades/1.64.1.md @@ -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`. diff --git a/lib/playwright/version.rb b/lib/playwright/version.rb index 78b80b66..a33f32ef 100644 --- a/lib/playwright/version.rb +++ b/lib/playwright/version.rb @@ -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 diff --git a/spec/integration/page/route_spec.rb b/spec/integration/page/route_spec.rb index aa49baa6..17f452d2 100644 --- a/spec/integration/page/route_spec.rb +++ b/spec/integration/page/route_spec.rb @@ -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 => {