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
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:
parent
52e005ef92
commit
08e6f045ae
1 changed files with 3 additions and 3 deletions
|
|
@ -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)", () => {
|
it("once the total is known, a decorative dot separates the counter from the next step (#446)", () => {
|
||||||
const props = bannerProps();
|
const props = bannerProps();
|
||||||
const [dot] = dots(props);
|
const found = dots(props);
|
||||||
expect(dots(props)).toHaveLength(1);
|
expect(found).toHaveLength(1);
|
||||||
expect(dot.props["aria-hidden"]).toBe("true");
|
expect(found[0].props["aria-hidden"]).toBe("true");
|
||||||
const html = markup(props);
|
const html = markup(props);
|
||||||
const counter = html.indexOf("t(onboarding.banner.progress");
|
const counter = html.indexOf("t(onboarding.banner.progress");
|
||||||
const dotAt = html.search(/<span aria-hidden="true" class="h-1 w-1 /);
|
const dotAt = html.search(/<span aria-hidden="true" class="h-1 w-1 /);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue