From 45ce9985788b9c39ca0bb8c110f4ba5e542b200b Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Thu, 23 Apr 2026 09:56:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(08-04):=20=E4=BD=BF=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=A3=80=E6=9F=A5=E5=9C=A8=E5=90=84=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8C=BA=E7=8A=B6=E6=80=81=E4=B8=8B=E9=83=BD=E6=9B=B4?= =?UTF-8?q?=E5=81=A5=E5=A3=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 通过注入的探测节点断言 bg-background,而非依赖易碎的可见布局选择器 - 移除未使用的颜色解析辅助函数,保持悬停/可见性断言具有确定性 --- frontend/tests/e2e/theme-colors.spec.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/frontend/tests/e2e/theme-colors.spec.ts b/frontend/tests/e2e/theme-colors.spec.ts index e5bd0b62..20624c9a 100644 --- a/frontend/tests/e2e/theme-colors.spec.ts +++ b/frontend/tests/e2e/theme-colors.spec.ts @@ -14,19 +14,6 @@ function isTransparent(color: string) { return normalized === "transparent" || normalized.endsWith(",0)"); } -function parseRgb(color: string) { - const colorRegex = - /rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)/i; - const match = colorRegex.exec(color); - if (!match) return null; - return { - r: Number(match[1]), - g: Number(match[2]), - b: Number(match[3]), - a: match[4] == null ? 1 : Number(match[4]), - }; -} - test.describe("聊天工作台 / 主题颜色回归", () => { test("DF-THEME-001 thread 页面在 light/dark 根容器颜色不同且非透明", async ({ page,