Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Since BasewicketTester does not have methods to conveniently search for components by wicket ID only, ignoring the path from last last rendered page, we could add them.
For example we could add
Optional<Component> getFirstComponentByWicketId(String id) List<Component> getAllComponentsByWicketId(String id)
to enable the Tester to do the following without the manual use of IVisitor
tester.startComponentInPage(myComponent); var nestedComponent = tester.getFirstComponentByWicketId("myNestedComponent"); assertThat(nestedComponent).isPresent(). ... // Other Example tester.startComponentInPage(myComponentWithListView); var result = tester.getAllComponentsByWicketId("repeterNestedItem"); assertThat(result).hasSize(4) .extracting(c -> c.isVisible()) .containsExactly(true, false, true, true);
Attachments
Issue Links
- links to