test: add real macOS Tauri integration coverage - #69
Open
Ryanb58 wants to merge 12 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a macOS-only “real desktop” integration test lane that builds an isolated Tauri .app (feature-gated Rust plugins + test-only Tauri config) and drives the actual WKWebView + IPC using WebdriverIO, with CI wiring and documentation to clarify the browser-only vs real-app test boundaries.
Changes:
- Introduces an isolated Tauri integration-test build flavor (
tauri.e2e.conf.json, new Cargo feature, optional WebdriverIO plugins). - Adds a frontend integration-test bootstrap gate (
VITE_TAURI_INTEGRATION_TEST) and suppresses the automatic silent update check in that mode. - Adds a WebdriverIO-based macOS integration suite (boot/filesystem/scope/recents/watcher), CI workflow, and testing docs.
Reviewed changes
Copilot reviewed 26 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Excludes WebdriverIO spec directory from Vitest discovery. |
| src/vite-env.d.ts | Adds typing for VITE_TAURI_INTEGRATION_TEST. |
| src/main.tsx | Bootstraps the app after conditionally loading the WebdriverIO Tauri guest. |
| src/lib/tauriIntegrationMode.ts | Centralizes integration-test mode flag + guest loader helpers. |
| src/lib/tests/tauriIntegrationMode.test.ts | Unit tests for guest loading and update-check scheduling gates. |
| src/lib/tests/tauriE2eConfig.test.ts | Contract test asserting isolation and test-only permissions vs production. |
| src/features/updates/useUpdates.ts | Skips scheduling the silent update timer in integration-test builds. |
| src-tauri/tauri.e2e.conf.json | Adds isolated Tauri config override for the integration-test app. |
| src-tauri/src/lib.rs | Feature-gates WebdriverIO plugins behind tauri-integration-tests. |
| src-tauri/Cargo.toml | Adds tauri-integration-tests feature + optional plugin deps. |
| src-tauri/Cargo.lock | Locks additional optional dependencies for the integration-test feature. |
| pnpm-workspace.yaml | Adds pnpm build allowlist configuration (workspace manifest). |
| package.json | Adds test:tauri build/run scripts and WebdriverIO dev dependencies. |
| e2e-tauri/wdio.d.ts | Declares WebdriverIO/Tauri globals used by integration specs. |
| e2e-tauri/wdio.conf.ts | WebdriverIO config: serial run, embedded driver, logs, failure screenshots, state reset. |
| e2e-tauri/specs/boot.spec.ts | Verifies the real .app boots and the Tauri test API is available. |
| e2e-tauri/specs/filesystem.spec.ts | Exercises real IPC: tree listing, read/write, vault scope enforcement, recents. |
| e2e-tauri/specs/watcher.spec.ts | Verifies external host writes surface via real watcher + vault-changed events. |
| e2e-tauri/helpers/tempVault.ts | Creates and safely cleans up per-test temporary vaults. |
| e2e-tauri/helpers/paths.ts | Resolves app binary path and safely resets isolated Application Support state. |
| e2e-tauri/helpers/ipc.ts | Helper for invoking real Tauri IPC commands via the embedded driver. |
| e2e-tauri/helpers/artifacts.ts | Captures failure screenshots with sanitized filenames. |
| e2e-tauri/helpers/tests/paths.test.ts | Unit tests for safe Application Support cleanup guardrails. |
| e2e-tauri/helpers/tests/artifacts.test.ts | Unit tests for failure screenshot capture behavior. |
| docs/TESTING.md | Documents the three suites and boundaries + troubleshooting guidance. |
| docs/superpowers/specs/2026-08-10-tauri-integration-tests-design.md | Adds a design spec for the integration-test architecture and acceptance criteria. |
| docs/superpowers/plans/2026-08-10-tauri-integration-tests.md | Adds a detailed implementation plan for the integration suite and CI. |
| AGENTS.md | Documents the new pnpm test:tauri* commands and test-scope boundaries. |
| .gitignore | Ignores test artifacts (adds a redundant subpath entry). |
| .github/workflows/tauri-integration.yml | Adds macOS PR workflow to build and run the real Tauri integration suite. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ) | ||
| } | ||
|
|
||
| void bootstrap() |
Comment on lines
+6
to
+10
| export async function loadTauriIntegrationGuest( | ||
| enabled: boolean, | ||
| loader: GuestLoader = () => import("@wdio/tauri-plugin"), | ||
| ): Promise<void> { | ||
| if (enabled) await loader() |
Comment on lines
+1
to
+4
| allowBuilds: | ||
| edgedriver: false | ||
| esbuild: true | ||
| geckodriver: false |
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.
Summary
Verification
Isolation