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
@@ -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"/);