test(e2e): add Playwright test#342
Merged
Merged
Conversation
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.
commit: |
…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`.
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.
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 throughplaywright-core, and asserts on captured console / pageerror events. The first regression test covers issue #339 across both build entry points —vite build(plugin path) andvite-devtools build(CLI path) — and both currently fail with the documentedNo dump match for "devtoolskit:internal:messages:list"andError getting server stateerrors, gating the upstream fix in devframe's static-RPC client.E2E is isolated from
pnpm test; opt in viapnpm 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.