feat(runner): read the share viewer from the outside (DEV-2203) - #182
Closed
danielzytohoc wants to merge 2 commits into
Closed
feat(runner): read the share viewer from the outside (DEV-2203)#182danielzytohoc wants to merge 2 commits into
danielzytohoc wants to merge 2 commits into
Conversation
/d/:id is what a client actually receives, and nothing exercised the deployed contract: authed-actions.spec.ts stubs /api/demos and never leaves the SPA. Six read-only checks against a permanent fixture demo: the built page renders for an anonymous viewer, the slashless URL is a 308 (not a second copy), /d is frame-locked to itself, /embed carries the docs-only frame-ancestors list with no X-Frame-Options and no CORS, the __source.json snapshot never leaks, and an unknown id is a real 404. Zero containers, zero writes — cheap enough for post-deploy smoke, which is why the render check carries @smoke. The authed write path (create → build → view → revoke) comes separately as share-create-live.spec.ts.
Contributor
This was referenced Aug 14, 2026
Closed
Author
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.
Second in the DEV-2203 series. Stacked on #181 — GitHub retargets to
masterwhen that merges.What
e2e/share-view.spec.ts— six read-only checks of the deployed/d+/embedcontract, against a permanent fixture demo (r-react-18-0-0, the IT-540 launch share; AGENTS.md now documents the replacement procedure):@smoke— zero containers, zero writes, post-deploy-cheap)/d/:id→ 308, not a second served copy/dframe-locked to itself (frame-ancestors 'self'+X-Frame-Options), HTML must-revalidate/embeddocs-only: allowlistframe-ancestors, no X-Frame-Options, no CORS__source.jsonnever servedNothing here existed:
authed-actions.spec.tsproves the share UI with/api/demosstubbed and never leaves the SPA.Gate:
test.skip(!E2E_BASE_URL)—vite previewhas no/api,/dor/embedroutes.Verification
Against prod: 6 passed in 1.4 s. Without
E2E_BASE_URL: 6 skipped.The authed write path (create → build → view → revoke) lands separately as
share-create-live.spec.ts.Note
Low Risk
Test-only and documentation changes with no production code paths modified; specs are read-only and skip without E2E_BASE_URL.
Overview
Adds read-only Playwright coverage for the deployed share viewer (
/d/:idand/embed/:id) that app-side specs never hit because they stub APIs and stay in the SPA.e2e/share-view.spec.ts— six checks against a permanent fixture demo (r-react-18-0-0), skipped unlessE2E_BASE_URLpoints at a deployment with/api,/d, and/embed: anonymous Handsontable render on/d(tagged@smoke), 308 redirect for slashless URLs,/dframe-lock and HTML revalidation headers,/embeddocs-only framing (allowlistedframe-ancestors, noX-Frame-Options, no CORS),__source.jsonreturns 404, and unknown ids return real 404s.AGENTS.md— documents that backend-bound specs self-gate onE2E_BASE_URLand thatshare-view.spec.tsdepends on the fixture id not being revoked, with a replacement procedure.Reviewed by Cursor Bugbot for commit c262d96. Bugbot is set up for automated code reviews on this repo. Configure here.