fix(test): keep the typewriter contract on its own component
Independent Staging Quality Gate / validate (push) Successful in 11m25s
Independent Staging Quality Gate / publish (push) Successful in 3m20s

The home-surface join pulled the onboarding shell's aria-busy into the typewriter slice. The typewriter file itself still announces the finished line once.
This commit is contained in:
jesse-ux
2026-09-25 03:48:19 +08:00
parent 3dd48c0dc3
commit c285646638
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -13756,7 +13756,7 @@
- 触发条件:首页拆分把引导屏 JSX 从 `page.tsx` 搬到 `home-onboarding-shell.tsx` 后推 staging。
- 根因:合同把 `<BirthTimeRectification` 锁在旧的首页文件清单里。拆分后组件还在,清单没跟上。
- 修复:扫描面加入 `home-onboarding-shell.tsx`,并要求 `page.tsx` 仍挂载 `<HomeOnboardingShell`。其余断言不放宽。
- 验证:Python 合同在 `81db05c6` 已过。run 2888 又露出 10 条前端源码合同:引导屏、恢复轮询、启动超时句、登录跳转搬出 `page.tsx` 后清单没跟上;西洋盘元素色没进 `@theme`。本提交把扫描面跟到新文件,并要求首页仍挂载这些模块;元素色补进 `@theme`。预览会话的墙钟只用于开发预览,标了既有豁免。
- 验证:Python 合同在 `81db05c6` 已过。run 2888 露出 10 条前端源码合同,已在 `3dd48c0d` 跟上。run 2889 只剩打字机合同:拼接面把引导屏的 `aria-busy` 切进了打字机片段。打字机合同改为只读 `onboarding-chat-message.tsx`。
- 防复发:引导屏再搬家时,合同必须同时锁住挂载点和组件文件,不能只扫 `page.tsx`。
- 相关记录:TASK-home-page-split-20260925
- 复发自:无
@@ -221,7 +221,10 @@ test("assertive announcement is reserved for genuine errors", () => {
});
test("the onboarding typewriter announces the finished line once instead of each character", () => {
const onboardingMessage = sourceBetween(pageSource, "function OnboardingChatMessage(", "function isProfileComplete(");
// 原值: 从拼接后的首页表面切到 isProfileComplete。
// 新值: 只读打字机组件文件。
// 原因: 引导屏插进拼接面后带上了评估遮罩的 aria-busy,打字机本身仍不得用 aria-busy。
const onboardingMessage = readFileSync(new URL("../src/components/onboarding-chat-message.tsx", import.meta.url), "utf8");
// Given: the visibly typed text is hidden from assistive technology.
assert.match(onboardingMessage, /className=\{`onboarding-stream[^`]*`\} aria-hidden="true"/);