Skip to content

fix(e2e): assert the hero CTA by its real role (unbreaks CI on main) - #169

Merged
marinom2 merged 1 commit into
mainfrom
fix/e2e-cta-role
Jul 29, 2026
Merged

fix(e2e): assert the hero CTA by its real role (unbreaks CI on main)#169
marinom2 merged 1 commit into
mainfrom
fix/e2e-cta-role

Conversation

@marinom2

Copy link
Copy Markdown
Owner

CI has been red on every merge to main since ~21 July because of this one assertion.

The test looked for a button named "Get the app", but the CTA is <Button asChild><Link/></Button>asChild renders a Radix Slot, so the DOM node is an <a> with role link. That button never existed.

The line directly above already asserts the Builder hub CTA — same construction — correctly as a link. Only this one was wrong.

13 passed locally, was 12 passed, 1 failed. No source changes, test-only.

`landing renders the dual-track hero and CTAs` has failed on main since at
least 21 July, so CI has been red on every merge and the signal was worthless.

The assertion looked for `getByRole("button", { name: /Get the app/i })`, but
the CTA is `<Button asChild><Link href="/onboard">…</Link></Button>`. `asChild`
swaps the `<button>` for a Radix `Slot`, which renders the child - so the DOM
node is an `<a>` and its accessible role is "link". No `button` with that name
has ever existed on the page.

The sibling assertion one line above already gets this right for the Builder
hub CTA, which is the same construction; only this line was wrong. Asserting
the shipped role rather than the wrapping component's name is also what makes
the test meaningful: role is what assistive tech sees.

13 passed locally (was 12 passed, 1 failed).
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightnode Ready Ready Preview, Comment Jul 29, 2026 7:54am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant