test: count the synastry failure title as a report shell (BUG-1897)
Independent Staging Quality Gate / validate-python (push) Successful in 10m37s
Independent Staging Quality Gate / validate-frontend (push) Successful in 14m20s
Independent Staging Quality Gate / publish (push) Successful in 13m22s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
This commit is contained in:
Claude
2026-11-15 21:29:16 +08:00
parent 12684c8b8f
commit 3b510608ef
+4 -1
View File
@@ -199,7 +199,10 @@ test("the reader renders inside the app shell, in every phase", () => {
// 原值:只认 `title="个人报告"` 的两种写法。
// 新值:也认生成中顶栏同一行的 `back=`,以及阅读顶栏带名字的标题表达式。
// 原因:BUG-1665(2026-11-06)生成中页面加返回链接,阅读顶栏标题带名字;外壳数量与阶段数仍须相等。
const shells = pageSource.match(/<SecondaryHeader title="个人报告" (?:\/>|back=)|<SecondaryHeader\n\s+title=(?:"个人报告"|\{state\.subjectDisplayName \? `个人报告)/g) ?? [];
// 原值:不认按报告类型取标题的写法。
// 新值:也认失败页 `title={state.reportType === "synastry_full" ? "婚恋合盘" : "个人报告"}`。
// 原因:BUG-1897(2026-11-15)合盘生成失败页顶栏不再写「个人报告」;外壳数量与阶段数仍须相等。
const shells = pageSource.match(/<SecondaryHeader title="个人报告" (?:\/>|back=)|<SecondaryHeader\n\s+title=(?:"个人报告"|\{state\.subjectDisplayName \? `个人报告)|<SecondaryHeader title=\{state\.reportType === "synastry_full" \? "婚恋合盘" : "个人报告"\} \/>/g) ?? [];
const phases = pageSource.match(/className="personal-report-(?:state|reader)"/g) ?? [];
assert.equal(shells.length, phases.length, "every rendered phase is wrapped exactly once");
assert.ok(phases.length >= 8, `all report phases render, got ${phases.length}`);