Hi Martijn, Why did you make this change ? There is already "else if (linkComponent instanceof IAjaxLink && isAjax)" few lines above [1] that you added few weeks ago with WICKET-5900.
The problem is that there is a broken test now: http://ci.apache.org/builders/wicket-master/builds/23/steps/compile/logs/stdio 1. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java#L1906 Martin Grigorov Freelancer. Available for hire! Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Jul 8, 2015 at 2:03 PM, <[email protected]> wrote: > Repository: wicket > Updated Branches: > refs/heads/master bae94e2d3 -> 354293e73 > > > Fixed IAjaxLink clicks in WicketTester > > Not all links are `AjaxLink`s or `AjaxFallbackLink`s, but rather direct > implementations of `IAjaxLink`. WicketTester didn't account for this > scenario, and this fixes that. > > > Project: http://git-wip-us.apache.org/repos/asf/wicket/repo > Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/354293e7 > Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/354293e7 > Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/354293e7 > > Branch: refs/heads/master > Commit: 354293e7390453d63ef1dac18e72b269b69e7d9b > Parents: bae94e2 > Author: Martijn Dashorst <[email protected]> > Authored: Wed Apr 29 16:15:02 2015 +0200 > Committer: Martijn Dashorst <[email protected]> > Committed: Wed Jul 8 13:03:23 2015 +0200 > > ---------------------------------------------------------------------- > .../wicket/util/tester/BaseWicketTester.java | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > ---------------------------------------------------------------------- > > > > http://git-wip-us.apache.org/repos/asf/wicket/blob/354293e7/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java > ---------------------------------------------------------------------- > diff --git > a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java > b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java > index 71d1943..8947ea2 100644 > --- > a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java > +++ > b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java > @@ -1913,6 +1913,26 @@ public class BaseWicketTester > } > } > /* > + * If the link is an instanceof IAjaxLink, it is not one > of the > + * special cases marked above, so we treat it as an > AjaxLink. > + */ > + else if (linkComponent instanceof IAjaxLink) > + { > + // If it's not ajax we fail > + if (isAjax == false) > + { > + fail("Link " + path + "is an AjaxLink and > will " + > + "not be invoked when AJAX > (javascript) is disabled."); > + } > + > + List<AjaxEventBehavior> behaviors = > WicketTesterHelper.findAjaxEventBehaviors( > + linkComponent, "click"); > + for (AjaxEventBehavior behavior : behaviors) > + { > + executeBehavior(behavior); > + } > + } > + /* > * If the link is a submitlink then we pretend to have > clicked it > */ > else if (linkComponent instanceof SubmitLink) > >
