Test/playwright e2e ci#28
Conversation
martian56
left a comment
There was a problem hiding this comment.
Nice work, this is the real e2e foundation #16 was asking for, and CI is green: the checks job and the Playwright job both pass on the PR. I went through it:
- The workflow is well put together. checks (typecheck, lint, format, build) runs first, then e2e depends on it, frozen lockfile, browsers installed with --with-deps, concurrency with cancel-in-progress, path filters scoped to apps/web. Good shape.
- The 11 specs are reasonable smoke coverage: seed the connected account in localStorage, navigate, assert the key testids render. Not deep, but exactly right for a first e2e pass.
- The 20 component edits are all just data-testid hooks plus formatting, no behavior or visual changes. I checked the diff, it is clean.
One thing to fix before you merge, plus a couple of optional hardening notes.
Must fix: apps/web/test-results/.last-run.json is committed. That is a Playwright run artifact, regenerated on every run, so it will create noise in every future diff. And .gitignore does not actually ignore Playwright output, the report.[0-9]_...json line is a mangled leftover, not a real pattern. Delete the committed file and add test-results/ and playwright-report/ to apps/web/.gitignore. Details inline.
Optional but worth it, inline on the config: reuseExistingServer should be CI-aware, and a retry on CI would cut flake.
Minor: the version was not bumped, and a new test suite plus a CI job is a meaningful change per AGENTS.md. Quick npm version patch as its own commit.
Green CI and clean test hooks, so approving. Just clear the committed artifact and fix the ignore before you merge.
| @@ -0,0 +1,4 @@ | |||
| { | |||
There was a problem hiding this comment.
Delete this. It is Playwright's run-output artifact, regenerated on every bun run e2e, so committing it means every local run shows a spurious diff. Then add to apps/web/.gitignore:
# Playwright
test-results/
playwright-report/
The existing report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json line is a corrupted default and does not match Playwright's output, so it can go too.
| webServer: { | ||
| command: "bun run dev", | ||
| url: "http://localhost:5173", | ||
| reuseExistingServer: true, |
There was a problem hiding this comment.
reuseExistingServer: true means locally the tests run against whatever is already on 5173, which on some of our machines is a different app entirely. Make it CI-aware: reuseExistingServer: !process.env.CI, so CI always boots a fresh server and locally you still get the fast reuse. While here, two small robustness adds: retries: process.env.CI ? 1 : 0 to absorb flake, and forbidOnly: !!process.env.CI so a stray test.only never silently passes CI.
martian56
left a comment
There was a problem hiding this comment.
Cleanup confirmed. The committed test-results artifact is gone, and .gitignore now properly ignores test-results/ and playwright-report/. Both CI jobs are green. That was the only must-fix, so this is clear to merge.
The optional config hardening (reuseExistingServer: !process.env.CI, plus a CI retry) is still worth doing whenever you next touch the config, but it is not blocking. You can also drop the leftover report.[0-9]... line in .gitignore, it never matched anything. Nice work landing the e2e foundation.
What does this change?
Adds Playwright end-to-end test execution to the frontend CI workflow.
The CI now runs:
This ensures frontend changes are validated automatically in pull requests.
Related issue
Closes #16
Area
Screenshots
Not applicable — CI workflow changes only.
Checklist
bun run typecheck && bun run buildinapps/web(for frontend changes)