-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: upgrade Playwright to ~1.56.0 for WSL2 compatibility #18468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dev-packages/e2e-tests/test-applications/browser-webworker-vite/package.json
Outdated
Show resolved
Hide resolved
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
- Update userAgent to match Chromium 141 in playwright-config.ts - Filter out favicon resource spans in react-create-*-router tests - Add retry logic for flaky navigation in browser-integration-tests - Handle error status code navigation in astro-4/5 SSR error tests
size-limit report 📦
|
Pages that return HTTP error status codes now fail with net::ERR_HTTP_RESPONSE_CODE_FAILURE in Playwright 1.56/Chromium 141
The value 'chromium' is not a valid Playwright channel option. Playwright uses the bundled Chromium by default when no channel is specified.
…ibility Playwright 1.56+ changed how glob patterns work in page.route(). The release notes recommend using regular expressions instead. This converts all 'https://dsn.ingest.sentry.io/**/*' glob patterns to regex equivalents: /^https:\/\/dsn\.ingest\.sentry\.io\//
...wser-integration-tests/suites/integrations/featureFlags/growthbook/onError/withScope/test.ts
Show resolved
Hide resolved
| // This page returns an error status code, so we need to catch the navigation error | ||
| await page.goto('/ssr-error').catch(() => { | ||
| // Expected to fail with net::ERR_HTTP_RESPONSE_CODE_FAILURE in newer Chromium versions | ||
| }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: does playwright throw for requests with errors now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Chromium behavior change in version 141 (bundled with Playwright 1.56). When navigating to a page that returns an HTTP error status code (4xx/5xx), Chromium now throws net::ERR_HTTP_RESPONSE_CODE_FAILURE.
This affects tests that intentionally navigate to error pages. The workaround is to catch the navigation error since we're testing the error handling behavior, not the navigation itself.
You can also use page.goto(url, { failOnStatusCode: false }) to suppress the error, but .catch() is more explicit about what's expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for explaining. .catch sounds good to me then.
The retry logic was added as a workaround when glob patterns weren't matching. Now that we've converted to regex patterns, this is no longer needed. Surfacing flakes is better than masking them with retries.
# Conflicts: # dev-packages/test-utils/package.json
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on my review. Good to merge from my end!
Closes #18469 (added automatically)