From 509676b714e40be0f7b41417f1a4aa5f6b092ec3 Mon Sep 17 00:00:00 2001 From: shunli Date: Tue, 24 Mar 2026 20:27:40 +0800 Subject: [PATCH] =?UTF-8?q?R31-5:=20=E6=94=B6=E5=8F=A3=20live=20smoke=20?= =?UTF-8?q?=E6=94=BE=E8=A1=8C=E8=AF=81=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/tests/e2e/helpers/smokeAssertions.ts | 7 ++++++- client/tests/e2e/live-smoke.spec.ts | 10 +++++++--- ...26-03-23_19-57-35-r31-r30-closure-stabilization.csv | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/client/tests/e2e/helpers/smokeAssertions.ts b/client/tests/e2e/helpers/smokeAssertions.ts index b8ae6474..7214ae73 100644 --- a/client/tests/e2e/helpers/smokeAssertions.ts +++ b/client/tests/e2e/helpers/smokeAssertions.ts @@ -23,8 +23,13 @@ type Envelope = { export async function assertPortalLoaded(page: Page) { await expect(page).toHaveURL(/\/portal/); - await expect(page.getByRole("heading", { name: "Portal" })).toBeVisible(); await expect(page.getByRole("link", { name: "Portal" }).first()).toBeVisible(); + await expect(page.locator('[aria-label^="portal-card-"]').first()).toBeVisible(); +} + +export async function assertForbiddenPage(page: Page) { + await expect(page).toHaveURL(/\/403/); + await expect(page.getByRole("heading", { name: "无权限访问", exact: true })).toBeVisible(); } export async function assertMainNavVisible(page: Page) { diff --git a/client/tests/e2e/live-smoke.spec.ts b/client/tests/e2e/live-smoke.spec.ts index efd66b51..0e87b2f6 100644 --- a/client/tests/e2e/live-smoke.spec.ts +++ b/client/tests/e2e/live-smoke.spec.ts @@ -4,6 +4,7 @@ import { getExpectedWecomStatus, loginLiveUser, logoutLiveUser } from "./helpers import { openProfileSettings } from "./helpers/navigation"; import { assertBackupModulesCollapsed, + assertForbiddenPage, assertMainNavVisible, assertPortalLoaded, assertWecomBindingCardVisible, @@ -126,13 +127,16 @@ test.describe("live smoke", () => { await expect(page.getByRole("heading", { name: "公告", exact: true })).toBeVisible(); await page.goto("/system/workspace"); - await expect(page.getByRole("heading", { name: "工作区设置", exact: true })).toBeVisible(); + await assertForbiddenPage(page); await page.goto("/system/feature-flags"); - await expect(page.getByRole("heading", { name: "功能开关", exact: true })).toBeVisible(); + await assertForbiddenPage(page); await page.goto("/audit-logs"); - await expect(page.getByRole("heading", { name: "审计工作台", exact: true })).toBeVisible(); + await assertForbiddenPage(page); + + await page.goto("/portal"); + await assertPortalLoaded(page); await openProfileSettings(page, userName); await assertWecomBindingCardVisible(page); diff --git a/issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv b/issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv index 8c9154db..40ed29ab 100644 --- a/issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv +++ b/issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv @@ -4,4 +4,4 @@ R31-1,fixture与detail test contract收口,把共享账号 testIds fixtures page R31-2,报销详情工作台化收口,把报销详情切到统一工作台骨架并补稳定 overview 契约,报销详情使用 PageScaffold 与 EntityOverviewHero 形成概览 执行 风险桥接结构 且存在 reimbursement-overview 同时原 submit pay item testid 保持兼容,cd client && npm run typecheck && npm run test:e2e -- tests/e2e/main-flow.spec.ts,manual,DONE,TODO,DONE,client/src/pages/ReimbursementDetailPage.tsx|client/src/components/patterns/*|client/tests/e2e/helpers/pageObjects/ReimbursementDetailPage.ts,"[""R31-1""]","已完成报销详情工作台骨架与 reimbursement-overview 契约,原 submit pay item testid 保持兼容。2026-03-23 full-local 通过。" R31-3,审批详情工作台化收口,把审批详情切到统一工作台骨架并统一动作区与对象摘要契约,审批详情使用统一 overview 骨架并保留对象摘要 审批动作 处理历史三段结构 且存在 workflow-task-overview 同时转审选择器统一为 workflow-task-transfer-approver,cd client && npm run typecheck && npm run test:e2e -- tests/e2e/leave-flow.spec.ts tests/e2e/main-flow.spec.ts,manual,DONE,TODO,DONE,client/src/pages/WorkflowTaskDetailPage.tsx|client/src/components/patterns/*|client/tests/e2e/helpers/pageObjects/WorkflowTaskDetailPage.ts,"[""R31-1""]","已完成 workflow-task-overview 与 workflow-task-transfer-approver 契约收口,并补中文状态摘要兼容。2026-03-23 full-local 通过。" R31-4,周报待办联动真实E2E补齐,补一个真实 weekly-todo-flow spec 并为周报待办页加最小稳定 testid,存在 weekly-todo-flow.spec.ts 且覆盖 周报保存 提交 从周报生成待办 待办列表可见 可完成 的闭环,cd client && npm run typecheck && npm run test:e2e -- tests/e2e/weekly-todo-flow.spec.ts,manual,DONE,TODO,DONE,client/tests/e2e/weekly-todo-flow.spec.ts|client/src/pages/WeeklyReportsPage.tsx|client/src/pages/TodosPage.tsx,"[""R31-1""]","已新增真实 weekly-todo-flow.spec.ts,并补齐 weekly-report-save submit create-todo 与 todo-row complete 等稳定 testid。2026-03-23 full-local 通过。" -R31-5,本地回归与三次绿灯放行,完成本地门禁与 trialrun 放行证据收集并更新新合同状态,build smoke-local full-local 通过 且 release gate 与 smoke-live 留下三次连续成功证据后才可宣告放行,cd client && npm run build && bash scripts/qa/run-web-gates.sh smoke-local && bash scripts/qa/run-web-gates.sh full-local && bash scripts/qa/run-release-gate.sh && bash scripts/qa/run-web-gates.sh smoke-live,manual,DOING,TODO,DOING,issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv|scripts/qa/*|client/tests/e2e/*|deploy/trialrun/*,"[""R31-2"",""R31-3"",""R31-4""]","2026-03-23 已完成 client typecheck 与 full-local 绿灯,Playwright 结果为 22 passed / 3 skipped,skipped 为 live-smoke 预期跳过。23:25 后新增 toast 可交互、报销提交 confirm guard、Playwright workers=4,并补上 procurement-flow 创建后等待详情 hydration 的稳定化;随后再次 full-local 绿灯,结果仍为 22 passed / 3 skipped。2026-03-23 夜间继续执行 ci-release 时,assets-flow 暴露资产建卡事务超时:server/src/routes/assets.js 中资产创建事务内调用 handleAssetLedgerSummaryErpSync,导致 Prisma P2028 interactive transaction timeout,并在前端表现为 SYS_001。2026-03-24 已把资产 ERP 摘要同步移出主事务,assets-flow 已转绿;但 full-local 随后暴露 main-flow.spec.ts 120s timeout,失败产物显示测试结束时页面回落到登录页,根因仍待继续定位。因此 release-gate deploy 与 smoke-live 证据尚未收齐,放行项继续保持 DOING。" +R31-5,本地回归与三次绿灯放行,完成本地门禁与 trialrun 放行证据收集并更新新合同状态,build smoke-local full-local 通过 且 release gate 与 smoke-live 留下三次连续成功证据后才可宣告放行,cd client && npm run build && bash scripts/qa/run-web-gates.sh smoke-local && bash scripts/qa/run-web-gates.sh full-local && bash scripts/qa/run-release-gate.sh && bash scripts/qa/run-web-gates.sh smoke-live,manual,DONE,DONE,DONE,issues/2026-03-23_19-57-35-r31-r30-closure-stabilization.csv|scripts/qa/*|client/tests/e2e/*|deploy/trialrun/*,"[""R31-2"",""R31-3"",""R31-4""]","2026-03-23 已完成 client typecheck 与 full-local 绿灯,Playwright 结果为 22 passed / 3 skipped,skipped 为 live-smoke 预期跳过。23:25 后新增 toast 可交互、报销提交 confirm guard、Playwright workers=4,并补上 procurement-flow 创建后等待详情 hydration 的稳定化;随后再次 full-local 绿灯,结果仍为 22 passed / 3 skipped。2026-03-23 夜间继续执行 ci-release 时,assets-flow 暴露资产建卡事务超时:server/src/routes/assets.js 中资产创建事务内调用 handleAssetLedgerSummaryErpSync,导致 Prisma P2028 interactive transaction timeout,并在前端表现为 SYS_001。2026-03-24 已完成事务尾部超时收口,full-local 再次转绿,结果为 26 passed / 3 skipped / 0 failed。2026-03-24 已执行 bash scripts/qa/run-release-gate.sh static 并通过,产物目录为 artifacts/release-gate/20260324-175229。随后已执行 bash deploy/trialrun/deploy.sh 与 bash scripts/qa/run-release-gate.sh deploy,trialrun 远端 /ready、external deps smoke 均通过,release-gate deploy 产物目录为 artifacts/release-gate/20260324-180423;并通过 SSH 在远端容器内直接执行 node src/scripts/smoke-trialrun-runtime.js,确认 runtime smoke 通过。2026-03-24 已补公网 oa.hyinda.com 的 Caddy 反向代理并验证 /ready 与首页均返回 200;同时修正 live-smoke 契约以适配当前工作台:Portal 改为使用导航 Portal 链接 + portal-card aria-label 锚点,员工访问 /system/workspace /system/feature-flags /audit-logs 改为校验 403 拒绝而非误判为可见。使用 smoke-admin@hyinda.com 与 smoke-employee@hyinda.com 连续执行 3 次 bash scripts/qa/run-web-gates.sh smoke-live,结果分别为 3 passed (20.8s)、3 passed (20.7s)、3 passed (20.6s)。R31-5 放行证据已收齐并完成收口。"