test(desktop): Playwright electron e2e harness

Launches the built app (out/main/index.js) via Playwright's _electron
API — no browser project, no chromium download. Adds a launch fixture
(electronApp/window/app), an AppPage page object with a screenshot
helper for autonomous visual review, and a boot smoke suite (shell
renders, @commitea/core label-parse runs in the renderer, preload API
exposed). Scripts: e2e (build+run), e2e:only, e2e:report. Artifacts
gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Croissant Le Doux
2026-07-08 11:38:59 -04:00
parent d6f531eb6d
commit 96c2b8b1c2
9 changed files with 223 additions and 1 deletions

View File

@@ -7,7 +7,10 @@
"dev": "electron-vite dev 2>&1 | tee desktop.log",
"build": "electron-vite build",
"start": "electron-vite preview",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"e2e": "electron-vite build && playwright test",
"e2e:only": "playwright test",
"e2e:report": "playwright show-report e2e/.artifacts/report"
},
"dependencies": {
"@commitea/core": "workspace:*",
@@ -15,6 +18,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@playwright/test": "^1.61.1",
"@types/node": "^22.13.1",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",