Files
zhangxiang 2474477495 docs(qa): §12.9 GA4 首次真断言 + §12.10 基线重采 113 张与 --radius-cta 负对照,取证车道与 PR 描述入库
- GA4:16 passed / 0 skipped,另有独立正对照(G-LGTLCR15KM 烘进两处客户端 chunk),
  §11.6 的「未取证」就此闭合;口径必须连「装配产物 + E2E_TARGET=production」一起引。
- AUTH-VISUAL:重采 113 张(23/23/23/21/23),终版只读复跑 125 passed / 0 failed,
  负对照 --radius-cta=12px ⇒ 15 failed / EXIT=1、还原 ⇒ 25 passed 且工作树干净。
- 两条不抹平的挂账:①113 与 §11.6 预测的 104 差 9 张,逐名对账未做(已进 PR 未验证项);
  ②逐张读图追认只做了抽样。
- 另记仪器口径教训:用字节数筛可疑空白图会把 button-*(82×44)误报,
  空白/塌版的判据应是尺寸与像素分布。
- docs/acceptance/2026-10-17-final/ 存三条可复跑车道脚本与 PR 描述(31 个子项,
  check-pr-checklist EXIT=0)。
2026-10-17 08:26:57 +08:00

40 lines
1.8 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# §12 终版取证车道:等视觉负对照车道结束,再用**含 DEC-N1 的终版代码**重建产物并重跑
# axe / Lighthouse / test:all —— 之前那两轮的装配是 00:04 之前的,不含页面改动,
# 不能当终版读数(口径与时点必须对齐,见 docs/lessons-learned.md §5.45–5.46)。
set -u
cd "$(git rev-parse --show-toplevel)" || exit 1
SUM=/tmp/12-final.txt
: > "$SUM"
say() { echo "$1" >> "$SUM"; }
# 1) 守候前一条车道(负对照)写完 DONE
for i in $(seq 1 80); do
if [ -f /tmp/12-vis-final.txt ] && grep -q DONE /tmp/12-vis-final.txt 2>/dev/null; then break; fi
sleep 15
done
say "VIS_LANE_WAIT_ITERS=$i"
cat /tmp/12-vis-final.txt >> "$SUM" 2>/dev/null
# 2) 重建(postbuild 会装配 dist/static + public)
npm run build > /tmp/f2-build.log 2>&1; say "BUILD=$?"
step() { "$@" > "/tmp/f2-$1.log" 2>&1; say "$1=$?"; }
# 3) axe 按 CI 约定用 :3100
(PORT=3100 node dist/standalone/server.js > /tmp/f2-srv.log 2>&1 & echo $! > /tmp/f2-srv.pid)
sleep 10
BASE=http://localhost:3100 npm run check:axe:routes > /tmp/f2-axe-routes.log 2>&1; say "AXE_ROUTES=$?"
BASE=http://localhost:3100 npm run check:axe > /tmp/f2-axe.log 2>&1; say "AXE=$?"
kill "$(cat /tmp/f2-srv.pid)" 2>/dev/null
sleep 3
# 4) GA4 16 例在终版产物上再取一次
(cd e2e && E2E_TARGET=production npx playwright test ga4-event-tracking.spec.ts --project=chromium --project=chromium-mobile --project=firefox --project=webkit > /tmp/f2-ga4.log 2>&1); say "GA4=$?"
grep -E '[0-9]+ (passed|skipped|failed)' /tmp/f2-ga4.log | tail -1 >> "$SUM"
# 5) Lighthouse + 伞形门禁
npm run lighthouse > /tmp/f2-lh.log 2>&1; say "LIGHTHOUSE=$?"
npm run test:all > /tmp/f2-testall.log 2>&1; say "TEST_ALL=$?"
grep -E 'Tests:|Test Suites:|passed|failed' /tmp/f2-testall.log | tail -3 >> "$SUM"
say DONE