Author: jjamrich
Date: 2011-08-17 19:41:58 -0400 (Wed, 17 Aug 2011)
New Revision: 22652
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
Log:
RFPL-1612: add tests for min|maxListWidth|Height and height|width for pickList
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-08-17
23:41:40 UTC (rev 22651)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-08-17
23:41:58 UTC (rev 22652)
@@ -59,6 +59,8 @@
private JQueryLocator targetCaptionLocator = pjq("div[id$=pickListTarget]
div.rf-pick-target-caption");
private JQueryLocator sourceCaptionLocator = pjq("div[id$=pickListSource]
div.rf-pick-source-caption");
+ private JQueryLocator pickListCtrl = pjq("div.rf-pick-lst-scrl");
+
private JQueryLocator pickListSrcItems =
pjq("div[id$=pickListSourceItems]");
private JQueryLocator pickListSrcItem =
pickListSrcItems.getChild(jq("div[id$=pickListItem{0}]"));
private JQueryLocator pickListSrcItemByText =
pickListSrcItems.getChild(jq("div.rf-pick-opt:contains({0})"));
@@ -223,24 +225,48 @@
assertTrue(classVal.contains(itemClass));
}
- // @Test
+ @Test
public void testListHeight() {
- // attributes.setListHeight(listHeight);
+ String listHeight = "333";
+ attributes.setListHeight(listHeight);
+
+ String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
+
+ assertTrue(found != null);
+ assertTrue(found.contains(listHeight));
}
- // @Test
+ @Test
public void testListWidth() {
- // attributes.setListWidth(listWidth)setMaxListHeight(maxListHeight);
+ String listWidth = "222";
+ attributes.setListWidth(listWidth);
+
+ String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
+
+ assertTrue(found != null);
+ assertTrue(found.contains(listWidth));
}
- // @Test
+ @Test
public void testMaxListHeight() {
- // attributes.setMaxListHeight(maxListHeight);
+ String maxListHeight = "345";
+ attributes.setMaxListHeight(maxListHeight);
+
+ String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
+
+ assertTrue(found != null);
+ assertTrue(found.contains(maxListHeight));
}
- // @Test
+ @Test
public void testMinListHeight() {
- // attributes.setMinListHeight(minListHeight);
+ String minListHeight = "234";
+ attributes.setMinListHeight(minListHeight);
+
+ String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
+
+ assertTrue(found != null);
+ assertTrue(found.contains(minListHeight));
}
@Test
Show replies by date