Author: jjamrich
Date: 2011-10-31 06:55:02 -0400 (Mon, 31 Oct 2011)
New Revision: 22847
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
Log:
RFPL-1743: add pickList tests for @switchByClick and @switchByDblClick
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java 2011-10-31
10:28:31 UTC (rev 22846)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java 2011-10-31
10:55:02 UTC (rev 22847)
@@ -103,7 +103,9 @@
showButton,
sourceCaption,
style,
- styleClass,
+ styleClass,
+ switchByClick,
+ switchByDblClick,
targetCaption,
upText,
upTopText,
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-10-31
10:28:31 UTC (rev 22846)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-10-31
10:55:02 UTC (rev 22847)
@@ -1020,5 +1020,33 @@
+ classAfterSelect);
}
+
+ /**
+ * Verify switchByClick attribute
+ */
+ @Test
+ public void testSwitchByClick() {
+ String itemLabel = "Colorado";
+
+ pickListAttributes.set(switchByClick, Boolean.TRUE);
+ selenium.click(pickListSrcItemByText.format(itemLabel));
+
+ // verify that item "added" to target list really appears in target
(staging) container.
+
waitModel.until(elementPresent.locator(pickListTrgtItemStageByText.format(itemLabel)));
+ }
+
+ /**
+ * Verify switchByDblClick attribute
+ */
+ @Test
+ public void testSwitchByDblClick() {
+ String itemLabel = "Delaware";
+
+ pickListAttributes.set(switchByDblClick, Boolean.TRUE);
+ selenium.doubleClick(pickListSrcItemByText.format(itemLabel));
+
+ // verify that item "added" to target list really appears in target
(staging) container.
+
waitModel.until(elementPresent.locator(pickListTrgtItemStageByText.format(itemLabel)));
+ }
}