SSR / Pages that work without JavaScript

Testing it

Three Playwright tests, all in noscript.e2e.ts:

  • With JavaScript off (browser.newContext({ javaScriptEnabled: false })): search, filter with the plain selects, page with the links, add to the cart, see the cart on another search, remove it.
  • With it on, the scripted page is unchanged: no form POST in the network log, no script requested after the page went live, and no hydration warning in the console.
  • Both, with one cookie: a cart filled with scripts is there on a reload and on a page without them, and a removal posted without scripts empties the scripted page's cart.

A scripted test that clicks before the runtime has taken the page over is now testing the page without scripts: the served page is priced and its forms post. Wait for the takeover first (the root loses data-foldkit-plus-resume as the page boots).