Author: ppitonak(a)redhat.com
Date: 2011-01-10 05:14:36 -0500 (Mon, 10 Jan 2011)
New Revision: 20926
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
Log:
* fixed testRendered
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-01-10
08:09:52 UTC (rev 20925)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-01-10
10:14:36 UTC (rev 20926)
@@ -21,6 +21,7 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.a4jOutputPanel;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
@@ -166,8 +167,12 @@
selenium.waitForPageToLoad(TIMEOUT);
assertFalse(selenium.isElementPresent(outputDiv), "Panel should not be
rendered.");
- selenium.click(increaseCounterButton);
- selenium.click(increaseCounterButton);
+ String timeValue = selenium.getText(time);
+ guardXhr(selenium).click(increaseCounterButton);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ timeValue = selenium.getText(time);
+ guardXhr(selenium).click(increaseCounterButton);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
selenium.click(renderedInputTrue);
selenium.waitForPageToLoad(TIMEOUT);
Show replies by date