test(viewer): Cypress 15 + run e2e against live deployments#252
Merged
Conversation
Bump cypress 14.3.2 → 15.18.0. Node 22 satisfies v15's engines
(^20.1 || ^22 || >=24) and none of v15's breaking changes touch how we
use it (no component testing, no cy.stub 3-arg, no SelectorPlayground).
v15 routing cy.url()/location()/title() through CDP/BiDi is a plus when
pointing at live cross-origin deployments. Test Replay comes for free on
`cypress run --record` (already used in CI).
Add `retries: { runMode: 2, openMode: 0 }` to absorb transient flake on
remote/live runs (network hiccups, async client-side deduction).
Verified 16/16 green in the hermetic path (local build + fixture).
Add a CYPRESS_ENV target axis that resolves both the base URL and a data
mode (fixture | live). local/CI stay hermetic (intercept the bundle with
main.min.json); deployed targets (pages, workers, graphs, preview) run
against the site's real R2 bundle, so we verify the actual deployments and
their cross-consistency.
- cypress.config.ts: resolveTarget() -> { baseUrl, mode }; expose mode via
Cypress.env. Workers URLs added; preview reads PREVIEW_URL (per-version).
- support: setup() intercepts only in fixture mode; add fixtureOnly() to
skip exact, fixture-pinned assertions on live runs.
- deduction/typesetting: move fixture-specific assertions (renumbered space
IDs, snapshotted KaTeX HTML) under fixtureOnly; data-stable deduction
checks still run live.
- bin/e2e: take targets (default pages+workers consistency check) and
health-check each; package scripts cy:run:{pages,workers,preview,graphs}.
- doc/testing.md: document fixture vs live and the target table.
Verified: hermetic 16/16; live pages and workers each 14 passed /
2 fixture-only skipped / 0 failed (identical).
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
pi-base-topology | e1e8fb9 | Commit Preview URL Branch Preview URL |
Jun 28 2026, 05:51 AM |
Deploying topology with
|
| Latest commit: |
e1e8fb9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://34187df6.topology.pages.dev |
| Branch Preview URL: | https://test-viewer-e2e-multi-target.topology.pages.dev |
These two specs were fixtureOnly because the curated fixture's space names had
drifted from live (live now embeds LaTeX, e.g. S000001 = "Discrete topology on
$\{0,1\}$"). Refresh the two tested spaces' display name/aliases (S000001,
S000004) to current live values and rewrite the assertions to hold in both
modes: a math-free name prefix for deduction, and a behavioral check (refs
resolve; embedded math is typeset via KaTeX) instead of an exact HTML snapshot
for typesetting. Drop the now-unused fixtureOnly helper.
NB: the fixture predates a pi-base property-ID reorganization, so its property
uids are NOT interchangeable with the live bundle's — only per-entity display
fields were refreshed (a bulk by-uid remap would corrupt the trait/theorem
corpus).
Verified: hermetic 16/16; live pages and workers each 16/16 (identical) — the
full suite now runs against the live deployments.
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.
Reworks the viewer e2e suite so one set of specs can validate every deployment — local fixture, production Pages, and the new Workers site — and runs the deployed targets against their real R2 bundle to confirm Pages and Workers serve identical content. Supports the Workers migration. Also bumps Cypress 14 → 15.
CYPRESS_ENVpicks the target (and its data mode); default stayslocal/fixture, so CI is unchanged and hermetic.Review notes
Easiest to review commit-by-commit:
cypress.config.tsresolvesCYPRESS_ENV→{ baseUrl, mode };setup()only intercepts the bundle in fixture mode.bin/e2etakes targets (default = pages+workers consistency check). Start atcypress.config.tsanddoc/testing.md.uidremap would corrupt the trait/theorem corpus.Validation
Fixture 16/16; live
pages16/16; liveworkers16/16 (identical to pages).previewneedsPREVIEW_URL(Workers preview URLs are per-version, not per-branch) — automating per-PR previews is a possible follow-up.