You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: no automated test of the web component on another origin #825
No automated test loads the embeddable web component, sd-component.js, into a page on a different origin and checks that the engine starts and simulates.
That broke once in production (#688: embeds showed data but the engine never initialized), and today only a manual step in the post-deploy checklist would catch it again.
Why it matters
The cross-origin path depends on bundler behaviour that an rspack upgrade or config change can quietly alter: rspack turns module workers into classic workers in UMD builds, and inside a worker started from a blob URL its automatic publicPath resolves to the embedding page's origin. src/engine/src/worker-trampoline.ts works around both; nothing tests the built bundle end to end. scripts/validate-app-prod-config.mjs checks the /static CORS header and src/engine/tests/worker-trampoline.test.ts unit-tests the trampoline, but neither shows a real cross-origin page booting the engine.
Fix
A Playwright test with two local origins, no GAE needed:
Origin A (127.0.0.1:<port>) serves the built public/static assets with Access-Control-Allow-Origin: *, as app.yaml does.
Origin B (localhost:<port>) serves a minimal page that loads sd-component.js from origin A.
Assert that a simulation result appears and that the WASM was fetched from origin A.
It could run in the CI frontend job after the build it already does.
A version of this harness was built by hand while fixing #688 but never checked in.
changed the title [-]test: no automated cross-origin embed regression test for sd-component.js (follow-up to #688)[/-][+]test: no automated test of the web component on another origin[/+]on Oct 12, 2026
Activity
[-]test: no automated cross-origin embed regression test for sd-component.js (follow-up to #688)[/-][+]test: no automated test of the web component on another origin[/+]