next.js
56adc02e - Use cookie as sole protocol for instant navigation testing (#89871)

Commit
65 days ago
Use cookie as sole protocol for instant navigation testing (#89871) The Instant Navigation Testing API already uses a cookie to persist lock state across MPA navigations (page reloads, plain anchor links), since window globals don't survive navigation. Rather than maintaining two parallel mechanisms — a window global for SPA and a cookie for MPA — this makes the cookie the single source of truth for all cases. Playwright sets/clears the cookie directly via the browser context, and the client reacts to changes through the CookieStore API's change event. This removes the window.__EXPERIMENTAL_NEXT_TESTING__ global and the page.evaluate() calls that went with it.
Author
Parents
Loading