fix(e2e): assert the hero CTA by its real role (unbreaks CI on main) - #169
Merged
Conversation
`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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI has been red on every merge to main since ~21 July because of this one assertion.
The test looked for a
buttonnamed "Get the app", but the CTA is<Button asChild><Link/></Button>—asChildrenders a RadixSlot, so the DOM node is an<a>with rolelink. 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 passedlocally, was12 passed, 1 failed. No source changes, test-only.