From efdf1e0282eaece154d5504e93db69243799c0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Thu, 1 Oct 2026 02:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20playwright=20e2e=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=9F=BA=E5=BB=BA=E4=B8=8E=20tauri=20?= =?UTF-8?q?=E5=9E=AB=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit invoke 条件垫片使前端可在无 tauri 容器下直连 dev server 做端到端验证 --- index.html | 1 + package-lock.json | 30 ++++ package.json | 2 + playwright.config.ts | 21 +++ src/mocks/tauri-shim.ts | 350 ++++++++++++++++++++++++++++++++++++++++ tests/e2e/smoke.spec.ts | 48 ++++++ 6 files changed, 452 insertions(+) create mode 100644 playwright.config.ts create mode 100644 src/mocks/tauri-shim.ts create mode 100644 tests/e2e/smoke.spec.ts diff --git a/index.html b/index.html index bde5baa..84ea6c1 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,7 @@ else if (t === 'system' && !window.matchMedia('(prefers-color-scheme: dark)').matches) document.documentElement.setAttribute('data-theme', 'light'); +