Skip to content

test(e2e): add Playwright test#342

Merged
antfu merged 3 commits into
mainfrom
antfu/e2e-tests
May 14, 2026
Merged

test(e2e): add Playwright test#342
antfu merged 3 commits into
mainfrom
antfu/e2e-tests

Conversation

@antfu

@antfu antfu commented May 14, 2026

Copy link
Copy Markdown
Member

Description

Adds an e2e workspace at e2e/ that builds a minimal Vite fixture, serves the static dist via a small Node http server, drives headless Chromium through playwright-core, and asserts on captured console / pageerror events. The first regression test covers issue #339 across both build entry points — vite build (plugin path) and vite-devtools build (CLI path) — and both currently fail with the documented No dump match for "devtoolskit:internal:messages:list" and Error getting server state errors, gating the upstream fix in devframe's static-RPC client.

E2E is isolated from pnpm test; opt in via pnpm test:e2e. A new ubuntu-only CI job installs Chromium and runs it.

Linked Issues

Captures #339.

Additional context

Root cause lives upstream in devframe (`packages/devframe/src/client/static-rpc.ts`): `type: 'static'` entries throw when called with any args, but the messages dock calls `messages:list(null)`. Once that's fixed in devframe, both tests pass without modification. The CI matrix expansion to Windows/macOS is deferred until the harness has stabilised.

Adds an e2e workspace that builds a minimal Vite fixture, serves the
static dist via Node http, drives headless Chromium via playwright-core,
and asserts on captured console/pageerror events.

The first regression test covers issue #339 — static DevTools builds
emit a SPA that throws "No dump match for messages:list" and "Error
getting server state" once served. Both the `vite build` plugin path
and the `vite-devtools build` CLI path are exercised, since both fail
through the same static-RPC client.

E2E is isolated from `pnpm test`; run via `pnpm test:e2e`. A new
ubuntu-only CI job installs Chromium and runs it.
Comment thread .github/workflows/ci.yml Fixed
@pkg-pr-new

pkg-pr-new Bot commented May 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@342
npm i https://pkg.pr.new/@vitejs/devtools-kit@342
npm i https://pkg.pr.new/@vitejs/devtools-rolldown@342
npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@342

commit: fbcc9d6

antfu and others added 2 commits May 14, 2026 09:35
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Wraps both tests in `it.fails` so they remain regression captures but
don't block CI. Once the upstream devframe static-RPC fix lands, the
tests will start "failing" by passing, prompting removal of `.fails`.
@antfu antfu changed the title test(e2e): add Playwright harness with regression test for #339 test(e2e): add Playwright test May 14, 2026
@antfu antfu merged commit 82e50a5 into main May 14, 2026
10 checks passed
@antfu antfu deleted the antfu/e2e-tests branch May 14, 2026 01:34
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