From 61e82b7e56c1b0431dde62729367d9eca2ed4182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Fri, 6 Mar 2026 11:51:46 +0800 Subject: [PATCH] docs: add remaining planning documents --- .../2026-03-05-smoke-test-failures-fix.md | 830 +++++++ ...5-test-suite-execution-and-optimization.md | 789 +++++++ .../2026-03-06-dev-environment-testing.md | 1996 +++++++++++++++++ 3 files changed, 3615 insertions(+) create mode 100644 docs/plans/2026-03-05-smoke-test-failures-fix.md create mode 100644 docs/plans/2026-03-05-test-suite-execution-and-optimization.md create mode 100644 docs/plans/2026-03-06-dev-environment-testing.md diff --git a/docs/plans/2026-03-05-smoke-test-failures-fix.md b/docs/plans/2026-03-05-smoke-test-failures-fix.md new file mode 100644 index 0000000..e366589 --- /dev/null +++ b/docs/plans/2026-03-05-smoke-test-failures-fix.md @@ -0,0 +1,830 @@ +# 冒烟测试失败修复实施计划 + +> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. + +**目标:** 修复 233 个冒烟测试失败,将测试通过率从 78.5% 提升至 95% 以上 + +**架构:** 采用分层修复策略,优先修复关键路径(导航、联系页面、表单),然后处理次要问题(滚动、可见性),最后优化测试稳定性 + +**技术栈:** Next.js 16.1.6, React 19.2.3, TypeScript 5, Playwright, Tailwind CSS 4 + +--- + +## 优先级分类 + +### P0 - 关键问题 (立即修复) +- 导航菜单不可见 +- 联系页面加载失败 +- 表单输入功能失败 +- 提交按钮不可见 + +### P1 - 高优先级 (尽快修复) +- 区块可见性问题 +- 滚动功能问题 +- 联系信息显示问题 + +### P2 - 中优先级 (稍后修复) +- 页脚可见性 +- 页面描述和徽章 +- 必填字段标记 + +### P3 - 低优先级 (可选优化) +- 字段占位符 +- 测试稳定性优化 + +--- + +## Task 1: 修复导航菜单选择器 + +**问题:** 导航元素选择器不正确,导致移动端和部分设备上导航测试失败 + +**文件:** +- 修改: `src/components/layout/header.tsx:242-248` +- 测试: `e2e/src/tests/smoke/home-page.smoke.spec.ts:25-29` + +**Step 1: 添加导航语义化属性** + +在 `src/components/layout/header.tsx` 第 242 行附近,为桌面导航添加 `role="navigation"`: + +```tsx +// 修改前 (第 242 行) +