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>
27 lines
945 B
TypeScript
27 lines
945 B
TypeScript
import { defineConfig } from '@playwright/test'
|
|
|
|
/**
|
|
* E2E harness for the Electron app. Tests launch the *built* app
|
|
* (`out/main/index.js`) through Playwright's `_electron` API — see
|
|
* `e2e/fixtures.ts`. There is no browser project and no chromium download:
|
|
* `_electron` drives the app's own bundled electron.
|
|
*
|
|
* Run `yarn e2e` (builds first) for a fresh run, or `yarn e2e:only` to reuse
|
|
* the existing `out/` build during a tight iteration loop.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
outputDir: './e2e/.artifacts/test-results',
|
|
fullyParallel: false,
|
|
workers: 1, // one electron instance at a time — deterministic, avoids window races
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
timeout: 30_000,
|
|
expect: { timeout: 5_000 },
|
|
reporter: [['list'], ['html', { outputFolder: './e2e/.artifacts/report', open: 'never' }]],
|
|
use: {
|
|
trace: 'retain-on-failure',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
})
|