Skip to content

feat(create-wdio): migrate to @wdio/electron-service and add Tauri service#15235

Merged
christian-bromann merged 6 commits into
webdriverio:mainfrom
goosewobbler:feat/electron-rename-and-tauri-service
May 11, 2026
Merged

feat(create-wdio): migrate to @wdio/electron-service and add Tauri service#15235
christian-bromann merged 6 commits into
webdriverio:mainfrom
goosewobbler:feat/electron-rename-and-tauri-service

Conversation

@goosewobbler
Copy link
Copy Markdown
Contributor

@goosewobbler goosewobbler commented May 6, 2026

Proposed changes

We recently released @wdio/electron-service (replacing the previous community service wdio-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

  • 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

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

goosewobbler and others added 4 commits May 6, 2026 13:50
…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>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 6, 2026

Open in StackBlitz

create-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/create-wdio@15235

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@15235

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@15235

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@15235

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@15235

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@15235

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@15235

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@15235

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@15235

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@15235

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@15235

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@15235

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@15235

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@15235

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@15235

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@15235

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@15235

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@15235

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@15235

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@15235

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@15235

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@15235

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@15235

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@15235

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@15235

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@15235

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@15235

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@15235

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@15235

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@15235

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@15235

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@15235

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@15235

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@15235

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@15235

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@15235

@wdio/xvfb

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/xvfb@15235

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@15235

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@15235

commit: 7d29ac2

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Greptile Summary

This PR migrates the create-wdio wizard and associated docs from the community wdio-electron-service to the first-party @wdio/electron-service, and adds full wizard + documentation support for the new @wdio/tauri-service. All three issues from the prior review round (missing driverProvider in generated config, unescaped Windows path, and duplicated buildLinkRewriter) have been addressed in this iteration.

  • Wizard flow: two separate desktop runner entries are collapsed into one 'desktop' runner with a follow-up desktopFramework sub-question; getResolvedPurpose() correctly unwraps the raw answer before it is threaded through every when guard and the template layer.
  • Config generation: services.ejs now emits the full Tauri service config block including driverProvider (mapped from the enum) and appBinaryPath (correctly JSON.stringify-escaped for Windows paths).
  • Docs: electronDocs.ts is refactored for the new monorepo layout; tauriDocs.ts and docsUtils.ts are added following the same pattern with the shared buildLinkRewriter helper.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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]
Loading

Fix All in Claude Code Fix All in Cursor

Reviews (2): Last reviewed commit: "fix(create-wdio): remove TypeScript synt..." | Re-trigger Greptile

Comment thread packages/create-wdio/src/templates/snippets/services.ejs
Comment thread packages/create-wdio/src/templates/snippets/services.ejs
Comment thread scripts/docs-generation/tauriDocs.ts Outdated
goosewobbler and others added 2 commits May 6, 2026 14:13
… 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>
Copy link
Copy Markdown
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Amazing work ❤️

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label May 11, 2026
@christian-bromann christian-bromann merged commit a9d3f85 into webdriverio:main May 11, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 PRs that contain new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants