fix(test): keep the typewriter contract on its own component
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:
@@ -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"/);
|
||||
|
||||
Reference in New Issue
Block a user