test: add dedicated native Electron Playwright harness - #531
Merged
Conversation
Greptile SummaryThe PR separates browser Playwright coverage from a dedicated native Electron harness while preserving both suites in CI.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the prior headless-launch path is now browser-only by default with native CI running under Xvfb, and the native harness no longer commits or duplicates static fixture credentials.
|
| Filename | Overview |
|---|---|
| package.json | Separates browser and native E2E scripts and makes the default E2E command browser-only, resolving the prior headless aggregate-launch failure. |
| .github/workflows/ci.yml | Runs Chromium explicitly in the browser job and supplies Xvfb for the isolated native Electron job. |
| frontend/e2e/desktop/native-harness.ts | Implements randomized fixture credentials, isolated runtime state, readiness checks, authenticated navigation, and bounded teardown. |
| tests/native-e2e-fixture.cjs | Seeds the isolated native database exclusively from runtime-provided profile and credential values. |
| frontend/e2e/helpers/electron-fixture.ts | Provides a complete browser-side Electron API fixture with an explicit initial-focus contract. |
| frontend/playwright.config.ts | Restricts the standard Playwright configuration to browser tests and adds an all-services-ready web-server barrier. |
| frontend/playwright.electron.config.ts | Defines the dedicated serial Electron desktop test project independently of the browser server lifecycle. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI changes detected] --> B[Browser Playwright job]
A --> C[Native Electron job]
B --> D[Chromium project]
D --> E[Browser E2E server]
C --> F[Xvfb display]
F --> G[Dedicated Electron harness]
G --> H[Temporary profile and database]
G --> I[Seeded authentication]
G --> J[Service and renderer readiness]
G --> K[Graceful teardown verification]
Reviews (2): Last reviewed commit: "no-mistakes(document): verify docs and l..." | Re-trigger Greptile
khaira777
force-pushed
the
fm/flocafe-525-dedicated-electron-harness
branch
from
August 27, 2026 16:38
b4ccb7f to
caf1ace
Compare
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Validate native Electron E2E test harness fixes on PR 531
What Changed
playwright.electron.config.ts,native-harness.ts,native-e2e-fixture.cjs, andtitle-bar.electron.spec.ts) with isolated database profiles and credential seeding.electronAPIfixture contract and added test-mode environment guards inmain/index.ts,main/db.ts, andtests/e2e-server.cjs.Risk Assessment
✅ Low: The changes cleanly isolate the native Electron E2E harness into a dedicated Playwright configuration and CI job with robust port management, disposable sandboxed profiles, and reliable process lifecycle teardown.
Testing
Executed the targeted native Electron Playwright E2E suite (
title-bar.electron.spec.ts), browser platform Playwright suite (title-bar-platform.spec.ts), real Electron runtime probe (platform-titlebar-runtime-probe.cjs), and window lifecycle unit suites (titlebar-window-options,electron-api-contract,window-readiness,window-load-retry). Captured visual evidence screenshots of the native Electron application in both unauthenticated login and authenticated POS dashboard states in~/.no-mistakes/evidence/01M1211RSKP5WYF9DSM6RBKME5/. All checks passed.~/.no-mistakes/evidence/01M1211RSKP5WYF9DSM6RBKME5/01-native-electron-login-screen.png)~/.no-mistakes/evidence/01M1211RSKP5WYF9DSM6RBKME5/02-native-electron-authenticated-dashboard.png)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
cd frontend && FLO_E2E_EVIDENCE_DIR=~/.no-mistakes/evidence/01M1211RSKP5WYF9DSM6RBKME5 npx playwright test --config=playwright.electron.config.ts --project=electron-desktopcd frontend && npx playwright test e2e/title-bar-platform.spec.ts --config=playwright.config.ts --project=chromiumnpm run test:titlebar-window-optionsnpm run test:electron-api-contractnpm run test:window-readinessnpm run test:window-load-retrynpx electron tests/platform-titlebar-runtime-probe.cjs✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.