Skip to content

test: Upgrade Playwright to 1.63 and fix the Chromium 153 fallout - #24273

Open
logaretm wants to merge 7 commits into
awad/inp-element-name-first-writefrom
awad/soft-nav-web-vitals-e2e
Open

test: Upgrade Playwright to 1.63 and fix the Chromium 153 fallout#24273
logaretm wants to merge 7 commits into
awad/inp-element-name-first-writefrom
awad/soft-nav-web-vitals-e2e

Conversation

@logaretm

@logaretm logaretm commented Sep 9, 2026

Copy link
Copy Markdown
Member

Upgrades Playwright to 1.63 and fixes the existing tests that the newer browser broke. This unblocks being able to test soft navigation web vitals.

Some assertions needed updates due to browser behavior changes that wasn't accounted for:

  • Timing changes for INP that surfaced a mismatch that we fix downstack, also timed out some tests.
  • bfcache reason reporting, unload listener now has a masked reason instead which is surprising.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.92 kB - -
@sentry/browser - with treeshaking flags 27.21 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.11 kB - -
@sentry/browser (incl. Tracing) 50.43 kB +0.04% +16 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 50.45 kB +0.04% +17 B 🔺
@sentry/browser (incl. Tracing, Profiling) 53.43 kB +0.04% +17 B 🔺
@sentry/browser (incl. Tracing, Replay) 89.96 kB +0.04% +29 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.08 kB +0.04% +27 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 94.66 kB +0.03% +22 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 107.67 kB +0.02% +20 B 🔺
@sentry/browser (incl. Feedback) 46.41 kB - -
@sentry/browser (incl. sendFeedback) 33.97 kB - -
@sentry/browser (incl. FeedbackAsync) 39.08 kB - -
@sentry/browser (incl. Metrics) 29.93 kB - -
@sentry/browser (incl. Logs) 30.2 kB - -
@sentry/browser (incl. Metrics & Logs) 30.87 kB - -
@sentry/react 30.67 kB - -
@sentry/react (incl. Tracing) 52.75 kB +0.04% +18 B 🔺
@sentry/vue 36.16 kB - -
@sentry/vue (incl. Tracing) 52.69 kB +0.05% +26 B 🔺
@sentry/svelte 28.93 kB - -
CDN Bundle 30.66 kB - -
CDN Bundle (incl. Tracing) 50.95 kB +0.06% +26 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.93 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 52.93 kB +0.06% +29 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.62 kB - -
CDN Bundle (incl. Tracing, Replay) 88.5 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 90.45 kB +0.02% +16 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 94.57 kB +0.02% +18 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 96.57 kB +0.02% +18 B 🔺
CDN Bundle - uncompressed 90.73 kB - -
CDN Bundle (incl. Tracing) - uncompressed 152.2 kB +0.03% +31 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.31 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 158.16 kB +0.02% +31 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.72 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 271.77 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 277.72 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 285.47 kB +0.02% +31 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 291.41 kB +0.02% +31 B 🔺
@sentry/nextjs (client) 55.08 kB +0.05% +25 B 🔺
@sentry/sveltekit (client) 50.85 kB +0.04% +18 B 🔺
@sentry/core/server 37.08 kB - -
@sentry/core/browser 13.66 kB - -
@sentry/node 128.59 kB +0.02% +15 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.82 kB - -
@sentry/node - without tracing 89.55 kB +0.04% +31 B 🔺
@sentry/node - without channel injection 107.52 kB +0.02% +21 B 🔺
@sentry/aws-serverless 97.77 kB +0.03% +23 B 🔺
@sentry/cloudflare (withSentry) - minified 203.02 kB - -
@sentry/cloudflare (withSentry) 505.43 kB - -

View base workflow run

@logaretm
logaretm force-pushed the awad/soft-nav-web-vitals-e2e branch from 6b626d2 to 6bf5302 Compare September 9, 2026 22:59
@logaretm
logaretm force-pushed the awad/soft-nav-web-vitals-e2e branch from 6bf5302 to edec2c5 Compare September 9, 2026 23:18
@logaretm
logaretm added this pull request to stack #24274 September 9, 2026 23:18
@logaretm
logaretm force-pushed the awad/soft-nav-web-vitals-e2e branch from edec2c5 to 55c4475 Compare September 10, 2026 03:32
Playwright 1.56 bundles Chromium 141, which has no Soft Navigations API, so the soft
navigation code paths in the web vitals integration never run under test. 1.63 bundles
Chromium 153, which supports the API unflagged.

