vaadin / vaadin/browserless-test
Agent DX improvement: Container locators can't read their rendered text
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 51
Description
Problem. SpanLocator has getText(). DialogLocator has open(),
close(), getComponent() — and no way to read what the dialog says. For a
modal editor test ("the live line total shows €37.50", "the error summary lists
this message") the natural assertion is on the dialog's text, and it needs the
component:
// Wanted (either shape)
assertThat(findDialog().getTextRecursively()).contains("€37.50");
assertThat(findDialog().getText()).contains("€37.50");
// Actual
assertThat(findDialog().getComponent().getElement().getTextRecursively())
.contains("€37.50");
Locator.inside(Locator) does let you scope a typed child lookup
(findSpan().inside(findDialog())), which covers some cases well — but it can't
express "assert over everything this container renders", and inside() isn't
mentioned anywhere an author would look (see ticket 6).
Ask. Add getText() / getTextRecursively() to locators for
container-shaped components (Dialog, ConfirmDialog, Popover, Details,
Notification, plus the layout locators from ticket 3). Alternatively expose
getElement() on the base Locator so the escape hatch is at least uniform.
Copied from https://github.com/vaadin/agentic-dx-improvement/issues/107
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the base Locator API and the named container locators: Dialog, ConfirmDialog, Popover, Details, Notification, and the layout locators from ticket 3. Compare the existing SpanLocator text access and getComponent() escape hatch, then define a consistent container-text API or uniform element access; done means modal assertions can read rendered text without reaching through getComponent().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100