Skip to content

Add TestDriver desktop (Electron) E2E test for Printventory - #71

Closed
testdriverai[bot] wants to merge 1 commit into
mainfrom
testdriver/electron-desktop-e2e
Closed

Add TestDriver desktop (Electron) E2E test for Printventory#71
testdriverai[bot] wants to merge 1 commit into
mainfrom
testdriver/electron-desktop-e2e

Conversation

@testdriverai

@testdriverai testdriverai Bot commented Jul 19, 2026

Copy link
Copy Markdown

What this adds

A TestDriver computer-use test that drives the real Printventory desktop build (electron . / npm start) — not server mode, per the request in #70.

  • tests/electron-app.test.js — end-to-end desktop test that:
    1. Provisions a Linux desktop VM
    2. Clones the repo into the sandbox
    3. Does a lean installPUPPETEER_SKIP_DOWNLOAD=1 + npm install --ignore-scripts to avoid the heavy electron-builder install-app-deps postinstall (that native rebuild + Puppeteer's Chromium download saturated and wedged the sandbox in my earlier attempts)
    4. Rebuilds only better-sqlite3 for Electron's ABI (it's require()d at the top of main.js, so the app can't boot without it)
    5. Launches electron . --no-sandbox with PRINTVENTORY_TEST_SCAN_PATH set (the app's built-in test hook) so the Scan button skips the native folder-picker and scans the bundled tests/test-fixtures/scan-me/*.stl
    6. Drives core flows: window renders → scan directory → models appear in grid → search/filter ("cube") → open a model → metadata/detail panel visible
  • .github/workflows/testdriver-desktop.yml — dedicated CI workflow that authenticates with the TD_API_KEY repo secret and runs this test. It installs only the test-runner deps (--ignore-scripts), because the app itself is provisioned inside the sandbox by the test — so it sidesteps the app's own postinstall on the runner.
  • Installs vitest + testdriverai as devDeps and removes the leftover demo sample test.

⚠️ Status: WIP — not yet run green

I authored this without a live sandbox to iterate against: the interactive TestDriver session credential got exhausted mid-run (device code … already been used) and I couldn't provision a fresh VM to validate it interactively. The test is syntactically valid and built from the app's actual UI (verified scan-directory-button, search-filter-input, the PRINTVENTORY_TEST_SCAN_PATH test hook, and the bundled fixtures in the repo), but the natural-language element descriptions and the provisioning/timeout steps will likely need one round of tuning on the first real run.

▶️ How to run it (this is the unblock)

Now that TD_API_KEY is set as a repo Actions secret, run it in CI — that's where the secret is actually injected:

  1. Actions tab → TestDriver Desktop (Electron) E2ERun workflow.
  2. It authenticates with TD_API_KEY (no expired device code involved) and runs tests/electron-app.test.js.

If the first run needs element/timeout tweaks, re-invoke me on the issue with a working session and I'll iterate to green.


Note: this repo also has a Playwright E2E suite (tests/full-app-e2e.spec.js etc.) — that's separate from TestDriver and out of scope for me; this PR only adds the TestDriver computer-use coverage.

@testdriverai testdriverai Bot mentioned this pull request Jul 19, 2026
@TechJeeper TechJeeper closed this Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant