Author: lfryc(a)redhat.com
Date: 2010-01-14 08:15:20 -0500 (Thu, 14 Jan 2010)
New Revision: 16289
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/dataScroller/DataScrollerTestCase.java
Log:
- DataScrollerTestCase - remembersActivePage modified to doesntRememberActivePage
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/dataScroller/DataScrollerTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/dataScroller/DataScrollerTestCase.java 2010-01-14
12:18:24 UTC (rev 16288)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/dataScroller/DataScrollerTestCase.java 2010-01-14
13:15:20 UTC (rev 16289)
@@ -25,6 +25,7 @@
import org.apache.commons.lang.StringUtils;
import org.jboss.richfaces.integrationTest.AbstractDataIterationTestCase;
+import org.jboss.test.selenium.waiting.*;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -66,19 +67,26 @@
* the second page.
*/
@Test(dependsOnMethods = "testNumberedPage")
- public void testRemembersActivePage() {
+ public void testDoesntRememberActivePage() {
gotoFirstPage();
- Integer page = 2;
+ int page = 2;
+
+ Condition firstPageIsActive = new Condition() {
+ public boolean isTrue() {
+ return 1 == getActivePage();
+ }
+ };
gotoPage(format(LOC_BUTTON_NUMBERED_PAGE_PREFORMATTED, page));
selenium.refresh();
- assertTrue(page.equals(getActivePage()));
+ Wait.until(firstPageIsActive);
+
+ gotoPage(format(LOC_BUTTON_NUMBERED_PAGE_PREFORMATTED, page));
- // TODO cannot just do openPage
- // openPage();
- // assertTrue(page.equals(getActivePage()));
+ loadPage();
+ Wait.until(firstPageIsActive);
}
/**
Show replies by date