JBoss Rich Faces SVN: r22507 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-23 10:47:32 -0400 (Mon, 23 May 2011)
New Revision: 22507
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java
Log:
upload listener updated
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java 2011-05-23 14:24:22 UTC (rev 22506)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichFileUploadBean.java 2011-05-23 14:47:32 UTC (rev 22507)
@@ -35,6 +35,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.richfaces.event.FileUploadEvent;
+import org.richfaces.tests.metamer.bean.RichBean;
/**
* Managed bean for rich:fileUpload.
@@ -88,6 +89,7 @@
}
public void listener(FileUploadEvent event) {
+ RichBean.logToPage("* upload listener");
UploadedFile file = event.getUploadedFile();
if (file != null) {
13 years, 7 months
JBoss Rich Faces SVN: r22506 - modules/tests/metamer/trunk/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-23 10:24:22 -0400 (Mon, 23 May 2011)
New Revision: 22506
Modified:
modules/tests/metamer/trunk/ftest/vncsession.sh
Log:
Change vncsession.sh to support earlier defined DISPLAY
Modified: modules/tests/metamer/trunk/ftest/vncsession.sh
===================================================================
--- modules/tests/metamer/trunk/ftest/vncsession.sh 2011-05-23 13:49:42 UTC (rev 22505)
+++ modules/tests/metamer/trunk/ftest/vncsession.sh 2011-05-23 14:24:22 UTC (rev 22506)
@@ -1,4 +1,8 @@
#!/bin/bash
-vncserver :1
-nohup vncviewer :1 &>/dev/null &
-export DISPLAY=:1
+if [ "x$DISPLAY" == "x:0.0" ]; then
+ export DISPLAY=:1;
+ echo "Setting DISPLAY env var: DISPLAY=$DISPLAY"
+fi
+
+vncserver $DISPLAY -geometry 1280x900
+nohup vncviewer $DISPLAY &>/dev/null &
13 years, 7 months
JBoss Rich Faces SVN: r22505 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org: richfaces/tests/metamer/ftest/a4jPoll and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-23 09:49:42 -0400 (Mon, 23 May 2011)
New Revision: 22505
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/PollAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPollSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/GraphValidatorAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderFAjax.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/RichMessageAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/RichMessageTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/TestRichMessageJSFValidator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/TestRichMessageJSR303.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/AbstractPanelMenuTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuDOMEvents.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuMode.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuSimple.java
Log:
SVN keyword Revision added
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/PollAttributes.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jPoll/TestPollSimple.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/GraphValidatorAttributes.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSliderFAjax.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/RichMessageAttributes.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/RichMessageTest.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/TestRichMessageJSFValidator.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/TestRichMessageJSR303.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/AbstractPanelMenuTest.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuDOMEvents.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuMode.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuSelection.java
___________________________________________________________________
Added: svn:keywords
+ Revision
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuSimple.java
___________________________________________________________________
Added: svn:keywords
+ Revision
13 years, 7 months
JBoss Rich Faces SVN: r22504 - modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-05-23 09:33:31 -0400 (Mon, 23 May 2011)
New Revision: 22504
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/testPageLink.xhtml
Log:
added a workaround for RF-10646
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml 2011-05-23 13:15:31 UTC (rev 22503)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml 2011-05-23 13:33:31 UTC (rev 22504)
@@ -17,7 +17,7 @@
<composite:implementation>
- <h:outputStylesheet library="metamer/css" name="attributes.ecss" target="head" />
+ <h:outputStylesheet library="metamer" name="css/attributes.ecss" target="head" />
<a4j:jsFunction id="submitAjaxFunction" name="submitAjax" execute="#{cc.attrs.execute}" render="#{cc.attrs.render}" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/testPageLink.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/testPageLink.xhtml 2011-05-23 13:15:31 UTC (rev 22503)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/testPageLink.xhtml 2011-05-23 13:33:31 UTC (rev 22504)
@@ -31,7 +31,7 @@
<composite:implementation>
- <h:outputStylesheet library="metamer/css" name="testPageLink.ecss" />
+ <h:outputStylesheet library="metamer" name="css/testPageLink.ecss" />
<h:link id="link" outcome="#{cc.attrs.outcome}" value="#{cc.attrs.value}" styleClass="link" />
<h:panelGroup id="desc" layout="block" styleClass="description">
13 years, 7 months
JBoss Rich Faces SVN: r22503 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richAutocomplete and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-23 09:15:31 -0400 (Mon, 23 May 2011)
New Revision: 22503
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml
Log:
rfpl-1241: test standard JSR-303 validators with autocomplete
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-05-23 13:14:55 UTC (rev 22502)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-05-23 13:15:31 UTC (rev 22503)
@@ -30,7 +30,10 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import org.hibernate.validator.constraints.NotEmpty;
import org.richfaces.component.UIAutocomplete;
import org.richfaces.tests.metamer.Attributes;
import org.richfaces.tests.metamer.model.Capital;
@@ -55,6 +58,12 @@
private Attributes ajaxAttributes;
@ManagedProperty(value = "#{model.capitals}")
private List<Capital> capitals;
+
+ // properties for jsr303 validations
+ private String value1;
+ private String value2;
+ private String value3;
+ private String value4;
/**
* Initializes the managed bean.
@@ -114,4 +123,40 @@
public void setCapitals(List<Capital> capitals) {
this.capitals = capitals;
}
+
+ @NotEmpty
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ @Pattern(regexp = "[a-z].*")
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ @Size(min = 3, max = 6)
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String getValue4() {
+ return value4;
+ }
+
+ public void setValue4(String value4) {
+ this.value4 = value4;
+ }
+
}
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/jsr303.xhtml 2011-05-23 13:15:31 UTC (rev 22503)
@@ -0,0 +1,98 @@
+<?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:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+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:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
+
+ <h:panelGrid columns="3">
+ not empty
+ <rich:autocomplete id="input1" value="#{richAutocompleteBean.value1}" >
+ <a4j:ajax event="change" render="output1"/>
+ </rich:autocomplete>
+ <rich:message id="inputMsg1" for="input1"/>
+
+ pattern [a-z].*
+ <rich:autocomplete id="input2"
+ defaultLabel="#{richAutocompleteBean.attributes['defaultLabel'].value}"
+ value="#{richAutocompleteBean.value2}"
+ >
+ <a4j:ajax event="change" render="output2"/>
+ </rich:autocomplete>
+ <rich:message id="inputMsg2" for="input2"/>
+
+ size 3-6
+ <rich:autocomplete id="input3"
+ defaultLabel="#{richAutocompleteBean.attributes['defaultLabel'].value}"
+ value="#{richAutocompleteBean.value3}"
+ >
+ <a4j:ajax event="change" render="output3"/>
+ </rich:autocomplete>
+ <rich:message id="inputMsg3" for="input3"/>
+
+ custom (RichFaces)
+ <rich:autocomplete id="input4"
+ defaultLabel="#{richAutocompleteBean.attributes['defaultLabel'].value}"
+ value="#{richAutocompleteBean.value4}"
+ >
+ <f:validator validatorId="org.richfaces.StringRichFacesValidator"/>
+ <a4j:ajax event="change" render="output4"/>
+ </rich:autocomplete>
+ <rich:message id="inputMsg4" for="input4"/>
+
+ </h:panelGrid>
+ <br/><br/>
+
+ <h:panelGrid columns="2">
+ output1
+ <h:outputText id="output1" value="#{richAutocompleteBean.value1}"/>
+ output2
+ <h:outputText id="output2" value="#{richAutocompleteBean.value2}"/>
+ output3
+ <h:outputText id="output3" value="#{richAutocompleteBean.value3}"/>
+ output4
+ <h:outputText id="output4" value="#{richAutocompleteBean.value4}"/>
+ </h:panelGrid>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml 2011-05-23 13:14:55 UTC (rev 22502)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml 2011-05-23 13:15:31 UTC (rev 22503)
@@ -35,6 +35,10 @@
Simple page that contains <b>rich:autocomplete</b> (with model containing capitals) and
input boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="jsr303" outcome="jsr303" value="JSR-303 Bean Validation">
+ Simple page that contains some <b>rich:autocomplete</b>s with various JSR-303 validators.
+ </metamer:testPageLink>
</ui:define>
13 years, 7 months
JBoss Rich Faces SVN: r22502 - modules/tests/metamer/trunk/ftest/src/test/resources.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-23 09:14:55 -0400 (Mon, 23 May 2011)
New Revision: 22502
Modified:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
modules/tests/metamer/trunk/ftest/src/test/resources/testng.xml
Log:
Add selenium tests for rich:graphValidator into suite
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-05-19 16:19:25 UTC (rev 22501)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-05-23 13:14:55 UTC (rev 22502)
@@ -13,6 +13,7 @@
<package name="org.richfaces.tests.metamer.ftest.richComponentControl" />
<package name="org.richfaces.tests.metamer.ftest.richDropDownMenu" />
<package name="org.richfaces.tests.metamer.ftest.richFunctions" />
+ <package name="org.richfaces.tests.metamer.ftest.richGraphValidator" />
<package name="org.richfaces.tests.metamer.ftest.richJQuery" />
<package name="org.richfaces.tests.metamer.ftest.richMenuGroup" />
<package name="org.richfaces.tests.metamer.ftest.richMenuItem" />
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng.xml 2011-05-19 16:19:25 UTC (rev 22501)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng.xml 2011-05-23 13:14:55 UTC (rev 22502)
@@ -46,6 +46,7 @@
<package name="org.richfaces.tests.metamer.ftest.richComponentControl" />
<package name="org.richfaces.tests.metamer.ftest.richDropDownMenu" />
<package name="org.richfaces.tests.metamer.ftest.richFunctions" />
+ <package name="org.richfaces.tests.metamer.ftest.richGraphValidator" />
<package name="org.richfaces.tests.metamer.ftest.richJQuery" />
<package name="org.richfaces.tests.metamer.ftest.richMenuGroup" />
<package name="org.richfaces.tests.metamer.ftest.richMenuItem" />
13 years, 7 months
JBoss Rich Faces SVN: r22501 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richTabPanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-19 12:19:25 -0400 (Thu, 19 May 2011)
New Revision: 22501
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/addTab2.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
Log:
RFPL-1445: Another way to create tab dynamically
Added new page with example of dynamic tab using predefined rich:tab
component with dynamically generated atributes
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java 2011-05-19 07:47:18 UTC (rev 22500)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.java 2011-05-19 16:19:25 UTC (rev 22501)
@@ -50,6 +50,7 @@
private Attributes attributes;
private List<UITab> tabs = new ArrayList<UITab>();
+ private List<TabBean> tabBeans = new ArrayList<TabBean>();
/**
* Initializes the managed bean.
@@ -85,6 +86,18 @@
tabs.add(tab);
}
+
+ public void generateNewTab() {
+
+ System.out.println(" ###### adding new tabBean... ");
+
+ int i = tabBeans.size();
+ String idBase = "tab" + (i + 6); // there is already 5 tabs
+ tabBeans.add(new TabBean(idBase, idBase, idBase + " header",
+ "Content of dynamicaly created " + idBase));
+
+ System.out.println(" Now is tabBeans list " + tabBeans.size() + " long");
+ }
public Attributes getAttributes() {
return attributes;
@@ -101,4 +114,60 @@
public void setTabs(List<UITab> tabs) {
this.tabs = tabs;
}
+
+ public class TabBean {
+ private String tabId;
+ private String tabName;
+ private String tabHeader;
+ private String tabContentText;
+
+ public TabBean(String tabId, String tabName, String tabHeader,
+ String tabContentText){
+ this.tabId = tabId;
+ this.tabName = tabName;
+ this.tabHeader = tabHeader;
+ this.tabContentText = tabContentText;
+ }
+
+ public String getTabId() {
+ return tabId;
+ }
+
+ public void setTabId(String tabId) {
+ this.tabId = tabId;
+ }
+
+ public String getTabName() {
+ return tabName;
+ }
+
+ public void setTabName(String tabName) {
+ this.tabName = tabName;
+ }
+
+ public String getTabHeader() {
+ return tabHeader;
+ }
+
+ public void setTabHeader(String tabHeader) {
+ this.tabHeader = tabHeader;
+ }
+
+ public String getTabContentText() {
+ return tabContentText;
+ }
+
+ public void setTabContentText(String tabContentText) {
+ this.tabContentText = tabContentText;
+ }
+
+ }
+
+ public List<TabBean> getTabBeans() {
+ return tabBeans;
+ }
+
+ public void setTabBeans(List<TabBean> tabBeans) {
+ this.tabBeans = tabBeans;
+ }
}
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/addTab2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/addTab2.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/addTab2.xhtml 2011-05-19 16:19:25 UTC (rev 22501)
@@ -0,0 +1,144 @@
+<?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:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" 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
+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">
+
+ <rich:tabPanel id="tabPanel"
+ activeItem="#{richTabPanelBean.attributes['activeItem'].value}"
+ cycledSwitching="#{richTabPanelBean.attributes['cycledSwitching'].value}"
+ dir="#{richTabPanelBean.attributes['dir'].value}"
+ headerAlignment="#{richTabPanelBean.attributes['headerAlignment'].value}"
+ headerPosition="#{richTabPanelBean.attributes['headerPosition'].value}"
+ immediate="#{richTabPanelBean.attributes['immediate'].value}"
+ itemChangeListener="#{richBean.itemChangeListener}"
+ lang="#{richTabPanelBean.attributes['lang'].value}"
+ onbeforeitemchange="#{richTabPanelBean.attributes['onbeforeitemchange'].value}"
+ onclick="#{richTabPanelBean.attributes['onclick'].value}"
+ ondblclick="#{richTabPanelBean.attributes['ondblclick'].value}"
+ onitemchange="#{richTabPanelBean.attributes['onitemchange'].value}"
+ onmousedown="#{richTabPanelBean.attributes['onmousedown'].value}"
+ onmousemove="#{richTabPanelBean.attributes['onmousemove'].value}"
+ onmouseout="#{richTabPanelBean.attributes['onmouseout'].value}"
+ onmouseover="#{richTabPanelBean.attributes['onmouseover'].value}"
+ onmouseup="#{richTabPanelBean.attributes['onmouseup'].value}"
+ rendered="#{richTabPanelBean.attributes['rendered'].value}"
+ style="#{richTabPanelBean.attributes['style'].value}"
+ styleClass="#{richTabPanelBean.attributes['styleClass'].value}"
+ switchType="#{richTabPanelBean.attributes['switchType'].value}"
+ tabActiveHeaderClass="#{richTabPanelBean.attributes['tabActiveHeaderClass'].value}"
+ tabContentClass="#{richTabPanelBean.attributes['tabContentClass'].value}"
+ tabDisabledHeaderClass="#{richTabPanelBean.attributes['tabDisabledHeaderClass'].value}"
+ tabHeaderClass="#{richTabPanelBean.attributes['tabHeaderClass'].value}"
+ tabInactiveHeaderClass="#{richTabPanelBean.attributes['tabInactiveHeaderClass'].value}"
+ title="#{richTabPanelBean.attributes['title'].value}"
+ >
+
+ <rich:tab id="tab1" name="tab1" header="tab1 header">
+ content of tab 1
+ </rich:tab>
+ <rich:tab id="tab2" name="tab2" header="tab2 header">
+ content of tab 2
+ </rich:tab>
+ <rich:tab id="tab3" name="tab3" header="tab3 header">
+ content of tab 3
+ </rich:tab>
+ <rich:tab id="tab4" name="tab4" header="tab4 header" disabled="true">
+ content of tab 4
+ </rich:tab>
+ <rich:tab id="tab5" name="tab5" header="tab5 header">
+ content of tab 5
+ </rich:tab>
+
+ <c:forEach items="#{richTabPanelBean.tabBeans}" var="newTab">
+ <rich:tab id="#{newTab.tabId}" name="#{newTab.tabName}" header="#{newTab.tabHeader}">
+ #{newTab.tabContentText}
+ </rich:tab>
+ </c:forEach>
+
+ </rich:tabPanel>
+
+ <br/><br/>
+ <fieldset>
+ <legend>JavaScript API</legend>
+
+ <script type="text/javascript">
+ testedComponentId = "#{rich:clientId('tabPanel')}";
+ </script>
+
+ <h:commandButton id="switchButton1" value="switch to tab1">
+ <rich:componentControl event="click" operation="switchToItem" target="tabPanel" >
+ <f:param value="tab1" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton2" value="switch to tab2">
+ <rich:componentControl event="click" operation="switchToItem" target="tabPanel" >
+ <f:param value="tab2" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton3" value="switch to tab3">
+ <rich:componentControl event="click" operation="switchToItem" target="tabPanel" >
+ <f:param value="tab3" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton4" value="switch to tab4">
+ <rich:componentControl event="click" operation="switchToItem" target="tabPanel" >
+ <f:param value="tab4" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton5" value="switch to tab5">
+ <rich:componentControl event="click" operation="switchToItem" target="tabPanel" >
+ <f:param value="tab5" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ <h:commandButton id="hCreateTabButton" value="[h] Create tab"
+ actionListener="#{richTabPanelBean.generateNewTab}" />
+ <a4j:commandButton id="a4jCreateTabButton" value="[a4j] Create tab"
+ render="tabPanel"
+ actionListener="#{richTabPanelBean.generateNewTab}" />
+
+ </fieldset>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richTabPanelBean.attributes}" id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-05-19 07:47:18 UTC (rev 22500)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-05-19 16:19:25 UTC (rev 22501)
@@ -35,7 +35,11 @@
Simple page containing <b>rich:tabPanel</b> and input boxes for all its attributes.
</metamer:testPageLink>
- <metamer:testPageLink id="addTab" outcome="addTab" value="Simple">
+ <metamer:testPageLink id="addTab" outcome="addTab" value="Add tab v1">
+ Simple page containing <b>rich:tabPanel</b> and buttons for create new tabs using binding
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="addTab2" outcome="addTab2" value="Add tab v2">
Simple page containing <b>rich:tabPanel</b> and buttons for create new tabs
</metamer:testPageLink>
13 years, 7 months
JBoss Rich Faces SVN: r22500 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org: jboss/test/selenium/waiting and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-19 03:47:18 -0400 (Thu, 19 May 2011)
New Revision: 22500
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/RequestTypeModelGuard.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
Log:
Fix checkcode violations
Main changes in static attributes, where was required made them private
and create access methods. In many cases solved by made them final and
change case accordingly
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/RequestTypeModelGuard.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/RequestTypeModelGuard.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/RequestTypeModelGuard.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -34,7 +34,7 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class RequestTypeModelGuard implements MethodHandler {
+public final class RequestTypeModelGuard implements MethodHandler {
private RequestTypeGuard guard;
private RequestTypeModelGuard(RequestTypeGuard guard) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -46,27 +46,32 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class WaitFactory {
+public final class WaitFactory {
+ /** elementPresent waiting */
+ public static final ElementPresent ELEMENT_PRESENT = ElementPresent.getInstance();
+
/**
* Waits for GUI interaction, such as rendering
*/
- public static AjaxWaiting waitGui = waitAjax().interval(WAIT_GUI_INTERVAL).timeout(getSeleniumTimeout(GUI));
+ public static final AjaxWaiting WAIT_GUI = waitAjax().interval(WAIT_GUI_INTERVAL).timeout(getSeleniumTimeout(GUI));
/**
* Waits for AJAX interaction with server - not computationally difficult
*/
- public static AjaxWaiting waitAjax = waitAjax().interval(WAIT_AJAX_INTERVAL).timeout(getSeleniumTimeout(AJAX));
+ public static final AjaxWaiting WAIT_AJAX = waitAjax().interval(WAIT_AJAX_INTERVAL).timeout(getSeleniumTimeout(AJAX));
/**
* Waits for computationally difficult requests
*/
- public static SeleniumWaiting waitModel = waitSelenium().interval(WAIT_MODEL_INTERVAL).timeout(
+ public static final SeleniumWaiting WAIT_MODEL = waitSelenium().interval(WAIT_MODEL_INTERVAL).timeout(
getSeleniumTimeout(MODEL));
- public static ElementPresent elementPresent = ElementPresent.getInstance();
- public static TextEquals textEquals = TextEquals.getInstance();
- public static StyleEquals styleEquals = StyleEquals.getInstance();
- public static AttributePresent attributePresent = AttributePresent.getInstance();
- public static AttributeEquals attributeEquals = AttributeEquals.getInstance();
- public static AlertPresent alertPresent = AlertPresent.getInstance();
- public static AlertEquals alertEquals = AlertEquals.getInstance();
- public static CountEquals countEquals = CountEquals.getInstance();
+ public static final TextEquals TEXT_EQUALS = TextEquals.getInstance();
+ public static final StyleEquals STYLE_EQUALS = StyleEquals.getInstance();
+ public static final AttributePresent ATTRIBUTE_PRESENT = AttributePresent.getInstance();
+ public static final AttributeEquals ATTRIBUTE_EQUALS = AttributeEquals.getInstance();
+ public static final AlertPresent ALERT_PRESENT = AlertPresent.getInstance();
+ public static final AlertEquals ALERT_EQUALS = AlertEquals.getInstance();
+ public static final CountEquals COUNT_EQUALS = CountEquals.getInstance();
+
+ private WaitFactory() { };
+
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -7,7 +7,7 @@
import static org.jboss.test.selenium.locator.Attribute.TITLE;
import static org.jboss.test.selenium.locator.reference.ReferencedLocator.ref;
import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
-import static org.jboss.test.selenium.waiting.WaitFactory.waitAjax;
+import static org.jboss.test.selenium.waiting.WaitFactory.WAIT_AJAX;
import static org.jboss.test.selenium.waiting.retrievers.RetrieverFactory.RETRIEVE_ATTRIBUTE;
import static org.jboss.test.selenium.waiting.retrievers.RetrieverFactory.RETRIEVE_TEXT;
import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
@@ -130,7 +130,7 @@
private void assertChangeIfNotEqualToOldValue(Retriever<Integer> retrieveCount, Integer eventCount, String eventType) {
if (!eventCount.equals(retrieveCount.getValue())) {
- assertEquals(waitAjax.failWith(eventType).waitForChangeAndReturn(retrieveCount), eventCount);
+ assertEquals(WAIT_AJAX.failWith(eventType).waitForChangeAndReturn(retrieveCount), eventCount);
} else {
assertEquals(retrieveCount.retrieve(), eventCount);
}
@@ -152,8 +152,8 @@
public void checkTimes(Input event, long requestDelay) {
Retriever<Long> retrieveEventTime = (event == Input.FIRST) ? retrieveEvent1Time : retrieveEvent2Time;
- long eventTime = waitAjax.waitForChangeAndReturn(retrieveEventTime);
- long beginTime = waitAjax.waitForChangeAndReturn(retrieveBeginTime);
+ long eventTime = WAIT_AJAX.waitForChangeAndReturn(retrieveEventTime);
+ long beginTime = WAIT_AJAX.waitForChangeAndReturn(retrieveBeginTime);
long actualDelay = beginTime - eventTime;
long deviation = Math.abs(actualDelay - requestDelay);
long maxDeviation = Math.max(300, requestDelay / 2);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -76,11 +76,11 @@
public enum Component {
OUTER("Outer"), REGION("Region"), NESTED("Nested region"), DECORATION("Decoration"), INSERTION("Insertion");
- public final JQueryLocator select;
- public final JQueryLocator output;
- public final JQueryLocator input;
- public final JQueryLocator link;
- public final OptionLocator<?> executeOption;
+ private final JQueryLocator select;
+ private final JQueryLocator output;
+ private final JQueryLocator input;
+ private final JQueryLocator link;
+ private final OptionLocator<?> executeOption;
private Component(String name) {
String id = name.substring(0, 1).toLowerCase() + WordUtils.capitalize(name).replace(" ", "").substring(1);
@@ -108,8 +108,8 @@
Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONENT_NESTED(Component.NESTED), COMPONENT_DECORATION(
Component.DECORATION), COMPONENT_INSERTION(Component.INSERTION);
- public final OptionLocator<?> option;
- public final Component componentBase;
+ private final OptionLocator<?> option;
+ private final Component componentBase;
private Execute(String label) {
this.option = optionLabel(label);
@@ -124,5 +124,9 @@
public boolean isComponentBased() {
return componentBase != null;
}
+
+ public Component getComponentBase() {
+ return componentBase;
+ }
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -96,15 +96,15 @@
}
if (execute.isComponentBased()) {
- expectedChanges.add(execute.componentBase);
+ expectedChanges.add(execute.getComponentBase());
}
}
private void obtainActualChanges() {
actualChanges = EnumSet.noneOf(Component.class);
- for (Component component : Component.values()) {
- if (component.isChanged()) {
- actualChanges.add(component);
+ for (Component currentComponent : Component.values()) {
+ if (currentComponent.isChanged()) {
+ actualChanges.add(currentComponent);
}
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -49,10 +49,6 @@
private static final String[] FILTER_TITLES = new String[] { "Director", null, "CEO" };
private static final Integer[] FILTER_NUMBER_OF_KIDS = new Integer[] { 2, 100, 0, 5 };
- public ExpectedEmployee filterEmployee;
- public List<Employee> expectedEmployees;
- public int rows;
-
JQueryLocator selectSex = jq("select");
JQueryLocator inputName = jq("input");
JQueryLocator inputTitle = jq("input");
@@ -61,6 +57,10 @@
FilteringDataTable filtering = new FilteringDataTable();
+ private ExpectedEmployee filterEmployee;
+ private List<Employee> expectedEmployees;
+ private int rows;
+
@BeforeMethod
public void setup() {
filterEmployee = new ExpectedEmployee();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -24,8 +24,8 @@
import static org.jboss.test.selenium.javascript.JQueryScript.jqObject;
import static org.jboss.test.selenium.javascript.JQueryScript.jqScript;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.waiting.WaitFactory.elementPresent;
-import static org.jboss.test.selenium.waiting.WaitFactory.waitGui;
+import static org.jboss.test.selenium.waiting.WaitFactory.ELEMENT_PRESENT;
+import static org.jboss.test.selenium.waiting.WaitFactory.WAIT_GUI;
import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
import java.awt.event.KeyEvent;
@@ -43,128 +43,128 @@
*/
public class Autocomplete implements Model {
- private static String KEY_UP = "38";
- private static String KEY_DOWN = "40";
+ private static final String KEY_UP = "38";
+ private static final String KEY_DOWN = "40";
- AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- JQueryLocator input = pjq("input.rf-au-inp[id$=autocompleteInput]");
-
- JQueryLocator items = jq("div.rf-au-lst-cord[id$=autocompleteList] div[id$=autocompleteItems]");
- JQueryLocator selection = items.getDescendant(jq("div.rf-au-itm-sel"));
- JQueryLocator option = jq("div.rf-au-itm");
- JQueryLocator labeledOption = jq("div.rf-au-opt:contains('{0}')");
-
- public void typeKeys(String keys) {
- for (int i = 0; i < keys.length(); i++) {
- final String key = String.valueOf(keys.charAt(i));
- selenium.focus(input);
- selenium.keyPress(input, key);
- selenium.fireEvent(input, Event.KEYDOWN);
- }
- }
-
- public void confirmByKeys() {
- pressEnter();
- }
-
- public void selectByKeys(String label) {
- int labeledIndex = getLabeledOptionIndex(label);
- while (getSelectedOptionIndex() < labeledIndex) {
- pressDown();
- }
- while (getSelectedOptionIndex() > labeledIndex) {
- pressUp();
- }
- }
-
- public boolean isLabeledOptionAvailable(String label) {
- return selenium.isElementPresent(getLabeledOption(label));
- }
-
- public int getLabeledOptionIndex(String label) {
- String index = selenium.getEval(jqScript(getLabeledOption(label),
- "index()"));
- return Integer.valueOf(index);
- }
-
- public int getSelectedOptionIndex() {
- JavaScript script = jqScript(option, "index({0})").parametrize(
- jqObject(selection));
- String index = selenium.getEval(script);
- return Integer.valueOf(index);
- }
-
- public String getSelectedOptionText() {
- return selenium.getText(selection);
- }
-
- public String getInputText() {
- return selenium.getValue(input);
- }
-
- private JQueryLocator getLabeledOption(String label) {
- return labeledOption.format(label);
- }
-
- public void pressBackspace() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_BACK_SPACE));
- }
-
- public void pressUp() {
- selenium.keyDown(input, KEY_UP);
- }
-
- public void pressDown() {
- selenium.keyDown(input, KEY_DOWN);
- }
-
- public void pressEnter() {
- selenium.keyDownNative(Integer.toString(KeyEvent.VK_ENTER));
- }
-
- public void pressLeft() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
- }
-
- public void pressRight() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
- }
-
- public void pressDelete() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_DELETE));
- }
-
- public void textSelectionLeft(int size) {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
- for (int i = 0; i < size; i++) {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
- }
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
- }
-
- public void textSelectionRight(int size) {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
- for (int i = 0; i < size; i++) {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
- }
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
- }
-
- public void textSelectAll() {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_A));
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
- }
-
- public boolean isCompletionVisible() {
- if (!selenium.isElementPresent(items)) {
- return false;
- }
- return selenium.isVisible(items);
- }
-
- public void waitForCompletionVisible() {
- waitGui.until(elementPresent.locator(option));
- }
+ JQueryLocator input = pjq("input.rf-au-inp[id$=autocompleteInput]");
+
+ JQueryLocator items = jq("div.rf-au-lst-cord[id$=autocompleteList] div[id$=autocompleteItems]");
+ JQueryLocator selection = items.getDescendant(jq("div.rf-au-itm-sel"));
+ JQueryLocator option = jq("div.rf-au-itm");
+ JQueryLocator labeledOption = jq("div.rf-au-opt:contains('{0}')");
+
+ public void typeKeys(String keys) {
+ for (int i = 0; i < keys.length(); i++) {
+ final String key = String.valueOf(keys.charAt(i));
+ selenium.focus(input);
+ selenium.keyPress(input, key);
+ selenium.fireEvent(input, Event.KEYDOWN);
+ }
+ }
+
+ public void confirmByKeys() {
+ pressEnter();
+ }
+
+ public void selectByKeys(String label) {
+ int labeledIndex = getLabeledOptionIndex(label);
+ while (getSelectedOptionIndex() < labeledIndex) {
+ pressDown();
+ }
+ while (getSelectedOptionIndex() > labeledIndex) {
+ pressUp();
+ }
+ }
+
+ public boolean isLabeledOptionAvailable(String label) {
+ return selenium.isElementPresent(getLabeledOption(label));
+ }
+
+ public int getLabeledOptionIndex(String label) {
+ String index = selenium.getEval(jqScript(getLabeledOption(label),
+ "index()"));
+ return Integer.valueOf(index);
+ }
+
+ public int getSelectedOptionIndex() {
+ JavaScript script = jqScript(option, "index({0})").parametrize(
+ jqObject(selection));
+ String index = selenium.getEval(script);
+ return Integer.valueOf(index);
+ }
+
+ public String getSelectedOptionText() {
+ return selenium.getText(selection);
+ }
+
+ public String getInputText() {
+ return selenium.getValue(input);
+ }
+
+ private JQueryLocator getLabeledOption(String label) {
+ return labeledOption.format(label);
+ }
+
+ public void pressBackspace() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_BACK_SPACE));
+ }
+
+ public void pressUp() {
+ selenium.keyDown(input, KEY_UP);
+ }
+
+ public void pressDown() {
+ selenium.keyDown(input, KEY_DOWN);
+ }
+
+ public void pressEnter() {
+ selenium.keyDownNative(Integer.toString(KeyEvent.VK_ENTER));
+ }
+
+ public void pressLeft() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
+ }
+
+ public void pressRight() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
+ }
+
+ public void pressDelete() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_DELETE));
+ }
+
+ public void textSelectionLeft(int size) {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
+ for (int i = 0; i < size; i++) {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
+ }
+ selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
+ }
+
+ public void textSelectionRight(int size) {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
+ for (int i = 0; i < size; i++) {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
+ }
+ selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
+ }
+
+ public void textSelectAll() {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_A));
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
+ }
+
+ public boolean isCompletionVisible() {
+ if (!selenium.isElementPresent(items)) {
+ return false;
+ }
+ return selenium.isVisible(items);
+ }
+
+ public void waitForCompletionVisible() {
+ WAIT_GUI.until(ELEMENT_PRESENT.locator(option));
+ }
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableSelection.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -83,17 +83,14 @@
public void testMultiSelectionUsingControl() {
Collection<Integer> forSelection = order(2, 5, 29, 16, 13, 21);
- try {
- for (int s : forSelection) {
- selection.click(s, CTRL);
+ for (int s : forSelection) {
+ selection.click(s, CTRL);
- assertEquals(selection.getPrevious(), selected);
- selected.add(s);
- assertEquals(selection.getCurrent(), selected);
- }
- } catch (RuntimeException e) {
- throw e;
+ assertEquals(selection.getPrevious(), selected);
+ selected.add(s);
+ assertEquals(selection.getCurrent(), selected);
}
+
}
@Test
@@ -238,6 +235,8 @@
case SHIFT:
selenium.shiftKeyUp();
break;
+ default:
+ break;
}
}
@@ -249,6 +248,8 @@
case SHIFT:
selenium.shiftKeyDown();
break;
+ default:
+ break;
}
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -45,21 +45,21 @@
* @version $Revision$
*/
public class TestTreeModelAdaptorSelection extends TestTreeSelection {
-
+
@Inject
+ PathsCrate paths;
+ PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] {{2, 1, 3 }, {3, 3, 2, 2 } });
+ PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] {{2, 1, 5 }, {3, 3, 2, 6 } });
+ PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] {{4, 1, 10, 2 },
+ {1, 4, 3, 11, 4 } });
+
+ @Inject
@Use(enumeration = true)
- public RecursiveModelRepresentation representation;
+ private RecursiveModelRepresentation representation;
@Inject
@Use(booleans = { true, false })
- public boolean recursiveLeafChildrenNullable;
-
- @Inject
- PathsCrate paths;
- PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] { { 2, 1, 3 }, { 3, 3, 2, 2 } });
- PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] { { 2, 1, 5 }, { 3, 3, 2, 6 } });
- PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] { { 4, 1, 10, 2 },
- { 1, 4, 3, 11, 4 } });
+ private boolean recursiveLeafChildrenNullable;
public URL getTestUrl() {
return buildUrl(contextPath, "http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-05-19 07:46:35 UTC (rev 22499)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-05-19 07:47:18 UTC (rev 22500)
@@ -43,11 +43,11 @@
@Inject
@Use(enumeration = true)
- public RecursiveModelRepresentation representation;
+ private RecursiveModelRepresentation representation;
@Inject
@Use(booleans = { true, false })
- public boolean recursiveLeafChildrenNullable;
+ private boolean recursiveLeafChildrenNullable;
@BeforeClass
public void setupTreeModelTesting() {
13 years, 7 months
JBoss Rich Faces SVN: r22499 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org: jboss/test/selenium and 25 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-19 03:46:35 -0400 (Thu, 19 May 2011)
New Revision: 22499
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/retriever/ColorRetriever.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/DelayTester.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerFailureLoggingTestListener.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/CollapsibleSubTableToggler.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/ModelIterable.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/PanelMenu.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnModelTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/AbstractScrollerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/Indicator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/AbstractSliderTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/AbstractSpinnerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerFAjax.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTreeNodeModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
Log:
Fix first group of checkstyle violations
Fixed issues like unused imports, attributes order according to access
level, fixed intendation, added default state in case, attributes case
according to final/non final declaration
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/retriever/ColorRetriever.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/retriever/ColorRetriever.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/cheiron/retriever/ColorRetriever.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,6 +21,9 @@
*/
package org.jboss.cheiron.retriever;
+import static org.jboss.test.selenium.encapsulated.JavaScript.js;
+import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
+
import java.awt.Color;
import org.apache.commons.lang.Validate;
@@ -31,13 +34,9 @@
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.utils.ColorUtils;
import org.jboss.test.selenium.waiting.conversion.Convertor;
-import org.jboss.test.selenium.waiting.conversion.PassOnConvertor;
import org.jboss.test.selenium.waiting.retrievers.AbstractRetriever;
import org.jboss.test.selenium.waiting.retrievers.Retriever;
-import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
-import static org.jboss.test.selenium.encapsulated.JavaScript.js;
-
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/JQuerySelectors.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -1,3 +1,24 @@
+/*
+ * 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.jboss.test.selenium;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
@@ -6,7 +27,17 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.text.SimplifiedFormat;
-public class JQuerySelectors {
+/**
+ * JQuery selectors store
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public final class JQuerySelectors {
+
+ /* According to checkstyle made class final, without default ctor.
+ * In case of need modify class accordingly */
+ private JQuerySelectors() { };
+
public static JQueryLocator not(ExtendedLocator<JQueryLocator> locator, String expression) {
return jq(SimplifiedFormat.format("{0}:not({1})", locator.getRawLocator(), expression));
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/WaitFactory.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -42,7 +42,7 @@
import org.jboss.test.selenium.waiting.conditions.TextEquals;
import org.jboss.test.selenium.waiting.selenium.SeleniumWaiting;
-/**
+/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -79,6 +79,11 @@
* @version $Revision$
*/
public abstract class AbstractMetamerTest extends AbstractTestCase {
+
+ /**
+ * timeout in miliseconds
+ */
+ public static final long TIMEOUT = 5000;
protected JQueryLocator time = jq("span[id$=requestTime]");
protected JQueryLocator renderChecker = jq("span[id$=renderChecker]");
@@ -90,10 +95,7 @@
protected PhaseInfo phaseInfo = new PhaseInfo();
protected LocatorReference<JQueryLocator> attributesRoot = new LocatorReference<JQueryLocator>(
pjq("span[id$=:attributes:panel]"));
- /**
- * timeout in miliseconds
- */
- public static final long TIMEOUT = 5000;
+
@Inject
@Templates({ "plain", "richAccordion", "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable",
"richDataGrid", "richList", "richCollapsiblePanel", "richPanel", "richTabPanel", "richTogglePanel",
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/DelayTester.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/DelayTester.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/DelayTester.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -42,13 +42,13 @@
long actualDelay;
long expectedDelay;
+
+ List<Long> deviations = new ArrayList<Long>();
public DelayTester(long expectedDelay) {
this.expectedDelay = expectedDelay;
}
- List<Long> deviations = new ArrayList<Long>();
-
public abstract void action();
public void beforeTest() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -324,21 +324,21 @@
}
if (useAnnotation.decimals().length > 0) {
- if (parameterType == double.class || parameterType == Double.class) {
- result.addAll(Arrays.asList(ArrayUtils.toObject(useAnnotation.decimals())));
- }
+ if (parameterType == double.class || parameterType == Double.class) {
+ result.addAll(Arrays.asList(ArrayUtils.toObject(useAnnotation.decimals())));
+ }
}
if (useAnnotation.strings().length > 0) {
- if (parameterType == String.class) {
- result.addAll(Arrays.asList(useAnnotation.strings()));
- }
+ if (parameterType == String.class) {
+ result.addAll(Arrays.asList(useAnnotation.strings()));
+ }
}
if (useAnnotation.booleans().length > 0) {
- if (parameterType == boolean.class || parameterType == Boolean.class) {
- result.addAll(Arrays.asList(ArrayUtils.toObject(useAnnotation.booleans())));
- }
+ if (parameterType == boolean.class || parameterType == Boolean.class) {
+ result.addAll(Arrays.asList(ArrayUtils.toObject(useAnnotation.booleans())));
+ }
}
if (useAnnotation.enumeration()) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerFailureLoggingTestListener.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerFailureLoggingTestListener.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerFailureLoggingTestListener.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,9 +21,10 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest;
+import static java.util.Arrays.asList;
+
import java.io.File;
import java.io.IOException;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
@@ -33,8 +34,6 @@
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.ITestResult;
-import static java.util.Arrays.asList;
-
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,7 +21,6 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.a4jLog;
-import java.awt.event.KeyEvent;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionLabel;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/QueueModel.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -27,14 +27,13 @@
import org.jboss.test.selenium.locator.reference.ReferencedLocator;
import org.jboss.test.selenium.waiting.retrievers.Retriever;
+/**
+ * Queue Model
+ * @version $Revision$
+ */
public class QueueModel {
-
- private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
-
- private Boolean event2Present = null;
-
+
List<Long> deviations = new ArrayList<Long>();
-
LocatorReference<JQueryLocator> form = new LocatorReference<JQueryLocator>(null);
ReferencedLocator<JQueryLocator> input1 = ref(form, "input:text[id$=input1]");
@@ -61,7 +60,11 @@
Retriever<Long> retrieveEvent2Time = longAdapter(RETRIEVE_ATTRIBUTE.attributeLocator(event2Time));
Retriever<Long> retrieveBeginTime = longAdapter(RETRIEVE_ATTRIBUTE.attributeLocator(beginTime));
Retriever<Long> retrieveCompleteTime = longAdapter(RETRIEVE_ATTRIBUTE.attributeLocator(completeTime));
+
+ private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+ private Boolean event2Present = null;
+
public QueueModel() {
this(pjq(""));
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -91,7 +91,7 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-10589")
@Use(field = "rows", ints = { -2, -1, 0, 1, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
- ELEMENTS_TOTAL + 1 })
+ ELEMENTS_TOTAL + 1 })
public void testRowsAttribute() {
verifyRepeat();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -48,7 +48,11 @@
private static final String[] FILTER_NAMES = new String[] { "ivan", "Гог", null, "Š" };
private static final String[] FILTER_TITLES = new String[] { "Director", null, "CEO" };
private static final Integer[] FILTER_NUMBER_OF_KIDS = new Integer[] { 2, 100, 0, 5 };
-
+
+ public ExpectedEmployee filterEmployee;
+ public List<Employee> expectedEmployees;
+ public int rows;
+
JQueryLocator selectSex = jq("select");
JQueryLocator inputName = jq("input");
JQueryLocator inputTitle = jq("input");
@@ -56,11 +60,7 @@
JQueryLocator inputNumberOfKids2 = jq("input");
FilteringDataTable filtering = new FilteringDataTable();
-
- public ExpectedEmployee filterEmployee;
- public List<Employee> expectedEmployees;
- public int rows;
-
+
@BeforeMethod
public void setup() {
filterEmployee = new ExpectedEmployee();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/CollapsibleSubTableToggler.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/CollapsibleSubTableToggler.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/CollapsibleSubTableToggler.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -8,13 +8,13 @@
public class CollapsibleSubTableToggler extends AbstractModel<JQueryLocator> {
+ ReferencedLocator<JQueryLocator> collapsedTogglers = ref(root, "> span[id$=collapsed]");
+ ReferencedLocator<JQueryLocator> expandedTogglers = ref(root, "> span[id$=expanded]");
+
public CollapsibleSubTableToggler(JQueryLocator root) {
super(root);
}
-
- ReferencedLocator<JQueryLocator> collapsedTogglers = ref(root, "> span[id$=collapsed]");
- ReferencedLocator<JQueryLocator> expandedTogglers = ref(root, "> span[id$=expanded]");
-
+
public ExtendedLocator<JQueryLocator> getCollapsed() {
return collapsedTogglers;
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataGrid.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,9 +21,8 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.model;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.locator.reference.ReferencedLocator.ref;
-import static org.jboss.test.selenium.locator.reference.ReferencedLocator.referenceInferred;
-import static org.jboss.test.selenium.locator.LocatorFactory.*;
import java.util.Iterator;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/ModelIterable.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/ModelIterable.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/ModelIterable.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -3,7 +3,6 @@
import java.lang.reflect.Constructor;
import java.util.Iterator;
-import org.apache.commons.lang.ArrayUtils;
import org.jboss.test.selenium.locator.ExtendedLocator;
public class ModelIterable<E extends ExtendedLocator<E>, T extends AbstractModel<E>> implements Iterable<T> {
@@ -43,8 +42,9 @@
public T next() {
ExtendedLocator<E> locator = iterator.next();
- try {
- constructorLoop: for (Constructor<?> constructor : classT.getConstructors()) {
+ try {
+ constructorLoop:
+ for (Constructor<?> constructor : classT.getConstructors()) {
if (ExtendedLocator.class.isAssignableFrom(constructor.getParameterTypes()[0])) {
if (constructorParamTypes.length == constructor.getParameterTypes().length - 1) {
Object[] params = new Object[constructorParamTypes.length + 1];
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/PanelMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/PanelMenu.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/PanelMenu.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,6 +21,9 @@
public class PanelMenu extends AbstractModel<JQueryLocator> implements Model {
AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ PanelMenuMode groupMode;
+ PanelMenuMode itemMode;
private ReferencedLocator<JQueryLocator> topItems = ref(root, "> .rf-pm-top-itm");
private ReferencedLocator<JQueryLocator> topGroups = ref(root, "> .rf-pm-top-gr");
@@ -29,9 +32,6 @@
private ReferencedLocator<JQueryLocator> anyDisabledItem = ref(root, "div[class*=rf-pm-][class*=-itm-dis]");
private ReferencedLocator<JQueryLocator> anyDisabledGroup = ref(root, "div[class*=rf-pm-][class*=-gr-dis]");
- PanelMenuMode groupMode;
- PanelMenuMode itemMode;
-
public PanelMenu(JQueryLocator root) {
super(root);
}
@@ -289,14 +289,14 @@
}
public abstract class Icon extends AbstractModel<JQueryLocator> {
+
+ ReferencedLocator<JQueryLocator> img = ref(root, "> img");
+ AttributeLocator<?> imgSrc = img.getAttribute(SRC);
public Icon(JQueryLocator root) {
super(root);
}
- ReferencedLocator<JQueryLocator> img = ref(root, "> img");
- AttributeLocator<?> imgSrc = img.getAttribute(SRC);
-
public abstract ElementLocator<JQueryLocator> getIcon();
public boolean isTransparent() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -50,12 +50,7 @@
AutocompleteAttributes attributes = new AutocompleteAttributes();
Autocomplete autocomplete = new Autocomplete();
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richAutocomplete/autocomplete.xhtml");
- }
-
+
@Inject
@Use(booleans = { true, false })
Boolean autofill;
@@ -68,6 +63,11 @@
StringBuilder partialInput;
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richAutocomplete/autocomplete.xhtml");
+ }
+
@BeforeMethod
public void prepareProperties() {
attributes.setAutofill(autofill);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -48,13 +48,13 @@
*/
public class TestCollapsibleSubTableFiltering extends AbstractCollapsibleSubTableTest {
+ int rows = 0;
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richCollapsibleSubTable/filtering.xhtml");
}
- int rows = 0;
-
@BeforeMethod
public void prepare() {
attributes.setRows(rows);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -48,12 +48,7 @@
* @version $Revision$
*/
public class TestCollapsibleSubTableSorting extends AbstractCollapsibleSubTableTest {
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richCollapsibleSubTable/sorting-using-column.xhtml");
- }
-
+
@Inject
@Use(enumeration = true)
SortMode sortMode;
@@ -61,6 +56,10 @@
int rows = 0;
List<Column> sortPriority = new LinkedList<Column>();
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richCollapsibleSubTable/sorting-using-column.xhtml");
+ }
@BeforeMethod
public void prepare() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -1,4 +1,6 @@
+package org.richfaces.tests.metamer.ftest.richCollapsibleSubTableToggler;
/*******************************************************************************
+
* 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
@@ -19,12 +21,7 @@
* 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.richCollapsibleSubTableToggler;
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
import static org.jboss.test.selenium.dom.Event.DBLCLICK;
import static org.jboss.test.selenium.dom.Event.MOUSEDOWN;
import static org.jboss.test.selenium.dom.Event.MOUSEUP;
@@ -47,10 +44,17 @@
import org.richfaces.tests.metamer.ftest.model.DataTable;
import org.testng.annotations.Test;
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
public class TestCollapsibleSubTableToggler extends AbstractMetamerTest {
- private final static String IMAGE_URL = "/resources/images/star.png";
- private final static String LABEL = "Label";
+ private static final String IMAGE_URL = "/resources/images/star.png";
+ private static final String LABEL = "Label";
+
+ CollapsibleSubTableTogglerAttributes attributes = new CollapsibleSubTableTogglerAttributes();
+ DataTable dataTable = new DataTable(pjq("table.rf-dt"));
JQueryLocator link = jq("a");
JQueryLocator image = jq("img");
@@ -66,9 +70,6 @@
return buildUrl(contextPath, "faces/components/richCollapsibleSubTableToggler/simple.xhtml");
}
- CollapsibleSubTableTogglerAttributes attributes = new CollapsibleSubTableTogglerAttributes();
- DataTable dataTable = new DataTable(pjq("table.rf-dt"));
-
@Test
@Use(field = "event", value = "events")
public void testEvent() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnModelTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnModelTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnModelTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -27,7 +27,6 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.model.Capital;
import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/AbstractColumnSortingTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -53,6 +53,10 @@
case descending:
Collections.sort(capitals, Collections.reverseOrder(RichColumnBean.STATE_NAME_LENGTH_COMPARATOR));
break;
+
+ default:
+ // default case required by checkstyle
+ break;
}
for (int i = 0; i < capitals.size(); i++) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richColumn/TestColumnFiltering.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -44,15 +44,17 @@
*/
public class TestColumnFiltering extends AbstractColumnModelTest {
+ private static final String STATE_NAME = "Maryland";
+ JQueryLocator stateNameToFilter = pjq("input:text[id$=stateNameToFilter]");
+ JQueryLocator tableWithFilter = pjq("table.rf-dt[id$=richDataTable1]");
+ JQueryLocator tableWithFilterExpression = pjq("table.rf-dt[id$=richDataTable2]");
+ RichColumnBean richColumnBean = new RichColumnBean();
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richColumn/filtering.xhtml");
}
- JQueryLocator stateNameToFilter = pjq("input:text[id$=stateNameToFilter]");
- private final static String stateName = "Maryland";
- JQueryLocator tableWithFilter = pjq("table.rf-dt[id$=richDataTable1]");
- JQueryLocator tableWithFilterExpression = pjq("table.rf-dt[id$=richDataTable2]");
-
+
@Test
public void testFilterAttribute() {
model.setRoot(tableWithFilter);
@@ -66,8 +68,8 @@
}
public void testFiltering() {
- for (int i = 1; i <= stateName.length(); i++) {
- String namePart = stateName.substring(0, i);
+ for (int i = 1; i <= STATE_NAME.length(); i++) {
+ String namePart = STATE_NAME.substring(0, i);
selenium.type(stateNameToFilter, namePart);
guardXhr(selenium).fireEvent(stateNameToFilter, Event.KEYUP);
@@ -86,8 +88,7 @@
assertEqualsCapitals(actualCapitals, expectedCapitals);
}
}
- RichColumnBean richColumnBean = new RichColumnBean();
-
+
private void assertEqualsCapitals(Collection<Capital> actualCapitals, Collection<Capital> expectedCapitals) {
assertEquals(actualCapitals.size(), expectedCapitals.size());
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/AbstractScrollerTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/AbstractScrollerTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/AbstractScrollerTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -78,7 +78,7 @@
}
@Use(field = "columns", ints = { 1, 3, 11, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
- ELEMENTS_TOTAL + 1 })
+ ELEMENTS_TOTAL + 1 })
public void testColumnsAttribute() {
paginationTester.testNumberedPages();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataGrid/TestSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -50,7 +50,7 @@
@Test
@Use(field = "columns", ints = { 1, 3, 11, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
- ELEMENTS_TOTAL + 1 })
+ ELEMENTS_TOTAL + 1 })
public void testColumnsAttribute() {
verifyGrid();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/Indicator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/Indicator.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/Indicator.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -121,6 +121,9 @@
verifyCustomClass(acceptClass, false);
verifyCustomClass(rejectClass, true);
break;
+ default:
+ // default case required by checkstyle
+ break;
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -39,9 +39,9 @@
*/
public class TestDragIndicator extends AbstractDragNDropTest {
- private final static String ACCEPT_CLASS = "sample-accept-class";
- private final static String REJECT_CLASS = "sample-reject-class";
- private final static String DRAGGING_CLASS = "sample-dragging-class";
+ private static final String ACCEPT_CLASS = "sample-accept-class";
+ private static final String REJECT_CLASS = "sample-reject-class";
+ private static final String DRAGGING_CLASS = "sample-dragging-class";
private DragIndicatorAttributes attributes = new DragIndicatorAttributes();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDropTarget/TestDropTarget.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -56,6 +56,13 @@
*/
public class TestDropTarget extends AbstractDragNDropTest {
+ TextRetriever retrieveDrop1 = retrieveText.locator(drop1);
+ TextRetriever retrieveDrop2 = retrieveText.locator(drop2);
+
+ JQueryLocator clientId = jq("span[id$=:clientId]");
+ JQueryLocator dragValue = jq("span[id$=:dragValue]");
+ JQueryLocator dropValue = jq("span[id$=:dropValue]");
+
private DropTargetAttributes attributes = new DropTargetAttributes();
@Override
@@ -63,13 +70,6 @@
return buildUrl(contextPath, "faces/components/richDropTarget/simple.xhtml");
}
- TextRetriever retrieveDrop1 = retrieveText.locator(drop1);
- TextRetriever retrieveDrop2 = retrieveText.locator(drop2);
-
- JQueryLocator clientId = jq("span[id$=:clientId]");
- JQueryLocator dragValue = jq("span[id$=:dragValue]");
- JQueryLocator dropValue = jq("span[id$=:dropValue]");
-
@Test
public void testAcceptedTypes() {
attributes.setAcceptedTypes("drg2");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/AbstractSliderTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/AbstractSliderTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/AbstractSliderTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -29,14 +29,12 @@
import java.net.URL;
-import org.jboss.test.selenium.css.CssProperty;
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.geometry.Point;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.testng.annotations.Test;
/**
* Abstract test case for rich:inputNumberSlider.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/AbstractSpinnerTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/AbstractSpinnerTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/AbstractSpinnerTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -25,15 +25,12 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.testng.Assert.assertEquals;
-
-
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.testng.annotations.Test;
/**
* Abstract test case for rich:inputNumberSpinner.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerFAjax.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerFAjax.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinnerFAjax.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -21,13 +21,10 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richInputNumberSpinner;
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
-import org.jboss.test.selenium.encapsulated.JavaScript;
-import org.jboss.test.selenium.locator.ElementLocator;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.Test;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/AbstractListTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -27,11 +27,11 @@
import org.testng.annotations.BeforeMethod;
public abstract class AbstractListTest extends AbstractMetamerTest {
- protected static List<Employee> EMPLOYESS = Model.unmarshallEmployees();
- protected static final int ELEMENTS_TOTAL = EMPLOYESS.size();
- protected static final Event[] events = { CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE,
+ protected static List<Employee> employees = Model.unmarshallEmployees();
+ protected static final int ELEMENTS_TOTAL = employees.size();
+ protected static final Event[] EVENTS = { CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE,
MOUSEOUT, MOUSEOVER, MOUSEUP };
- protected static final Integer[] ints = { -1, 0, 1, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
+ protected static final Integer[] INTS = { -1, 0, 1, ELEMENTS_TOTAL / 2, ELEMENTS_TOTAL - 1, ELEMENTS_TOTAL,
ELEMENTS_TOTAL + 1 };
ListModel list;
@@ -126,7 +126,7 @@
expectedEnd = rows - 1;
}
- expectedEmployees = EMPLOYESS.subList(expectedBegin, expectedBegin + displayedRows);
+ expectedEmployees = employees.subList(expectedBegin, expectedBegin + displayedRows);
}
private int minMax(int min, int value, int max) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richList/ListModel.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -37,15 +37,15 @@
*/
public class ListModel extends AbstractModel<JQueryLocator> {
- public ListModel(JQueryLocator root) {
- super(root);
- }
-
ListType type;
ReferencedLocator<JQueryLocator> rows = ref(root, "li");
private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ public ListModel(JQueryLocator root) {
+ super(root);
+ }
public ListType getType() {
return type;
@@ -83,6 +83,10 @@
return jq("li.rf-ulst-itm");
case definitions:
return jq("dd.rf-dlst-dfn");
+ default:
+ // default case required by checkstyle.
+ // Kept Exception throw as without 'default'
+ break;
}
throw new IllegalStateException();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessage/AbstractRichMessageTest.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -46,18 +46,20 @@
*/
public abstract class AbstractRichMessageTest extends AbstractMetamerTest {
+ // component's locators
+ protected static JQueryLocator message4Input1 = pjq("span[id$=simpleInputMsg1]");
+ protected static JQueryLocator message4Input2 = pjq("span[id$=simpleInputMsg2]");
+ protected static JQueryLocator messages = pjq("span[id$=msgs]");
+
private static Logger logger = LoggerFactory.getLogger(AbstractRichMessageTest.class);
+
protected RichMessageComponentAttributes attributes = new RichMessageComponentAttributes();
// controls
protected JQueryLocator wrongValuesBtn = pjq("input[type=button][id$=setWrongValuesButton]");
protected JQueryLocator correctValuesBtn = pjq("input[type=button][id$=setCorrectValuesButton]");
protected JQueryLocator hCommandBtn = pjq("input[id$=hButton]");
protected JQueryLocator a4jCommandBtn = pjq("input[id$=a4jButton]");
- // component's locators
- protected static JQueryLocator message4Input1 = pjq("span[id$=simpleInputMsg1]");
- protected static JQueryLocator message4Input2 = pjq("span[id$=simpleInputMsg2]");
- protected static JQueryLocator messages = pjq("span[id$=msgs]");
-
+
/**
* Because of message and messages have many attributes very similar,
* this method helps test method distinguish between metamer
@@ -165,7 +167,9 @@
}
protected void waitForAttribute(RichMessageAttributes attr) {
- waitGui.until(attributeEquals.locator(getTestElemLocator().getAttribute(new Attribute(attr.toString()))).text(attr.toString()));
+ waitGui.until(attributeEquals.locator(
+ getTestElemLocator().getAttribute(new Attribute(attr.toString())))
+ .text(attr.toString()));
}
// ==================== test methods ====================
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenu/TestPanelMenuIcon.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -32,41 +32,41 @@
*/
public class TestPanelMenuIcon extends AbstractPanelMenuTest {
- private static String CUSTOM_URL = "/resources/images/loading.gif";
+ private static String customURL = "/resources/images/loading.gif";
@Test
public void testGroupCollapsedLeftIcon() {
- attributes.setGroupCollapsedLeftIcon(CUSTOM_URL);
+ attributes.setGroupCollapsedLeftIcon(customURL);
group2.toggle();
verifyIcon(group24.getLeftIcon());
}
@Test
public void testGroupCollapsedRightIcon() {
- attributes.setGroupCollapsedRightIcon(CUSTOM_URL);
+ attributes.setGroupCollapsedRightIcon(customURL);
group2.toggle();
verifyIcon(group24.getRightIcon());
}
@Test
public void testGroupDisabledLeftIcon() {
- attributes.setGroupDisabledLeftIcon(CUSTOM_URL);
+ attributes.setGroupDisabledLeftIcon(customURL);
group2.toggle();
assertTrue(group26.getLeftIcon().isCustomURL());
- assertTrue(group26.getLeftIcon().getCustomURL().endsWith(CUSTOM_URL));
+ assertTrue(group26.getLeftIcon().getCustomURL().endsWith(customURL));
verifyIcon(group26.getLeftIcon());
}
@Test
public void testDisabledRightIcon() {
- attributes.setGroupDisabledRightIcon(CUSTOM_URL);
+ attributes.setGroupDisabledRightIcon(customURL);
group2.toggle();
verifyIcon(group26.getRightIcon());
}
@Test
public void testGroupExpandedLeftIcon() {
- attributes.setGroupExpandedLeftIcon(CUSTOM_URL);
+ attributes.setGroupExpandedLeftIcon(customURL);
group2.toggle();
group24.toggle();
verifyIcon(group24.getLeftIcon());
@@ -74,7 +74,7 @@
@Test
public void testGroupExpandedRightIcon() {
- attributes.setGroupExpandedRightIcon(CUSTOM_URL);
+ attributes.setGroupExpandedRightIcon(customURL);
group2.toggle();
group24.toggle();
verifyIcon(group24.getRightIcon());
@@ -82,96 +82,96 @@
@Test
public void testItemDisabledLeftIcon() {
- attributes.setItemDisabledLeftIcon(CUSTOM_URL);
+ attributes.setItemDisabledLeftIcon(customURL);
group2.toggle();
verifyIcon(item25.getLeftIcon());
}
@Test
public void testItemDisabledRightIcon() {
- attributes.setItemDisabledRightIcon(CUSTOM_URL);
+ attributes.setItemDisabledRightIcon(customURL);
group2.toggle();
verifyIcon(item25.getRightIcon());
}
@Test
public void testItemLeftIcon() {
- attributes.setItemLeftIcon(CUSTOM_URL);
+ attributes.setItemLeftIcon(customURL);
group2.toggle();
verifyIcon(item22.getLeftIcon());
}
@Test
public void testItemRightIcon() {
- attributes.setItemRightIcon(CUSTOM_URL);
+ attributes.setItemRightIcon(customURL);
group2.toggle();
verifyIcon(item22.getRightIcon());
}
@Test
public void testTopGroupCollapsedLeftIcon() {
- attributes.setTopGroupCollapsedLeftIcon(CUSTOM_URL);
+ attributes.setTopGroupCollapsedLeftIcon(customURL);
verifyIcon(group1.getLeftIcon());
}
@Test
public void testTopGroupCollapsedRightIcon() {
- attributes.setTopGroupCollapsedRightIcon(CUSTOM_URL);
+ attributes.setTopGroupCollapsedRightIcon(customURL);
verifyIcon(group1.getRightIcon());
}
@Test
public void testTopGroupDisabledLeftIcon() {
- attributes.setTopGroupDisabledLeftIcon(CUSTOM_URL);
+ attributes.setTopGroupDisabledLeftIcon(customURL);
verifyIcon(group4.getLeftIcon());
}
@Test
public void testTopGroupDisabledRightIcon() {
- attributes.setTopGroupDisabledRightIcon(CUSTOM_URL);
+ attributes.setTopGroupDisabledRightIcon(customURL);
verifyIcon(group4.getRightIcon());
}
@Test
public void testTopGroupExpandedLeftIcon() {
- attributes.setTopGroupExpandedLeftIcon(CUSTOM_URL);
+ attributes.setTopGroupExpandedLeftIcon(customURL);
group1.toggle();
verifyIcon(group1.getLeftIcon());
}
@Test
public void testTopGroupExpandedRightIcon() {
- attributes.setTopGroupExpandedRightIcon(CUSTOM_URL);
+ attributes.setTopGroupExpandedRightIcon(customURL);
group1.toggle();
verifyIcon(group1.getRightIcon());
}
@Test
public void testTopItemDisabledLeftIcon() {
- attributes.setTopItemDisabledLeftIcon(CUSTOM_URL);
+ attributes.setTopItemDisabledLeftIcon(customURL);
verifyIcon(item4.getLeftIcon());
}
@Test
public void testTopItemDisabledRightIcon() {
- attributes.setTopItemDisabledRightIcon(CUSTOM_URL);
+ attributes.setTopItemDisabledRightIcon(customURL);
verifyIcon(item4.getRightIcon());
}
@Test
public void testTopItemLeftIcon() {
- attributes.setTopItemLeftIcon(CUSTOM_URL);
+ attributes.setTopItemLeftIcon(customURL);
verifyIcon(item3.getLeftIcon());
}
@Test
public void testTopItemRightIcon() {
- attributes.setTopItemRightIcon(CUSTOM_URL);
+ attributes.setTopItemRightIcon(customURL);
verifyIcon(item3.getRightIcon());
}
private void verifyIcon(Icon icon) {
assertTrue(icon.isCustomURL());
- assertTrue(icon.getCustomURL().endsWith(CUSTOM_URL));
+ assertTrue(icon.getCustomURL().endsWith(customURL));
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -40,6 +40,8 @@
* @version $Revision$
*/
public class TestPanelMenuGroupClientSideHandlers extends AbstractPanelMenuGroupTest {
+
+ PanelMenu.Group group1 = menu.getGroupContains("Group 1");
@Inject
@Use(empty = true)
@@ -59,8 +61,7 @@
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richPanelMenuGroup/simple.xhtml");
}
- PanelMenu.Group group1 = menu.getGroupContains("Group 1");
-
+
@Test
@Use(field = "event", value = "ajaxCollapsionEvents")
public void testClientSideCollapsionEvent() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -16,9 +16,9 @@
*/
public class TestPanelMenuGroupSimple extends AbstractPanelMenuGroupTest {
- private static String SAMPLE_IMAGE = "/resources/images/loading.gif";
- private static String CHEVRON_DOWN = "chevronDown";
- private static String CHEVRON_DOWN_CLASS = "rf-ico-chevron-down";
+ private static String sampleImage = "/resources/images/loading.gif";
+ private static String chevronDown = "chevronDown";
+ private static String chevronDownClass = "rf-ico-chevron-down";
@Test
public void testData() {
@@ -60,7 +60,7 @@
@Test
public void testLeftDisabledIcon() {
- attributes.setLeftDisabledIcon(SAMPLE_IMAGE);
+ attributes.setLeftDisabledIcon(sampleImage);
assertTrue(leftIcon.isTransparent());
assertFalse(leftIcon.isCustomURL());
@@ -68,16 +68,16 @@
attributes.setDisabled(true);
assertTrue(leftIcon.isCustomURL());
- assertTrue(leftIcon.getCustomURL().endsWith(SAMPLE_IMAGE));
+ assertTrue(leftIcon.getCustomURL().endsWith(sampleImage));
}
@Test
public void testLeftCollapsedIcon() {
- attributes.setLeftCollapsedIcon(CHEVRON_DOWN);
+ attributes.setLeftCollapsedIcon(chevronDown);
topGroup.toggle();
- assertTrue(leftIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(leftIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
@@ -86,9 +86,9 @@
@Test
public void testLeftExpandedIcon() {
- attributes.setLeftExpandedIcon(CHEVRON_DOWN);
+ attributes.setLeftExpandedIcon(chevronDown);
- assertTrue(leftIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(leftIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
@@ -118,7 +118,7 @@
@Test
public void testRightDisabledIcon() {
- attributes.setRightDisabledIcon(SAMPLE_IMAGE);
+ attributes.setRightDisabledIcon(sampleImage);
assertTrue(rightIcon.isTransparent());
assertFalse(rightIcon.isCustomURL());
@@ -126,14 +126,14 @@
attributes.setDisabled(true);
assertTrue(rightIcon.isCustomURL());
- assertTrue(rightIcon.getCustomURL().endsWith(SAMPLE_IMAGE));
+ assertTrue(rightIcon.getCustomURL().endsWith(sampleImage));
}
@Test
public void testRightExpandedIcon() {
- attributes.setRightExpandedIcon(CHEVRON_DOWN);
+ attributes.setRightExpandedIcon(chevronDown);
- assertTrue(rightIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(rightIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
@@ -142,11 +142,11 @@
@Test
public void testRightCollapsedIcon() {
- attributes.setRightCollapsedIcon(CHEVRON_DOWN);
+ attributes.setRightCollapsedIcon(chevronDown);
topGroup.toggle();
- assertTrue(rightIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(rightIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -22,9 +22,9 @@
*/
public class TestPanelMenuItemSimple extends AbstractMetamerTest {
- private static String SAMPLE_IMAGE = "/resources/images/loading.gif";
- private static String CHEVRON_DOWN = "chevronDown";
- private static String CHEVRON_DOWN_CLASS = "rf-ico-chevron-down";
+ private static String sampleImage = "/resources/images/loading.gif";
+ private static String chevronDown = "chevronDown";
+ private static String chevronDownClass = "rf-ico-chevron-down";
PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
PanelMenu menu = new PanelMenu(pjq("div.rf-pm[id$=panelMenu]"));
@@ -83,7 +83,7 @@
@Test
public void testLeftDisabledIcon() {
- attributes.setLeftDisabledIcon(SAMPLE_IMAGE);
+ attributes.setLeftDisabledIcon(sampleImage);
assertTrue(leftIcon.isTransparent());
assertFalse(leftIcon.isCustomURL());
@@ -91,14 +91,14 @@
attributes.setDisabled(true);
assertTrue(leftIcon.isCustomURL());
- assertTrue(leftIcon.getCustomURL().endsWith(SAMPLE_IMAGE));
+ assertTrue(leftIcon.getCustomURL().endsWith(sampleImage));
}
@Test
public void testLeftIcon() {
- attributes.setLeftIcon(CHEVRON_DOWN);
+ attributes.setLeftIcon(chevronDown);
- assertTrue(leftIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(leftIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
@@ -133,7 +133,7 @@
@Test
public void testRightDisabledIcon() {
- attributes.setRightDisabledIcon(SAMPLE_IMAGE);
+ attributes.setRightDisabledIcon(sampleImage);
assertTrue(rightIcon.isTransparent());
assertFalse(rightIcon.isCustomURL());
@@ -141,15 +141,15 @@
attributes.setDisabled(true);
assertTrue(rightIcon.isCustomURL());
- assertTrue(rightIcon.getCustomURL().endsWith(SAMPLE_IMAGE));
+ assertTrue(rightIcon.getCustomURL().endsWith(sampleImage));
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-10519")
public void testRightIcon() {
- attributes.setRightIcon(CHEVRON_DOWN);
+ attributes.setRightIcon(chevronDown);
- assertTrue(rightIcon.containsClass(CHEVRON_DOWN_CLASS));
+ assertTrue(rightIcon.containsClass(chevronDownClass));
attributes.setDisabled(true);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTooltip/TestTooltipSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -171,7 +171,9 @@
case LEFT:
assertEquals(tooltipPosition.getX() + tooltipDimension.getWidth(), eventPosition.getX()
- horizontalOffset);
+ break;
default:
+ break;
}
}
@@ -183,7 +185,9 @@
case TOP:
assertEquals(tooltipPosition.getY() + tooltipDimension.getHeight(), eventPosition.getY()
- verticalOffset);
+ break;
default:
+ break;
}
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTreeNodeModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTreeNodeModel.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTreeNodeModel.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -36,24 +36,24 @@
* @version $Revision$
*/
public class AbstractTreeNodeModel extends AbstractModel<JQueryLocator> {
-
- public AbstractTreeNodeModel(JQueryLocator root) {
- super(root);
- }
-
- private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- protected TreeModel tree;
-
+
static JQueryLocator treeNode = jq("div.rf-tr-nd");
static JQueryLocator treeNodeExpanded = jq("div.rf-tr-nd-exp");
static JQueryLocator treeNodeCollapsed = jq("div.rf-tr-nd-colps");
static JQueryLocator treeNodeSelected = jq("div.rf-tr-nd:has(> .rf-trn > .rf-trn-sel)");
-
+
+ protected TreeModel tree;
ReferencedLocator<JQueryLocator> nodes = ref(root, "> " + treeNode.getRawLocator());
ReferencedLocator<JQueryLocator> anyNodes = ref(root, treeNode.getRawLocator());
ReferencedLocator<JQueryLocator> nodesCollapsed = ref(root, "> " + treeNodeCollapsed.getRawLocator());
ReferencedLocator<JQueryLocator> nodesExpanded = ref(root, "> " + treeNodeExpanded.getRawLocator());
ReferencedLocator<JQueryLocator> anyNodesSelected = ref(root, treeNodeSelected.getRawLocator());
+
+ private AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ public AbstractTreeNodeModel(JQueryLocator root) {
+ super(root);
+ }
public Iterable<TreeNodeModel> getNodes() {
Iterable<TreeNodeModel> result = new ModelIterable<JQueryLocator, TreeNodeModel>(nodes.getAllOccurrences(),
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -50,14 +50,9 @@
@Use(field = "selectionPaths", value = "")
public class TestTreeSelection extends AbstractMetamerTest {
- protected Integer[][] selectionPaths = new Integer[][] { { 2, 3 }, { 3, 4 }, { 4, 1, 1 }, { 4 }, { 4, 1 },
- { 1, 5 }, { 2, 3, 3 } };
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richTree/simple.xhtml");
- }
-
+ protected Integer[][] selectionPaths = new Integer[][] {{2, 3}, {3, 4}, {4, 1, 1}, {4}, {4, 1},
+ {1, 5 }, {2, 3, 3 } };
+
protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=attributes]"));
protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
protected TreeNodeModel treeNode;
@@ -65,8 +60,8 @@
@Inject
@Use(value = "selectionTypes")
SwitchType selectionType;
- SwitchType[] selectionTypes = new SwitchType[] { SwitchType.ajax, SwitchType.client };
- SwitchType[] eventEnabledSelectionTypes = new SwitchType[] { SwitchType.ajax };
+ SwitchType[] selectionTypes = new SwitchType[] {SwitchType.ajax, SwitchType.client};
+ SwitchType[] eventEnabledSelectionTypes = new SwitchType[] {SwitchType.ajax};
JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
JQueryLocator selection = jq("span[id$=selection]");
@@ -74,6 +69,12 @@
JQueryLocator newSelection = jq("span[id$=selectionEventNewSelection]");
JQueryLocator oldSelection = jq("span[id$=selectionEventOldSelection]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richTree/simple.xhtml");
+ }
+
@BeforeMethod
public void testInitialize() {
treeAttributes.setSelectionType(selectionType);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -64,18 +64,26 @@
* @version $Revision$
*/
public class TestTreeSimple extends AbstractMetamerTest {
+
+ private static final String IMAGE_URL = "/resources/images/loading.gif";
+
+ SeleniumCondition treeNodeExpanded = new SeleniumCondition() {
- private final static String IMAGE_URL = "/resources/images/loading.gif";
+ @Override
+ public boolean isTrue() {
+ return treeNode.isExpanded();
+ }
+ };
@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;
@@ -333,14 +341,6 @@
}
}
- SeleniumCondition treeNodeExpanded = new SeleniumCondition() {
-
- @Override
- public boolean isTrue() {
- return treeNode.isExpanded();
- }
- };
-
private void fireEvent(ElementLocator<?> target, Event eventToFire, Event eventToSetup) {
RequestType requestType = (eventToFire == eventToSetup) ? RequestType.XHR : RequestType.NONE;
if (eventToFire == MOUSEDOWN) {
@@ -381,7 +381,9 @@
treeNode2.expand();
}
}
+ break;
default:
+ break;
}
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -45,15 +45,15 @@
private static final int TOP_LEVEL_NODES = 4;
- protected int[][] paths = new int[][] { { 3, 2, 1 }, { 2, 4, 1 } };
-
+ protected int[][] paths = new int[][] {{3, 2, 1 }, {2, 4, 1 }};
protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=attributes]"));
- private TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
- private TreeNodeModel treeNode;
-
+
@Inject
@Use(enumeration = true)
SwitchType toggleType = SwitchType.ajax;
+
+ private TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
+ private TreeNodeModel treeNode;
@Override
public URL getTestUrl() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -48,19 +48,20 @@
* @version $Revision$
*/
public class TestTreeModelAdaptorLazyLoading extends AbstractMetamerTest {
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richTree/treeAdaptors.xhtml");
- }
-
+
protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
protected TreeNodeModel treeNode;
+
+ protected Integer[][] paths = new Integer[][] {{1, 1, 1, 8, 1}, {4, 4, 11, 4}};
JQueryLocator lazyInitialized = pjq("span[id$=lazyInitialized]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richTree/treeAdaptors.xhtml");
+ }
- protected Integer[][] paths = new Integer[][] { { 1, 1, 1, 8, 1 }, { 4, 4, 11, 4 } };
-
@Test
public void testLazyLoading() {
List<String> expected = getListOfVisibleNodes();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -47,19 +47,19 @@
public class TestTreeModelAdaptorSelection extends TestTreeSelection {
@Inject
- PathsCrate paths;
- PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] { { 2, 1, 3 }, { 3, 3, 2, 2 } });
- PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] { { 2, 1, 5 }, { 3, 3, 2, 6 } });
- PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] { { 4, 1, 10, 2 },
- { 1, 4, 3, 11, 4 } });
-
- @Inject
@Use(enumeration = true)
public RecursiveModelRepresentation representation;
@Inject
@Use(booleans = { true, false })
public boolean recursiveLeafChildrenNullable;
+
+ @Inject
+ PathsCrate paths;
+ PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] { { 2, 1, 3 }, { 3, 3, 2, 2 } });
+ PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] { { 2, 1, 5 }, { 3, 3, 2, 6 } });
+ PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] { { 4, 1, 10, 2 },
+ { 1, 4, 3, 11, 4 } });
public URL getTestUrl() {
return buildUrl(contextPath, "http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -47,7 +47,13 @@
protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
protected TreeNodeModel treeNode;
+
+ private ModelAdaptorAttributes modelAdaptorAttributes = new ModelAdaptorAttributes(
+ pjq("span[id$=:listAttributes:panel]"));
+ private RecursiveModelAdaptorAttributes recursiveModelAdaptorAttributes = new RecursiveModelAdaptorAttributes(
+ pjq("span[id$=:recursiveAttributes:panel]"));
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richTree/treeAdaptors.xhtml");
@@ -87,12 +93,7 @@
}
}
}
-
- private ModelAdaptorAttributes modelAdaptorAttributes = new ModelAdaptorAttributes(
- pjq("span[id$=:listAttributes:panel]"));
- private RecursiveModelAdaptorAttributes recursiveModelAdaptorAttributes = new RecursiveModelAdaptorAttributes(
- pjq("span[id$=:recursiveAttributes:panel]"));
-
+
private class ModelAdaptorAttributes extends AbstractComponentAttributes {
public <T extends ExtendedLocator<JQueryLocator>> ModelAdaptorAttributes(T root) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-05-17 23:53:24 UTC (rev 22498)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-05-19 07:46:35 UTC (rev 22499)
@@ -75,17 +75,22 @@
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,
+ 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() {
@@ -123,10 +128,6 @@
assertEquals(selenium.getCount(not(tree.getAnyNode().getIcon(), JQ_SAMPLE_CLASS)), 4);
}
- ElementLocator<?> iconImage = treeNode.getIcon();
- AttributeLocator<?> imageSrc = iconImage.getAttribute(SRC);
- AttributeRetriever retrieveImageSrc = retrieveAttribute.attributeLocator(imageSrc);
-
@Test
public void testIconCollapsed() {
assertTrue(selenium.isElementPresent(iconImage));
13 years, 7 months
JBoss Rich Faces SVN: r22498 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-05-17 19:53:24 -0400 (Tue, 17 May 2011)
New Revision: 22498
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java
Log:
Update validation condition to cover select-many components too
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java 2011-05-17 23:42:01 UTC (rev 22497)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java 2011-05-17 23:53:24 UTC (rev 22498)
@@ -136,11 +136,11 @@
&& inputSecret.contains(smile)
&& inputTextarea.contains(smile)
&& selectBooleanCheckbox.booleanValue()
- && !selectManyCheckbox.isEmpty()
+ && selectManyCheckbox.contains(smile)
&& selectOneListbox.contains(smile)
- && !selectManyListbox.isEmpty()
+ && selectManyListbox.contains(smile)
&& selectOneMenu.contains(smile)
- && !selectManyMenu.isEmpty()
+ && selectManyMenu.contains(smile)
&& selectOneRadio.contains(smile)
&& !calendar.after(new Date(System.currentTimeMillis()));
}
13 years, 7 months