feat(create-wdio): migrate to @wdio/electron-service and add Tauri service#15235
Conversation
…rvice wizard support - Collapse two separate desktop runner entries (Electron, macOS) into a single "Desktop Testing" runner with a follow-up "What type of desktop application are you testing?" sub-question (Electron / Tauri / Native macOS) - Hard cutover from community wdio-electron-service to first-party @wdio/electron-service; remove wdio-electron-service from COMMUNITY_PACKAGES_WITH_TS_SUPPORT (scoped @wdio/* pkgs need no shim) - Add @wdio/tauri-service and @wdio/tauri-plugin entries to SUPPORTED_PACKAGES - Add DesktopFrameworkChoice and TauriDriverProviderChoice enums - Add getResolvedPurpose() to map raw 'desktop' purpose → electron/tauri/macos; thread resolved purpose through parseAnswers() so templates see the right value - Add Tauri wizard questions: driver provider, optional frontend plugin, binary path - Add buildTauriBanner() that prints Cargo.toml / Rust registration instructions based on the chosen driver provider - Update EJS templates for tauri reference types, services config snippet - Update tests and snapshot for all of the above Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… repo, add Tauri docs generator - electronDocs.ts: point GITHUB_REPO at webdriverio/desktop-mobile; rewrite allDocs map to match the new package layout (api-reference, window-management, deeplink-testing, debugging, common-issues added; standalone mocking page dropped as content is now folded into electron-apis.md); replace hard-coded link-pair rewriter with a generic ./<id>.md → /docs/desktop-testing/electron/<id> transformer - tauriDocs.ts (new): mirrors electronDocs.ts; downloads 11 Tauri service doc pages from packages/tauri-service/docs/ and writes to website/docs/desktop-testing/tauri/ - generateDocs.ts: call generateTauriDocs() alongside the existing electron call - services.json: replace legacy wdio-electron-service entry with scoped @wdio/electron-service pointing at webdriverio/desktop-mobile; add @wdio/tauri-service entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Tauri.md (new): landing page covering intro, getting-started wizard flow, manual setup with Cargo.toml/lib.rs snippets for embedded driver mode, and links to auto-generated child pages - Electron.md: update wizard wording and package name to match new @wdio/electron-service - _sidebars.json: add Tauri category with 11 sub-pages; update Electron items to match the new desktop-mobile doc layout (api-reference, window-management, deeplink-testing, debugging, common-issues added; mocking removed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-service - .gitignore: ignore generated website/docs/desktop-testing/tauri/ alongside electron/ - wdio-xvfb README: correct service package name in integration list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
@wdio/xvfb
webdriver
webdriverio
commit: |
Greptile SummaryThis PR migrates the
Confidence Score: 5/5Safe to merge — all three previously flagged issues are resolved, the new wizard flow is correctly sequenced, and generated config output is properly escaped. The changes are additive (new Tauri path) or straight replacements (electron package rename). The resolver, questionnaire ordering, and template logic are all consistent with each other. The only remaining note is a defensive comment around the EJS providerMap, which has a safe fallback built in. No files require special attention.
|
| Filename | Overview |
|---|---|
| packages/create-wdio/src/constants.ts | Adds DesktopFrameworkChoice / TauriDriverProviderChoice enums, getResolvedPurpose() resolver, buildTauriBanner(), Tauri wizard questions, and updated service-selection logic; the new 'desktop' purpose is correctly unwrapped before being threaded through all questionnaire when-guards |
| packages/create-wdio/src/templates/snippets/services.ejs | Adds Tauri service config snippet; uses a local string-keyed providerMap that duplicates the TauriDriverProviderChoice enum values — a future enum rename would silently fall back to 'official', though the fallback itself is safe; JSON.stringify is correctly applied to appBinaryPath |
| packages/create-wdio/src/cli/utils.ts | Refactors success-message construction into an extraInfoParts array and wires in buildTauriBanner / getResolvedPurpose; purpose check and banner args are correct |
| scripts/docs-generation/docsUtils.ts | New shared helper that extracts the duplicated buildLinkRewriter implementation; resolves the duplication flagged in the prior review |
| scripts/docs-generation/electronDocs.ts | Rewrites doc-fetch logic for the new desktop-mobile monorepo structure: simpler single-file fetch per page, reuses buildLinkRewriter, updates GITHUB_REPO, SHA, and allDocs map to match the new electron-service docs layout |
| scripts/docs-generation/tauriDocs.ts | New doc-generation module for @wdio/tauri-service; mirrors electronDocs.ts structure, shares buildLinkRewriter, targets packages/tauri-service/docs in the same monorepo SHA |
| packages/create-wdio/src/types.ts | Adds four Tauri fields to Questionnair (desktopFramework, tauriDriverProvider, tauriUseFrontendPlugin, tauriAppBinaryPath); rawAnswers: Questionnair in ParsedAnswers automatically picks them up |
| website/_sidebars.json | Adds complete Tauri sidebar tree and expands Electron entries (api-reference, window-management, deeplink-testing, debugging, common-issues) to match the new allDocs map; removes the now-gone mocking entry |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects runner] --> B{purpose === 'desktop'?}
B -- Yes --> C[desktopFramework question]
B -- No --> D[Other wizard branches]
C --> E{DesktopFrameworkChoice}
E -- Electron --> F[electronBuildTool / electronAppBinaryPath questions]
E -- Tauri --> G[tauriDriverProvider question]
E -- MacOS --> H[No extra questions]
G --> I[tauriUseFrontendPlugin question]
I --> J[tauriAppBinaryPath question]
F --> K[getResolvedPurpose → 'electron']
G --> K2[getResolvedPurpose → 'tauri']
H --> K3[getResolvedPurpose → 'macos']
K --> L[services.ejs: electron block]
K2 --> M[services.ejs: tauri block with driverProvider + appBinaryPath]
K3 --> N[services.ejs: appium block]
K2 --> O[buildTauriBanner printed to stdout]
Reviews (2): Last reviewed commit: "fix(create-wdio): remove TypeScript synt..." | Re-trigger Greptile
… binary path - services.ejs: map TauriDriverProviderChoice enum to 'official'|'crabnebula'| 'embedded' config string and emit it as driverProvider in the generated wdio.conf — previously the user's provider selection was used only for the post-install banner but never written into the config, so the service would silently default to 'official' regardless of choice - services.ejs: use JSON.stringify() for tauriAppBinaryPath so Windows paths with backslashes are properly double-quoted and escaped in the generated file (raw single-quoted interpolation produces broken \t, \u etc. escape sequences) - docs-generation: extract shared buildLinkRewriter() into docsUtils.ts; both electronDocs.ts and tauriDocs.ts now call the shared helper with their local allDocs and PUBLISHED_URL_PREFIX instead of duplicating the implementation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…late EJS templates are evaluated as plain JavaScript; the Record<string, string> type annotation and 'as string' cast both fail ejslint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
christian-bromann
left a comment
There was a problem hiding this comment.
LGTM 👍
Amazing work ❤️
Proposed changes
We recently released
@wdio/electron-service(replacing the previous community servicewdio-electron-service) and@wdio/tauri-service(new) so we need to update WDIO documentation and the project creation wizard accordingly.https://github.com/webdriverio/desktop-mobile
https://github.com/webdriverio-community/wdio-electron-service
single "Desktop Testing" runner with a follow-up "What type of desktop
application are you testing?" sub-question (Electron / Tauri / Native macOS)
wdio-electron-serviceto first-party@wdio/electron-service; removewdio-electron-servicefromCOMMUNITY_PACKAGES_WITH_TS_SUPPORT (scoped @wdio/* pkgs need no shim)
@wdio/tauri-serviceand@wdio/tauri-pluginentries to SUPPORTED_PACKAGESthread resolved purpose through parseAnswers() so templates see the right value
based on the chosen driver provider
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Types of changes
Checklist
Backport Request
v9and doesn't need to be back-ported#XXXXXFurther comments
Reviewers: @webdriverio/project-committers