`page.route` resolves with a `Disposable` as of 1.63, so returning it from a `Promise<void>`
helper no longer type-checks.
…e hiding the page

web-vitals defers processing an interaction's event entries into
`requestIdleCallback(..., { timeout: 1000 })`. Chromium 141 ran that well before the tests
hid the page; Chromium 153 only runs it once the timeout elapses, so hiding first forced a
report while the metric was still unset and no vital was emitted at all.

`hidePage` now waits for an idle callback of its own first. Idle callbacks run in scheduling
order, so one queued at hide time running means web-vitals' earlier callback has too.
CLS lands on the pageload span when it ends on the idle timeout, so nothing has to force the
page away to finalize it. The reload raced the envelope instead: on Chromium 153 the page
reloads before the in-flight send leaves, so no transaction was ever received and the test
timed out. It also looped, since the reloaded page re-ran the same subject.
web-vitals finalizes LCP on the first trusted input or visibility change and checks
`isTrusted`, so the synthetic `visibilitychange` this test dispatched never finalized it. It
passed anyway while `reportAllChanges` was on, since every LCP entry was reported as it
arrived. Soft navigation reporting turns that off, so on a browser that supports the Soft
Navigations API no LCP span was emitted at all. Clicking finalizes it the way a real user does.
`page.route` resolves with a `Disposable` as of Playwright 1.63, so returning it from a
`Promise<void>` helper no longer type-checks.

The INP tests in react-17, react-17-static and the react-router 7/8 SPA apps hid the page
500ms after the interaction, which is the same race already fixed in react-router-6:
web-vitals defers entry processing to `requestIdleCallback(..., { timeout: 1000 })` and
Chromium 153 only runs it on the timeout, so the forced report found an unset metric.

solid-tanstack-router's LCP test dispatched a synthetic `visibilitychange`, which web-vitals
ignores for finalization because it checks `isTrusted`. It passed only while
`reportAllChanges` was on. It now finalizes with a real click, as in the browser integration
suite.
Playwright 1.63 ships a WebKit that reports `deliveryType`, so the attribute is no longer
Chromium-only and the expectation moves out of the non-WebKit branch. That WebKit also
resolves the intercepted routes without measurable delay, so the TTFB range check keeps its
upper bound (which is what verifies we report seconds, not milliseconds) but only holds the
other engines to a non-zero value.
Two assumptions in the bfcache app stopped holding on newer Chromium, and both traced back to
`unload`.

An unload listener still makes a page ineligible, but Chrome no longer hands out the
`unload-listener` reason for it, only the privacy-masked one. The test waited for both, so it
hung on a reason that never arrives. It now asserts the masked reason, which is what the
browser actually reports and which older versions reported too.

The child-frame test used an unload listener inside the iframe purely as a blocker, so it lost
its reason as well. It blocks with a held-up IndexedDB version upgrade instead, mirroring the
top-level botcher, which keeps the child-frame classification covered.
@logaretm
logaretm force-pushed the awad/soft-nav-web-vitals-e2e branch from b41854e to d40223d Compare September 10, 2026 18:19
@logaretm logaretm changed the title test: Upgrade Playwright to 1.63 and cover soft navigation web vitals test: Upgrade Playwright to 1.63 and fix the Chromium 153 fallout Sep 10, 2026
@logaretm
logaretm marked this pull request as ready for review September 10, 2026 19:04
@logaretm
logaretm requested a review from a team as a code owner September 10, 2026 19:04
@logaretm
logaretm requested review from Lms24 and msonnb and removed request for a team September 10, 2026 19:04
// `requestIdleCallback(..., { timeout: 1000 })`. Chromium only runs that on the timeout here, so
// hiding the page any earlier forces a report before the interaction has been processed and no
// INP is emitted at all.
await page.waitForTimeout(1500);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Probably fine for now but if this flakes I think we need some other mechanism than the timeout (totally fine to leave as-is, since this was already an issue before).

Another question: Below we still trigger a visibilityChange event. Given we removed some of these calls in other tests, do we still want to keep this one? (same pattern in the other react and react-router e2e tests). I guess maybe we still need it for INP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants