browser-test: embed-static env -- test the built editor.embed.html ar…#1892
Open
jpolitz wants to merge 1 commit into
Open
browser-test: embed-static env -- test the built editor.embed.html ar…#1892jpolitz wants to merge 1 commit into
jpolitz wants to merge 1 commit into
Conversation
…tifact Joe says: Completing the set of environments under headless test. We now have: - Plain HTML/self-host embedded (e.g. the pyret-embed npm package) In addition to: - Server-direct-served (e.g. code.pyret.org/editor) - Server-iframe-embedded (e.g. the VMT use case) - VScode-in-browser - VScode-in-browser with a GitLab-simulating server that breaks various things --env=embed drives /editor#controlled=true through a running CPO server, so the file an embedding host actually deploys -- editor.embed.html, rendered once at build time from src/web/editor.html + .env.embed (BASE_URL=".", relative asset paths, POSTMESSAGE_ORIGIN="*") -- was never loaded by any test. embed-static serves code.pyret.org/build/web from a plain correct-MIME static server (new shared/static-server.js: multi-root + path aliases), aliases /editor to /editor.embed.html, and loads the same test-util/embed/embed1.html host page the embed env uses -- so the embed flow is byte-for-byte the existing one, but every asset comes from the built artifact. Catches breakage only visible there: template variables mis-rendered at build time, and asset references that resolve at a server root but 404 under relative/static hosting (the bug class of 21dbeb9). Strictly additive: nothing under code.pyret.org/ changes. In CI it's a fifth matrix entry needing only the cpo-build artifact -- no CPO server, no code.pyret.org node_modules (those steps now run for cpo|embed only). Verified locally: all five suites (check-blocks, errors, type-check, charts, tables) pass against the static artifact -- 236 tests, 0 failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tifact
Joe says:
Completing the set of environments under headless test. We now have:
In addition to:
--env=embed drives /editor#controlled=true through a running CPO server, so the file an embedding host actually deploys -- editor.embed.html, rendered once at build time from src/web/editor.html + .env.embed (BASE_URL=".", relative asset paths, POSTMESSAGE_ORIGIN="*") -- was never loaded by any test.
embed-static serves code.pyret.org/build/web from a plain correct-MIME static server (new shared/static-server.js: multi-root + path aliases), aliases /editor to /editor.embed.html, and loads the same test-util/embed/embed1.html host page the embed env uses -- so the embed flow is byte-for-byte the existing one, but every asset comes from the built artifact. Catches breakage only visible there: template variables mis-rendered at build time, and asset references that resolve at a server root but 404 under relative/static hosting (the bug class of 21dbeb9).
Strictly additive: nothing under code.pyret.org/ changes. In CI it's a fifth matrix entry needing only the cpo-build artifact -- no CPO server, no code.pyret.org node_modules (those steps now run for cpo|embed only).
Verified locally: all five suites (check-blocks, errors, type-check, charts, tables) pass against the static artifact -- 236 tests, 0 failures.