dashorst opened a new issue, #1955: URL: https://github.com/apache/wicket/issues/1955
`WicketTester#executeBehavior(AbstractAjaxBehavior)` needs the behavior instance. A behavior added inside the tested component is usually not reachable from the test, so the test has to dig it out first: ```java MyPanel panel = tester.startComponentInPage(new MyPanel()); panel.getBehaviors(AbstractDefaultAjaxBehavior.class).forEach(tester::executeBehavior); ``` A variant that finds the behavior by type would make this one call. ## Where `wicket-tester/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java`, next to `executeBehavior(AbstractAjaxBehavior)`. `WicketTester` is shipped to applications, so this is public API: it needs Javadoc and an `@since` with the next release. ## Done when - A method that takes a component and a behavior class is probably more useful than one that searches the whole page; decide which and explain it in the pull request. It fails with a clear message when there is no match or more than one. - Tests in `wicket-core-tests/src/test/java/org/apache/wicket/util/tester/BaseWicketTesterTest.java`. ## Background Originally requested as [WICKET-6487](https://issues.apache.org/jira/browse/WICKET-6487). --- Part of #1945. This issue is meant for a first contribution to Wicket. To work on it, leave a comment so others know; a claim without a pull request lapses after two weeks. Questions are welcome, here on the issue or on [email protected]. Start your branch from `master`, and see [Send a pull request to Wicket](https://wicket.apache.org/contribute/wicket-pull-request.html) for building and testing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
