Author: lfryc(a)redhat.com
Date: 2011-01-27 08:15:50 -0500 (Thu, 27 Jan 2011)
New Revision: 21274
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java
Log:
AbstractComponentAttributes - removed special convertor for enum values - needs to be in
same letter-case like the original enum - fixed for rich:list
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2011-01-27
13:15:00 UTC (rev 21273)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2011-01-27
13:15:50 UTC (rev 21274)
@@ -26,8 +26,6 @@
import static
org.jboss.test.selenium.locator.reference.ReferencedLocator.referenceInferred;
import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.WordUtils;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.framework.AjaxSelenium;
import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
@@ -86,15 +84,6 @@
String valueAsString = value.toString();
- if (value.getClass().isEnum()) {
- if ("select".equals(inputType) &&
!selenium.getSelectOptions(locator).contains(valueAsString)) {
- valueAsString = valueAsString.toLowerCase();
- valueAsString = WordUtils.capitalizeFully(valueAsString, new char[] {
'_' });
- valueAsString = valueAsString.replace("_", "");
- valueAsString = StringUtils.uncapitalize(valueAsString);
- }
- }
-
if ("text".equals(inputType)) {
applyText(locator, valueAsString);
} else if ("checkbox".equals(inputType)) {
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-01-27
13:15:00 UTC (rev 21273)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-01-27
13:15:50 UTC (rev 21274)
@@ -21,11 +21,11 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest;
+import static org.jboss.test.selenium.encapsulated.JavaScript.js;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.id;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.encapsulated.JavaScript.js;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
import static org.testng.Assert.assertEquals;
@@ -52,7 +52,6 @@
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.jboss.test.selenium.waiting.retrievers.Retriever;
import org.jboss.test.selenium.waiting.retrievers.TextRetriever;
-import org.richfaces.tests.metamer.Phase;
import org.richfaces.tests.metamer.TemplatesList;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Templates;
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java 2011-01-27
13:15:00 UTC (rev 21273)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java 2011-01-27
13:15:50 UTC (rev 21274)
@@ -13,19 +13,16 @@
import static org.jboss.test.selenium.dom.Event.MOUSEOVER;
import static org.jboss.test.selenium.dom.Event.MOUSEUP;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.richfaces.tests.metamer.ftest.richList.ListAttributes.Type.ORDERED;
import static org.testng.Assert.assertEquals;
-import java.net.URL;
import java.util.List;
import org.jboss.test.selenium.dom.Event;
+import org.richfaces.component.ListType;
import org.richfaces.tests.metamer.bean.Model;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.richfaces.tests.metamer.ftest.richList.ListAttributes.Type;
import org.richfaces.tests.metamer.model.Employee;
import org.testng.annotations.BeforeMethod;
@@ -52,7 +49,7 @@
@Use(empty = true)
Event event;
- Type type = ORDERED;
+ ListType type = ListType.ordered;
int expectedBegin;
int displayedRows;
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListAttributes.java 2011-01-27
13:15:00 UTC (rev 21273)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListAttributes.java 2011-01-27
13:15:50 UTC (rev 21274)
@@ -23,6 +23,7 @@
import org.jboss.test.selenium.locator.ExtendedLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.component.ListType;
import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
/**
@@ -82,12 +83,8 @@
setProperty("title", title);
}
- public void setType(Type type) {
+ public void setType(ListType type) {
setProperty("type", type);
}
- public enum Type {
- DEFINITIONS, ORDERED, UNORDERED;
- }
-
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java 2011-01-27
13:15:00 UTC (rev 21273)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java 2011-01-27
13:15:50 UTC (rev 21274)
@@ -28,8 +28,8 @@
import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.locator.reference.ReferencedLocator;
+import org.richfaces.component.ListType;
import org.richfaces.tests.metamer.ftest.model.AbstractModel;
-import org.richfaces.tests.metamer.ftest.richList.ListAttributes.Type;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
@@ -41,17 +41,17 @@
super(root);
}
- Type type;
+ ListType type;
ReferencedLocator<JQueryLocator> rows = ref(root, "li");
private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- public Type getType() {
+ public ListType getType() {
return type;
}
- public void setType(Type type) {
+ public void setType(ListType type) {
this.type = type;
}
@@ -77,11 +77,11 @@
private JQueryLocator getInnerElement() {
switch (type) {
- case ORDERED:
+ case ordered:
return jq("li.rf-olst-itm");
- case UNORDERED:
+ case unordered:
return jq("li.rf-ulst-itm");
- case DEFINITIONS:
+ case definitions:
return jq("dd.rf-dlst-dfn");
}
throw new IllegalStateException();
Show replies by thread