Skip to content

Browser-mode test parity for Tauri & Dioxus #415

@goosewobbler

Description

@goosewobbler

Summary

Browser mode (#260) shipped for Tauri, Electron, and Dioxus, but test coverage is asymmetric. Electron has the full pyramid (unit → integration → E2E → package); Tauri and Dioxus only have unit tests + package fixtures. This issue brings Tauri and Dioxus up to the Electron template so all three are gated equally.

Current state

Tier Electron Tauri Dioxus
Unit
Integration test/integration/browser-mode.integration.spec.ts, launcher.browser.integration.spec.ts ❌ none ❌ none
E2E e2e/wdio.electron-browser.conf.ts + e2e/test/electron-browser/mock.spec.ts ❌ no config ❌ no config
Package ✅ (CJS+ESM, mocking exercised) ✅ but mocking only ⚠️ fixtures/package-tests/dioxus-app/test-browser/browser.spec.ts only checks page load + service presence — no mocking

Tasks

  • Tauri integration tests — mirror Electron's browser-mode.integration.spec.ts / launcher.browser.integration.spec.ts: launcher→worker handshake, capability transformation, no-driver assertion, navigation re-injection, mock lifecycle across navigation.
  • Dioxus integration tests — same template.
  • Tauri E2E — add e2e/wdio.tauri-browser.conf.ts + a browser-mode spec (real Chrome, IPC mock, ps-based process-absence check that no tauri-driver/msedgedriver started).
  • Dioxus E2E — add an equivalent browser-mode E2E config + spec.
  • Dioxus package fixture — extend fixtures/package-tests/dioxus-app/test-browser/browser.spec.ts to actually exercise browser.dioxus.mock() + mock.update(), matching the Tauri/Electron fixtures.
  • Dioxus docs — add a one-line note to packages/dioxus-service/docs/browser-mode.md that events are unsupported (no native event bus; see native-types/src/dioxus.ts), so the docs match Tauri/Electron's events sections by explicit omission.
  • Wire the new Tauri/Dioxus browser-mode E2E configs into CI (the existing electron-browser E2E + the three :browser package tests are wired separately as part of closing Browser-only test mode for Tauri and Electron services #260).

Notes

  • Reuse the Electron integration/E2E specs as the canonical template — the worker flow (navigate → inject → patch url() → single-context mock) is identical across frameworks.
  • Dioxus has no event bus, so there's intentionally no events tier to test (unlike Tauri/Electron).

Follow-up to #260.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:testsUpdates to testsscope:dioxusDioxus service, bridge, and driversscope:tauriTauri service and pluginstype:taskTask(s) to complete

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions