Skip to content

test(ui): run mock playwright suite against production build - #3147

Open
higgsboson1710 wants to merge 2 commits into
kagent-dev:mainfrom
higgsboson1710:fix-mock-playwright
Open

higgsboson1710 wants to merge 2 commits into
kagent-dev:mainfrom
higgsboson1710:fix-mock-playwright

Conversation

@higgsboson1710

Copy link
Copy Markdown

Resolves #3134

Description
The mock Playwright suite (yarn test:pw) was previously running against the Vite dev server (yarn dev). This caused MSW to fetch hundreds of unbundled modules, which could overwhelm the 30-second test budget and lead to timeouts (especially under CI). It also meant we were testing dev-mode code rather than the production bundle.

This PR updates the Playwright configuration to serve the mock suite using production builds.

Changes made:

  • Updated ui/playwright.config.ts to use vite build and vite preview instead of yarn dev for the mock web servers.
  • Separated the builds into two distinct output directories (dist-e2e-bare and dist-e2e-extension) to ensure the different import.meta.env build-time variables don't conflict.
  • Added /dist-e2e-* to ui/.gitignore to ignore the newly generated end-to-end test artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Additional testing required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Run the mock UI Playwright suite against a production build, not the Vite dev server

1 participant