open-design/apps/web/tests/runtime
YOMXXX 72be9f4e63
test(web): pin the Web Storage shim's sandbox-iframe end-to-end behavior (#1403 verify) (#3072)
PR #1306 routed artifacts whose source matches htmlNeedsSandboxShim() through buildSrcdoc(), which injects a localStorage / sessionStorage polyfill before any user script runs. Issue #1403 stayed open as a verification placeholder against the original repro shape — a React tree whose useState initializer reads localStorage in a sandboxed iframe.

file-viewer-render-mode.test.ts already covers the routing decision. This commit closes the loop on the runtime payload: a real-shape React artifact is fed through buildSrcdoc, the produced doc is run inside a Node vm context whose window forbids Web Storage the same way an allow-scripts iframe does, and we assert (a) the bare sandbox raises SecurityError on access, (b) the shim takes over and exposes a working in-memory store, (c) the original boot script that read localStorage from initializers runs cleanly, and (d) the shim does NOT clobber a working native storage when one is present (the allow-same-origin path stays untouched). Also pins shim ordering — the shim script must appear before the first user storage read for the polyfill to be effective.
2026-05-27 06:35:17 +00:00
..
app-route-export.test.ts fix(web): keep Vercel static builds writing to out (#2946) 2026-05-26 03:37:27 +00:00
design-template-deck-nav.test.ts Fix editorial deck navigation (#2173) 2026-05-19 19:30:30 +08:00
exports.test.ts refactor desktop host bridge (#2246) 2026-05-19 18:27:05 +08:00
file-ops.test.ts feat(web): implement file operations summary in assistant messages 2026-05-11 23:25:38 +08:00
in-project-link.test.ts fix(web): route chat file links to workspace preview instead of new window (#1239) (#2576) 2026-05-23 11:48:07 +08:00
jsx-module-refs.test.ts feat(web): point .jsx module previews at their HTML entry (#2748) 2026-05-23 11:49:22 +08:00
markdown.linkClick.test.tsx fix(web): route chat file links to workspace preview instead of new window (#1239) (#2576) 2026-05-23 11:48:07 +08:00
markdown.test.tsx feat(web): render code comment directives (#2871) 2026-05-25 11:09:59 +00:00
plugin-source.test.ts feat(web): standardize plugin terminology and enhance UI components 2026-05-13 12:19:29 +08:00
react-component.test.ts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
srcdoc-bridge-empty-targets.test.ts fix(web): allow Comment/Inspect picker to select iframe-backed components (#2254) 2026-05-19 19:26:11 +08:00
srcdoc-deck-bridge-framework-deck.test.ts fix(daemon,web): block pitch-deck placeholder publishes and unbreak framework decks (#2384) 2026-05-20 16:20:34 +08:00
srcdoc-deck-bridge-nested-slides.test.ts fix(web): count nested .slide elements in deck preview bridge (#1542) 2026-05-13 19:42:20 +08:00
srcdoc-palette-css-vars.test.ts test(e2e): align entry coverage with redesigned flows (#2101) 2026-05-19 11:26:40 +08:00
srcdoc-sandbox-shim.test.ts test(web): pin the Web Storage shim's sandbox-iframe end-to-end behavior (#1403 verify) (#3072) 2026-05-27 06:35:17 +00:00
srcdoc-transport.test.ts fix(web): gate srcDoc transport activation on shell ready (#2320) 2026-05-20 11:13:40 +08:00
srcdoc.test.ts fix(web): prevent preview iframe from stealing focus on load (#2792) 2026-05-24 14:37:08 +00:00
todos.test.ts feat(web): render code comment directives (#2871) 2026-05-25 11:09:59 +00:00
tool-renderers.test.tsx fix(web): complete finished tool calls missing results (#1240) 2026-05-11 15:54:11 +08:00