Skip to content

fix(e2e): build packages before Playwright starts dev servers#1410

Merged
russellwheatley merged 2 commits into
mainfrom
e2e-build-before-playwright
Jul 15, 2026
Merged

fix(e2e): build packages before Playwright starts dev servers#1410
russellwheatley merged 2 commits into
mainfrom
e2e-build-before-playwright

Conversation

@russellwheatley

@russellwheatley russellwheatley commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Moves package builds out of Playwright's globalSetup and into the test:e2e:* npm scripts (pnpm build:packages && ...), so Vite/Angular dev servers never start against a partially-rebuilt dist/.
  • globalSetup now only asserts the built package artifacts exist (assertPackagesBuilt()), instead of also being responsible for triggering the build.
  • Restores the execSync import in e2e/global-setup.ts that was accidentally dropped when the now-removed runBuildPackages() helper was deleted. That ReferenceError was being swallowed and rethrown as a misleading "Auth emulator cannot start" error, failing the ui-e2e CI job before any tests could run.
  • Updates AD-4 in developer-docs/decisions.md, playwright-e2e-smoke.md, and LOCAL_DEVELOPMENT.md to reflect the new build timing and Node version guidance.

Split out of #1355 so the e2e/build-infra changes can be reviewed independently of the onUpgradeFailure auth feature (AD-10).

Moves package builds out of Playwright's globalSetup and into the
test:e2e:* npm scripts (pnpm build:packages && ...), so Vite/Angular
never observe a partially rebuilt dist/. globalSetup now only asserts
the built artifacts exist. Also restores the execSync import that
runBuildPackages() removal accidentally dropped, which was breaking
the ui-e2e CI job with a misleading "Auth emulator cannot start" error.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the E2E testing setup by moving the package build step out of Playwright's globalSetup and directly into the individual test:e2e:* scripts in package.json. This ensures packages are fully built before Playwright starts the dev servers, preventing issues with partially rebuilt files. The reviewer suggests optimizing these scripts by leveraging pnpm's dependency filtering (e.g., pnpm --filter=... build) to build only the necessary dependencies for each specific test, which would significantly speed up local test execution.

Comment thread package.json Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@mikehardy mikehardy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me - all the code looks ✅ and if this timing is better DX that's fine of course - this stuff is all very new so I personally have no preferences other than "make it work" :-)

@russellwheatley
russellwheatley merged commit 6b5b794 into main Jul 15, 2026
17 checks passed
@russellwheatley
russellwheatley deleted the e2e-build-before-playwright branch July 15, 2026 07: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