Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

docs(testing): 记录上游 issue desktop-mobile#665

hairyf62b12b6173b2
diff --git a/docs/testing/desktop/04-locale-theme.md b/docs/testing/desktop/04-locale-theme.md
index 78c6dbc5..77fe90ec 100644
--- a/docs/testing/desktop/04-locale-theme.md
+++ b/docs/testing/desktop/04-locale-theme.md
@@ -175,5 +175,5 @@
1. `theme.rs` 的 `DEFAULT_THEME` 由 `Dark` 改为 `System`:首次进入(无 `settings.yaml`)与偏好非法时都应跟随系统,固定深色会让浅色系统上「首次进入即深色」;`use-theme-adaptive.ts` 的折算同步覆盖「偏好尚未取到」的窗口。守门用例 `TC-DSK-L3-04-005` + Rust 单测 `config::theme::tests`。
2. `debug.tsx` 语言下拉补 3 个 `data-testid`;`iframe.tsx` 补 `dsh-shell-iframe`;`setup-preinstall.tsx` 的跳过按钮补 `dsh-setup-preinstall-skip`。
3. `builder.rs` 的 WebView2 目录增加 E2E 专用覆盖(仅 `is_e2e_run()` 下生效),E2E 写入的 localStorage 不再污染开发会话的 `EBWebView-dev`。
- 4. **E2E 基础设施**:上游 `tauri-plugin-wdio-webdriver` 1.4.0 的帧上下文靠 JS 模拟(`frame.contentWindow.eval`),跨域时 `contentDocument` 为 `null`,任何帧内脚本必然超时。壳层 `tauri://localhost` 与内嵌 dsh `http://127.0.0.1:<port>` 正是跨域,因此 `006` 在补丁前无法运行。现以 `[patch.crates-io]` 指向 `src-tauri/vendor/tauri-plugin-wdio-webdriver`,在 Windows 路径改用 `ICoreWebView2Frame2::ExecuteScript`(引擎按帧路由,不受同源策略约束);`frame_context` 为空(所有非帧用例)时行为完全不变,深层嵌套帧仍回退上游 JS 路径。上游支持后删除 vendor 目录与 `Cargo.toml` 中的 `[patch.crates-io]` 即可(见 `PATCH.md`)。
+ 4. **E2E 基础设施**:上游 `tauri-plugin-wdio-webdriver` 1.4.0 的帧上下文靠 JS 模拟(`frame.contentWindow.eval`),跨域时 `contentDocument` 为 `null`,任何帧内脚本必然超时。壳层 `tauri://localhost` 与内嵌 dsh `http://127.0.0.1:<port>` 正是跨域,因此 `006` 在补丁前无法运行。现以 `[patch.crates-io]` 指向 `src-tauri/vendor/tauri-plugin-wdio-webdriver`,在 Windows 路径改用 `ICoreWebView2Frame2::ExecuteScript`(引擎按帧路由,不受同源策略约束);`frame_context` 为空(所有非帧用例)时行为完全不变,深层嵌套帧仍回退上游 JS 路径。上游支持后删除 vendor 目录与 `Cargo.toml` 中的 `[patch.crates-io]` 即可(见 `PATCH.md`;上游 issue:<https://github.com/webdriverio/desktop-mobile/issues/665>)。
- **假设**:执行机系统语言为中文或缺省语言已由 `localStorage` 决定;用例显式把语言归一到 `zh-CN` 再开始断言,不依赖执行机语言。
diff --git a/docs/testing/progressive.md b/docs/testing/progressive.md
index d4494018..e515a4aa 100644
--- a/docs/testing/progressive.md
+++ b/docs/testing/progressive.md
@@ -141,4 +141,4 @@
| 2026-09 | 批次 `04` 补 `TC-DSK-L3-04-006`(语言切换不重建 iframe):该用例要验真实 iframe,改走**真实装配车道**(不置 `disableDownload`)。为让该车道可跑:预装引导跳过编排(`test/e2e/support/preinstall.ts`)、`stop()` 收掉被强杀应用遗留的 dsh 子进程(`killOrphanHarness`)、真实车道下点击统一改为每轮重新定位(`clickWhenReady`)。全车道 26 条全绿 |
| 2026-09 | 修复**首次进入主题默认**:`theme.rs` 的 `DEFAULT_THEME` 由 `Dark` 改为 `System`(无 `settings.yaml` 与偏好非法时都跟随系统),`use-theme-adaptive.ts` 的折算同步覆盖「偏好尚未取到」窗口;新增 Rust 单测 `config::theme::tests`,`TC-DSK-L3-04-005` 增加「首次进入必须回退 system」断言 |
| 2026-09 | 纠正**导航栏装饰层**的理解:该层镜像 dsh 页面遮罩,dsh 弹官方模态(如首次进入的 apiKey 引导)时遮罩铺满,此时壳层**就该**不可点,因此**不**加 `pointer-events-none`(先前误加,已撤销)。随之 `TC-DSK-L3-04-006` 的 `afterEach` 语言归一改为「导航栏被遮罩时跳过」,不因此判失败(G-D04-7) |
-| 2026-09 | 打通**跨域 iframe**(`TC-DSK-L3-04-006` 的前置基础设施):上游 `tauri-plugin-wdio-webdriver` 1.4.0 用 JS 模拟帧上下文(`frame.contentWindow.eval`),壳层 `tauri://localhost` 与内嵌 dsh `http://127.0.0.1:<port>` 跨域时 `contentDocument` 为 `null`,任何帧内脚本必然超时。以 `[patch.crates-io]` 指向 `src-tauri/vendor/tauri-plugin-wdio-webdriver`,Windows 路径改用原生 `ICoreWebView2Frame2::ExecuteScript`(引擎按帧路由,不受同源策略约束);`frame_context` 为空时行为不变,深层嵌套帧仍回退上游路径。探针实测跨域帧内脚本从 167s 超时变为 173ms 正确返回。待上游支持后删除 vendor 与 `[patch.crates-io]`(`PATCH.md` 记载移除步骤) |
+| 2026-09 | 打通**跨域 iframe**(`TC-DSK-L3-04-006` 的前置基础设施):上游 `tauri-plugin-wdio-webdriver` 1.4.0 用 JS 模拟帧上下文(`frame.contentWindow.eval`),壳层 `tauri://localhost` 与内嵌 dsh `http://127.0.0.1:<port>` 跨域时 `contentDocument` 为 `null`,任何帧内脚本必然超时。以 `[patch.crates-io]` 指向 `src-tauri/vendor/tauri-plugin-wdio-webdriver`,Windows 路径改用原生 `ICoreWebView2Frame2::ExecuteScript`(引擎按帧路由,不受同源策略约束);`frame_context` 为空时行为不变,深层嵌套帧仍回退上游路径。探针实测跨域帧内脚本从 167s 超时变为 173ms 正确返回。待上游支持后删除 vendor 与 `[patch.crates-io]`(`PATCH.md` 记载移除步骤;已提上游 issue [desktop-mobile#665](https://github.com/webdriverio/desktop-mobile/issues/665)) |
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 4252729b..188b2055 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -118,7 +118,8 @@ tray-icon = { version = "0.25", default-features = false, features = [ "ksni" ]
# `http://127.0.0.1:<port>`,跨域下 `contentDocument` 为 null、proxy 无 `eval`,
# 一切帧内脚本必然超时。本地副本改为 WebView2 原生 `ICoreWebView2Frame2::ExecuteScript`
# (引擎按帧路由,不受同源策略约束)。改动仅限 Windows 路径,其余与上游 1.4.0 一致;
-# 上游支持后删除 vendor 与本节,详见 vendor 目录内 README。
+# 上游支持后删除 vendor 与本节,详见 vendor 目录内 PATCH.md
+# (上游 issue: https://github.com/webdriverio/desktop-mobile/issues/665)。
[patch.crates-io]
tauri-plugin-wdio-webdriver = { path = "vendor/tauri-plugin-wdio-webdriver" }
diff --git a/src-tauri/vendor/tauri-plugin-wdio-webdriver/PATCH.md b/src-tauri/vendor/tauri-plugin-wdio-webdriver/PATCH.md
index de227824..720a8bfa 100644
--- a/src-tauri/vendor/tauri-plugin-wdio-webdriver/PATCH.md
+++ b/src-tauri/vendor/tauri-plugin-wdio-webdriver/PATCH.md
@@ -48,4 +48,5 @@ Delete this directory and the `[patch.crates-io]` block plus its comment in
`src-tauri/Cargo.toml`. `Cargo.lock` regains the `source` + `checksum` lines for the
registry copy.
-Upstream issue: pending.
+Upstream issue: <https://github.com/webdriverio/desktop-mobile/issues/665>
+(offers the fix upstream; drop this directory once it ships).