ci: explorer Playwright e2e gate (#249 PR 1)#9
Draft
rdhyee wants to merge 4 commits into
Draft
Conversation
…ale on fork main) Upstream commit bde53e2 (PR isamplesorg#269 follow-up) updated this spec when the duplicate sidebar search box was removed; fork main got the explorer.qmd change but not the spec alignment, leaving the suite red on a selector that no longer exists. Verbatim port of the upstream hunk. https://claude.ai/code/session_01R4oXhmYe3qJiGBbHwGG7zn
Browser-level regression gate that must exist before any refactor of explorer.qmd: renders explorer.qmd (single-page, ~10s), serves docs/ with the repo's range-capable dev_server.py, and runs the new explorer-smoke.spec.js in headless Chromium on every PR touching the explorer. The smoke set asserts structural liveness only (boot without uncaught/OJS-cell errors, Cesium canvas at non-zero size, facet sidebar rows, single search box) and deliberately never waits on parquet loads from data.isamples.org, so slow data cannot flake the gate. Deeper data-dependent specs stay runnable via workflow_dispatch spec_filter and locally per tests/README.md. NOTE: the workflow ships in .github/workflows-pending/ because the automation token lacks the Workflows permission to write into .github/workflows/. Activate with: git mv .github/workflows-pending/explorer-e2e.yml .github/workflows/ Caching: Quarto .deb (pinned 1.6.42), ~/.npm (package-lock.json is gitignored, so npm ci/setup-node cache are unavailable), and Playwright browsers keyed on the resolved @playwright/test version. REFACTOR_PLAN_249.md is the paste-ready draft comment for issue isamplesorg#249 laying out the staged refactor-window sequence (PR 1 = this gate, then characterization tests, pure-logic extraction, URL/state codecs per isamplesorg#208, zoomWatcher controller splits per isamplesorg#189-when-triggered), each stage gated on this suite staying green. https://claude.ai/code/session_01R4oXhmYe3qJiGBbHwGG7zn
Pushed from laptop with workflow-scoped credentials; the cloud sandbox PAT couldn't write under .github/workflows/ (no Workflows permission), so PR 1 shipped the file in .github/workflows-pending/ with this exact move documented as the activation step. Activation-note header removed. https://claude.ai/code/session_01R4oXhmYe3qJiGBbHwGG7zn Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 (MAJOR): spec_filter was expanded unquoted, letting a dispatch input smuggle Playwright flags (--pass-with-no-tests = fail-open green run), and the documented empty-filter-runs-all never worked because the || fallback swallowed it. PR/push runs are now hardcoded to the smoke set; dispatch passes the filter as one quoted argument; empty filter runs all specs. 2 (MAJOR): pageErrors was asserted only in the first serial test, so an async OJS/runtime error during the later shared-page tests passed silently. afterEach now drains and asserts the accumulator after every test. 3 (NIT): README claimed dropping the filter runs the other explorer specs — it runs ALL Playwright specs including the Cesium tutorial suite; wording fixed. Verified locally post-fix: 4 passed (6.5s) against a fresh render. https://claude.ai/code/session_01R4oXhmYe3qJiGBbHwGG7zn 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.
What this is
PR 1 of the isamplesorg#249 refactor window: a browser-level regression gate for the explorer that must exist before any refactor of
explorer.qmdlands. Infrastructure only — zero behavior changes toexplorer.qmd.Issue context: isamplesorg#249 (analysis + 2026-06-05 refactor-window update).
Changes
.github/workflows/explorer-e2e.ymltests/playwright/explorer-smoke.spec.jstests/playwright/explorer-map-overlay.spec.jsbde53e2— the isamplesorg#266 spec fix that landed upstream (PR isamplesorg#269 follow-up) but was missing on fork main, leaving the suite red against a selector that no longer existstests/README.mdREFACTOR_PLAN_249.mdActivation required— resolvedThe cloud-sandbox PAT couldn't write under
.github/workflows/(no Workflows permission), so the workflow initially shipped in.github/workflows-pending/. It has since been moved into place and pushed with workflow-scoped credentials (commit94fb5a3), and the gate ran on this PR:✅ Green CI run: https://github.com/rdhyee/isamplesorg.github.io/actions/runs/27452914375 —
4 passed (17.4s), job total 1m12s (cold caches; Quarto/npm/browser caches warm from here).What the gate does
On every PR touching the explorer (
explorer.qmd,assets/**,workers/**, specs, config): installs pinned Quarto 1.6.42, renders onlyexplorer.qmd(~10s — no Python deps / vocab generation needed, verified), servesdocs/with the repo's range-capabledev_server.pyon :5860, runsexplorer-smoke.spec.jsin headless Chromium. Caches: Quarto.deb,~/.npm(no lockfile in repo — it's gitignored — sonpm ci/setup-node cache are unavailable), Playwright browsers keyed on resolved@playwright/testversion. Failure uploads the Playwright report + traces as artifacts.What's covered (one assertion each)
pageerrorAND noError evaluating OJS cellconsole errors during boot (OJS swallows cell exceptions as console errors, sopageerroralone misses a dead explorer — same lesson astests/test_smoke.py)..cesium-viewer .cesium-widget canvasattached with non-zero bounding box.#sampleSearch(post-Duplicate search bars in Explorer isamplesorg/isamplesorg.github.io#266 contract).All four share one page load (serial mode) per the documented "never hammer DuckDB-WASM with reloads" lesson.
What's NOT covered (by design)
facet-viewport,url-roundtrip,heatmap-overlay,search-real-count, …) remain on-demand: locally pertests/README.md, or in CI via the workflow'sspec_filterdispatch input.quarto-pages.yml(tests/test_smoke.py) still guards production; this gate guards PRs.Verification (executed runs)
quarto render explorer.qmd→dev_server.py→ suite): 4 passed (7.9s), twice (initial + clean re-run).npx playwright test explorer-map-overlay -g "sidebar search input is gone"→ 1 passed (13.8s) (withignoreHTTPSErrorsfor the sandbox's TLS-intercepting proxy; the smoke spec sets it on its own context — no-op on a clean network).ignoreHTTPSErrors: trueand why headless WebGL (SwiftShader) was explicitly verified — Cesium draws an 864×400 canvas headlessly.Next (per REFACTOR_PLAN_249.md — paste into isamplesorg#249 after light edit)
PR 2 characterization tests around upcoming seams (isamplesorg#260/isamplesorg#265/isamplesorg#267/isamplesorg#239) → PR 3 pure-logic extraction to
assets/js/→ PR 4 URL/state codecs + single-writer (isamplesorg#208) → PR 5zoomWatchercontroller splits (isamplesorg#189 only if its YAGNI trigger fires). Each stage gated on this suite staying green.https://claude.ai/code/session_01R4oXhmYe3qJiGBbHwGG7zn