Skip to content

feat: add Breadcrumbs TestBench element classes#9530

Merged
web-padawan merged 5 commits into
mainfrom
feat/breadcrumbs-task8
Jun 17, 2026
Merged

feat: add Breadcrumbs TestBench element classes#9530
web-padawan merged 5 commits into
mainfrom
feat/breadcrumbs-task8

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Task 8 of the Breadcrumbs SDD.

Added TestBench element classes.

Type of change

  • Feature

Note

The first commit is intentionally fully generated by Claude without any modifications on my part.

It contains questionable APIs like getOverflowOverlay(). I will fix any suggestions in follow up commits.

@web-padawan
web-padawan requested a review from sissbruecker June 16, 2026 13:15
@web-padawan
web-padawan force-pushed the feat/breadcrumbs-task8 branch from ca19d9c to 0c5a200 Compare June 16, 2026 13:44
@web-padawan
web-padawan force-pushed the feat/breadcrumbs-task8 branch 3 times, most recently from 1a80eb9 to 4a9472d Compare June 16, 2026 14:09
web-padawan and others added 2 commits June 17, 2026 11:24
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Use $("*").withAttribute("slot", "prefix") for the prefix lookup, and
drop the public getOverflowOverlay() — the overlay is an implementation
detail, so openOverflowOverlay() now waits on the collapsed items.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@web-padawan
web-padawan force-pushed the feat/breadcrumbs-task8 branch from 4a9472d to 14de4ae Compare June 17, 2026 08:24
- Drop the overflow API (hasOverflow, getOverflowButton,
  openOverflowOverlay, getOverflowItems); item retrieval works regardless
  of whether items overflow.
- Replace the click() override with navigate(), which throws when the
  item has no link, matching SideNavItemElement.
- Rename getPrefixSlotContent() to getPrefixComponent() and use single().
- Drop shadow/slot wording from javadocs.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@web-padawan
web-padawan requested a review from sissbruecker June 17, 2026 08:32
Align with ButtonElement: use getPropertyString("textContent") instead
of resolving the unnamed slot's assigned nodes with JavaScript.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
throw new NoSuchElementException("Item does not contain an anchor",
e);
}
// click() on elements in shadow DOM does not work with Chrome driver

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit: From my testing this also makes clicking items that are in the overflow overlay work, even though they are not be visible on the page when the overflow is not opened. Could extend the comment to include that bit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated the comment accordingly.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@web-padawan
web-padawan added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 89e3f9b Jun 17, 2026
14 of 15 checks passed
@web-padawan
web-padawan deleted the feat/breadcrumbs-task8 branch June 17, 2026 10:13
@sonarqubecloud

Copy link
Copy Markdown

sissbruecker pushed a commit that referenced this pull request Jun 17, 2026
…9540)

This PR cherry-picks changes from the original PR #9530 to branch 25.2.
---
#### Original PR description
> ## Description
> 
> Task 8 of the Breadcrumbs SDD.
> 
> Added TestBench element classes.
> 
> ## Type of change
> 
> - Feature
> 
> ## Note
> 
> The first commit is intentionally fully generated by Claude without
any modifications on my part.
> 
> It contains questionable APIs like `getOverflowOverlay()`. I will fix
any suggestions in follow up commits.

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants