test(e2e): run the SvelteKit SPA Playwright suite in CI#518
Merged
Conversation
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.
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.
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
The frontend e2e CI job (
Frontend end-to-end tests (via Playwright)) ran the legacyscenarios/*specs, which drive the vanillastatic/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.yml): build the release binary with--features plugins(the admin Plugins-tab specs exercise the WASM runtime); runnpm run test:coverage, building the instrumented SPA withCOVERAGE=1 VITE_E2E=1so the server serves thedata-testid-instrumented build; print the server startup log on completion.playwright.coverage.config.ts,spa/global-setup.ts,start-server-spa.sh): target127.0.0.1instead oflocalhost(resolves to::1first 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.+page.svelte,files-extra.spec.ts): restore a persistent breadcrumb home link (buildCrumbsreturns 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).