Author: jpapouse
Date: 2011-08-17 04:07:59 -0400 (Wed, 17 Aug 2011)
New Revision: 22637
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichOrderingListBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml
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
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListMoving.java
Log:
RFPL-1547:
- removed attribut 'showButton' from pages and tests containg ordering list
- updated tests of ordering list to check whether the selected item is surely selected
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichOrderingListBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichOrderingListBean.java 2011-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichOrderingListBean.java 2011-08-17
08:07:59 UTC (rev 22637)
@@ -70,7 +70,6 @@
attributes.setAttribute("listWidth", 300);
attributes.setAttribute("listHeight", 500);
attributes.setAttribute("rendered", true);
- attributes.setAttribute("showButton", true);
attributes.setAttribute("var", "capital");
attributes.setAttribute("upText", "Up");
attributes.setAttribute("upTopText", "First");
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml 2011-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml 2011-08-17
08:07:59 UTC (rev 22637)
@@ -81,7 +81,6 @@
required="#{richOrderingListBean.attributes['required'].value}"
requiredMessage="#{richOrderingListBean.attributes['requiredMessage'].value}"
selectItemClass="#{richOrderingListBean.attributes['selectItemClass'].value}"
-
showButton="#{richOrderingListBean.attributes['showButton'].value}"
style="#{richOrderingListBean.attributes['style'].value}"
styleClass="#{richOrderingListBean.attributes['styleClass'].value}"
upText="#{richOrderingListBean.attributes['upText'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml 2011-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml 2011-08-17
08:07:59 UTC (rev 22637)
@@ -80,7 +80,6 @@
required="#{richOrderingListBean.attributes['required'].value}"
requiredMessage="#{richOrderingListBean.attributes['requiredMessage'].value}"
selectItemClass="#{richOrderingListBean.attributes['selectItemClass'].value}"
-
showButton="#{richOrderingListBean.attributes['showButton'].value}"
style="#{richOrderingListBean.attributes['style'].value}"
styleClass="#{richOrderingListBean.attributes['styleClass'].value}"
upText="#{richOrderingListBean.attributes['upText'].value}"
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-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/AbstractOrderingListTest.java 2011-08-17
08:07:59 UTC (rev 22637)
@@ -124,6 +124,11 @@
}
}
+ protected void selectItem(int index) {
+ getOrderingList().selectItem(index);
+ assertTrue(selenium.belongsClass(getOrderingList().getItem(index),
"rf-ord-sel"), "After selecting an item, the item should belong to the
class <rf-ord-sel>.");
+ }
+
private void checkColumnValuesSwapped(int indexA, String stateA, String cityA, int
indexB, String stateB, String cityB) {
assertEquals(orderingList.getItemColumnValue(indexA, 0), stateB, "The rows
weren't swapped succesfully after moving.");
assertEquals(orderingList.getItemColumnValue(indexA, 1), cityB, "The rows
weren't swapped succesfully after moving.");
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-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java 2011-08-17
08:07:59 UTC (rev 22637)
@@ -73,6 +73,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11317")
public void testItemClass() {
fillAttribute("itemClass", "some-class");
assertTrue(selenium.belongsClass(getOrderingList().getItem(0),
"some-class"), "The attribute <itemClass> is set to
<some-class>, but the first item doesn't belong to this class.");
@@ -112,23 +113,14 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11310")
public void testSelectItemClass() {
fillAttribute("selectItemClass", "some-class");
- getOrderingList().selectItem(0);
+ selectItem(0);
assertTrue(selenium.belongsClass(getOrderingList().getItem(0),
"some-class"), "The attribute <selectItemClass> is set to
<some-class>, but it has no effect.");
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11311")
- public void testShowButton() {
- fillAttribute("showButton", false);
- assertFalse(getOrderingList().isButtonBottomPresent(), "The attribute
<showButton> is set <false>, but the button [bottom] is present.");
- assertFalse(getOrderingList().isButtonDownPresent(), "The attribute
<showButton> is set <false>, but the button [down] is present.");
- assertFalse(getOrderingList().isButtonTopPresent(), "The attribute
<showButton> is set <false>, but the button [top] is present.");
- assertFalse(getOrderingList().isButtonUpPresent(), "The attribute
<showButton> is set <false>, but the button [up] is present.");
- }
-
- @Test
public void testStyle() {
super.testStyle(getOrderingList().getLocator(), "style");
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListMoving.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListMoving.java 2011-08-16
16:07:23 UTC (rev 22636)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListMoving.java 2011-08-17
08:07:59 UTC (rev 22637)
@@ -42,49 +42,49 @@
@Test
public void testMoveFirstBottom() {
- getOrderingList().selectItem(0);
+ selectItem(0);
moveBottom();
}
@Test
public void testMoveFirstDown() {
- getOrderingList().selectItem(0);
+ selectItem(0);
moveDown();
}
@Test
public void testMoveLastTop() {
- getOrderingList().selectItem(getOrderingList().getNumberOfItems() - 1);
+ selectItem(getOrderingList().getNumberOfItems() - 1);
moveTop();
}
@Test
public void testMoveLastUp() {
- getOrderingList().selectItem(getOrderingList().getNumberOfItems() - 1);
+ selectItem(getOrderingList().getNumberOfItems() - 1);
moveUp();
}
@Test
public void testMoveMiddleBottom() {
- getOrderingList().selectItem(2);
+ selectItem(2);
moveBottom();
}
@Test
public void testMoveMiddleDown() {
- getOrderingList().selectItem(2);
+ selectItem(2);
moveDown();
}
@Test
public void testMoveMiddleTop() {
- getOrderingList().selectItem(2);
+ selectItem(2);
moveTop();
}
@Test
public void testMoveMiddleUp() {
- getOrderingList().selectItem(2);
+ selectItem(2);
moveUp();
}