Add TestDriver desktop (Electron) E2E test for Printventory - #71
Closed
testdriverai[bot] wants to merge 1 commit into
Closed
Add TestDriver desktop (Electron) E2E test for Printventory#71testdriverai[bot] wants to merge 1 commit into
testdriverai[bot] wants to merge 1 commit into
Conversation
Closed
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.
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:PUPPETEER_SKIP_DOWNLOAD=1+npm install --ignore-scriptsto avoid the heavyelectron-builder install-app-depspostinstall (that native rebuild + Puppeteer's Chromium download saturated and wedged the sandbox in my earlier attempts)better-sqlite3for Electron's ABI (it'srequire()d at the top ofmain.js, so the app can't boot without it)electron . --no-sandboxwithPRINTVENTORY_TEST_SCAN_PATHset (the app's built-in test hook) so the Scan button skips the native folder-picker and scans the bundledtests/test-fixtures/scan-me/*.stl.github/workflows/testdriver-desktop.yml— dedicated CI workflow that authenticates with theTD_API_KEYrepo 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.vitest+testdriveraias devDeps and removes the leftover demo sample test.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 (verifiedscan-directory-button,search-filter-input, thePRINTVENTORY_TEST_SCAN_PATHtest 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.Now that
TD_API_KEYis set as a repo Actions secret, run it in CI — that's where the secret is actually injected:TD_API_KEY(no expired device code involved) and runstests/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.jsetc.) — that's separate from TestDriver and out of scope for me; this PR only adds the TestDriver computer-use coverage.