Author: ppitonak(a)redhat.com
Date: 2011-10-19 09:49:01 -0400 (Wed, 19 Oct 2011)
New Revision: 22827
Added:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/MenuItemAttributes.java
modules/tests/metamer/branches/wfk2-product-branch/ftest/run-test-with-replace-context-params.sh
Modified:
modules/tests/metamer/branches/wfk2-product-branch/
modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichNotifyBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/list.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/csv.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richFileUpload/simple.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/moreStacks.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/simple.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/validation.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richPickList/simple.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richTree/treeAdaptors.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/footer.xhtml
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestInstantAttributes.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/Attributes.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richComponentControl/TestDataScroller.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableSortingUsingComponentControl.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHashParam/TestRichHashParam.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderWithJSR303.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerWithJSR303.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/NotifyStackAttributes.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotify.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotifyMoreStacks.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanelAddPanel1.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipTarget.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/ftest/src/test/resources/testng-output.xml
Log:
merged with trunk
Property changes on: modules/tests/metamer/branches/wfk2-product-branch
___________________________________________________________________
Added: svn:mergeinfo
+ /modules/tests/metamer/trunk:22762-22826
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2011-10-19
13:04:51 UTC (rev 22826)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -110,13 +110,8 @@
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
</dependency>
+
<dependency>
- <groupId>org.jboss.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.2.2.Final</version>
- </dependency>
-
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
@@ -207,7 +202,7 @@
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
- <version>1.3.8</version>
+ <version>1.3.9</version>
<executions>
<execution>
<phase>package</phase>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -430,8 +430,8 @@
* @param event
* an event representing the activation of a user interface component
*/
- public void changeEventListener(ValueChangeEvent event) {
- logToPage("*2 value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
+ public void changeEventListener(AjaxBehaviorEvent event) {
+ logToPage("*2 value changed ");
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -140,8 +140,6 @@
StringBuilder result = new StringBuilder();
result.append("RichFaces ");
result.append(rfVersionBean.getVersion().getImplementationVersion());
- result.append(" r.");
- result.append(rfVersionBean.getVersion().getScmRevision());
richFacesVersion = result.toString();
return richFacesVersion;
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -53,6 +53,7 @@
private static Logger logger;
private Attributes attributes;
private String input;
+ private List<?> inputs;
private List<String> cars;
private String car;
private boolean boolVal;
@@ -199,4 +200,12 @@
public void causeErrorListener(AjaxBehaviorEvent event) {
throw new FacesException("Ajax request caused an error. This is intentional
behavior.");
}
+
+ public List<?> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(List<?> inputs) {
+ this.inputs = inputs;
+ }
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -47,7 +47,7 @@
/**
* Managed bean for rich:calendar.
- *
+ *
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
@@ -149,7 +149,7 @@
/**
* A value change listener that logs to the page old and new value.
- *
+ *
* @param event
* an event representing the activation of a user interface component
*/
@@ -161,10 +161,18 @@
String newDate = "null";
if (event.getOldValue() != null) {
- oldDate = sdf.format((Date) event.getOldValue());
+ if (event.getOldValue() instanceof String) {
+ oldDate = (String) event.getOldValue();
+ } else {
+ oldDate = sdf.format((Date) event.getOldValue());
+ }
}
if (event.getNewValue() != null) {
- newDate = sdf.format((Date) event.getNewValue());
+ if (event.getNewValue() instanceof String) {
+ newDate = (String) event.getNewValue();
+ } else {
+ newDate = sdf.format((Date) event.getNewValue());
+ }
}
RichBean.logToPage("* value changed: " + oldDate + " -> "
+ newDate);
@@ -180,7 +188,7 @@
int componentYear = cal.get(Calendar.YEAR);
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Date
too far in the past.",
- "Select a date from year 1991 or newer.");
+ "Select a date from year 1991 or newer.");
if (componentYear < 1991) {
FacesContext.getCurrentInstance().addMessage("form:calendar",
message);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichNotifyBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichNotifyBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichNotifyBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -85,13 +85,11 @@
attributesNotifyStackFirst.setAttribute("method", "first");
attributesNotifyStackFirst.setAttribute("position",
"topRight");
attributesNotifyStackFirst.setAttribute("rendered", true);
- attributesNotifyStackFirst.setAttribute("styleClass",
"topRight");
attributesNotifyStackSecond.setAttribute("direction",
"vertical");
attributesNotifyStackSecond.setAttribute("method", "first");
attributesNotifyStackSecond.setAttribute("position",
"bottomRight");
attributesNotifyStackSecond.setAttribute("rendered", true);
- attributesNotifyStackSecond.setAttribute("styleClass",
"bottomRight");
attributesBean.setAttribute("messageCount", "1");
attributesBean.setAttribute("messageDetail", DEFAULT_DETAIL);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -34,7 +34,7 @@
/**
* Managed bean for rich:tab.
- *
+ *
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
@@ -61,6 +61,8 @@
attributes.setAttribute("rendered", true);
// will be tested in another way
+ attributes.remove("action");
+ attributes.remove("actionListener");
attributes.remove("converter");
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTooltipBean.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -69,7 +69,7 @@
attributes.setAttribute("mode", "client");
attributes.setAttribute("showEvent", "mouseenter");
attributes.setAttribute("hideEvent", "mouseleave");
- attributes.setAttribute("target", "form:panel");
+ attributes.setAttribute("target", "panel");
// attributes that needs to be tested in other way
attributes.remove("converter");
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichComponentControlBean.properties 2011-10-19
13:49:01 UTC (rev 22827)
@@ -1,4 +1,3 @@
-attr.operation.none=
attr.operation.first=first
attr.operation.last=last
attr.operation.previous=previous
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -1,81 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
-
- <display-name>metamer</display-name>
-
- <welcome-file-list>
- <welcome-file>faces/index.xhtml</welcome-file>
- </welcome-file-list>
-
- <!-- disabled because of a bug in Mojarra 2.1 showing an error message on every
page -->
- <!-- <context-param>
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+ <display-name>metamer</display-name>
+ <!-- disabled because of a bug in Mojarra 2.1 showing an error message on every page
+ <context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>-->
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>#{richBean.skin}</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
- <param-value>2097152</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.push.jms.connectionUsername</param-name>
- <param-value>guest</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.push.jms.connectionPassword</param-name>
- <param-value>guest</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>Resource Servlet</servlet-name>
- <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource Servlet</servlet-name>
- <url-pattern>/org.richfaces.resources/*</url-pattern>
- </servlet-mapping>
- <filter>
- <filter-name>PushFilter</filter-name>
- <filter-class>org.richfaces.webapp.PushFilter</filter-class>
- <async-supported>true</async-supported>
- </filter>
- <filter-mapping>
- <filter-name>PushFilter</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- </filter-mapping>
- <filter>
- <filter-name>Test Identity Filter</filter-name>
-
<filter-class>org.richfaces.tests.metamer.TestIdentityFilter</filter-class>
- <async-supported>true</async-supported>
- </filter>
- <filter-mapping>
- <filter-name>Test Identity Filter</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- </filter-mapping>
+ <context-param>
+
<param-name>com.sun.faces.enableMissingResourceLibraryDetection</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
+ <param-value>2097152</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.push.jms.connectionPassword</param-name>
+ <param-value>guest</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.push.jms.connectionUsername</param-name>
+ <param-value>guest</param-value>
+ </context-param>
+
+ <!-- resource mapping enable/disable/configure -->
+ <context-param>
+ <param-name>org.richfaces.resourceMapping.compressedStages</param-name>
+ <param-value>None</param-value>
+ </context-param>
+ <!-- -->
+ <context-param>
+ <param-name>org.richfaces.resourceMapping.packedStages</param-name>
+ <param-value>None</param-value>
+ </context-param>
+ <!-- -->
+ <context-param>
+ <param-name>org.richfaces.resourceMapping.enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{richBean.skin}</param-value>
+ </context-param>
+ <filter>
+ <filter-name>PushFilter</filter-name>
+ <filter-class>org.richfaces.webapp.PushFilter</filter-class>
+ <async-supported>true</async-supported>
+ </filter>
+ <filter>
+ <filter-name>Test Identity Filter</filter-name>
+
<filter-class>org.richfaces.tests.metamer.TestIdentityFilter</filter-class>
+ <async-supported>true</async-supported>
+ </filter>
+ <filter-mapping>
+ <filter-name>PushFilter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>Test Identity Filter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Resource Servlet</servlet-name>
+ <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource Servlet</servlet-name>
+ <url-pattern>/org.richfaces.resources/*</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>faces/index.xhtml</welcome-file>
+ </welcome-file-list>
</web-app>
Copied:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
(from rev 22826,
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml)
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
(rev 0)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <h:panelGrid columns="2">
+ <h:column>
+ h:inputText:
+ </h:column>
+ <h:column>
+ <h:inputText id="simpleText1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </h:inputText>
+ </h:column>
+
+ <h:column>
+ rich:accordion
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!-- rich:accordion id="accordion"
itemChangeListener="#{richBean.itemChangeListener}" >
+ <rich:accordionItem id="item1"
name="item1" header="Item 1">
+ content of item 1
+ </rich:accordionItem>
+ <rich:accordionItem id="item2"
name="item2" header="Item 2">
+ content of item 2
+ </rich:accordionItem>
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:accordion-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:autocomplete:
+ </h:column>
+ <h:column>
+ <rich:autocomplete id="autocomplete1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:autocomplete>
+ </h:column>
+
+ <h:column>
+ rich:calendar
+ </h:column>
+ <h:column>
+ <rich:calendar id="calendar"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:calendar>
+ </h:column>
+
+ <h:column>
+ rich:editor
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!-- rich:editor id="editor1"
value="#{a4jAjaxBean.input}" width="310px" height="40px"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:editor-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:inplaceInput
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!--rich:inplaceInput id="inplaceInput"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inplaceInput-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:inplaceSelect
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSlider
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSpinner
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+
+ </h:panelGrid>
+
+ <br/>
+ <a4j:outputPanel id="output" layout="block">
+ Output: <h:outputText value="#{a4jAjaxBean.input}"/>
+ </a4j:outputPanel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -62,12 +62,110 @@
valueChangeListener="#{richBean.valueChangeListener}" >
<a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
</rich:autocomplete>
- </h:column>
+ </h:column>
+ <h:column>
<rich:autocomplete id="autocomplete2"
value="#{a4jAjaxBean.input}">
<a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
</rich:autocomplete>
+ </h:column>
+
<h:column>
+ rich:calendar
</h:column>
+ <h:column>
+ <rich:calendar id="calendar1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:calendar>
+ </h:column>
+ <h:column>
+ <rich:calendar id="calendar2"
value="#{a4jAjaxBean.input}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:calendar>
+ </h:column>
+
+ <h:column>
+ rich:editor
+ </h:column>
+ <h:column>
+ <rich:editor id="editor1"
value="#{a4jAjaxBean.input}" width="310px" height="40px"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </rich:editor>
+ </h:column>
+ <h:column>
+ <rich:editor id="editor2"
value="#{a4jAjaxBean.input}" width="310px" height="40px"
>
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </rich:editor>
+ </h:column>
+
+ <h:column>
+ rich:inplaceInput
+ </h:column>
+ <h:column>
+ <rich:inplaceInput id="inplaceInput1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceInput>
+ </h:column>
+ <h:column>
+ <rich:inplaceInput id="inplaceInput2"
value="#{a4jAjaxBean.input}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceInput>
+ </h:column>
+
+ <h:column>
+ rich:inplaceSelect
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect2"
value="#{a4jAjaxBean.input}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSlider
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider2"
value="#{a4jAjaxBean.input}">
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSpinner
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner2"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+
</h:panelGrid>
<br/>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/list.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -93,6 +93,10 @@
<metamer:testPageLink id="eventHandlers"
outcome="eventHandlers" value="Event handlers for various
components">
Simple page that contains <b>various components</b> with
<b>a4j:ajax</b> with event handler to tests collisions on this attribute
</metamer:testPageLink>
+
+ <metamer:testPageLink id="defaultEventHandlers"
outcome="defaultEventHandlers" value="Default event handlers for various
components">
+ Simple page that contains <b>various components</b> with
<b>a4j:ajax</b> with default event handler
+ </metamer:testPageLink>
</ui:define>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/csv.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/csv.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/csv.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -74,6 +74,7 @@
custom (RichFaces)
<rich:autocomplete id="input4"
+
autocompleteMethod="#{richAutocompleteBean.autocomplete}"
value="#{richAutocompleteBean.value4}"
<f:validator
validatorId="org.richfaces.StringRichFacesValidator"/>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -69,7 +69,8 @@
<rich:message id="inputMsg3" for="input3"/>
custom (RichFaces)
- <rich:autocomplete id="input4"
+ <rich:autocomplete id="input4"
+
autocompleteMethod="#{richAutocompleteBean.autocomplete}"
value="#{richAutocompleteBean.value4}"
<f:validator
validatorId="org.richfaces.StringRichFacesValidator"/>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richFileUpload/simple.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -55,6 +55,7 @@
noDuplicate="#{richFileUploadBean.attributes['noDuplicate'].value}"
onbeforedomupdate="#{richFileUploadBean.attributes['onbeforedomupdate'].value}"
onbegin="#{richFileUploadBean.attributes['onbegin'].value}"
+
onclear="#{richFileUploadBean.attributes['onclear'].value}"
onclick="#{richFileUploadBean.attributes['onclick'].value}"
oncomplete="#{richFileUploadBean.attributes['oncomplete'].value}"
ondblclick="#{richFileUploadBean.attributes['ondblclick'].value}"
@@ -67,6 +68,7 @@
onmouseout="#{richFileUploadBean.attributes['onmouseout'].value}"
onmouseover="#{richFileUploadBean.attributes['onmouseover'].value}"
onmouseup="#{richFileUploadBean.attributes['onmouseup'].value}"
+
ontyperejected="#{richFileUploadBean.attributes['ontyperejected'].value}"
onuploadcomplete="#{richFileUploadBean.attributes['onuploadcomplete'].value}"
render="#{richFileUploadBean.attributes['render'].value}"
rendered="#{richFileUploadBean.attributes['rendered'].value}"
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/moreStacks.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/moreStacks.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/moreStacks.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -27,39 +27,13 @@
-->
<ui:composition template="/templates/template.xhtml">
-
- <ui:define name="head">
-<!--
- <style>
- .topLeft {
- bottom: auto;
- left: 10px;
- top: 10px;
- right: auto;
- }
-
- .topRight {
- bottom: auto;
- right: 10px;
- top: 10px;
- left: auto;
- }
-
- .bottomLeft {
- bottom: 10px;
- left: 10px;
- top: auto;
- right: auto;
- }
-
- .bottomRight {
- bottom: 10px;
- right: 10px;
- top: auto;
- left: auto;
- }
- </style>
- -->
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
</ui:define>
<ui:define name="component">
@@ -165,14 +139,15 @@
<h:outputLabel for="number1" value="Number for Stack 1
(from 5 to 10)"/>
<h:inputText id="number1" required="true">
<f:validateLongRange minimum="5"
maximum="10"/>
- <a4j:ajax event="change" execute="@form"/>
</h:inputText>
<br />
<h:outputLabel for="number2" value="Number for Stack 2
(from 5 to 10)"/>
<h:inputText id="number2" required="true">
<f:validateLongRange minimum="5"
maximum="10"/>
- <a4j:ajax event="change" execute="@form"/>
</h:inputText>
+ <br />
+ <h:commandButton action="@form" value="h:commandButton
Submit" id="hCommandButtonSubmit" />
+ <a4j:commandButton action="@form"
value="a4j:commandButton Submit" id="a4jCommandButtonSubmit" />
</h:form>
</ui:define>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/simple.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/simple.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/simple.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -29,6 +29,14 @@
<ui:composition template="/templates/template.xhtml">
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
<ui:define name="component">
<h:form>
<a4j:outputPanel ajaxRendered="true">
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/validation.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/validation.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richNotify/validation.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -28,6 +28,14 @@
<ui:composition template="/templates/template.xhtml">
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
<ui:define name="component">
<h:form>
<rich:notifyMessages ajaxRendered="true"
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richPickList/simple.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richPickList/simple.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richPickList/simple.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -77,8 +77,10 @@
onmouseover="#{richPickListBean.attributes['onmouseover'].value}"
onmouseup="#{richPickListBean.attributes['onmouseup'].value}"
onremoveitems="#{richPickListBean.attributes['onremoveitems'].value}"
+
onsourceblur="#{richPickListBean.attributes['onsourceblur'].value}"
onsourceclick="#{richPickListBean.attributes['onsourceclick'].value}"
onsourcedblclick="#{richPickListBean.attributes['onsourcedblclick'].value}"
+
onsourcefocus="#{richPickListBean.attributes['onsourcefocus'].value}"
onsourcekeydown="#{richPickListBean.attributes['onsourcekeydown'].value}"
onsourcekeypress="#{richPickListBean.attributes['onsourcekeypress'].value}"
onsourcekeyup="#{richPickListBean.attributes['onsourcekeyup'].value}"
@@ -87,8 +89,10 @@
onsourcemouseout="#{richPickListBean.attributes['onsourcemouseout'].value}"
onsourcemouseover="#{richPickListBean.attributes['onsourcemouseover'].value}"
onsourcemouseup="#{richPickListBean.attributes['onsourcemouseup'].value}"
+
ontargetblur="#{richPickListBean.attributes['ontargetblur'].value}"
ontargetclick="#{richPickListBean.attributes['ontargetclick'].value}"
ontargetdblclick="#{richPickListBean.attributes['ontargetdblclick'].value}"
+
ontargetfocus="#{richPickListBean.attributes['ontargetfocus'].value}"
ontargetkeydown="#{richPickListBean.attributes['ontargetkeydown'].value}"
ontargetkeypress="#{richPickListBean.attributes['ontargetkeypress'].value}"
ontargetkeyup="#{richPickListBean.attributes['ontargetkeyup'].value}"
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richTree/treeAdaptors.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richTree/treeAdaptors.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richTree/treeAdaptors.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -219,7 +219,7 @@
<fieldset>
<legend>rich:tree</legend>
- <metamer:attributes value="#{richTreeBean.attributes}"
id="treeAttributes" />
+ <metamer:attributes value="#{richTreeBean.attributes}"
id="attributes" />
<fieldset>
<legend>rich:treeModelRecursiveAdaptor [0]</legend>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/footer.xhtml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/footer.xhtml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/footer.xhtml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
- <!--
+<!--
JBoss, Home of Professional Open Source
Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
@@ -25,28 +25,26 @@
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-->
- <ui:composition>
- <hr style="width: 1050px; margin-left: 0px;" />
+<ui:composition>
+ <hr style="width: 1050px; margin-left: 0px;" />
- <ul>
- <li><h:outputText id="richfacesVersion"
value="#{metamer.richFacesVersion}" /></li>
- <li><h:outputText id="metamerVersion"
value="#{metamer.shortVersion}" /></li>
- <li><h:outputText id="jsfVersion"
value="#{metamer.jsfVersion}" /></li>
- <li><h:outputText id="serverVersion"
value="#{metamer.serverVersion}" /></li>
- <li><h:outputText id="javaVersion"
value="#{metamer.javaVersion}" /> @ <h:outputText
id="osVersion"
-
value="#{metamer.osVersion}" /></li>
- <li><h:outputText id="browserVersion"
value="#{metamer.browserVersion}" /></li>
- </ul>
+ <ul>
+ <li><h:outputText id="richfacesVersion"
value="#{metamer.richFacesVersion}" /></li>
+ <li><h:outputText id="metamerVersion"
value="#{metamer.shortVersion}" /></li>
+ <li><h:outputText id="jsfVersion"
value="#{metamer.jsfVersion}" /></li>
+ <li><h:outputText id="serverVersion"
value="#{metamer.serverVersion}" /></li>
+ <li><h:outputText id="javaVersion"
value="#{metamer.javaVersion}" /> @ <h:outputText
id="osVersion"
+ value="#{metamer.osVersion}" /></li>
+ <li><h:outputText id="browserVersion"
value="#{metamer.browserVersion}" /></li>
+ </ul>
- <!-- human-readable browser detection -->
- <c:if test="#{metamer.projectStage != 'Production'}">
- <h:outputScript name="jquery.js" target="head"/>
- <h:outputScript library="script"
name="detect-browser.js" target="head"/>
- <script type="text/javascript">
+ <!-- human-readable browser detection -->
+
+ <h:outputScript name="jquery.js" target="head" />
+ <h:outputScript library="script" name="detect-browser.js"
target="head" />
+ <script type="text/javascript">
jQuery("span[id$=browserVersion]").text(jQuery.browser.name +
' ' + jQuery.browser.version + ' @ ' + jQuery.browser.os);
- </script>
+ </script>
- </c:if>
-
- </ui:composition>
+</ui:composition>
</html>
\ No newline at end of file
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml 2011-10-19 13:04:51
UTC (rev 22826)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml 2011-10-19 13:49:01
UTC (rev 22827)
@@ -26,7 +26,7 @@
<artifactId>functional-test-jboss-ci-template</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
<version>1.5.3.Final</version>
- <relativePath/>
+ <relativePath />
</parent>
<groupId>org.richfaces.tests</groupId>
@@ -411,7 +411,7 @@
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
- <version>1.3.8</version>
+ <version>1.3.9</version>
<executions>
<execution>
<phase>package</phase>
@@ -440,6 +440,192 @@
<deployable.classifier>jee6</deployable.classifier>
</properties>
</profile>
+
+ <!-- unpack metamer -->
+ <profile>
+ <id>unpack-metamer</id>
+ <activation>
+ <property>
+ <name>org.richfaces.resourceMapping.enabled</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-metamer-war</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+
<groupId>org.richfaces.tests</groupId>
+ <artifactId>metamer</artifactId>
+
<version>4.1.0-SNAPSHOT</version>
+ <type>war</type>
+
<classifier>${deployable.classifier}</classifier>
+ <overWrite>true</overWrite>
+
<outputDirectory>target/metamer</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+
<overWriteReleases>true</overWriteReleases>
+
<overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- enable resource mapping by context-param in web.xml -->
+ <profile>
+ <id>org.richfaces.resourceMapping.enabled</id>
+ <activation>
+ <property>
+ <name>org.richfaces.resourceMapping.enabled</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+
<groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.3.9</version>
+ <executions>
+
+ <execution>
+
<id>replacer-org.richfaces.resourceMapping.enabled</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+
<file>target/metamer/WEB-INF/web.xml</file>
+ <regexFlags>
+ <regexFlag>MULTILINE</regexFlag>
+ </regexFlags>
+
<token><param-name>org.richfaces.resourceMapping.enabled</param-name>\s*<param-value>false</param-value></token>
+
<value><param-name>org.richfaces.resourceMapping.enabled</param-name><param-value>true</param-value></value>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- enable resource mapping compressedStages -->
+ <profile>
+ <id>org.richfaces.resourceMapping.compressedStages</id>
+ <activation>
+ <property>
+ <name>org.richfaces.resourceMapping.compressedStages</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+
<groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.3.9</version>
+ <executions>
+ <execution>
+
<id>replacer-org.richfaces.resourceMapping.compressedStages</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+
<file>target/metamer/WEB-INF/web.xml</file>
+ <regex>true</regex>
+ <regexFlags>
+ <regexFlag>MULTILINE</regexFlag>
+ </regexFlags>
+
<token><param-name>org.richfaces.resourceMapping.compressedStages</param-name>\s*<param-value>None</param-value></token>
+
<value><param-name>org.richfaces.resourceMapping.compressedStages</param-name><param-value>All</param-value></value>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- enable resource mapping packedStages -->
+ <profile>
+ <id>org.richfaces.resourceMapping.packedStages</id>
+ <activation>
+ <property>
+ <name>org.richfaces.resourceMapping.packedStages</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+
<groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.3.9</version>
+ <executions>
+ <execution>
+
<id>replacer-org.richfaces.resourceMapping.packedStages</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+
<file>target/metamer/WEB-INF/web.xml</file>
+ <regex>true</regex>
+ <regexFlags>
+ <regexFlag>MULTILINE</regexFlag>
+ </regexFlags>
+
<token><param-name>org.richfaces.resourceMapping.packedStages</param-name>\s*<param-value>None</param-value></token>
+
<value><param-name>org.richfaces.resourceMapping.packedStages</param-name><param-value>All</param-value></value>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- pack metamer back to WAR -->
+ <profile>
+ <id>repack-metamer</id>
+ <activation>
+ <property>
+ <name>org.richfaces.resourceMapping.enabled</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <classifier>${deployable.classifier}</classifier>
+
<warSourceDirectory>target/metamer</warSourceDirectory>
+ <warName>metamer-updated</warName>
+ </configuration>
+ <executions>
+ <execution>
+ <id>repack-metamer-back-to-war</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
<build>
Copied:
modules/tests/metamer/branches/wfk2-product-branch/ftest/run-test-with-replace-context-params.sh
(from rev 22826,
modules/tests/metamer/trunk/ftest/run-test-with-replace-context-params.sh)
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest/run-test-with-replace-context-params.sh
(rev 0)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest/run-test-with-replace-context-params.sh 2011-10-19
13:49:01 UTC (rev 22827)
@@ -0,0 +1,2 @@
+#!/bin/bash
+mvn clean package -Pjboss6x-mojarra -Dtemplates=plain -DcontainerId=jboss6x
-Dcargo.jvmargs.additional=-Xmx1536m
-Dcontainer.installer.url=file:///media/velkyDisk/Download/jboss-as-distribution-6.0.0.Final.zip
-Dorg.richfaces.resourceMapping.enabled -Dorg.richfaces.resourceMapping.packedStages
-Dorg.richfaces.resourceMapping.compressedStages -Dbrowser="*chrome
/opt/firefox-3.5.5/firefox-bin" -Dtest=TestRichMenuItem
-Ddeployable.location=$PWD/target/metamer-updated-jee6.war
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest/src/test/resources/testng-output.xml
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest/src/test/resources/testng-output.xml 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest/src/test/resources/testng-output.xml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -14,7 +14,6 @@
</classes>
<packages>
- <package name="org.richfaces.tests.metamer.ftest.richPanel"
/>
<package name="org.richfaces.tests.metamer.ftest.richPopupPanel"
/>
<package
name="org.richfaces.tests.metamer.ftest.richProgressBar" />
<package name="org.richfaces.tests.metamer.ftest.richToolbar"
/>
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml 2011-10-19
13:04:51 UTC (rev 22826)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml 2011-10-19
13:49:01 UTC (rev 22827)
@@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.9</version>
+ <version>2.10</version>
<configuration>
<skip>true</skip>
</configuration>
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestInstantAttributes.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestInstantAttributes.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestInstantAttributes.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -78,7 +78,7 @@
}
@Test
- @IssueTracking({ "https://issues.jboss.org/browse/RF-9118",
"http://java.net/jira/browse/JAVASERVERFACES-1788" })
+ @IssueTracking({ "https://issues.jboss.org/browse/RF-9118",
"http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1024" })
public void testOnError() {
for (int i = 0; i < 2; i++) {
statusAttributes.set(onerror, alert.parametrize("error" + i));
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -24,6 +24,7 @@
import org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes;
import org.richfaces.tests.metamer.ftest.richJQuery.RichJQueryAttributes;
import org.richfaces.tests.metamer.ftest.richList.ListAttributes;
+import org.richfaces.tests.metamer.ftest.richMenuItem.MenuItemAttributes;
import org.richfaces.tests.metamer.ftest.richMessage.MessageAttributes;
import org.richfaces.tests.metamer.ftest.richPanelMenu.PanelMenuAttributes;
import org.richfaces.tests.metamer.ftest.richPanelMenuGroup.PanelMenuGroupAttributes;
@@ -63,5 +64,6 @@
public static Attributes<PanelMenuItemAttributes> panelMenuItemAttributes = new
Attributes<PanelMenuItemAttributes>();
public static Attributes<PickListAttributes> pickListAttributes = new
Attributes<PickListAttributes>();
public static Attributes<TreeAttributes> treeAttributes = new
Attributes<TreeAttributes>(jq("span[id*=attributes]"));
+ public static Attributes<MenuItemAttributes> menuItemAttributes = new
Attributes<MenuItemAttributes>();
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/Attributes.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/Attributes.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/Attributes.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -18,6 +18,8 @@
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.ExtendedLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.LocatorFactory;
+import org.jboss.test.selenium.locator.option.OptionLabelLocator;
import org.jboss.test.selenium.locator.option.OptionValueLocator;
import org.jboss.test.selenium.locator.reference.LocatorReference;
import org.jboss.test.selenium.locator.reference.ReferencedLocator;
@@ -32,7 +34,7 @@
protected AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
LocatorReference<ExtendedLocator<JQueryLocator>> root =
new
LocatorReference<ExtendedLocator<JQueryLocator>>(pjq(""));
- ReferencedLocator<JQueryLocator> propertyLocator = referenceInferred(root,
":input[id*=:{0}Input]{1}");
+ ReferencedLocator<JQueryLocator> propertyLocator = referenceInferred(root,
":input[id*={0}Input]{1}");
RequestType requestType = RequestType.HTTP;
@@ -127,10 +129,10 @@
if (value == null) {
value = "";
}
+
+ String valueAsString = value.toString();
+ // System.out.println("\n ###setting following value as string: '"
+ valueAsString + "'");
- String valueAsString = value.toString();
- System.out.println("\n ###setting following value as string: '" +
valueAsString + "'");
-
if ("text".equals(inputType)) {
applyText(locator, valueAsString);
} else if ("checkbox".equals(inputType)) {
@@ -139,7 +141,7 @@
} else if ("radio".equals(inputType)) {
locator = propertyLocator.format(propertyName, "[value="
+ ("".equals(valueAsString) ? "null" : valueAsString)
+ "]");
-
+
if (!selenium.isChecked(locator)) {
applyRadio(locator);
}
@@ -177,7 +179,15 @@
protected void applySelect(ElementLocator<?> locator, String value) {
OptionValueLocator optionLocator = new OptionValueLocator(value);
- guard(selenium, requestType).select(locator, optionLocator);
+
+ LocatorFactory.jq(locator.getRawLocator());
+ JQueryLocator fullLocator =
jq(locator.getRawLocator()).getChild(jq(optionLocator.getRawLocator()));
+ if (selenium.isElementPresent(fullLocator)) {
+ guard(selenium, requestType).select(locator, optionLocator);
+ } else {
+ OptionLabelLocator optionLabelLocator = new OptionLabelLocator(value);
+ guard(selenium, requestType).select(locator, optionLabelLocator);
+ }
}
private class RepeatForElementNotFound implements CommandInterceptor {
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -32,6 +32,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -88,11 +89,18 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11296")
+ @Templates(exclude = { "richPopupPanel" })
public void testAccesskey() {
testHtmlAttribute(button, "accesskey", "b");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11296")
+ public void testAccesskeyInPopupPanel() {
+ testHtmlAttribute(button, "accesskey", "b");
+ }
+
@Test
public void testAction() {
JQueryLocator doubleStringAction =
pjq("input[value=doubleStringAction]");
@@ -106,7 +114,7 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4"));
String output = selenium.getText(output2);
assertEquals(output, "RichFaces 4RichFaces 4",
- "output2 when 'RichFaces 4' in input and doubleStringAction
selected");
+ "output2 when 'RichFaces 4' in input and doubleStringAction
selected");
selenium.click(first6CharsAction);
selenium.waitForPageToLoad(TIMEOUT);
@@ -138,7 +146,7 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4"));
String output = selenium.getText(output3);
assertEquals(output, "RichFaces 4RichFaces 4",
- "output2 when 'RichFaces 4' in input and
doubleStringActionListener selected");
+ "output2 when 'RichFaces 4' in input and
doubleStringActionListener selected");
selenium.click(first6CharsActionListener);
selenium.waitForPageToLoad(TIMEOUT);
@@ -155,7 +163,7 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4ě"));
output = selenium.getText(output3);
assertEquals(output, "RICHFACES 4Ě",
- "output2 when 'RichFaces 4ě' in input and
toUpperCaseActionListener selected");
+ "output2 when 'RichFaces 4ě' in input and
toUpperCaseActionListener selected");
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -48,6 +48,7 @@
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -288,7 +289,7 @@
for (int i = 2; i < 42; i += 7) {
if (!selenium.belongsClass(cellDay.format(i),
"rf-cal-boundary-day")) {
assertTrue(selenium.belongsClass(cellDay.format(i),
"yellowDay"), "Cell nr. " + i
- + " should be yellow.");
+ + " should be yellow.");
}
}
@@ -299,12 +300,12 @@
for (int i = 0; i < 42; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "yellowDay"),
"Cell nr. " + i
- + " should not be yellow.");
+ + " should not be yellow.");
}
}
@Test
- @RegressionTest({"https://issues.jboss.org/browse/RF-9837",
"https://issues.jboss.org/browse/RF-10085"})
+ @RegressionTest({ "https://issues.jboss.org/browse/RF-9837",
"https://issues.jboss.org/browse/RF-10085" })
public void testDefaultTime() {
selenium.type(pjq("input[type=text][id$=defaultTimeInput]"),
"21:24");
selenium.waitForPageToLoad();
@@ -354,7 +355,7 @@
selenium.click(input);
- String[] labels = {"", "Sat", "Sun",
"Mon", "Tue", "Wed", "Thu", "Fri"};
+ String[] labels = { "", "Sat", "Sun",
"Mon", "Tue", "Wed", "Thu", "Fri" };
for (int i = 0; i < 8; i++) {
String label = selenium.getText(weekDayLabel.format(i));
@@ -375,7 +376,7 @@
// }
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10821")
public void testImmediate() {
selenium.click(pjq("input[name$=immediateInput][value=true]"));
@@ -432,7 +433,7 @@
selenium.click(input);
- String[] labels = {"", "Вс", "Пн", "Вт",
"Ср", "Чт", "Пт", "Сб"};
+ String[] labels = { "", "Вс", "Пн", "Вт",
"Ср", "Чт", "Пт", "Сб" };
for (int i = 0; i < 8; i++) {
String label = selenium.getText(weekDayLabel.format(i));
@@ -445,7 +446,8 @@
String selectedDate = null;
try {
- Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm", new
Locale("ru")).parse(day + " " + month + " 12:00");
+ Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm", new
Locale("ru"))
+ .parse(day + " " + month + " 12:00");
selectedDate = new SimpleDateFormat("MMM d, yyyy hh:mm", new
Locale("ru")).format(date);
} catch (ParseException ex) {
fail(ex.getMessage());
@@ -458,7 +460,8 @@
@Test
public void testMonthLabels() {
- String[] labels = {"január", "február", "marec",
"apríl", "máj", "jún", "júl", "august",
"september", "október", "november", "december"};
+ String[] labels = { "január", "február", "marec",
"apríl", "máj", "jún", "júl", "august",
"september",
+ "október", "november", "december" };
String labelsString = "január,február,marec,apríl,máj,jún,
júl,august,september,október,november,december";
selenium.type(pjq("input[id$=monthLabelsInput]"), labelsString);
@@ -479,7 +482,7 @@
@Test
public void testMonthLabelsShort() {
- String[] labels = {"jan", "feb", "mar",
"apr", "máj", "jún", "júl", "aug",
"sep", "okt", "nov", "dec"};
+ String[] labels = { "jan", "feb", "mar",
"apr", "máj", "jún", "júl", "aug",
"sep", "okt", "nov", "dec" };
String labelsString = "jan,feb,mar,apr,máj,jún,
júl,aug,sep,okt,nov,dec";
selenium.type(pjq("input[id$=monthLabelsShortInput]"), labelsString);
@@ -524,7 +527,8 @@
selenium.click(cellDay.format(18));
selenium.click(applyButton);
- waitGui.failWith("Attribute onchange does not work
correctly").until(new EventFiredCondition(new Event("change")));
+ waitGui.failWith("Attribute onchange does not work correctly").until(
+ new EventFiredCondition(new Event("change")));
}
@Test
@@ -536,7 +540,8 @@
selenium.click(cellDay.format(18));
selenium.click(cleanButton);
- waitGui.failWith("Attribute onclean does not work correctly").until(new
EventFiredCondition(new Event("clean")));
+ waitGui.failWith("Attribute onclean does not work correctly")
+ .until(new EventFiredCondition(new Event("clean")));
}
@Test
@@ -549,7 +554,8 @@
selenium.click(input);
guardXhr(selenium).click(nextMonthButton);
- waitGui.failWith("Attribute oncomplete does not work
correctly").until(new EventFiredCondition(new Event("complete")));
+ waitGui.failWith("Attribute oncomplete does not work
correctly").until(
+ new EventFiredCondition(new Event("complete")));
}
@Test
@@ -560,7 +566,8 @@
selenium.click(input);
selenium.fireEvent(cellDay.format(18), Event.MOUSEOUT);
- waitGui.failWith("Attribute ondatemouseout does not work
correctly").until(new EventFiredCondition(new Event("datemouseout")));
+ waitGui.failWith("Attribute ondatemouseout does not work
correctly").until(
+ new EventFiredCondition(new Event("datemouseout")));
}
@Test
@@ -571,7 +578,8 @@
selenium.click(input);
selenium.fireEvent(cellDay.format(18), Event.MOUSEOVER);
- waitGui.failWith("Attribute ondatemouseover does not work
correctly").until(new EventFiredCondition(new Event("datemouseover")));
+ waitGui.failWith("Attribute ondatemouseover does not work
correctly").until(
+ new EventFiredCondition(new Event("datemouseover")));
}
@Test
@@ -582,7 +590,8 @@
selenium.click(input);
selenium.click(cellDay.format(18));
- waitGui.failWith("Attribute ondateselect does not work
correctly").until(new EventFiredCondition(new Event("dateselect")));
+ waitGui.failWith("Attribute ondateselect does not work
correctly").until(
+ new EventFiredCondition(new Event("dateselect")));
}
@Test
@@ -613,7 +622,7 @@
selenium.type(input, "Dec 23, 2010 19:27");
waitGui.failWith("Attribute oninputchange does not work
correctly").until(
- new EventFiredCondition(new Event("inputchange")));
+ new EventFiredCondition(new Event("inputchange")));
}
@Test
@@ -873,11 +882,18 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = "richPopupPanel")
public void testTabindexInput() {
testHtmlAttribute(input, "tabindex", "99");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(value = "richPopupPanel")
+ public void testTabindexInputInPopupPanel() {
+ testHtmlAttribute(input, "tabindex", "99");
+ }
+
@Test
public void testTabindexButton() {
testHtmlAttribute(image, "tabindex", "99");
@@ -912,7 +928,7 @@
private void assertNoDateSelected() {
for (int i = 0; i < 42; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
@@ -936,10 +952,10 @@
for (int i = lowerBoundary; i < upperBoundary; i++) {
if (exceptOfDate.equals(selenium.getText(cellDay.format(i)))) {
assertTrue(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
} else {
assertFalse(selenium.belongsClass(cellDay.format(i),
"rf-cal-sel"), "Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
@@ -949,7 +965,7 @@
// check other 3 lines of cells
for (int i = lowerBoundary; i < upperBoundary; i++) {
assertFalse(selenium.belongsClass(cellDay.format(i), "rf-cal-sel"),
"Cell nr. " + i
- + " should not be selected.");
+ + " should not be selected.");
}
}
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -319,6 +319,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11568")
public void testToggleListener() {
String reqTime = selenium.getText(time);
guardXhr(selenium).click(header);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -42,9 +42,9 @@
@Inject
@Use(enumeration = true)
SortOrder sortOrder;
-
+
public void testSortingWithSortOrder() {
- columnAttributes.set(ColumnAttributes.requestType, RequestType.XHR);
+ columnAttributes.setRequestType(RequestType.XHR);
columnAttributes.set(ColumnAttributes.sortOrder, sortOrder);
switch (sortOrder) {
@@ -54,7 +54,7 @@
case descending:
Collections.sort(capitals,
Collections.reverseOrder(RichColumnBean.STATE_NAME_LENGTH_COMPARATOR));
break;
-
+
default:
// default case required by checkstyle
break;
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richComponentControl/TestDataScroller.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richComponentControl/TestDataScroller.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richComponentControl/TestDataScroller.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -27,6 +27,7 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.richDataScroller.PaginationTester;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -66,8 +67,18 @@
}
@Test
- @IssueTracking({ "https://issues.jboss.org/browse/RF-9306",
"https://issues.jboss.org/browse/RFPL-1187" })
+ @IssueTracking({ "https://issues.jboss.org/browse/RFPL-1187" })
+ @Templates(exclude = { "a4jRepeat", "richCollapsibleSubTable",
"richDataGrid", "richDataTable",
+ "richExtendedDataTable", "richList" })
public void testScrollerPagination() {
paginationTester.testNumberedPages();
}
+
+ @Test(groups = { "4.Future" })
+ @IssueTracking({ "https://issues.jboss.org/browse/RF-9306" })
+ @Templates(value = { "a4jRepeat", "richCollapsibleSubTable",
"richDataGrid", "richDataTable",
+ "richExtendedDataTable", "richList" })
+ public void testScrollerPaginationInIterationComponents() {
+ paginationTester.testNumberedPages();
+ }
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableSortingUsingComponentControl.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableSortingUsingComponentControl.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableSortingUsingComponentControl.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -65,7 +65,7 @@
super.testSortModeSingleDoesntRememberOrder();
}
- @Test
+ @Test(groups = { "4.Future" })
@Override
@IssueTracking({ "https://issues.jboss.org/browse/RF-9932",
"http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790" })
@@ -97,7 +97,7 @@
super.testSortModeMultiReplacingOldOccurences();
}
- @Test
+ @Test(groups = { "4.Future" })
@Override
@IssueTracking({ "https://issues.jboss.org/browse/RF-9932",
"http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790" })
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richEditor/TestRichEditor.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -37,7 +37,7 @@
private JQueryLocator editorTextArea = pjq("textarea[id$=editor:inp]");
private JQueryLocator editorArea = jq("body");
private JQueryLocator phaseListenerFormat = jq("div#phasesPanel
li:eq({0})");
- private FrameLocator frameLocator = new FrameLocator("jquery=iframe");
+ private FrameLocator frameLocator = new
FrameLocator("jquery=iframe:eq(0)");
private JQueryLocator hSubmit = pjq("input[id$=hButton]");
private JQueryLocator a4jSubmit = pjq("input[id$=a4jButton]");
private JQueryLocator validationMsgLoc = pjq("span.rf-msgs-sum");
@@ -191,9 +191,7 @@
String langVal = "xyz";
editorAttributes.set(lang, langVal);
- // there is lang attribute present in 2 editor's elements
assertTrue(langVal.equals(selenium.getAttribute(editorTextArea.getAttribute(langAttribute))));
-
assertTrue(langVal.equals(selenium.getAttribute(editor.getAttribute(langAttribute))));
}
@Test
@@ -220,29 +218,18 @@
@IssueTracking("https://issues.jboss.org/browse/RFPL-1658")
public void testReadonly() {
- typeTextToEditor(text1);
-
- String currentText = getEditorText();
- assertTrue(currentText != null && currentText.contains(text1));
-
editorAttributes.set(readonly, Boolean.TRUE);
- // waitModel.until(elementPresent.locator(editor));
- typeTextToEditor("test");
- // assert that there is no "test" present in editor text area
- currentText = getEditorText();
- assertFalse(currentText != null &&
currentText.contains("test"));
+ String readOnlyAttrVal = selenium.getAttribute(
+ editorTextArea.getAttribute(new Attribute("readonly")));
+ assertTrue("readonly".equals(readOnlyAttrVal));
- // now set read-only back to false
- editorAttributes.set(readonly, Boolean.FALSE);
- // waitModel.until(elementPresent.locator(editor));
+ selenium.selectFrame(frameLocator);
+ String contentEditableVal = selenium.getAttribute(
+ editorArea.getAttribute(new Attribute("contenteditable")));
+ assertTrue("false".equals(contentEditableVal));
- // and type another text
- typeTextToEditor(text2);
-
- // now we should assert that only expected text are present
- currentText = getEditorText();
- assertTrue(currentText != null && currentText.contains(text2));
+ selenium.selectFrame(new FrameLocator("relative=top"));
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -29,11 +29,12 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
* Test case for page faces/components/richFunctions/all.xhtml.
- *
+ *
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
@@ -55,7 +56,8 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10465")
+ @Templates(exclude = { "a4jRepeat", "richCollapsibleSubTable",
"richDataGrid", "richDataTable",
+ "richExtendedDataTable", "richList" })
public void testFunctions() {
String clientId = selenium.getText(clientIdOutput);
assertNotNull(clientId, "Function clientId() doesn't work.");
@@ -71,6 +73,14 @@
assertEquals(output, "abc", "Function findComponent() doesn't
work.");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "a4jRepeat", "hDataTable",
"richCollapsibleSubTable", "richDataGrid", "richDataTable",
+ "richExtendedDataTable", "richList", "uiRepeat" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10465")
+ public void testFunctionsInIterationComponents() {
+ testFunctions();
+ }
+
@Test
public void testRoles() {
String outputAU = selenium.getText(userInRoleAUOutput);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -24,12 +24,14 @@
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.attributes.AttributeList.graphValidatorAttributes;
-import static
org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes.*;
+import static
org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes.groups;
+import static
org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes.rendered;
+import static
org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes.summary;
+import static
org.richfaces.tests.metamer.ftest.richGraphValidator.GraphValidatorAttributes.value;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.GregorianCalendar;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.locator.option.OptionValueLocator;
@@ -38,22 +40,20 @@
/**
* Test for page /faces/components/richGraphValidator/all.xhtml
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision: 22622 $
*/
public class TestRichGraphValidator extends AbstractMetamerTest {
private static final String SMILE = ":-)";
-
- private static final String[] GROUPS = {"",
"javax.validation.groups.Default",
-
"org.richfaces.tests.metamer.validation.groups.ValidationGroupAllComponents",
-
"org.richfaces.tests.metamer.validation.groups.ValidationGroupBooleanInputs",
-
"org.richfaces.tests.metamer.validation.groups.ValidationGroupNumericInputs"};
-
+
+ private static final String[] GROUPS = { "Default", "null",
"ValidationGroupAllComponents",
+ "ValidationGroupBooleanInputs",
"ValidationGroupNumericInputs" };
+
private static final int BOOLEAN_INPUTS_GROUP = 3;
private static final int NUMERIC_INPUTS_GROUP = 4;
-
+
private JQueryLocator autocomplete = pjq("input[id$=autocompleteInput]");
private JQueryLocator inputSecret = pjq("input[id$=inputSecret]");
private JQueryLocator inputText = pjq("input[id$=inputText]");
@@ -67,27 +67,27 @@
private JQueryLocator selectBooleanCheckbox =
pjq("input[id$=selectBooleanCheckbox]");
private JQueryLocator inputNumberSliderInput = pjq("span[id$=inputNumberSlider]
input.rf-insl-inp");
private JQueryLocator inputNumberSpinnerInput =
pjq("span[id$=inputNumberSpinner] input.rf-insp-inp");
-
+
private JQueryLocator globalMessagesContainer =
pjq("span[id$=_globalMessages]");
private JQueryLocator errorMessagesContainer = pjq("span.rf-msgs");
private JQueryLocator header = pjq("div.rf-p-hdr[id$=gv1h_header]");
-
+
private OptionValueLocator optionSmile = new OptionValueLocator(SMILE);
-
+
private JQueryLocator applyChangesBtn = pjq("input[id$=applyChanges]");
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/richGraphValidator/all.xhtml");
}
-
+
@Test
public void testGroups() {
- for (int i=0; i<GROUPS.length; ++i) {
+ for (int i = 0; i < GROUPS.length; ++i) {
graphValidatorAttributes.set(groups, GROUPS[i]);
-
+ waitFor(6000);
setAllValidatedFields();
-
+
if (i == BOOLEAN_INPUTS_GROUP) {
// only Boolean inputs validated
allFieldsSetToWrong();
@@ -98,83 +98,81 @@
selenium.type(inputNumberSliderInput, "10");
selenium.type(inputNumberSpinnerInput, "10");
}
-
+
// let's submit the form
selenium.click(applyChangesBtn);
-
+
// wait for success validation
- waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf
span.rf-msgs-sum")))
- .text("Action sucessfully done!"));
+ waitGui.until(textEquals.locator(
+ globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf
span.rf-msgs-sum"))).text(
+ "Action sucessfully done!"));
}
}
-
+
@Test
public void testSummary() {
String msg = "My own validation message!";
graphValidatorAttributes.set(summary, msg);
-
+
setAllValidatedFields();
allFieldsSetToWrong();
-
+
selenium.click(applyChangesBtn);
-
- waitGui.until(textEquals
-
.locator(errorMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
- .text(msg));
+
+
waitGui.until(textEquals.locator(errorMessagesContainer.getDescendant(jq("span.rf-msgs-sum"))).text(msg));
}
@Test
public void testValue() {
-
+
graphValidatorAttributes.set(value, "testValue");
-
+
setAllValidatedFields();
-
+
// let's submit the form
selenium.click(applyChangesBtn);
-
+
// wait for success validation
waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf
span.rf-msgs-sum")))
- .text("Action sucessfully done!"));
+ .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf
span.rf-msgs-sum"))).text(
+ "Action sucessfully done!"));
}
-
+
@Test
public void testRendered() {
setAllValidatedFields();
-
+
graphValidatorAttributes.set(rendered, Boolean.FALSE);
-
+
waitGui.until(isNotDisplayed.locator(header));
}
-
+
private void setAllValidatedFields() {
// inputSecret don't keed entered value after submit
selenium.type(inputSecret, SMILE);
-
+
// input returning List/Set are by default without any element checked
selenium.check(selectManyCheckbox, true);
- selenium.select(selectManyListbox, optionSmile);
- selenium.select(selectManyMenu, optionSmile);
+ selenium.select(selectManyListbox, optionSmile);
+ selenium.select(selectManyMenu, optionSmile);
}
-
+
private void allFieldsSetToWrong() {
String wrongString = "---";
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy");
- String wrongDate = sdf.format(new Date(System.currentTimeMillis() +
24*60*60*1000));
-
+ String wrongDate = sdf.format(new Date(System.currentTimeMillis() + 24 * 60 * 60
* 1000));
+
selenium.type(inplaceSelect, wrongString);
selenium.type(inplaceInput, wrongString);
selenium.type(inputNumberSpinnerInput, "10");
selenium.check(selectBooleanCheckbox, false);
selenium.type(inputSecret, wrongString);
-
+
selenium.type(inputNumberSliderInput, "15");
selenium.type(inputNumberSpinnerInput, "15");
selenium.type(autocomplete, wrongString);
selenium.type(inputText, wrongString);
- selenium.type(calendar, wrongDate);
+ selenium.type(calendar, wrongDate);
selenium.type(inputTextArea, wrongString);
}
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHashParam/TestRichHashParam.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHashParam/TestRichHashParam.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHashParam/TestRichHashParam.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -33,6 +33,7 @@
import org.jboss.test.selenium.geometry.Offset;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -93,14 +94,18 @@
int panelLeft = selenium.getElementPositionLeft(panelContainer);
int shadowLeft = selenium.getElementPositionLeft(shadow);
- assertEquals(selenium.getStyle(header, new CssProperty("cursor")),
"move", "Cursor used when mouse is over panel's header.");
+ assertEquals(selenium.getStyle(header, new CssProperty("cursor")),
"move",
+ "Cursor used when mouse is over panel's header.");
selenium.dragAndDrop(header, new Offset(20, 0));
- assertEquals(selenium.getElementPositionLeft(panelContainer), panelLeft + 20,
"Panel's position after move to the right (20px).");
- assertEquals(selenium.getElementPositionLeft(shadow), shadowLeft + 20,
"Shadow's position after move to the right (20px).");
+ assertEquals(selenium.getElementPositionLeft(panelContainer), panelLeft + 20,
+ "Panel's position after move to the right (20px).");
+ assertEquals(selenium.getElementPositionLeft(shadow), shadowLeft + 20,
+ "Shadow's position after move to the right (20px).");
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testPanelResizeHorizontal() {
selenium.click(openButton);
int panelWidth = selenium.getElementWidth(panelContainer);
@@ -108,18 +113,24 @@
int shadowWidth = selenium.getElementWidth(shadow);
int shadowHeight = selenium.getElementHeight(shadow);
- assertEquals(selenium.getStyle(resizerW, new CssProperty("cursor")),
"w-resize", "Cursor used when mouse is over panel's left
resizer.");
- assertEquals(selenium.getStyle(resizerE, new CssProperty("cursor")),
"e-resize", "Cursor used when mouse is over panel's right
resizer.");
+ assertEquals(selenium.getStyle(resizerW, new CssProperty("cursor")),
"w-resize",
+ "Cursor used when mouse is over panel's left resizer.");
+ assertEquals(selenium.getStyle(resizerE, new CssProperty("cursor")),
"e-resize",
+ "Cursor used when mouse is over panel's right resizer.");
selenium.dragAndDrop(resizerW, new Offset(100, 0));
- assertEquals(selenium.getElementWidth(panelContainer), panelWidth - 100,
"Panel's width after resizing horizontally (-100px).");
- assertEquals(selenium.getElementHeight(panelContainer), panelHeight,
"Panel's height after resizing horizontally.");
- assertEquals(selenium.getElementWidth(shadow), shadowWidth - 100,
"Shadow's width after resizing horizontally (-100px).");
+ assertEquals(selenium.getElementWidth(panelContainer), panelWidth - 100,
+ "Panel's width after resizing horizontally (-100px).");
+ assertEquals(selenium.getElementHeight(panelContainer), panelHeight,
+ "Panel's height after resizing horizontally.");
+ assertEquals(selenium.getElementWidth(shadow), shadowWidth - 100,
+ "Shadow's width after resizing horizontally (-100px).");
assertEquals(selenium.getElementHeight(shadow), shadowHeight, "Shadow's
height after resizing horizontally.");
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testPanelHeight() {
selenium.click(openButton);
waitGui.failWith("Panel was not
opened.").until(isDisplayed.locator(panel));
@@ -127,6 +138,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testPanelLeft() {
selenium.click(openButton);
waitGui.failWith("Panel was not
opened.").until(isDisplayed.locator(panel));
@@ -134,6 +146,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testPanelTop() {
selenium.click(openButton);
waitGui.failWith("Panel was not
opened.").until(isDisplayed.locator(panel));
@@ -141,6 +154,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testPanelWidth() {
selenium.click(openButton);
waitGui.failWith("Panel was not
opened.").until(isDisplayed.locator(panel));
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -43,6 +43,7 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -80,22 +81,25 @@
@Test
public void testClick() {
guardNoRequest(selenium).click(inplaceInput);
- assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit
should not contain class rf-ii-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-ii-none"),
+ "Edit should not contain class rf-ii-none when popup is open.");
assertTrue(selenium.isDisplayed(input), "Input should be displayed.");
selenium.type(input, "new value");
selenium.fireEvent(input, Event.BLUR);
assertTrue(selenium.belongsClass(inplaceInput, "rf-ii-chng"), "New
class should be added to inplace input.");
- assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should
contain class rf-ii-none when popup is closed.");
+ assertTrue(selenium.belongsClass(edit, "rf-ii-none"),
+ "Edit should contain class rf-ii-none when popup is closed.");
assertEquals(selenium.getText(label), "new value", "Label should
contain selected value.");
assertEquals(selenium.getText(output), "new value", "Output did
not change.");
String listenerText = selenium.getText(jq("div#phasesPanel
li:eq(3)"));
- assertEquals(listenerText, "*1 value changed: RichFaces 4 -> new
value", "Value change listener was not invoked.");
+ assertEquals(listenerText, "*1 value changed: RichFaces 4 -> new
value",
+ "Value change listener was not invoked.");
phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
- PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "value changed:
RichFaces 4 -> new value");
}
@@ -166,13 +170,16 @@
selenium.type(pjq("input[id$=activeClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
- assertFalse(selenium.belongsClass(inplaceInput, "metamer-ftest-class"),
"Inplace input should not have class metamer-ftest-class.");
+ assertFalse(selenium.belongsClass(inplaceInput,
"metamer-ftest-class"),
+ "Inplace input should not have class metamer-ftest-class.");
selenium.click(inplaceInput);
- assertTrue(selenium.belongsClass(inplaceInput, "metamer-ftest-class"),
"Inplace input should have class metamer-ftest-class.");
+ assertTrue(selenium.belongsClass(inplaceInput, "metamer-ftest-class"),
+ "Inplace input should have class metamer-ftest-class.");
selenium.fireEvent(input, Event.BLUR);
- assertFalse(selenium.belongsClass(inplaceInput, "metamer-ftest-class"),
"Inplace input should not have class metamer-ftest-class.");
+ assertFalse(selenium.belongsClass(inplaceInput,
"metamer-ftest-class"),
+ "Inplace input should not have class metamer-ftest-class.");
}
@Test
@@ -187,7 +194,7 @@
waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
- PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed:
RichFaces 4 -> new value");
}
@@ -205,7 +212,8 @@
// it cannot handle null because of a bug in Mojarra and Myfaces and
// generates style="width: ; " instead of default value
- assertTrue(selenium.isAttributePresent(input.getAttribute(Attribute.STYLE)),
"Input doesn't have attribute style.");
+ assertTrue(selenium.isAttributePresent(input.getAttribute(Attribute.STYLE)),
+ "Input doesn't have attribute style.");
width = selenium.getAttribute(input.getAttribute(Attribute.STYLE));
assertTrue(!width.contains("width: ;"), "Default width of input
was not set (was " + width + ").");
}
@@ -236,7 +244,7 @@
waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
waitGui.failWith("Attribute onchange does not work correctly").until(
- new EventFiredCondition(new Event("change")));
+ new EventFiredCondition(new Event("change")));
}
@Test
@@ -369,13 +377,16 @@
selenium.waitForPageToLoad();
selenium.click(inplaceInput);
- assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit
should not contain class rf-is-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-ii-none"),
+ "Edit should not contain class rf-is-none when popup is open.");
assertTrue(selenium.isDisplayed(input), "Input should be displayed.");
selenium.type(input, "new value");
selenium.fireEvent(input, Event.BLUR);
- assertFalse(selenium.belongsClass(inplaceInput, "rf-ii-c-s"), "New
class rf-ii-c-s should not be added to inplace input.");
- assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should
contain class rf-is-none when popup is closed.");
+ assertFalse(selenium.belongsClass(inplaceInput, "rf-ii-c-s"),
+ "New class rf-ii-c-s should not be added to inplace input.");
+ assertTrue(selenium.belongsClass(edit, "rf-ii-none"),
+ "Edit should contain class rf-is-none when popup is closed.");
assertEquals(selenium.getText(label), "RichFaces 4", "Label should
not change.");
assertEquals(selenium.getText(output), "RichFaces 4", "Output
should not change.");
@@ -428,7 +439,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = { "richPopupPanel" })
public void testTabindex() {
AttributeLocator<?> attr = input.getAttribute(new
Attribute("tabindex"));
@@ -438,6 +449,18 @@
assertTrue(selenium.getAttribute(attr).contains("47"), "Attribute
tabindex should contain \"47\".");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(value = { "richPopupPanel" })
+ public void testTabindexInPopupPanel() {
+ AttributeLocator<?> attr = input.getAttribute(new
Attribute("tabindex"));
+
+ selenium.type(pjq("input[id$=tabindexInput]"), "47");
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.getAttribute(attr).contains("47"), "Attribute
tabindex should contain \"47\".");
+ }
+
@Test
public void testValue() {
selenium.type(pjq("input[type=text][id$=valueInput]"), "new
value");
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -43,6 +43,7 @@
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -81,14 +82,15 @@
@IssueTracking("https://issues.jboss.org/browse/RF-11227")
public void testClick() {
guardNoRequest(selenium).click(select);
- assertFalse(selenium.belongsClass(edit, "rf-is-none"), "Edit
should not contain class rf-is-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-is-none"),
+ "Edit should not contain class rf-is-none when popup is open.");
assertTrue(selenium.isDisplayed(popup), "Popup should be displayed.");
for (int i = 0; i < 50; i++) {
assertTrue(selenium.isDisplayed(options.format(i)), "Select option
" + i + " should be displayed.");
}
- String[] selectOptions = {"Alabama", "Hawaii",
"Massachusetts", "New Mexico", "South Dakota"};
+ String[] selectOptions = { "Alabama", "Hawaii",
"Massachusetts", "New Mexico", "South Dakota" };
for (int i = 0; i < 50; i += 10) {
assertEquals(selenium.getText(options.format(i)), selectOptions[i / 10],
"Select option nr. " + i);
}
@@ -98,7 +100,8 @@
waitGui.failWith("Output did not
change.").until(textEquals.locator(output).text("Hawaii"));
assertTrue(selenium.belongsClass(select, "rf-is-chng"), "New class
should be added to inplace select.");
- assertTrue(selenium.belongsClass(edit, "rf-is-none"), "Edit should
contain class rf-is-none when popup is closed.");
+ assertTrue(selenium.belongsClass(edit, "rf-is-none"),
+ "Edit should contain class rf-is-none when popup is closed.");
assertEquals(selenium.getText(label), "Hawaii", "Label should
contain selected value.");
@@ -180,14 +183,17 @@
selenium.type(pjq("input[id$=activeClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
- assertFalse(selenium.belongsClass(select, "metamer-ftest-class"),
"Inplace input should not have class metamer-ftest-class.");
+ assertFalse(selenium.belongsClass(select, "metamer-ftest-class"),
+ "Inplace input should not have class metamer-ftest-class.");
selenium.click(select);
- assertTrue(selenium.belongsClass(select, "metamer-ftest-class"),
"Inplace input should have class metamer-ftest-class.");
+ assertTrue(selenium.belongsClass(select, "metamer-ftest-class"),
+ "Inplace input should have class metamer-ftest-class.");
selenium.click(options.format(10));
guardXhr(selenium).fireEvent(input, Event.BLUR);
- assertFalse(selenium.belongsClass(select, "metamer-ftest-class"),
"Inplace input should not have class metamer-ftest-class.");
+ assertFalse(selenium.belongsClass(select, "metamer-ftest-class"),
+ "Inplace input should not have class metamer-ftest-class.");
}
@Test
@@ -203,7 +209,7 @@
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
- PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed: ->
Hawaii");
}
@@ -218,7 +224,8 @@
selenium.type(pjq("input[type=text][id$=inputWidthInput]"),
"");
selenium.waitForPageToLoad();
- assertFalse(selenium.isAttributePresent(input.getAttribute(Attribute.STYLE)),
"Input should not have attribute style.");
+ assertFalse(selenium.isAttributePresent(input.getAttribute(Attribute.STYLE)),
+ "Input should not have attribute style.");
}
@Test
@@ -228,8 +235,8 @@
selenium.waitForPageToLoad();
for (int i = 0; i < 50; i++) {
- assertTrue(selenium.belongsClass(options.format(i), value), "Select
option "
- + selenium.getText(options.format(i)) + " does not contain class
" + value);
+ assertTrue(selenium.belongsClass(options.format(i), value),
+ "Select option " + selenium.getText(options.format(i)) + "
does not contain class " + value);
}
}
@@ -297,8 +304,7 @@
selenium.click(options.format(10));
guardXhr(selenium).fireEvent(input, Event.BLUR);
- waitGui.failWith("Attribute onchange does not work correctly").until(
- new EventFiredCondition(Event.CHANGE));
+ waitGui.failWith("Attribute onchange does not work
correctly").until(new EventFiredCondition(Event.CHANGE));
}
@Test
@@ -319,8 +325,7 @@
selenium.click(select);
- waitGui.failWith("Attribute onfocus does not work correctly").until(
- new EventFiredCondition(Event.FOCUS));
+ waitGui.failWith("Attribute onfocus does not work correctly").until(new
EventFiredCondition(Event.FOCUS));
}
@Test
@@ -478,7 +483,7 @@
selenium.click(options.format(10));
waitGui.failWith("Attribute onselectitem does not work
correctly").until(
- new EventFiredCondition(new Event("selectitem")));
+ new EventFiredCondition(new Event("selectitem")));
}
@Test
@@ -487,7 +492,8 @@
selenium.waitForPageToLoad();
selenium.click(select);
- assertFalse(selenium.belongsClass(edit, "rf-is-none"), "Edit
should not contain class rf-is-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-is-none"),
+ "Edit should not contain class rf-is-none when popup is open.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be
displayed.");
selenium.click(input);
@@ -569,9 +575,11 @@
selenium.click(select);
selenium.mouseOver(options.format(0));
- assertTrue(selenium.belongsClass(options.format(0),
"metamer-ftest-class"), "Selected item does not contain defined
class.");
+ assertTrue(selenium.belongsClass(options.format(0),
"metamer-ftest-class"),
+ "Selected item does not contain defined class.");
for (int i = 1; i < 50; i++) {
- assertFalse(selenium.belongsClass(options.format(i),
"metamer-ftest-class"), "Not selected item " + i + " should not
contain defined class.");
+ assertFalse(selenium.belongsClass(options.format(i),
"metamer-ftest-class"), "Not selected item " + i
+ + " should not contain defined class.");
}
}
@@ -625,7 +633,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = { "richPopupPanel" })
public void testTabindex() {
AttributeLocator<?> attr = input.getAttribute(new
Attribute("tabindex"));
@@ -635,12 +643,25 @@
assertTrue(selenium.getAttribute(attr).contains("47"), "Attribute
tabindex should contain \"47\".");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(value = { "richPopupPanel" })
+ public void testTabindexInPopupPanel() {
+ AttributeLocator<?> attr = input.getAttribute(new
Attribute("tabindex"));
+
+ selenium.type(pjq("input[id$=tabindexInput]"), "47");
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.getAttribute(attr).contains("47"), "Attribute
tabindex should contain \"47\".");
+ }
+
@Test
public void testValue() {
selenium.type(pjq("input[type=text][id$=valueInput]"), "North
Carolina");
selenium.waitForPageToLoad();
- assertTrue(selenium.belongsClass(edit, "rf-is-none"), "Edit should
contain class rf-is-none when popup is closed.");
+ assertTrue(selenium.belongsClass(edit, "rf-is-none"),
+ "Edit should contain class rf-is-none when popup is closed.");
assertEquals(selenium.getText(label), "North Carolina", "Label
should contain selected value.");
}
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -49,6 +49,7 @@
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.Test;
@@ -112,12 +113,26 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel", "richAccordion" })
@Override
- @IssueTracking("https://issues.jboss.org/browse/RF-11314")
public void testClick() {
super.testClick();
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11314")
+ @Templates(value = { "richPopupPanel" })
+ public void testClickInPopupPanel() {
+ super.testClick();
+ }
+
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11314")
+ @Templates(value = { "richAccordion" })
+ public void testClickInAccordion() {
+ super.testClick();
+ }
+
@Test
public void testInit() {
assertTrue(selenium.isDisplayed(slider), "Slider is not present on the
page.");
@@ -132,11 +147,18 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11315")
+ @Templates(exclude = { "richPopupPanel" })
public void testAccesskey() {
testHtmlAttribute(input, "accesskey", "x");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11315")
+ @Templates(value = { "richPopupPanel" })
+ public void testAccesskeyInPopupPanel() {
+ testHtmlAttribute(input, "accesskey", "x");
+ }
+
@Test
public void testDecreaseClass() {
selenium.click(pjq("input[type=radio][name$=showArrowsInput][value=true]"));
@@ -159,7 +181,7 @@
}
@Test
- @Use(field = "delay", ints = {800, 1250, 3700})
+ @Use(field = "delay", ints = { 800, 1250, 3700 })
public void testDelay() {
selenium.type(pjq("input[type=text][id$=delayInput]"),
delay.toString());
selenium.waitForPageToLoad();
@@ -196,6 +218,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel", "richAccordion" })
public void testEnableManualInput() {
JQueryLocator selectOption =
pjq("input[type=radio][name$=enableManualInputInput][value=false]");
selenium.click(selectOption);
@@ -207,6 +230,18 @@
testClick();
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testEnableManualInputInPopupPanel() {
+ testEnableManualInput();
+ }
+
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richAccordion" })
+ public void testEnableManualInputInAccordion() {
+ testEnableManualInput();
+ }
+
@Test
public void testHandleClass() {
testStyleClass(handle, handleClass);
@@ -228,13 +263,15 @@
selenium.waitForPageToLoad();
String reqTime = selenium.getText(time);
- guardXhr(selenium).mouseDownAt(track, new Point(0, 0));
+ guardXhr(selenium).type(input, "-10");
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
- PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
- // Remove first 2 preceding chars from correct message (used to remove usual
'* ' token)
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
+ // Remove first 2 preceding chars from correct message (used to remove usual
'* ' token)
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed: 2
-> -10");
+
+ assertEquals(selenium.getText(output), "-10", "Output was not
updated.");
}
@Test
@@ -340,6 +377,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel", "richAccordion" })
public void testMaxValueClick() {
selenium.type(pjq("input[type=text][id$=maxValueInput]"),
"20");
selenium.waitForPageToLoad();
@@ -350,16 +388,30 @@
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output), "17", "Output was not
updated.");
int margin = selenium.getElementPositionLeft(handle) -
selenium.getElementPositionLeft(track);
- assertTrue(margin >= 167 && margin <= 173, "Left margin of
handle should be between 167 and 173 (was " + margin + ").");
+ assertTrue(margin >= 167 && margin <= 173, "Left margin of
handle should be between 167 and 173 (was " + margin
+ + ").");
reqTime = selenium.getText(time);
guardXhr(selenium).mouseDownAt(track, new Point(195, 0));
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output), "20", "Output was not
updated.");
margin = selenium.getElementPositionLeft(handle) -
selenium.getElementPositionLeft(track);
- assertTrue(margin >= 192 && margin <= 198, "Left margin of
handle should be between 192 and 198 (was " + margin + ").");
+ assertTrue(margin >= 192 && margin <= 198, "Left margin of
handle should be between 192 and 198 (was " + margin
+ + ").");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richAccordion" })
+ public void testMaxValueClickInAccordion() {
+ testMaxValueClick();
+ }
+
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testMaxValueClickInPopupPanel() {
+ testMaxValueClick();
+ }
+
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9860")
public void testMaxlength() {
@@ -393,6 +445,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel", "richAccordion" })
public void testMinValueClick() {
selenium.type(pjq("input[type=text][id$=minValueInput]"),
"-20");
selenium.waitForPageToLoad();
@@ -403,7 +456,8 @@
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output), "-16", "Output was not
updated.");
int margin = selenium.getElementPositionLeft(handle) -
selenium.getElementPositionLeft(track);
- assertTrue(margin >= 25 && margin <= 31, "Left margin of
handle should be between 25 and 31 (was " + margin + ").");
+ assertTrue(margin >= 25 && margin <= 31, "Left margin of
handle should be between 25 and 31 (was " + margin
+ + ").");
reqTime = selenium.getText(time);
guardXhr(selenium).mouseDownAt(track, new Point(0, 0));
@@ -413,7 +467,19 @@
assertTrue(margin <= 3, "Left margin of handle should be between 0 and 3
(was " + margin + ").");
}
- @Test
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richAccordion" })
+ public void testMinValueClickInAccordion() {
+ testMinValueClick();
+ }
+
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testMinValueClickInPopupPanel() {
+ testMinValueClick();
+ }
+
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10829")
public void testOnblur() {
testFireEvent(Event.BLUR, slider);
@@ -438,6 +504,7 @@
}
@Test
+ @Templates(exclude = { "richPopupPanel" })
public void testOnchangeClick() {
selenium.click(pjq("input[type=radio][name$=showArrowsInput][value=true]"));
selenium.waitForPageToLoad();
@@ -461,6 +528,12 @@
assertEquals(events.length, 3, "Three events should be fired.");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testOnchangeClickInPopupPanel() {
+ testOnchangeClick();
+ }
+
@Test
public void testOnclick() {
testFireEvent(Event.CLICK, slider);
@@ -471,7 +544,7 @@
testFireEvent(Event.DBLCLICK, slider);
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10829")
public void testOnfocus() {
testFireEvent(Event.FOCUS, slider);
@@ -517,7 +590,7 @@
testFireEvent(Event.MOUSEUP, slider);
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10829")
public void testOnselect() {
testFireEvent(Event.SELECT, slider);
@@ -562,7 +635,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11314")
+ @Templates(exclude = { "richPopupPanel", "richAccordion" })
public void testShowTooltip() {
selenium.click(pjq("input[type=radio][name$=showTooltipInput][value=true]"));
selenium.waitForPageToLoad();
@@ -578,6 +651,20 @@
assertFalse(selenium.isVisible(tooltip), "Tooltip should not be
visible.");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11314")
+ @Templates(value = { "richAccordion" })
+ public void testShowTooltipInAccordion() {
+ testShowTooltip();
+ }
+
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11314")
+ @Templates(value = { "richPopupPanel" })
+ public void testShowTooltipInPopupPanel() {
+ testShowTooltip();
+ }
+
@Test
public void testStep() {
selenium.click(pjq("input[type=radio][name$=showArrowsInput][value=true]"));
@@ -617,7 +704,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = { "richPopupPanel" })
public void testTabindex() {
selenium.type(pjq("input[id$=tabindexInput]"), "55");
selenium.waitForPageToLoad(TIMEOUT);
@@ -631,6 +718,13 @@
assertEquals(selenium.getAttribute(attr), "55", "Attribute
tabindex of input.");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(value = { "richPopupPanel" })
+ public void testTabindexInPopupPanel() {
+ testTabindex();
+ }
+
@Test
public void testTooltipClass() {
selenium.click(pjq("input[type=radio][name$=showTooltipInput][value=true]"));
@@ -676,15 +770,19 @@
/**
* Clicks on slider's arrow.
- * @param arrow slider's left or right arrow locator
- * @param clicks how many times should it be clicked
+ *
+ * @param arrow
+ * slider's left or right arrow locator
+ * @param clicks
+ * how many times should it be clicked
*/
private void clickArrow(ElementLocator<?> arrow, int clicks) {
String reqTime = null;
for (int i = 0; i < clicks; i++) {
reqTime = selenium.getText(time);
- guardXhr(selenium).runScript(new JavaScript("jQuery(\"" +
arrow.getRawLocator() + "\").mousedown().mouseup()"));
+ guardXhr(selenium).runScript(
+ new JavaScript("jQuery(\"" + arrow.getRawLocator() +
"\").mousedown().mouseup()"));
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
}
@@ -692,8 +790,11 @@
/**
* Clicks on slider's arrow and verifies delay.
- * @param arrow slider's left or right arrow locator
- * @param delay awaited delay between ajax requests
+ *
+ * @param arrow
+ * slider's left or right arrow locator
+ * @param delay
+ * awaited delay between ajax requests
*/
private void verifyDelay(JQueryLocator arrow, int delay) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss.SSS");
@@ -718,7 +819,8 @@
delta = (long) (delay * 0.5);
long average = countAverage(timesArray);
- assertTrue(Math.abs(average - delay) < delta, "Average delay " +
average + " is too far from set value (" + delay + ")");
+ assertTrue(Math.abs(average - delay) < delta, "Average delay " +
average + " is too far from set value ("
+ + delay + ")");
}
private long countAverage(Date[] times) {
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderWithJSR303.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderWithJSR303.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderWithJSR303.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -29,47 +29,47 @@
import org.jboss.test.selenium.waiting.TextContainsCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* Test for faces/components/richInputNumberSpinner/jsr303.xhtml page
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
public class TestRichSliderWithJSR303 extends AbstractMetamerTest {
-
+
/** Wrong value for input validated to min value */
public static final String WRONG_MIN_VAL = "1";
/** Wrong value for input validated to max value */
public static final String WRONG_MAX_VAL = "5";
/** Wrong value for input validated to custom value */
public static final String WRONG_CUSTOM_VAL = "-1";
-
+
/** Wrong value for input validated to min value */
public static final String CORRECT_MIN_VAL = "3";
/** Wrong value for input validated to max value */
public static final String CORRECT_MAX_VAL = "1";
/** Wrong value for input validated to custom value */
public static final String CORRECT_CUSTOM_VAL = "5";
-
-
+
/** validation message for input validated to min value */
public static final String MSG_MIN = "must be greater than or equal to 2";
/** validation message for input validated to max value */
public static final String MSG_MAX = "must be less than or equal to 2";
/** validation message for input validated to custom value */
public static final String MSG_CUSTOM = "must be a positive number";
-
+
private JQueryLocator inputFormat = pjq("span[id$=:slider{0}]
span.rf-insl-inp-cntr > input");
private JQueryLocator msgFormat = pjq("span.rf-msg[id$=:inputMsg{0}]
span.rf-msg-det");
private JQueryLocator outputFormat = pjq("span[id$=:output{0}]");
private JQueryLocator sliderFormat = pjq("span[id$=:slider{0}]
span.rf-insl-trc");
-
+
private JQueryLocator hCommandBtn = pjq("input[id$=:hButton]");
private JQueryLocator a4jCommandBtn = pjq("input[id$=:a4jButton]");
-
+
/** Codes for inputs */
private enum ID {
/** input validated to min val */
@@ -78,33 +78,35 @@
MAX(2),
/** input validated to custom (positive) val */
CUSTOM(3);
-
+
private int id;
+
private ID(int i) {
this.id = i;
}
+
public int val() {
return id;
}
}
-
- /** Position coordinates for slider.
- * Width is 200px, positions are relative to this
+
+ /**
+ * Position coordinates for slider. Width is 200px, positions are relative to this
*/
private enum POSITION {
- LESS_THAN_ZERO(10),
- ZERO(100),
- MORE_THAN_TWO(150);
-
+ LESS_THAN_ZERO(10), ZERO(100), MORE_THAN_TWO(150);
+
private int position;
+
private POSITION(int position) {
this.position = position;
}
- public int val(){
+
+ public int val() {
return position;
}
}
-
+
private void setAllCorrect() {
selenium.type(inputFormat.format(ID.MIN.val()), CORRECT_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
@@ -113,7 +115,7 @@
selenium.type(inputFormat.format(ID.CUSTOM.val()), CORRECT_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
}
-
+
private void setAllWrong() {
selenium.type(inputFormat.format(ID.MIN.val()), WRONG_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
@@ -121,91 +123,99 @@
selenium.fireEvent(inputFormat.format(ID.MAX.val()), Event.BLUR);
selenium.type(inputFormat.format(ID.CUSTOM.val()), WRONG_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
-
+
// wait until validation appears on last input before go ahead (e.g. submit
form)
waitGui.until(TextContainsCondition.getInstance().text(MSG_CUSTOM).locator(msgFormat.format(ID.CUSTOM.val())));
}
-
+
@Override
public URL getTestUrl() {
return URLUtils.buildUrl(contextPath,
"faces/components/richInputNumberSlider/jsr303.xhtml");
}
-
+
@Test
public void testMin() {
selenium.type(inputFormat.format(ID.MIN.val()), WRONG_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
}
-
+
@Test
- public void testSlideToMin() {
+ @Templates(exclude = { "richPopupPanel" })
+ public void testSlideToMin() {
setAllCorrect();
-
+
selenium.mouseDownAt(sliderFormat.format(ID.MIN.val()), new
Point(POSITION.ZERO.val(), 0));
-
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
+
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
}
-
+
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testSlideToMinInPopupPanel() {
+ testSlideToMin();
+ }
+
@Test
public void testMax() {
selenium.type(inputFormat.format(ID.MAX.val()), WRONG_MAX_VAL);
selenium.fireEvent(inputFormat.format(ID.MAX.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MAX.val())).text(MSG_MAX));
}
-
+
@Test
- public void testSlideToMax() {
+ public void testSlideToMax() {
setAllCorrect();
-
+
selenium.mouseDownAt(sliderFormat.format(ID.MAX.val()), new
Point(POSITION.MORE_THAN_TWO.val(), 0));
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MAX.val())).text(MSG_MAX));
}
-
+
@Test
public void testCustom() {
selenium.type(inputFormat.format(ID.CUSTOM.val()), WRONG_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().text(MSG_CUSTOM).locator(msgFormat.format(ID.CUSTOM.val())));
}
-
+
@Test
public void testSlideToNegative() {
setAllCorrect();
-
+
selenium.mouseDownAt(sliderFormat.format(ID.CUSTOM.val()), new
Point(POSITION.LESS_THAN_ZERO.val(), 0));
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.CUSTOM.val())).text(MSG_CUSTOM));
}
-
- @Test
+
+ @Test
+ @Templates(exclude = { "a4jRegion" })
public void testAllCorrect() {
-
+
setAllCorrect();
-
- waitGui.until(textEquals.text(CORRECT_MIN_VAL)
- .locator(outputFormat.format(ID.MIN.val())));
+
+
waitGui.until(textEquals.text(CORRECT_MIN_VAL).locator(outputFormat.format(ID.MIN.val())));
Assert.assertEquals(selenium.getText(outputFormat.format(ID.MAX.val())),
CORRECT_MAX_VAL);
Assert.assertEquals(selenium.getText(outputFormat.format(ID.CUSTOM.val())),
CORRECT_CUSTOM_VAL);
-
+
}
-
+
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11264")
+ @Templates(exclude = { "a4jRegion" })
public void testAllWrong() {
-
+
setAllCorrect();
setAllWrong();
-
+
selenium.click(hCommandBtn);
-
+
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
Assert.assertEquals(selenium.getText(msgFormat.format(ID.MAX.val())), MSG_MAX);
Assert.assertEquals(selenium.getText(msgFormat.format(ID.CUSTOM.val())),
MSG_CUSTOM);
-
+
setAllCorrect();
setAllWrong();
-
+
selenium.click(a4jCommandBtn);
-
+
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
Assert.assertEquals(selenium.getText(msgFormat.format(ID.MAX.val())), MSG_MAX);
Assert.assertEquals(selenium.getText(msgFormat.format(ID.CUSTOM.val())),
MSG_CUSTOM);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -38,6 +38,7 @@
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.Test;
@@ -110,11 +111,18 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-11315")
+ @Templates(exclude = { "richPopupPanel" })
public void testAccesskey() {
testHtmlAttribute(input, "accesskey", "x");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11315")
+ public void testAccesskeyInPopupPanel() {
+ testHtmlAttribute(input, "accesskey", "x");
+ }
+
@Test
public void testCycled() {
JQueryLocator selectOption =
pjq("input[type=radio][name$=cycledInput][value=true]");
@@ -183,7 +191,7 @@
assertEquals(selenium.getText(output), "4", "Output was not
updated.");
phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
- PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed: 2
-> 4");
}
@@ -478,11 +486,17 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10980")
+ @Templates(exclude = { "richPopupPanel" })
public void testTabindex() {
testHtmlAttribute(input, "tabindex", "57");
}
+ @Test(groups = { "4.Future" })
+ @Templates(value = { "richPopupPanel" })
+ public void testTabindexInPopupPanel() {
+ testHtmlAttribute(input, "tabindex", "57");
+ }
+
@Test
@Use(field = "number", value = "correctNumbers")
public void testValueCorrect() {
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerWithJSR303.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerWithJSR303.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerWithJSR303.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -31,49 +31,49 @@
import org.jboss.test.selenium.waiting.TextContainsCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* Test for faces/components/richInputNumberSpinner/jsr303.xhtml page
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
public class TestRichSpinnerWithJSR303 extends AbstractMetamerTest {
-
+
/** Wrong value for input validated to min value */
public static final String WRONG_MIN_VAL = "1";
/** Wrong value for input validated to max value */
public static final String WRONG_MAX_VAL = "5";
/** Wrong value for input validated to custom value */
public static final String WRONG_CUSTOM_VAL = "-1";
-
+
/** Wrong value for input validated to min value */
public static final String CORRECT_MIN_VAL = "3";
/** Wrong value for input validated to max value */
public static final String CORRECT_MAX_VAL = "1";
/** Wrong value for input validated to custom value */
public static final String CORRECT_CUSTOM_VAL = "5";
-
-
+
/** validation message for input validated to min value */
public static final String MSG_MIN = "must be greater than or equal to 2";
/** validation message for input validated to max value */
public static final String MSG_MAX = "must be less than or equal to 2";
/** validation message for input validated to custom value */
public static final String MSG_CUSTOM = "must be a positive number";
-
+
private JQueryLocator inputFormat = pjq("span[id$=:input{0}] > input");
private JQueryLocator msgFormat = pjq("span.rf-msg[id$=:inputMsg{0}]
span.rf-msg-det");
private JQueryLocator outputFormat = pjq("span[id$=:output{0}]");
-
+
private JQueryLocator hCommandBtn = pjq("input[id$=:hButton]");
private JQueryLocator a4jCommandBtn = pjq("input[id$=:a4jButton]");
-
+
private JQueryLocator spinnerIncFormat = jq("span[id$=:input{0}]
span.rf-insp-inc");
private JQueryLocator spinnerDecFormat = jq("span[id$=:input{0}]
span.rf-insp-dec");
-
+
/** Codes for inputs */
private enum ID {
/** input validated to min val */
@@ -82,16 +82,18 @@
MAX(2),
/** input validated to custom (positive) val */
CUSTOM(3);
-
+
private int id;
+
private ID(int i) {
this.id = i;
}
+
public int val() {
return id;
}
}
-
+
private void setAllCorrect() {
selenium.type(inputFormat.format(ID.MIN.val()), CORRECT_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
@@ -100,7 +102,7 @@
selenium.type(inputFormat.format(ID.CUSTOM.val()), CORRECT_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
}
-
+
private void setAllWrong() {
selenium.type(inputFormat.format(ID.MIN.val()), WRONG_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
@@ -108,32 +110,32 @@
selenium.fireEvent(inputFormat.format(ID.MAX.val()), Event.BLUR);
selenium.type(inputFormat.format(ID.CUSTOM.val()), WRONG_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
-
+
// wait until validation appears on last input before go ahead (e.g. submit
form)
waitGui.until(TextContainsCondition.getInstance().text(MSG_CUSTOM).locator(msgFormat.format(ID.CUSTOM.val())));
}
-
+
private void spinUp(ID inputId, String toValue) {
int currentVal =
Integer.parseInt(selenium.getValue(inputFormat.format(inputId.val())));
int diff = Integer.parseInt(toValue) - currentVal;
-
+
if (diff < 0) {
throw new IllegalArgumentException("Cannot spin from " + currentVal
+ " to " + toValue);
}
-
- for (int i = 0; i < diff; ++i) {
+
+ for (int i = 0; i < diff; ++i) {
selenium.clickAt(spinnerIncFormat.format(inputId.val()), new Point(1, 1));
- }
+ }
}
-
+
private void spinDown(ID inputId, String toValue) {
int currentVal =
Integer.parseInt(selenium.getValue(inputFormat.format(inputId.val())));
int diff = currentVal - Integer.parseInt(toValue);
-
+
if (diff < 0) {
throw new IllegalArgumentException("Cannot spin from " + currentVal
+ " to " + toValue);
}
-
+
for (int i = 0; i < diff; ++i) {
selenium.clickAt(spinnerDecFormat.format(inputId.val()), new Point(1, 1));
}
@@ -143,83 +145,86 @@
public URL getTestUrl() {
return URLUtils.buildUrl(contextPath,
"faces/components/richInputNumberSpinner/jsr303.xhtml");
}
-
+
@Test
public void testMin() {
selenium.type(inputFormat.format(ID.MIN.val()), WRONG_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
}
-
+
@Test
public void testSpinToMin() {
selenium.type(inputFormat.format(ID.MIN.val()), CORRECT_MIN_VAL);
selenium.fireEvent(inputFormat.format(ID.MIN.val()), Event.BLUR);
-
+
spinDown(ID.MIN, WRONG_MIN_VAL);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
}
-
+
@Test
public void testMax() {
selenium.type(inputFormat.format(ID.MAX.val()), WRONG_MAX_VAL);
selenium.fireEvent(inputFormat.format(ID.MAX.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MAX.val())).text(MSG_MAX));
}
-
+
@Test
public void testSpinToMax() {
selenium.type(inputFormat.format(ID.MAX.val()), CORRECT_MAX_VAL);
selenium.fireEvent(inputFormat.format(ID.MAX.val()), Event.BLUR);
-
+
spinUp(ID.MAX, WRONG_MAX_VAL);
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MAX.val())).text(MSG_MAX));
}
-
+
@Test
public void testCustom() {
selenium.type(inputFormat.format(ID.CUSTOM.val()), WRONG_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
waitGui.until(TextContainsCondition.getInstance().text(MSG_CUSTOM).locator(msgFormat.format(ID.CUSTOM.val())));
}
-
+
@Test
public void testSpinToNegative() {
selenium.type(inputFormat.format(ID.CUSTOM.val()), CORRECT_CUSTOM_VAL);
selenium.fireEvent(inputFormat.format(ID.CUSTOM.val()), Event.BLUR);
-
+
spinDown(ID.CUSTOM, WRONG_CUSTOM_VAL);
waitGui.until(TextContainsCondition.getInstance().text(MSG_CUSTOM).locator(msgFormat.format(ID.CUSTOM.val())));
}
-
- @Test
+
+ @Test
+ @Templates(exclude = { "a4jRegion" })
public void testAllCorrect() {
-
+
setAllCorrect();
-
-
waitGui.until(TextContainsCondition.getInstance().text(CORRECT_MIN_VAL).locator(outputFormat.format(ID.MIN.val())));
+
+ waitGui.until(TextContainsCondition.getInstance().text(CORRECT_MIN_VAL)
+ .locator(outputFormat.format(ID.MIN.val())));
Assert.assertEquals(selenium.getText(outputFormat.format(ID.MAX.val())),
CORRECT_MAX_VAL);
Assert.assertEquals(selenium.getText(outputFormat.format(ID.CUSTOM.val())),
CORRECT_CUSTOM_VAL);
}
-
+
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11264")
+ @Templates(exclude = { "a4jRegion" })
public void testAllWrong() {
-
+
setAllCorrect();
setAllWrong();
-
+
selenium.click(hCommandBtn);
-
+
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
Assert.assertEquals(selenium.getText(msgFormat.format(ID.MAX.val())), MSG_MAX);
Assert.assertEquals(selenium.getText(msgFormat.format(ID.CUSTOM.val())),
MSG_CUSTOM);
-
+
setAllCorrect();
setAllWrong();
-
+
selenium.click(a4jCommandBtn);
-
+
waitGui.until(TextContainsCondition.getInstance().locator(msgFormat.format(ID.MIN.val())).text(MSG_MIN));
Assert.assertEquals(selenium.getText(msgFormat.format(ID.MAX.val())), MSG_MAX);
Assert.assertEquals(selenium.getText(msgFormat.format(ID.CUSTOM.val())),
MSG_CUSTOM);
Copied:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/MenuItemAttributes.java
(from rev 22826,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/MenuItemAttributes.java)
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/MenuItemAttributes.java
(rev 0)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/MenuItemAttributes.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richMenuItem;
+
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
+
+/**
+ * Attributes for rich:menuItem component
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ *
+ * @version $Revision$
+ */
+public enum MenuItemAttributes implements AttributeEnum {
+ bypassUpdates,
+ data,
+ dir,
+ disabled,
+ execute,
+ icon,
+ iconDisabled,
+ immediate,
+ label,
+ lang,
+ limitRender,
+ mode,
+ onbeforedomupdate,
+ onbegin,
+ onclick,
+ oncomplete,
+ ondblclick,
+ onkeydown,
+ onkeypress,
+ onkeyup,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup,
+ render,
+ rendered,
+ status,
+ style,
+ styleClass,
+ title
+}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuItem/TestRichMenuItem.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -32,6 +32,8 @@
import static org.testng.Assert.assertNotSame;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
+import static
org.richfaces.tests.metamer.ftest.attributes.AttributeList.menuItemAttributes;
+import static org.richfaces.tests.metamer.ftest.richMenuItem.MenuItemAttributes.*;
import java.net.URL;
@@ -43,7 +45,6 @@
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -123,9 +124,8 @@
@Test
public void testBypassUpdates() {
-
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
- selenium.waitForPageToLoad();
-
+ menuItemAttributes.set(bypassUpdates, Boolean.TRUE);
+
String reqTime = selenium.getText(time);
selenium.mouseOver(fileMenuLabel);
guardXhr(selenium).click(menuItem1);
@@ -142,11 +142,9 @@
@Test
public void testData() {
- selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces
4");
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(data, "RichFaces 4");
- selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(oncomplete, "data = event.data");
String reqTime = selenium.getText(time);
selenium.mouseOver(fileMenuLabel);
@@ -164,8 +162,7 @@
@Test
public void testDisabled() {
-
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(disabled, Boolean.TRUE);
assertTrue(selenium.belongsClass(menuItem1, "rf-ddm-itm-dis"),
"Menu item should have class \"rf-ddm-itm-dis\".");
@@ -176,8 +173,7 @@
@Test
public void testExecute() {
- selenium.type(pjq("input[type=text][id$=executeInput]"), "@this
executeChecker");
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(execute, "@this executeChecker");
String reqTime = selenium.getText(time);
selenium.mouseOver(fileMenuLabel);
@@ -198,18 +194,18 @@
public void testIcon() {
AttributeLocator<?> attr = image.getAttribute(Attribute.SRC);
- selenium.select(pjq("select[id$=iconInput]"),
optionLabel("star"));
- selenium.waitForPageToLoad();
+ // selenium.select(pjq("select[id$=iconInput]"),
optionLabel("star"));
+ menuItemAttributes.set(icon, "star");
assertTrue(selenium.getAttribute(attr).contains("star.png"),
"Image's src attribute should contain
\"star.png\".");
- selenium.select(pjq("select[id$=iconInput]"),
optionLabel("nonexisting"));
- selenium.waitForPageToLoad();
+ // selenium.select(pjq("select[id$=iconInput]"),
optionLabel("nonexisting"));
+ menuItemAttributes.set(icon, "nonexisting");
assertTrue(selenium.getAttribute(attr).contains("nonexisting"),
"Image's src attribute should contain
\"nonexisting\".");
- selenium.select(pjq("select[id$=iconInput]"),
optionLabel("null"));
- selenium.waitForPageToLoad();
+ // selenium.select(pjq("select[id$=iconInput]"),
optionLabel("null"));
+ menuItemAttributes.set(icon, "null");
assertFalse(selenium.isElementPresent(image), "Icon should not be
present.");
assertTrue(selenium.isElementPresent(menuItem1.getDescendant(jq("div.rf-ddm-emptyIcon"))),
"Empty icon should be present.");
@@ -217,8 +213,7 @@
@Test
public void testIconDisabled() {
-
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(disabled, Boolean.TRUE);
AttributeLocator<?> attr = image.getAttribute(Attribute.SRC);
@@ -226,21 +221,20 @@
assertTrue(selenium.isElementPresent(menuItem1.getDescendant(jq("div.rf-ddm-emptyIcon"))),
"Empty icon should be present.");
- selenium.select(pjq("select[id$=iconDisabledInput]"),
optionLabel("star"));
- selenium.waitForPageToLoad();
+ // selenium.select(pjq("select[id$=iconDisabledInput]"),
optionLabel("star"));
+ menuItemAttributes.set(iconDisabled, "star");
assertTrue(selenium.getAttribute(attr).contains("star.png"),
"Image's src attribute should contain
\"star.png\".");
- selenium.select(pjq("select[id$=iconDisabledInput]"),
optionLabel("nonexisting"));
- selenium.waitForPageToLoad();
+ // selenium.select(pjq("select[id$=iconDisabledInput]"),
optionLabel("nonexisting"));
+ menuItemAttributes.set(iconDisabled, "nonexisting");
assertTrue(selenium.getAttribute(attr).contains("nonexisting"),
"Image's src attribute should contain
\"nonexisting\".");
}
@Test
public void testImmediate() {
-
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(immediate, Boolean.TRUE);
String reqTime = selenium.getText(time);
selenium.mouseOver(fileMenuLabel);
@@ -257,8 +251,7 @@
@Test
public void testLabel() {
- selenium.type(pjq("input[type=text][id$=labelInput]"), "new
label");
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(MenuItemAttributes.label, "new label");
assertEquals(selenium.getText(label), "new label", "New label of
first menu item.");
}
@@ -270,8 +263,7 @@
@Test
public void testLimitRender() {
-
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(limitRender, Boolean.TRUE);
String reqTime = selenium.getText(time);
selenium.mouseOver(fileMenu);
@@ -281,9 +273,10 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10200")
public void testMode() {
String reqTime = selenium.getText(time);
+
+ // test for @mode=ajax
selenium.mouseOver(fileMenu);
guardXhr(selenium).click(menuItem1);
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
@@ -296,8 +289,8 @@
listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(6)"));
assertEquals(listenerOutput, "* action invoked", "Action's
output");
- selenium.click(pjq("input[name$=modeInput][value=server]"));
- selenium.waitForPageToLoad();
+ // test for @mode=server
+ menuItemAttributes.set(mode, "server");
selenium.mouseOver(fileMenu);
guardHttp(selenium).click(menuItem1);
@@ -309,16 +302,14 @@
assertEquals(listenerOutput, "* action listener invoked", "Action
listener's output");
listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(6)"));
assertEquals(listenerOutput, "* action invoked", "Action's
output");
+
}
@Test
public void testEvents() {
- selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
- selenium.waitForPageToLoad();
- selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
- selenium.waitForPageToLoad();
- selenium.type(pjq("input[type=text][id$=oncompleteInput]"),
"metamerEvents += \"complete \"");
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(onbegin, "metamerEvents += \"begin
\"");
+ menuItemAttributes.set(onbeforedomupdate, "metamerEvents +=
\"beforedomupdate \"");
+ menuItemAttributes.set(oncomplete, "metamerEvents += \"complete
\"");
selenium.getEval(new JavaScript("window.metamerEvents =
\"\";"));
@@ -386,8 +377,7 @@
@Test
public void testRendered() {
-
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
- selenium.waitForPageToLoad();
+ menuItemAttributes.set(rendered, Boolean.FALSE);
assertFalse(selenium.isElementPresent(menuItem1), "Menu item should not be
rendered when rendered=false.");
assertTrue(selenium.isDisplayed(menuItem1), "Menu item should be displayed
when item 1 is not rendered.");
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -31,7 +31,7 @@
/**
* Test case for page /faces/components/richMessages/csv.xhtml
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
@@ -58,13 +58,14 @@
}
// list of called test methods
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
- @Test
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11415")
public void testGlobalOnly() {
super.testGlobalOnly();
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -31,7 +31,7 @@
/**
* Test case for page /faces/components/richMessages/jsfValidator.xhtml
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
@@ -58,13 +58,14 @@
}
// list of called test methods
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
- @Test
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11415")
public void testGlobalOnly() {
super.testGlobalOnly();
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -31,7 +31,7 @@
/**
* Test case for page /faces/components/richMessages/jsr303.xhtml
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
@@ -58,13 +58,14 @@
}
// list of called test methods
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
- @Test
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11415")
public void testGlobalOnly() {
super.testGlobalOnly();
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/NotifyStackAttributes.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/NotifyStackAttributes.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/NotifyStackAttributes.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -28,7 +28,9 @@
*/
public enum NotifyStackAttributes implements AttributeEnum {
- rendered,
- styleClass
-
+ direction,
+ method,
+ position,
+ rendered
+
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotify.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotify.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotify.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -21,21 +21,23 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richNotify;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertEquals;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+
import org.jboss.test.selenium.css.CssProperty;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.NegationCondition;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.bean.rich.RichNotifyBean;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -71,13 +73,13 @@
@Test
public void testAttributeDelay() {
- // set the delay to <1000>
- attributesNotify.set(NotifyAttributes.delay, 1000);
- // wait for <500>
- delay(500);
- assertFalse(selenium.isElementPresent(notify), "The delay is set to 1000 and
after some little waiting the notify shouldn't be present.");
+ // set the delay to <2000>
+ attributesNotify.set(NotifyAttributes.delay, 2000);
// wait for <1000>
delay(1000);
+ assertFalse(selenium.isElementPresent(notify), "The delay is set to 1000 and
after some little waiting the notify shouldn't be present.");
+ // wait for <1500>
+ delay(1500);
assertTrue(selenium.isElementPresent(notify), "The delay is set to 1000 and
after some waiting the notify should be present.");
}
@@ -148,6 +150,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11433")
public void testAttributeSticky() {
// set the stayTime to <0>
attributesNotify.set(NotifyAttributes.stayTime, 0);
@@ -322,17 +325,16 @@
// set the sticky to <true>
selenium.click(pjq("input[type=radio][name*='attributesNotifyMessages:sticky'][value=true]"));
selenium.waitForPageToLoad();
- // produce messages
for(String type : messages.keySet()) {
+ // produce message
produceMessage(messages.get(type), type, 1);
- }
- // check whether the messages are still present
- delay(500);
- for(String type : messages.keySet()) {
+ delay(500);
+ // check whether the messages are still present
waitGui
.failWith("The stayTime is set to <0> and sticky to
<true>, so the " + type + " message should be present.")
- .until(elementPresent.locator(messages.get(type)));
- }
+ .until(elementPresent.locator(messages.get(type)));
+ closeAll(notify);
+ }
}
@Test
@@ -352,12 +354,6 @@
}
@Test
- public void testAttributeStackStyleClass() {
- attributesStack.set(NotifyStackAttributes.styleClass,
"someNiceStyleClass");
- assertTrue(selenium.belongsClass(notifyStack, "someNiceStyleClass"));
- }
-
- @Test
public void testInit() {
assertTrue(selenium.isElementPresent(notify), "There is no notify message
after page is loaded.");
assertEquals(selenium.getText(getDetail(notify)), RichNotifyBean.DEFAULT_DETAIL,
"The notify detail doesn't match.");
@@ -365,6 +361,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11433")
public void testCloseAndProduceNotify() {
// check closing the notify
close(notify);
@@ -390,6 +387,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11433")
public void testProduceMoreMessages() {
// set the messageCount to <testedNumber>
int testedNumber = 3;
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotifyMoreStacks.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotifyMoreStacks.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richNotify/TestRichNotifyMoreStacks.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -27,7 +27,6 @@
import static org.testng.Assert.assertEquals;
import java.net.URL;
-import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.testng.annotations.Test;
@@ -50,15 +49,20 @@
private final JQueryLocator stack2 = jq("div.bottomRight");
/**
- * locater of the input which is associated with messages for the first stack
+ * locator of the input which is associated with messages for the first stack
*/
private final JQueryLocator number1 = pjq("input[id$=number1]");
/**
- * locater of the input which is associated with messages for the second stack
+ * locator of the input which is associated with messages for the second stack
*/
private final JQueryLocator number2 = pjq("input[id$=number2]");
+ /**
+ * locator of the h:commnadButton submit
+ */
+ private final JQueryLocator submitHCommandButton =
pjq("input[id$=hCommandButtonSubmit]");
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/richNotify/moreStacks.xhtml");
@@ -66,8 +70,6 @@
@Test
public void testInit() {
- assertTrue(selenium.isElementPresent(stack1), "The first stack is not
present.");
- assertTrue(selenium.isElementPresent(stack2), "The second stack is not
present.");
assertTrue(selenium.isElementPresent(inStack(stack1, notify)), "The notify
in the first stack is not present.");
assertTrue(selenium.isElementPresent(inStack(stack2, notify)), "The notify
in the second stack is not present.");
assertEquals(1, getNumberOfNotifies(stack1), "The initial number of notifies
in the first stack should be <1>, found <" + getNumberOfNotifies(stack1) +
">.");
@@ -77,32 +79,28 @@
@Test
public void testValidationErrorInTwoStacks() {
// notify in stacks
- JQueryLocator message1 = inStack(stack1, notify);
- JQueryLocator message2 = inStack(stack2, notify);
- // close notifes in both stacks
- close(message1);
- close(message2);
+ JQueryLocator message1 = inStack(stack1, notifyError);
+ JQueryLocator message2 = inStack(stack2, notifyError);
// try to fill the number 1 field (wrong)
selenium.type(number1, "1");
- selenium.fireEvent(number1, Event.BLUR);
- delay(1000);
+ selenium.type(number2, "5");
+ selenium.click(submitHCommandButton);
+ selenium.waitForPageToLoad();
waitGui
.failWith("After wrong filling the first form field the number of
messages in the first stack should be <1>, found <" +
selenium.getCount(message1) + ">")
.until(countEquals.locator(message1).count(1));
waitGui
.failWith("After wrong filling the first form field the number of
messages in the second stack should be <0>, found <" +
selenium.getCount(message2) + ">")
- .until(countEquals.locator(message1).count(0));
-
- // close produced notifies
+ .until(countEquals.locator(message2).count(0));
close(message1);
- close(message2);
// try to fill the number 2 field (wrong)
+ selenium.type(number1, "10");
selenium.type(number2, "1");
- selenium.fireEvent(number2, Event.BLUR);
- delay(1000);
+ selenium.click(submitHCommandButton);
+ selenium.waitForPageToLoad();
waitGui
.failWith("After wrong filling the second form field the number of
messages in the second stack should be <1>, found <" +
selenium.getCount(message2) + ">")
- .until(countEquals.locator(message1).count(1));
+ .until(countEquals.locator(message2).count(1));
waitGui
.failWith("After wrong filling the second form field the number of
messages in the first stack should be <0>, found <" +
selenium.getCount(message1) + ">")
.until(countEquals.locator(message1).count(0));
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -32,6 +32,7 @@
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.model.PanelMenu;
@@ -75,6 +76,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11547")
@Use(field = "event", value = "ajaxExpansionEvents")
public void testClientSideExpansionEvent() {
panelMenuGroupAttributes.set(mode, ajax);
@@ -109,6 +111,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11547")
public void testClientSideExpansionEventsOrderAjax() {
panelMenuGroupAttributes.set(mode, ajax);
menu.setGroupMode(ajax);
@@ -129,6 +132,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11547")
@Use(field = "event", value = "serverExpansionEvents")
public void testClientSideExpansionEventsServer() {
panelMenuGroupAttributes.set(mode, server);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -88,7 +88,7 @@
super.testRequestEventsAfter(ajaxEvents);
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-10844")
public void testClientSideEventsOrderServer() {
panelMenuItemAttributes.set(mode, server);
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -22,6 +22,7 @@
package org.richfaces.tests.metamer.ftest.richPickList;
import static java.text.MessageFormat.format;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -31,8 +32,11 @@
import java.net.URL;
+import org.atmosphere.client.JavascriptClientFilter;
import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.URLUtils;
import org.jboss.test.selenium.waiting.EventFiredCondition;
@@ -317,7 +321,14 @@
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOnblur() {
- testFireEvent(Event.BLUR, pickListTop);
+ ElementLocator<?> eventInput = pjq("input[id$=onblurInput]");
+ String value = "metamerEvents += \"blur \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(addAllBtn, Event.FOCUS);
+ selenium.fireEvent(addAllBtn, Event.BLUR);
+
+ waitGui.failWith("Attribute onblur does not work correctly").until(new
EventFiredCondition(Event.BLUR));
}
@Test
@@ -396,7 +407,14 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourceblur() {
- testFireEvent(Event.BLUR, pickListSource, "sourceblur");
+ ElementLocator<?> eventInput =
pjq("input[id$=onsourceblurInput]");
+ String value = "metamerEvents += \"blur \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.click(pickListSrcItems);
+ selenium.click(pickListTargetItems);
+
+ waitGui.failWith("Attribute onsourceblur does not work
correctly").until(new EventFiredCondition(Event.BLUR));
}
@Test
@@ -412,25 +430,57 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOnsourcefocus() {
- testFireEvent(Event.FOCUS, pickListSource, "sourcefocus");
+ ElementLocator<?> eventInput =
pjq("input[id$=onsourcefocusInput]");
+ String value = "metamerEvents += \"focus \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.click(pickListSrcItems);
+
+ waitGui.failWith("Attribute onsourcefocus does not work
correctly").until(new EventFiredCondition(Event.FOCUS));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOnsourcekeydown() {
- testFireEvent(Event.KEYDOWN, pickListSource, "sourcekeydown");
+ ElementLocator<?> eventInput =
pjq("input[id$=onsourcekeydownInput]");
+ String value = "metamerEvents += \"keydown \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListSrcItems, Event.KEYDOWN);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListSourceItems]').keydown()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute onsourcekeydown does not work
correctly").until(
+ new EventFiredCondition(Event.KEYDOWN));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOnsourcekeypress() {
- testFireEvent(Event.KEYPRESS, pickListSource, "sourcekeypress");
+ ElementLocator<?> eventInput =
pjq("input[id$=onsourcekeypressInput]");
+ String value = "metamerEvents += \"keypress \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListSrcItems, Event.KEYPRESS);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListSourceItems]').keypress()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute onsourcekeypress does not work
correctly").until(
+ new EventFiredCondition(Event.KEYPRESS));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOnsourcekeyup() {
- testFireEvent(Event.KEYUP, pickListSource, "sourcekeyup");
+ ElementLocator<?> eventInput =
pjq("input[id$=onsourcekeyupInput]");
+ String value = "metamerEvents += \"keyup \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListSrcItems, Event.KEYUP);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListSourceItems]').keyup()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute onsourcekeyup does not work
correctly").until(new EventFiredCondition(Event.KEYUP));
}
@Test
@@ -461,7 +511,14 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetblur() {
- testFireEvent(Event.BLUR, pickListTarget, "targetblur");
+ ElementLocator<?> eventInput =
pjq("input[id$=ontargetblurInput]");
+ String value = "metamerEvents += \"blur \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.click(pickListTargetItems);
+ selenium.click(pickListSrcItems);
+
+ waitGui.failWith("Attribute ontargetblur does not work
correctly").until(new EventFiredCondition(Event.BLUR));
}
@Test
@@ -477,25 +534,57 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11322")
public void testOntargetfocus() {
- testFireEvent(Event.FOCUS, pickListTarget, "targetfocus");
+ ElementLocator<?> eventInput =
pjq("input[id$=ontargetfocusInput]");
+ String value = "metamerEvents += \"focus \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.click(pickListTargetItems);
+
+ waitGui.failWith("Attribute ontargetfocus does not work
correctly").until(new EventFiredCondition(Event.FOCUS));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOntargetkeydown() {
- testFireEvent(Event.KEYDOWN, pickListTarget, "targetkeydown");
+ ElementLocator<?> eventInput =
pjq("input[id$=ontargetkeydownInput]");
+ String value = "metamerEvents += \"keydown \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListTargetItems, Event.KEYDOWN);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListTargetItems]').keydown()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute ontargetkeydown does not work
correctly").until(
+ new EventFiredCondition(Event.KEYDOWN));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOntargetkeypress() {
- testFireEvent(Event.KEYPRESS, pickListTarget, "targetkeypress");
+ ElementLocator<?> eventInput =
pjq("input[id$=ontargetkeypressInput]");
+ String value = "metamerEvents += \"keypress \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListTargetItems, Event.KEYPRESS);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListTargetItems]').keypress()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute ontargetkeypress does not work
correctly").until(
+ new EventFiredCondition(Event.KEYPRESS));
}
@Test
@IssueTracking({ "https://issues.jboss.org/browse/RFPL-1659",
"https://issues.jboss.org/browse/RF-11322" })
public void testOntargetkeyup() {
- testFireEvent(Event.KEYUP, pickListTarget, "targetkeyup");
+ ElementLocator<?> eventInput =
pjq("input[id$=ontargetkeyupInput]");
+ String value = "metamerEvents += \"keyup \"";
+
+ guardHttp(selenium).type(eventInput, value);
+ selenium.fireEvent(pickListTargetItems, Event.KEYUP);
+ JavaScript script = new
JavaScript("window.jQuery('div[id$=pickListTargetItems]').keyup()");
+ selenium.getEval(script);
+
+ waitGui.failWith("Attribute ontargetkeyup does not work
correctly").until(new EventFiredCondition(Event.KEYUP));
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -50,21 +50,24 @@
* @version $Revision$
*/
public class TestRichTab extends AbstractMetamerTest {
-
+
private static final JQueryLocator PHASE_FORMAT = jq("div#phasesPanel
li:eq({0})");
- private static final String PHASE_LISTENER_LOG = "* action listener
invoked";
-
+ private static final String ACTION_LOG = "* action invoked";
+ private static final String ACTION_LISTENER_LOG = "* action listener
invoked";
+
private JQueryLocator panel = pjq("div[id$=tabPanel]");
- private JQueryLocator[] itemContents = {pjq("div[id$=tab1] >
div.rf-tab-cnt"), pjq("div[id$=tab2] > div.rf-tab-cnt"),
- pjq("div[id$=tab3] > div.rf-tab-cnt"), pjq("div[id$=tab4] >
div.rf-tab-cnt"), pjq("div[id$=tab5] > div.rf-tab-cnt")};
- private JQueryLocator[] activeHeaders = {pjq("td[id$=tab1:header:active]"),
pjq("td[id$=tab2:header:active]"),
- pjq("td[id$=tab3:header:active]"),
pjq("td[id$=tab4:header:active]"),
pjq("td[id$=tab5:header:active]")};
- private JQueryLocator[] inactiveHeaders =
{pjq("td[id$=tab1:header:inactive]"),
pjq("td[id$=tab2:header:inactive]"),
- pjq("td[id$=tab3:header:inactive]"),
pjq("td[id$=tab4:header:inactive]"),
pjq("td[id$=tab5:header:inactive]")};
- private JQueryLocator[] disabledHeaders =
{pjq("td[id$=tab1:header:disabled]"),
pjq("td[id$=tab2:header:disabled]"),
- pjq("td[id$=tab3:header:disabled]"),
pjq("td[id$=tab4:header:disabled]"),
pjq("td[id$=tab5:header:disabled]")};
+ private JQueryLocator[] itemContents = { pjq("div[id$=tab1] >
div.rf-tab-cnt"),
+ pjq("div[id$=tab2] > div.rf-tab-cnt"), pjq("div[id$=tab3] >
div.rf-tab-cnt"),
+ pjq("div[id$=tab4] > div.rf-tab-cnt"), pjq("div[id$=tab5] >
div.rf-tab-cnt") };
+ private JQueryLocator[] activeHeaders = {
pjq("td[id$=tab1:header:active]"), pjq("td[id$=tab2:header:active]"),
+ pjq("td[id$=tab3:header:active]"),
pjq("td[id$=tab4:header:active]"), pjq("td[id$=tab5:header:active]")
};
+ private JQueryLocator[] inactiveHeaders = {
pjq("td[id$=tab1:header:inactive]"),
+ pjq("td[id$=tab2:header:inactive]"),
pjq("td[id$=tab3:header:inactive]"),
pjq("td[id$=tab4:header:inactive]"),
+ pjq("td[id$=tab5:header:inactive]") };
+ private JQueryLocator[] disabledHeaders = {
pjq("td[id$=tab1:header:disabled]"),
+ pjq("td[id$=tab2:header:disabled]"),
pjq("td[id$=tab3:header:disabled]"),
pjq("td[id$=tab4:header:disabled]"),
+ pjq("td[id$=tab5:header:disabled]") };
private JQueryLocator tab1 = pjq("div[id$=tab1]");
-
@Override
public URL getTestUrl() {
@@ -73,23 +76,37 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11427")
- public void testActionListener() {
+ public void testAction() {
retrieveRequestTime.initializeValue();
selenium.click(pjq("input[id$=nextTabButton]"));
waitAjax.waitForChange(retrieveRequestTime);
-
+
retrieveRequestTime.initializeValue();
selenium.click(pjq("input[id$=prevTabButton]"));
waitAjax.waitForChange(retrieveRequestTime);
-
- waitGui
- .failWith("Expected <" + PHASE_LISTENER_LOG + ">, found
<" + selenium.getText(PHASE_FORMAT.format(5)) + ">")
- .until(textEquals.locator(PHASE_FORMAT.format(5)).text(
- PHASE_LISTENER_LOG)
- );
- }
+
+ waitGui.failWith(
+ "Expected <" + ACTION_LOG + ">, found <" +
selenium.getText(PHASE_FORMAT.format(6)) + ">").until(
+ textEquals.locator(PHASE_FORMAT.format(6)).text(ACTION_LOG));
+ }
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11427")
+ public void testActionListener() {
+ retrieveRequestTime.initializeValue();
+ selenium.click(pjq("input[id$=nextTabButton]"));
+ waitAjax.waitForChange(retrieveRequestTime);
+
+ retrieveRequestTime.initializeValue();
+ selenium.click(pjq("input[id$=prevTabButton]"));
+ waitAjax.waitForChange(retrieveRequestTime);
+
+ waitGui.failWith(
+ "Expected <" + ACTION_LISTENER_LOG + ">, found
<" + selenium.getText(PHASE_FORMAT.format(5)) + ">").until(
+ textEquals.locator(PHASE_FORMAT.format(5)).text(ACTION_LISTENER_LOG));
+ }
+
+ @Test
public void testInit() {
boolean displayed = selenium.isDisplayed(panel);
assertTrue(displayed, "Tab panel is not present on the page.");
@@ -166,7 +183,8 @@
selenium.type(pjq("input[type=text][id$=headerInput]"),
"ľščťťžžôúňď ацущьмщфзщйцу");
selenium.waitForPageToLoad();
- assertEquals(selenium.getText(activeHeaders[0]), "ľščťťžžôúňď
ацущьмщфзщйцу", "Header of the first tab did not change.");
+ assertEquals(selenium.getText(activeHeaders[0]), "ľščťťžžôúňď
ацущьмщфзщйцу",
+ "Header of the first tab did not change.");
}
@Test
@@ -184,6 +202,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11549")
public void testHeaderClass() {
selenium.type(pjq("input[id$=headerClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
@@ -203,12 +222,16 @@
selenium.waitForPageToLoad();
assertFalse(selenium.belongsClass(activeHeaders[0],
"metamer-ftest-class"), "headerDisabledClass does not work");
- assertFalse(selenium.belongsClass(inactiveHeaders[0],
"metamer-ftest-class"), "headerDisabledClass does not work");
- assertTrue(selenium.belongsClass(disabledHeaders[0],
"metamer-ftest-class"), "headerDisabledClass does not work");
+ assertFalse(selenium.belongsClass(inactiveHeaders[0],
"metamer-ftest-class"),
+ "headerDisabledClass does not work");
+ assertTrue(selenium.belongsClass(disabledHeaders[0],
"metamer-ftest-class"),
+ "headerDisabledClass does not work");
assertFalse(selenium.belongsClass(activeHeaders[1],
"metamer-ftest-class"), "headerDisabledClass does not work");
- assertFalse(selenium.belongsClass(inactiveHeaders[1],
"metamer-ftest-class"), "headerDisabledClass does not work");
- assertFalse(selenium.belongsClass(disabledHeaders[1],
"metamer-ftest-class"), "headerDisabledClass does not work");
+ assertFalse(selenium.belongsClass(inactiveHeaders[1],
"metamer-ftest-class"),
+ "headerDisabledClass does not work");
+ assertFalse(selenium.belongsClass(disabledHeaders[1],
"metamer-ftest-class"),
+ "headerDisabledClass does not work");
}
@Test
@@ -217,12 +240,16 @@
selenium.waitForPageToLoad();
assertFalse(selenium.belongsClass(activeHeaders[0],
"metamer-ftest-class"), "headerInactiveClass does not work");
- assertTrue(selenium.belongsClass(inactiveHeaders[0],
"metamer-ftest-class"), "headerInactiveClass does not work");
- assertFalse(selenium.belongsClass(disabledHeaders[0],
"metamer-ftest-class"), "headerInactiveClass does not work");
+ assertTrue(selenium.belongsClass(inactiveHeaders[0],
"metamer-ftest-class"),
+ "headerInactiveClass does not work");
+ assertFalse(selenium.belongsClass(disabledHeaders[0],
"metamer-ftest-class"),
+ "headerInactiveClass does not work");
assertFalse(selenium.belongsClass(activeHeaders[1],
"metamer-ftest-class"), "headerInactiveClass does not work");
- assertFalse(selenium.belongsClass(inactiveHeaders[1],
"metamer-ftest-class"), "headerInactiveClass does not work");
- assertFalse(selenium.belongsClass(disabledHeaders[1],
"metamer-ftest-class"), "headerInactiveClass does not work");
+ assertFalse(selenium.belongsClass(inactiveHeaders[1],
"metamer-ftest-class"),
+ "headerInactiveClass does not work");
+ assertFalse(selenium.belongsClass(disabledHeaders[1],
"metamer-ftest-class"),
+ "headerInactiveClass does not work");
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -53,16 +53,19 @@
public class TestRichTabPanel extends AbstractMetamerTest {
private JQueryLocator panel = pjq("div[id$=tabPanel]");
- private JQueryLocator[] items = {pjq("div[id$=tab1]"),
pjq("div[id$=tab2]"), pjq("div[id$=tab3]"),
pjq("div[id$=tab4]"),
- pjq("div[id$=tab5]")};
- private JQueryLocator[] itemContents = {pjq("div[id$=tab1] >
div.rf-tab-cnt"), pjq("div[id$=tab2] > div.rf-tab-cnt"),
- pjq("div[id$=tab3] > div.rf-tab-cnt"), pjq("div[id$=tab4] >
div.rf-tab-cnt"), pjq("div[id$=tab5] > div.rf-tab-cnt")};
- private JQueryLocator[] activeHeaders = {pjq("td[id$=tab1:header:active]"),
pjq("td[id$=tab2:header:active]"),
- pjq("td[id$=tab3:header:active]"),
pjq("td[id$=tab4:header:active]"),
pjq("td[id$=tab5:header:active]")};
- private JQueryLocator[] inactiveHeaders =
{pjq("td[id$=tab1:header:inactive]"),
pjq("td[id$=tab2:header:inactive]"),
- pjq("td[id$=tab3:header:inactive]"),
pjq("td[id$=tab4:header:inactive]"),
pjq("td[id$=tab5:header:inactive]")};
- private JQueryLocator[] disabledHeaders =
{pjq("td[id$=tab1:header:disabled]"),
pjq("td[id$=tab2:header:disabled]"),
- pjq("td[id$=tab3:header:disabled]"),
pjq("td[id$=tab4:header:disabled]"),
pjq("td[id$=tab5:header:disabled]")};
+ private JQueryLocator[] items = { pjq("div[id$=tab1]"),
pjq("div[id$=tab2]"), pjq("div[id$=tab3]"),
+ pjq("div[id$=tab4]"), pjq("div[id$=tab5]") };
+ private JQueryLocator[] itemContents = { pjq("div[id$=tab1] >
div.rf-tab-cnt"),
+ pjq("div[id$=tab2] > div.rf-tab-cnt"), pjq("div[id$=tab3] >
div.rf-tab-cnt"),
+ pjq("div[id$=tab4] > div.rf-tab-cnt"), pjq("div[id$=tab5] >
div.rf-tab-cnt") };
+ private JQueryLocator[] activeHeaders = {
pjq("td[id$=tab1:header:active]"), pjq("td[id$=tab2:header:active]"),
+ pjq("td[id$=tab3:header:active]"),
pjq("td[id$=tab4:header:active]"), pjq("td[id$=tab5:header:active]")
};
+ private JQueryLocator[] inactiveHeaders = {
pjq("td[id$=tab1:header:inactive]"),
+ pjq("td[id$=tab2:header:inactive]"),
pjq("td[id$=tab3:header:inactive]"),
pjq("td[id$=tab4:header:inactive]"),
+ pjq("td[id$=tab5:header:inactive]") };
+ private JQueryLocator[] disabledHeaders = {
pjq("td[id$=tab1:header:disabled]"),
+ pjq("td[id$=tab2:header:disabled]"),
pjq("td[id$=tab3:header:disabled]"),
pjq("td[id$=tab4:header:disabled]"),
+ pjq("td[id$=tab5:header:disabled]") };
@Override
public URL getTestUrl() {
@@ -70,43 +73,52 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11550")
public void testHeaderAlignment() {
JQueryLocator spaceLeft = jq(panel.getRawLocator() + "
*.rf-tab-hdr-spcr:eq(0)");
JQueryLocator spaceRight = jq(panel.getRawLocator() + "
*.rf-tab-hdr-spcr:eq(6)");
-
- assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px",
"The header should be aligned to the left, but it isn't.");
- assertTrue(Integer.parseInt(selenium.getStyle(spaceRight,
CssProperty.WIDTH).replace("px", "")) > 100, "The header
should be aligned to the left, but it isn't.");
-
+
+ assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px",
+ "The header should be aligned to the left, but it isn't.");
+ assertTrue(Integer.parseInt(selenium.getStyle(spaceRight,
CssProperty.WIDTH).replace("px", "")) > 100,
+ "The header should be aligned to the left, but it isn't.");
+
selenium.click(pjq("input[name$=headerAlignmentInput][value=left]"));
selenium.waitForPageToLoad();
-
- assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px",
"The header should be aligned to the left, but it isn't.");
- assertTrue(Integer.parseInt(selenium.getStyle(spaceRight,
CssProperty.WIDTH).replace("px", "")) > 100, "The header
should be aligned to the left, but it isn't.");
-
+
+ assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px",
+ "The header should be aligned to the left, but it isn't.");
+ assertTrue(Integer.parseInt(selenium.getStyle(spaceRight,
CssProperty.WIDTH).replace("px", "")) > 100,
+ "The header should be aligned to the left, but it isn't.");
+
selenium.click(pjq("input[name$=headerAlignmentInput][value=right]"));
selenium.waitForPageToLoad();
-
- assertTrue(Integer.parseInt(selenium.getStyle(spaceLeft,
CssProperty.WIDTH).replace("px", "")) > 100, "The header
should be aligned to the right, but it isn't.");
- assertEquals(selenium.getStyle(spaceRight, CssProperty.WIDTH), "0px",
"The header should be aligned to the right, but it isn't.");
+
+ assertTrue(Integer.parseInt(selenium.getStyle(spaceLeft,
CssProperty.WIDTH).replace("px", "")) > 100,
+ "The header should be aligned to the right, but it isn't.");
+ assertEquals(selenium.getStyle(spaceRight, CssProperty.WIDTH), "0px",
+ "The header should be aligned to the right, but it isn't.");
}
-
+
@Test
public void testHeaderPosition() {
selenium.click(pjq("input[name$=headerPositionInput][value=bottom]"));
- selenium.waitForPageToLoad();
-
- JQueryLocator bottomVersion = jq(panel.getRawLocator() + "
*.rf-tab-hdr-tabline-btm-vis");
- JQueryLocator topVersion = jq(panel.getRawLocator() + "
*.rf-tab-hdr-tabline-top-vis");
+ selenium.waitForPageToLoad();
+ JQueryLocator bottomVersion = jq(panel.getRawLocator() + "
.rf-tab-hdr-tabline-vis.rf-tab-hdr-tabline-btm");
+ JQueryLocator topVersion = jq(panel.getRawLocator() + "
.rf-tab-hdr-tabline-vis.rf-tab-hdr-tabline-top");
+
selenium.click(pjq("input[name$=headerPositionInput][value=top]"));
- selenium.waitForPageToLoad();
- assertTrue(selenium.isElementPresent(topVersion), "The header should be
placed on the top position (" + topVersion.getRawLocator() +")");
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.isElementPresent(topVersion), "The header should be
placed on the top position ("
+ + topVersion.getRawLocator() + ")");
selenium.click(pjq("input[name$=headerPositionInput][value=bottom]"));
- selenium.waitForPageToLoad();
- assertTrue(selenium.isElementPresent(bottomVersion), "The header should be
placed on the bottom position (" + bottomVersion.getRawLocator() +")");
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.isElementPresent(bottomVersion), "The header should be
placed on the bottom position ("
+ + bottomVersion.getRawLocator() + ")");
}
-
+
@Test
public void testInit() {
boolean displayed = selenium.isDisplayed(panel);
@@ -240,7 +252,8 @@
guardXhr(selenium).click(inactiveHeaders[1]);
waitGui.failWith("Tab 2 is not
displayed.").until(isDisplayed.locator(itemContents[1]));
- waitGui.failWith("onbeforeitemchange attribute does not work
correctly").until(new EventFiredCondition(new Event("beforeitemchange")));
+ waitGui.failWith("onbeforeitemchange attribute does not work
correctly").until(
+ new EventFiredCondition(new Event("beforeitemchange")));
}
@Test
@@ -282,7 +295,8 @@
guardXhr(selenium).click(inactiveHeaders[1]);
waitGui.failWith("Tab 2 is not
displayed.").until(isDisplayed.locator(itemContents[1]));
- waitGui.failWith("onitemchange attribute does not work
correctly").until(new EventFiredCondition(new Event("itemchange")));
+ waitGui.failWith("onitemchange attribute does not work
correctly").until(
+ new EventFiredCondition(new Event("itemchange")));
}
@Test
@@ -333,7 +347,8 @@
for (int i = 2; i >= 0; i--) {
final int index = i;
guardXhr(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContents[index]));
}
}
@@ -353,7 +368,8 @@
for (int i = 2; i >= 0; i--) {
final int index = i;
guardNoRequest(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContents[index]));
}
}
@@ -366,7 +382,8 @@
for (int i = 2; i >= 0; i--) {
final int index = i;
guardHttp(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(isDisplayed.locator(itemContents[index]));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContents[index]));
}
}
@@ -419,7 +436,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9309")
+ @IssueTracking({ "https://issues.jboss.org/browse/RF-9309",
"https://issues.jboss.org/browse/RF-11549" })
public void testTabHeaderClass() {
selenium.type(pjq("input[id$=tabHeaderClassInput]"),
"metamer-ftest-class");
selenium.waitForPageToLoad();
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanelAddPanel1.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanelAddPanel1.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanelAddPanel1.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -41,83 +41,82 @@
* @version $Revision$
*/
public class TestRichTabPanelAddPanel1 extends AbstractMetamerTest {
-
+
private static final String SWITCH_TYPE_CLIENT = "client";
private static final String SWITCH_TYPE_SERVER = "server";
private static final String SWITCH_TYPE_AJAX = "ajax";
-
+
private static final int MAX_NEW_TAB_COUNT = 3;
private static final int STATIC_TAB_COUNT = 5;
-
+
private JQueryLocator itemContentsFormat = pjq("div[id$=tab{0}:content]");
-
+
private JQueryLocator inactiveHeadersFormat =
pjq("td[id$=tab{0}:header:inactive]");
-
+
private JQueryLocator hCreateTabBtn = pjq("input[id$=hCreateTabButton]");
private JQueryLocator a4jCreateTabBtn =
pjq("input[id$=a4jCreateTabButton]");
-
+
private JQueryLocator tabsCount = pjq("table.rf-tab-hdr-tabs
td.rf-tab-hdr-inact");
-
+
private JQueryLocator switchTypeFormat =
pjq("input[name$=switchTypeInput][value={0}]");
-
+
private JQueryLocator tabCloseFormat = pjq("td[id$=tab{0}:header:inactive]
span.rf-tab-lbl > a");
-
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/richTabPanel/addTab2.xhtml");
}
-
+
/**
* Simple create new tab (without tab switch)
+ *
* @param addTabBtn
*/
private void verifyCreateTab(JQueryLocator addTabBtn) {
-
+
int baseTabsCount = selenium.getCount(tabsCount);
-
+
// add 3 new tabs
for (int i = 1; i <= MAX_NEW_TAB_COUNT; ++i) {
selenium.click(addTabBtn);
waitGui.until(countEquals.count(baseTabsCount + i).locator(tabsCount));
}
}
-
+
/**
- * Simple test to tab delete. Create 3 new tabs and then delete them.
- * Without tab switch.
+ * Simple test to tab delete. Create 3 new tabs and then delete them. Without tab
switch.
*/
private void verifyDeleteTab() {
verifyCreateTab(a4jCreateTabBtn);
-
+
int baseTabsCount = selenium.getCount(tabsCount);
System.out.println(baseTabsCount);
for (int i = 0; i < MAX_NEW_TAB_COUNT; ++i) {
- waitGui.until(elementPresent.locator(inactiveHeadersFormat.format(
- STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT - i)));
+ waitGui
+
.until(elementPresent.locator(inactiveHeadersFormat.format(STATIC_TAB_COUNT +
MAX_NEW_TAB_COUNT - i)));
selenium.fireEvent(tabCloseFormat.format(STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT
- i), Event.CLICK);
System.out.println(selenium.getCount(tabsCount));
waitGui.until(countEquals.count(baseTabsCount - 1 - i).locator(tabsCount));
}
}
-
+
private void verifyContentOfNewTab(JQueryLocator addTabBtn) {
-
+
verifyCreateTab(addTabBtn);
-
- // tab switch work at least with "client" option
+
+ // tab switch work at least with "client" option
selenium.click(switchTypeFormat.format(SWITCH_TYPE_CLIENT));
-
+
System.out.println("testSwitchTypeAjax: tab count: " +
selenium.getCount(tabsCount));
-
+
for (int i = STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT - 1; i >= STATIC_TAB_COUNT;
i--) {
selenium.click(inactiveHeadersFormat.format(i + 1));
- waitGui.failWith("Tab " + (i + 1) + " doesn't display
correct content.")
- .until(textEquals.text("Content of dynamicaly created tab" + (i
+ 1))
+ waitGui.failWith("Tab " + (i + 1) + " doesn't display
correct content.").until(
+ textEquals.text("Content of dynamicaly created tab" + (i + 1))
.locator(itemContentsFormat.format(i + 1)));
}
}
-
-
+
/**
* Create new tab by clicking on h:commandButton
*/
@@ -125,7 +124,7 @@
public void testCreateTabJSF() {
verifyCreateTab(hCreateTabBtn);
}
-
+
/**
* Create new tab by clicking on a4j:commandButton
*/
@@ -133,7 +132,7 @@
public void testCreateTabAjax() {
verifyCreateTab(a4jCreateTabBtn);
}
-
+
/**
* Delete newly created tabs
*/
@@ -141,7 +140,7 @@
public void testRemoveTab() {
verifyDeleteTab();
}
-
+
/**
* Verify that all tabs displays correct content when switch tab
*/
@@ -149,34 +148,31 @@
public void testContentOfDynamicTab() {
verifyContentOfNewTab(hCreateTabBtn);
}
-
- /*
- * Test plan:
- * 1. click on 'create tab' btn 3 time and verify that new tabs appeared
- * 2. verify that switch between newly created tabs still works as in previous tabs
(staticaly created)
- * 3. verify a4j ajax btn to create new tabs
+
+ /**
+ * Test plan: 1. click on 'create tab' btn 3 time and verify that new tabs
appeared 2. verify that switch between
+ * newly created tabs still works as in previous tabs (staticaly created) 3. verify
a4j ajax btn to create new tabs
*/
-
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11081")
public void testSwitchTypeNull() {
-
+
verifyCreateTab(hCreateTabBtn);
-
+
for (int i = STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT - 1; i >= STATIC_TAB_COUNT;
i--) {
final int index = i;
guardXhr(selenium).click(inactiveHeadersFormat.format(index + 1));
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.")
- .until(isDisplayed.locator(itemContentsFormat.format(index + 1)));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContentsFormat.format(index + 1)));
}
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11081")
public void testSwitchTypeAjax() {
-
+
verifyCreateTab(hCreateTabBtn);
-
+
selenium.click(switchTypeFormat.format(SWITCH_TYPE_AJAX));
selenium.waitForPageToLoad();
@@ -185,34 +181,34 @@
@Test
public void testSwitchTypeClient() {
-
+
verifyCreateTab(hCreateTabBtn);
-
+
selenium.click(switchTypeFormat.format(SWITCH_TYPE_CLIENT));
selenium.waitForPageToLoad();
-
+
for (int i = STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT - 1; i >= STATIC_TAB_COUNT;
i--) {
final int index = i;
guardNoRequest(selenium).click(inactiveHeadersFormat.format(index + 1));
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.")
- .until(isDisplayed.locator(itemContentsFormat.format(index + 1)));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContentsFormat.format(index + 1)));
}
}
-
+
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11054")
public void testSwitchTypeServer() {
-
+
verifyCreateTab(hCreateTabBtn);
-
+
selenium.click(switchTypeFormat.format(SWITCH_TYPE_SERVER));
selenium.waitForPageToLoad();
-
+
for (int i = STATIC_TAB_COUNT + MAX_NEW_TAB_COUNT - 1; i >= STATIC_TAB_COUNT;
i--) {
final int index = i;
guardHttp(selenium).click(inactiveHeadersFormat.format(index + 1));
- waitGui.failWith("Tab " + (index + 1) + " is not
displayed.")
- .until(isDisplayed.locator(itemContentsFormat.format(index + 1)));
+ waitGui.failWith("Tab " + (index + 1) + " is not
displayed.").until(
+ isDisplayed.locator(itemContentsFormat.format(index + 1)));
}
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipTarget.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipTarget.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipTarget.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -36,18 +36,18 @@
/**
* Test for @target attribute on page faces/components/richTooltip/targetting.xhtml
- *
+ *
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- *
+ *
* @version $Revision$
*/
public class TestTooltipTarget extends AbstractMetamerTest {
-
+
// private TooltipAttributes attributes = new TooltipAttributes();
private JQueryLocator panel1 = pjq("div[id$=regular-div]");
private JQueryLocator panel2 = pjq("div[id$=jsf-div]");
private JQueryLocator panel3 = pjq("div[id$=panel_body]");
-
+
TooltipModel tooltip1 = new TooltipModel(jq(".rf-tt"), panel1);
TooltipModel tooltip2 = new TooltipModel(jq(".rf-tt"), panel2);
TooltipModel tooltip3 = new TooltipModel(jq(".rf-tt"), panel3);
@@ -56,7 +56,7 @@
public URL getTestUrl() {
return URLUtils.buildUrl(contextPath,
"faces/components/richTooltip/targetting.xhtml");
}
-
+
@BeforeMethod
public void setupAttributes() {
tooltipAttributes.set(showEvent, "mouseover");
@@ -66,19 +66,22 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11370")
public void testTarget() {
- // 1. first target
- tooltipAttributes.set(target, "regular-div");
- tooltip1.recall();
- waitGui.until(isDisplayed.locator(tooltip1));
-
// 2. target
- tooltipAttributes.set(target, "form:jsf-div");
+ tooltipAttributes.set(target, "jsf-div");
tooltip2.recall();
waitGui.until(isDisplayed.locator(tooltip2));
-
+
// 3. default target
- tooltipAttributes.set(target, "form:panel");
+ tooltipAttributes.set(target, "panel");
tooltip3.recall();
waitGui.until(isDisplayed.locator(tooltip3));
}
+
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11370")
+ public void testTargetWithRegularDiv() {
+ tooltipAttributes.set(target, "regular-div");
+ tooltip1.recall();
+ waitGui.until(isDisplayed.locator(tooltip1));
+ }
}
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -63,6 +63,8 @@
import org.jboss.cheiron.halt.XHRHalter;
import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.ExtendedLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
@@ -80,9 +82,9 @@
* @version $Revision$
*/
public class TestTreeSimple extends AbstractMetamerTest {
-
+
private static final String IMAGE_URL = "/resources/images/loading.gif";
-
+
SeleniumCondition treeNodeExpanded = new SeleniumCondition() {
@Override
@@ -94,12 +96,12 @@
@Inject
@Use(empty = true)
Event eventToFire;
- Event[] eventsToFire = new Event[] {MOUSEDOWN, MOUSEUP, MOUSEOVER, MOUSEOUT};
+ Event[] eventsToFire = new Event[] { MOUSEDOWN, MOUSEUP, MOUSEOVER, MOUSEOUT };
@Inject
@Use(empty = true)
Event domEvent;
- Event[] domEvents = {CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE,
MOUSEOUT, MOUSEOVER, MOUSEUP};
+ Event[] domEvents = { CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN,
MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP };
TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
TreeNodeModel treeNode;
@@ -139,19 +141,37 @@
@Test
public void testHandleClass() {
expandAll();
- super.testStyleClass(tree.getAnyNode().getHandle(), handleClass);
+
+ final String value = "metamer-ftest-class";
+ selenium.type(jq("input[id$=attributes:handleClassInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr =
tree.getAnyNode().getHandle().getAttribute(Attribute.CLASS);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
handleClass should contain \"" + value
+ + "\"");
}
@Test
public void testIconClass() {
expandAll();
- super.testStyleClass(tree.getAnyNode().getIcon(), iconClass);
+
+ final String value = "metamer-ftest-class";
+ selenium.type(jq("input[id$=attributes:iconClassInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr =
tree.getAnyNode().getIcon().getAttribute(Attribute.CLASS);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
iconClass should contain \"" + value
+ + "\"");
}
@Test
public void testLabelClass() {
expandAll();
- super.testStyleClass(tree.getAnyNode().getLabel(), labelClass);
+
+ final String value = "metamer-ftest-class";
+ selenium.type(jq("input[id$=attributes:labelClassInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr =
tree.getAnyNode().getLabel().getAttribute(Attribute.CLASS);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
labelClass should contain \"" + value
+ + "\"");
}
@Test
@@ -287,12 +307,20 @@
@Test
public void testStyle() {
- this.testStyle(tree);
+ final String value = "background-color: yellow; font-size: 1.5em;";
+ selenium.type(jq("input[id$=attributes:styleInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr = tree.getAttribute(Attribute.STYLE);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
style should contain \"" + value + "\"");
}
@Test
public void testStyleClass() {
- this.testStyleClass(tree);
+ final String value = "metamer-ftest-class";
+ selenium.type(jq("input[id$=attributes:styleClassInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr = tree.getAttribute(Attribute.CLASS);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
class should contain \"" + value + "\"");
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -59,7 +59,7 @@
private boolean recursiveLeafChildrenNullable;
public URL getTestUrl() {
- return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
+ return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
}
@BeforeMethod
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -63,7 +63,7 @@
}
public URL getTestUrl() {
- return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
+ return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
}
@Test
Modified:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
===================================================================
---
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-10-19
13:04:51 UTC (rev 22826)
+++
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-10-19
13:49:01 UTC (rev 22827)
@@ -36,6 +36,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
+import static
org.richfaces.tests.metamer.ftest.attributes.AttributeList.basicAttributes;
import static org.richfaces.tests.metamer.ftest.richTreeNode.TreeNodeAttributes.*;
import java.net.URL;
@@ -44,6 +45,7 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.geometry.Point;
+import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.waiting.EventFiredCondition;
@@ -70,29 +72,29 @@
private static final String IMAGE_URL = "/resources/images/loading.gif";
Attributes<TreeAttributes> attributesTree = new
Attributes<TreeAttributes>(jq("span[id$=attributes:panel]"));
- Attributes<TreeNodeAttributes> attributes = new
Attributes<TreeNodeAttributes>(jq("span[id$=treeNode1Attributes:panel]"));
- Attributes<TreeNodeAttributes> attributesLeaf = new
Attributes<TreeNodeAttributes>(jq("span[id$=treeNode3Attributes:panel]"));
+ Attributes<TreeNodeAttributes> attributes = new
Attributes<TreeNodeAttributes>(
+ jq("span[id$=treeNode1Attributes:panel]"));
+ Attributes<TreeNodeAttributes> attributesLeaf = new
Attributes<TreeNodeAttributes>(
+ jq("span[id$=treeNode3Attributes:panel]"));
TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
TreeNodeModel treeNode = tree.getNode(1);
TreeNodeModel subTreeNode = treeNode.getNode(1);
TreeNodeModel leaf = subTreeNode.getNode(1);
-
+
ElementLocator<?> iconImage = treeNode.getIcon();
AttributeLocator<?> imageSrc = iconImage.getAttribute(SRC);
AttributeRetriever retrieveImageSrc = retrieveAttribute.attributeLocator(imageSrc);
-
@Inject
@Use(empty = true)
Event event = CLICK;
- Event[] events = new Event[] {CLICK, DBLCLICK, MOUSEDOWN, MOUSEMOVE, MOUSEOUT,
- MOUSEOVER, MOUSEUP };
+ Event[] events = new Event[] { CLICK, DBLCLICK, MOUSEDOWN, MOUSEMOVE, MOUSEOUT,
MOUSEOVER, MOUSEUP };
@Inject
@Use(empty = true)
SwitchType toggleType;
- SwitchType[] toggleTypes = new SwitchType[] {SwitchType.ajax, SwitchType.server };
+ SwitchType[] toggleTypes = new SwitchType[] { SwitchType.ajax, SwitchType.server };
@BeforeMethod
public void init() {
@@ -261,12 +263,20 @@
@Test
public void testStyle() {
- super.testStyle(treeNode.getTreeNode());
+ final String value = "background-color: yellow; font-size: 1.5em;";
+ selenium.type(jq("input[id$=treeNode1Attributes:styleInput]"), value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr =
treeNode.getTreeNode().getAttribute(Attribute.STYLE);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
style should contain \"" + value + "\"");
}
@Test
public void testStyleClass() {
- super.testStyleClass(treeNode.getTreeNode());
+ final String value = "metamer-ftest-class";
+ selenium.type(jq("input[id$=treeNode1Attributes:styleClassInput]"),
value);
+ selenium.waitForPageToLoad();
+ AttributeLocator<?> styleAttr =
treeNode.getTreeNode().getAttribute(Attribute.CLASS);
+ assertTrue(selenium.getAttribute(styleAttr).contains(value), "Attribute
class should contain \"" + value + "\"");
}
@Test