Author: jpapouse
Date: 2011-10-21 08:52:01 -0400 (Fri, 21 Oct 2011)
New Revision: 22840
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/AbstractOrderingListTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java
Log:
RFPL-1672: tests for rich:orderingList extended with test for valueChangeListener
attribute
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/AbstractOrderingListTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/AbstractOrderingListTest.java 2011-10-21
12:25:16 UTC (rev 22839)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/AbstractOrderingListTest.java 2011-10-21
12:52:01 UTC (rev 22840)
@@ -42,6 +42,8 @@
private JQueryLocator requestTime = jq("span#requestTime");
+ private JQueryLocator phaseListenerFormat = jq("div#phasesPanel
li:eq({0})");
+
private JQueryLocator submitButton = pjq("input[id$=submitButton]");
protected static final Attributes<OrderingListAttributes> ATTRIBUTES = new
Attributes<OrderingListAttributes>();
@@ -71,6 +73,10 @@
return orderingList;
}
+ protected JQueryLocator getPhaseListener(int index) {
+ return phaseListenerFormat.format(index);
+ }
+
protected void moveBottom() {
int beforeIndex = orderingList.getIndexOfSelectedItem();
String stateA = orderingList.getItemColumnValue(beforeIndex, 0);
@@ -139,7 +145,6 @@
}
protected void submit() {
- String timeBefore = selenium.getText(requestTime);
selenium.click(submitButton);
selenium.waitForPageToLoad();
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java 2011-10-21
12:25:16 UTC (rev 22839)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java 2011-10-21
12:52:01 UTC (rev 22840)
@@ -240,9 +240,13 @@
super.testStyle(getOrderingList().getLocator());
}
- @Test(enabled=false)
+ @Test
public void testValueChangeListener() {
-
+ getOrderingList().selectItem(0);
+ getOrderingList().moveBottom();
+ submit();
+ assertTrue(selenium.isElementPresent(getPhaseListener(3)));
+ assertTrue(selenium.getText(getPhaseListener(3)).contains("*3 value
changed"));
}
private void testSizeCssProperty(JQueryLocator element, OrderingListAttributes
attribute, CssProperty cssProperty) {
Show replies by date