Author: ppitonak(a)redhat.com
Date: 2011-11-03 14:22:54 -0400 (Thu, 03 Nov 2011)
New Revision: 22875
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java
Log:
tests for filtering in rich:dataTable and rich:extendedDataTable fixed
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-11-03
16:55:33 UTC (rev 22874)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-11-03
18:22:54 UTC (rev 22875)
@@ -48,7 +48,7 @@
private static final String[] FILTER_NAMES = new String[] { "ivan",
"Гог", null, "Š" };
private static final String[] FILTER_TITLES = new String[] { "Director",
null, "CEO" };
private static final Integer[] FILTER_NUMBER_OF_KIDS = new Integer[] { 2, 100, 0, 5
};
-
+
JQueryLocator selectSex = jq("select");
JQueryLocator inputName = jq("input");
JQueryLocator inputTitle = jq("input");
@@ -56,11 +56,11 @@
JQueryLocator inputNumberOfKids2 = jq("input");
FilteringDataTable filtering = new FilteringDataTable();
-
+
private ExpectedEmployee filterEmployee;
private List<Employee> expectedEmployees;
private int rows;
-
+
@BeforeMethod
public void setup() {
filterEmployee = new ExpectedEmployee();
@@ -137,7 +137,7 @@
filtering.selectName("an");
filterEmployee.name = "an";
-
+
expectedEmployees = filter(EMPLOYEES, getFilter());
dataScroller2.gotoLastPage();
@@ -148,11 +148,11 @@
assertEquals(dataScroller2.getCurrentPage(), lastPage);
assertTrue(dataScroller2.isLastPage());
verifyPageContent(lastPage);
-
+
dataScroller2.gotoFirstPage();
verifyPageContent(1);
}
-
+
public void testFullPageRefresh() {
dataScroller2.setLastPage(dataScroller2.obtainLastPage());
dataScroller2.gotoFirstPage();
@@ -160,7 +160,7 @@
filtering.selectName("an");
filterEmployee.name = "an";
-
+
expectedEmployees = filter(EMPLOYEES, getFilter());
dataScroller2.gotoLastPage();
@@ -171,7 +171,7 @@
assertEquals(dataScroller2.getCurrentPage(), lastPage);
assertTrue(dataScroller2.isLastPage());
verifyPageContent(lastPage);
-
+
dataScroller2.gotoFirstPage();
verifyPageContent(1);
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java 2011-11-03
16:55:33 UTC (rev 22874)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java 2011-11-03
18:22:54 UTC (rev 22875)
@@ -197,7 +197,7 @@
}
int startPage = getCurrentPage();
clickLastPageButton();
- int lastPage = getCurrentPage();
+ lastPage = getCurrentPage();
if (startPage == 1) {
clickFirstPageButton();
} else {
Show replies by date