Skip to content

test(e2e): run the SvelteKit SPA Playwright suite in CI#518

Merged
DioCrafts merged 2 commits into
AtalayaLabs:mainfrom
BCNelson:bcn/playwright-e2e-ci
Jun 22, 2026
Merged

test(e2e): run the SvelteKit SPA Playwright suite in CI#518
DioCrafts merged 2 commits into
AtalayaLabs:mainfrom
BCNelson:bcn/playwright-e2e-ci

Conversation

@BCNelson

Copy link
Copy Markdown
Contributor

What

The frontend e2e CI job (Frontend end-to-end tests (via Playwright)) ran the legacy scenarios/* specs, which drive the vanilla static/ frontend that has since been removed — so it could never pass (it's PR-only + needs: api-test, so it had gone unexercised). This points CI at the repo's actual SvelteKit SPA suite (tests/e2e/spa, 101 specs) and wires up the pieces it needs.

Changes

  • CI (ci.yml): build the release binary with --features plugins (the admin Plugins-tab specs exercise the WASM runtime); run npm run test:coverage, building the instrumented SPA with COVERAGE=1 VITE_E2E=1 so the server serves the data-testid-instrumented build; print the server startup log on completion.
  • Coverage harness (playwright.coverage.config.ts, spa/global-setup.ts, start-server-spa.sh): target 127.0.0.1 instead of localhost (resolves to ::1 first on CI runners while the server binds IPv4, so webServer readiness never connected) and poll /ready; tee server startup output to a log for diagnostics.
  • Files page (+page.svelte, files-extra.spec.ts): restore a persistent breadcrumb home link (buildCrumbs returns only path folders, leaving no "go home" affordance), and fix a ?file= deep-link race where the viewer→URL effect stripped the param before the listing loaded — bookmarked preview links now open the viewer.

Verification

All 101 spa specs pass locally (npm run test:coverage).

The e2e CI job ran the legacy `scenarios/*` specs against the vanilla `static/`
frontend that upstream has since removed, so it could never pass. Point CI at
this repo's SvelteKit SPA suite (tests/e2e/spa) and wire up what it needs:

- CI: build the release binary with `--features plugins` (the admin Plugins-tab
  specs exercise the WASM runtime) and run `npm run test:coverage`, building the
  instrumented SPA with COVERAGE=1 VITE_E2E=1 so the server serves the
  data-testid-instrumented build the specs drive.
- Coverage harness: target 127.0.0.1 instead of `localhost` (which resolves to
  ::1 first on CI runners while the server binds IPv4, so readiness never
  connected) and poll `/ready` for webServer readiness; tee start-server-spa.sh
  output to a log surfaced by an always-run CI step for diagnostics.
- Files page: restore a persistent breadcrumb home link (buildCrumbs returns
  only the path folders, so there was no "go home" affordance), and fix the
  `?file=` deep-link race where the viewer→URL effect stripped the param before
  the listing loaded — a bookmarked preview link now opens the viewer.

All 101 spa specs pass locally.
@BCNelson BCNelson requested a review from DioCrafts as a code owner June 22, 2026 16:35
These example targets landed unformatted on main and fail the Rustfmt CI
check (`cargo fmt --all --check`); reformat them so this PR's checks pass.
No logic changes.
@DioCrafts DioCrafts merged commit 4d9329b into AtalayaLabs:main Jun 22, 2026
13 checks passed
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.

2 participants