Skip to content

feat(runner): prove the editor's two promises, and version dispatch end to end (DEV-2203) - #183

Closed
danielzytohoc wants to merge 2 commits into
feat/DEV-2203-share-view-specfrom
feat/DEV-2203-editor-and-version-specs
Closed

feat(runner): prove the editor's two promises, and version dispatch end to end (DEV-2203)#183
danielzytohoc wants to merge 2 commits into
feat/DEV-2203-share-view-specfrom
feat/DEV-2203-editor-and-version-specs

Conversation

@danielzytohoc

@danielzytohoc danielzytohoc commented Aug 14, 2026

Copy link
Copy Markdown

Third in the DEV-2203 series. Stacked on #182 — retargets when the stack merges.

What

e2e/editor-download.spec.ts

  • Deterministic (PR CI): edit the entry file through CodeMirror's own dispatch → Download → unzip (fflate) → the zip carries the edit, relative paths, package.json, and the slugged filename (react-vite-ts.zip). The zip is built client-side, so this needs no bundler and no API.
  • E2E_LIVE: rename 'Company name' → the renamed header appears in the rendered grid. "Type a thing, see the thing" was only ever implied by the error-recovery and theme specs.

e2e/version-pinning.spec.ts — the URL → pin → workspace path a DEV-2198 PR-preview link takes:

  • Deterministic ×3: ?v=17.1.0 pins handsontable and @handsontable/react-wrapper in lockstep; ?v=7940 (bare pkg.pr.new id) rewrites both deps to https://pkg.pr.new/...@7940; the validated ref ("7940", not the raw param) reaches the POST /api/session payload.
  • Live: newest -next build installs through the real bundler and renders.
  • E2E_PKG_PR_NEW_REF=<build id> (opt-in): boots one real container at a fresh pkg.pr.new ref, for DEV-2198 validation days. Never hardcoded — builds expire per commit and /api/versions/exists only vouches for npm.

Verification

Deterministic: 4 passed locally. Live against prod: 6 passed, 12.5 s, zero containers (the pkg.pr.new container test skips without a ref).


Note

Low Risk
Test-only additions using existing E2E helpers and env gates; no production behavior changes.

Overview
Adds Playwright E2E coverage for editor download and ?v= version pinning—no app or API code changes.

editor-download.spec.ts adds a PR-CI test that edits via CodeMirror dispatch, downloads the workspace zip, and asserts the unsaved marker, relative paths, and slugged filename. An E2E_LIVE test renames a column header and waits for that text in the Sandpack preview grid.

version-pinning.spec.ts walks the URL → workspace package.json path: semver pins handsontable and @handsontable/react-wrapper together; a bare pkg.pr.new id rewrites both to tarball URLs; for container examples the validated ref (not the raw query param) appears on POST /api/session. Live/opt-in cases cover installing the published -next build through Sandpack and booting a real container when E2E_PKG_PR_NEW_REF is set.

Reviewed by Cursor Bugbot for commit afed1d4. Bugbot is set up for automated code reviews on this repo. Configure here.

…nd to end (DEV-2203)

editor-download.spec.ts: Download is the only way out of play/share with
your edits, and no test ever opened a zip — now one does, client-side and
deterministic (fflate both builds and reads it). The live half types into
the real editor and watches the renamed header reach the rendered grid;
error-recovery and theme specs only ever implied that path.

version-pinning.spec.ts: the URL → pin → workspace path a DEV-2198 PR
preview link will take. Deterministic: a semver deep link pins core and
wrapper in lockstep; a bare pkg.pr.new id rewrites every Handsontable
dependency to its tarball URL and posts the validated ref to the
container session. Live: the newest -next build installs through the
real bundler. pkg.pr.new refs are never hardcoded (builds expire; npm
cannot vouch for them) — E2E_PKG_PR_NEW_REF boots one real container at
a fresh ref when a DEV-2198 validation run wants it.
@danielzytohoc

Copy link
Copy Markdown
Author

Collapsed into #184 (Dan's call: spec-only PRs reviewed as one unit — #184 now bases on master and carries this PR's commits; nothing was dropped). The branch stays for history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant