Author: mgrigorov Date: Sun Nov 14 18:42:49 2010 New Revision: 1035044 URL: http://svn.apache.org/viewvc?rev=1035044&view=rev Log: WICKET-3164 executeAjaxEvent in WicketTester works although Component is not enabled
Add check for isVisibleInHierarchy() for tester.clickLink() Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=1035044&r1=1035043&r2=1035044&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Sun Nov 14 18:42:49 2010 @@ -1139,6 +1139,12 @@ public class BaseWicketTester { Component linkComponent = getComponentFromLastRenderedPage(path); + if (linkComponent.isVisibleInHierarchy() == false) + { + fail("The component is currently not visible in the hierarchy and thus you can not fire events on it." + + " Component: " + linkComponent); + } + if (linkComponent.isEnabledInHierarchy() == false) { fail("The component is currently not enabled in the hierarchy and thus you can not be clicked." +