fix(e2e): rebuild better-sqlite3 per ABI + select inbox window by title
- Vitest needs the node-ABI prebuilt sqlite binary; Electron 41 needs ABI 145. Add `rebuild:node` / `rebuild:electron` scripts and wire them as pre-hooks for `test`, `test:e2e`, `start`, `dev`, `test:integration`. - Smoke test was racing on `firstWindow()`, which non-deterministically returned the quickcapture window. Strip ELECTRON_RUN_AS_NODE from the launch env, wait for both windows to register, then pick the inbox by title and assert the heading via `getByRole`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,13 @@
|
||||
"dev": "electron-vite dev",
|
||||
"build": "electron-vite build",
|
||||
"start": "electron-vite preview",
|
||||
"rebuild:node": "cd node_modules/better-sqlite3 && prebuild-install",
|
||||
"rebuild:electron": "cd node_modules/better-sqlite3 && prebuild-install --runtime=electron --target=41.3.0",
|
||||
"pretest": "npm run rebuild:node",
|
||||
"pretest:integration": "npm run rebuild:node",
|
||||
"pretest:e2e": "npm run rebuild:electron && npm run build",
|
||||
"prestart": "npm run rebuild:electron",
|
||||
"predev": "npm run rebuild:electron",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:integration": "INKLING_INTEGRATION=1 vitest run tests/integration",
|
||||
|
||||
Reference in New Issue
Block a user