test: read the banner's dots once in the presence test (#446)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m2s

Self-review tidy-up: the presence test looked the dots up twice; it now
keeps the one list it asserts on. No assertion changed.

Resolves #446

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-10-18 21:07:44 -04:00
parent 52e005ef92
commit 08e6f045ae

View file

@ -145,9 +145,9 @@ describe("OnboardingBanner — banner mode (#397)", () => {
it("once the total is known, a decorative dot separates the counter from the next step (#446)", () => {
const props = bannerProps();
const [dot] = dots(props);
expect(dots(props)).toHaveLength(1);
expect(dot.props["aria-hidden"]).toBe("true");
const found = dots(props);
expect(found).toHaveLength(1);
expect(found[0].props["aria-hidden"]).toBe("true");
const html = markup(props);
const counter = html.indexOf("t(onboarding.banner.progress");
const dotAt = html.search(/<span aria-hidden="true" class="h-1 w-1 /);