JBoss Rich Faces SVN: r20055 - in branches/RF-8742-1: ui/parent and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-11-15 19:20:58 -0500 (Mon, 15 Nov 2010)
New Revision: 20055
Removed:
branches/RF-8742-1/ui/validator/impl/
Modified:
branches/RF-8742-1/bom/pom.xml
branches/RF-8742-1/ui/parent/pom.xml
branches/RF-8742-1/ui/validator/api/pom.xml
branches/RF-8742-1/ui/validator/pom.xml
branches/RF-8742-1/ui/validator/ui/pom.xml
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/ClientScriptServiceTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
Log:
CODING IN PROGRESS - issue RF-9799: CSV code review
https://jira.jboss.org/browse/RF-9799
validator-impl project removed
Modified: branches/RF-8742-1/bom/pom.xml
===================================================================
--- branches/RF-8742-1/bom/pom.xml 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/bom/pom.xml 2010-11-16 00:20:58 UTC (rev 20055)
@@ -1,230 +1,226 @@
- <!--
- JBoss, Home of Professional Open Source Copyright 2010, 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<!-- JBoss, Home of Professional Open Source Copyright 2010, 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-bom</artifactId>
- <packaging>pom</packaging>
- <version>4.0.0-SNAPSHOT</version>
- <name>RichFaces BOM</name>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-bom</artifactId>
+ <packaging>pom</packaging>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>RichFaces BOM</name>
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <version>10</version>
- <relativePath>../build/parent/pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>10</version>
+ <relativePath>../build/parent/pom.xml</relativePath>
+ </parent>
- <description>
+ <description>
The RichFaces "Bill of Materials". This defines all runtime dependency
versions for RichFaces.
</description>
- <properties>
- </properties>
+ <properties>
+ </properties>
- <!-- Runtime dependency management -->
- <dependencyManagement>
- <dependencies>
- <!-- Project Versions -->
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.common</groupId>
- <artifactId>richfaces-ui-common-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.common</groupId>
- <artifactId>richfaces-ui-common-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.core</groupId>
- <artifactId>richfaces-ui-core-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.core</groupId>
- <artifactId>richfaces-ui-core-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.iteration</groupId>
- <artifactId>richfaces-ui-iteration-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.iteration</groupId>
- <artifactId>richfaces-ui-iteration-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.output</groupId>
- <artifactId>richfaces-ui-output-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.output</groupId>
- <artifactId>richfaces-ui-output-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.misc</groupId>
- <artifactId>richfaces-ui-misc-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.input</groupId>
- <artifactId>richfaces-ui-input-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.input</groupId>
- <artifactId>richfaces-ui-input-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.validator</groupId>
- <artifactId>richfaces-ui-validator-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.validator</groupId>
- <artifactId>richfaces-ui-validator-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui.validator</groupId>
- <artifactId>richfaces-ui-validator-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- JSF 2 -->
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>2.0.3-b03</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>2.0.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-impl</artifactId>
- <version>2.0.2</version>
- </dependency>
+ <!-- Runtime dependency management -->
+ <dependencyManagement>
+ <dependencies>
+ <!-- Project Versions -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.common</groupId>
+ <artifactId>richfaces-ui-common-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.common</groupId>
+ <artifactId>richfaces-ui-common-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.iteration</groupId>
+ <artifactId>richfaces-ui-iteration-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.iteration</groupId>
+ <artifactId>richfaces-ui-iteration-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.misc</groupId>
+ <artifactId>richfaces-ui-misc-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.input</groupId>
+ <artifactId>richfaces-ui-input-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.input</groupId>
+ <artifactId>richfaces-ui-input-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- JSF 2 -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.3-b03</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>2.0.3-b03</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>2.0.2</version>
+ </dependency>
- <!-- Misc -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>r05</version>
- </dependency>
- <!-- Required for EL-CSS func -->
- <dependency>
- <groupId>net.sourceforge.cssparser</groupId>
- <artifactId>cssparser</artifactId>
- <version>0.9.5</version>
- </dependency>
+ <!-- Misc -->
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>r05</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+ <!-- Required for EL-CSS func -->
+ <dependency>
+ <groupId>net.sourceforge.cssparser</groupId>
+ <artifactId>cssparser</artifactId>
+ <version>0.9.5</version>
+ </dependency>
- <!-- Optional cache dependencies -->
- <dependency>
- <groupId>opensymphony</groupId>
- <artifactId>oscache</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>3.2.5.GA</version>
- </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- <version>1.6.0</version>
- </dependency>
+ <!-- Optional cache dependencies -->
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>oscache</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>3.2.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.6.0</version>
+ </dependency>
- <!-- Push dependencies -->
- <dependency>
- <groupId>org.atmosphere</groupId>
- <artifactId>atmosphere-runtime</artifactId>
- <version>0.6.3</version>
- </dependency>
- <dependency>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- <version>1.1</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <!-- Push dependencies -->
+ <dependency>
+ <groupId>org.atmosphere</groupId>
+ <artifactId>atmosphere-runtime</artifactId>
+ <version>0.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/build/bom</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/build/bom</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/trunk/build/bom</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/build/bom</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/build/bom</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/trunk/build/bom</url>
+ </scm>
</project>
Modified: branches/RF-8742-1/ui/parent/pom.xml
===================================================================
--- branches/RF-8742-1/ui/parent/pom.xml 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/parent/pom.xml 2010-11-16 00:20:58 UTC (rev 20055)
@@ -124,6 +124,7 @@
<artifactId>jstl</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- validation -->
<!-- tests -->
<dependency>
Modified: branches/RF-8742-1/ui/validator/api/pom.xml
===================================================================
--- branches/RF-8742-1/ui/validator/api/pom.xml 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/api/pom.xml 2010-11-16 00:20:58 UTC (rev 20055)
@@ -54,8 +54,8 @@
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
<scope>provided</scope>
+ <optional>true</optional>
</dependency>
</dependencies>
Modified: branches/RF-8742-1/ui/validator/pom.xml
===================================================================
--- branches/RF-8742-1/ui/validator/pom.xml 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/pom.xml 2010-11-16 00:20:58 UTC (rev 20055)
@@ -34,7 +34,6 @@
<modules>
<module>api</module>
- <module>impl</module>
<module>ui</module>
</modules>
Modified: branches/RF-8742-1/ui/validator/ui/pom.xml
===================================================================
--- branches/RF-8742-1/ui/validator/ui/pom.xml 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/ui/pom.xml 2010-11-16 00:20:58 UTC (rev 20055)
@@ -61,21 +61,26 @@
</build>
<dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.validator</groupId>
+ <artifactId>richfaces-ui-validator-api</artifactId>
+ </dependency>
<!-- runtime -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
<dependency>
- <groupId>org.richfaces.ui.validator</groupId>
- <artifactId>richfaces-ui-validator-impl</artifactId>
- </dependency>
- <dependency>
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-ui</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
<scope>provided</scope>
+ <optional>true</optional>
</dependency>
+ <!-- tests -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
Modified: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-11-16 00:20:58 UTC (rev 20055)
@@ -63,6 +63,7 @@
@After
public void tearDown() throws Exception {
validatorService = null;
+ controller.release();
}
@Test
Modified: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/ClientScriptServiceTest.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/ClientScriptServiceTest.java 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/ClientScriptServiceTest.java 2010-11-16 00:20:58 UTC (rev 20055)
@@ -73,6 +73,7 @@
@After
public void tearDown() throws Exception {
controller.verify();
+ controller.release();
}
/**
Modified: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-11-16 00:20:58 UTC (rev 20055)
@@ -63,6 +63,7 @@
public void tearDown() {
controller.verify();
serviceImpl = null;
+ controller.release();
}
@Test
Modified: branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
===================================================================
--- branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-11-15 19:38:06 UTC (rev 20054)
+++ branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-11-16 00:20:58 UTC (rev 20055)
@@ -58,6 +58,7 @@
public void tearDown() {
controller.verify();
serviceImpl = null;
+ controller.release();
}
@Test
14 years, 1 month
JBoss Rich Faces SVN: r20054 - in sandbox/trunk/ui/fileupload/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-15 14:38:06 -0500 (Mon, 15 Nov 2010)
New Revision: 20054
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss
sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
Log:
RF-9496
Modified: sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss 2010-11-15 18:54:38 UTC (rev 20053)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss 2010-11-15 19:38:06 UTC (rev 20054)
@@ -37,7 +37,7 @@
width: 34%;
}
-.rf-fu-btn-add, .rf-fu-btn {
+.rf-fu-btn {
background-color: '#{richSkin.trimColor}';
background-image: url("#{resource['org.richfaces.images:fuBtnGrad.png']}");
background-position:left top;
@@ -45,38 +45,36 @@
border-color: '#{richSkin.panelBorderColor}';
border-style: solid;
border-width: 1px;
+ cursor: default;
display: inline-block;
margin: 4px;
- padding: 1px 3px 1px 3px;
vertical-align: top;
}
/*TODO Add disabled state for buttons*/
-.rf-fu-btn-add {
- position: relative;
- overflow: hidden;
-}
-
-.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-uld, .rf-fu-btn-cnt-clr {
+.rf-fu-btn-add, .rf-fu-btn-uld, .rf-fu-btn-clr {
+ background-position: 2px 2px;
background-repeat: no-repeat;
color: '#{richSkin.generalTextColor}';
display: inline-block;
font-family: '#{richSkin.generalFamilyFont}';
font-size: '#{richSkin.generalSizeFont}';
- padding: 2px 2px 2px 19px;
+ padding: 3px 5px 3px 21px;
}
-.rf-fu-btn-cnt-add {
+.rf-fu-btn-add {
background-image: url("#{resource['org.richfaces:fu-add.gif']}");
+ overflow: hidden;
+ position: relative;
}
-.rf-fu-btn-cnt-uld {
+.rf-fu-btn-uld {
background-image: url("#{resource['org.richfaces:fu-uld.gif']}");
font-weight: bold;
}
-.rf-fu-btn-cnt-clr {
+.rf-fu-btn-clr {
background-image: url("#{resource['org.richfaces:fu-clr.gif']}");
}
@@ -91,6 +89,7 @@
.rf-fu-inp {
filter: "alpha(opacity=0)";
font-size: 10em;
+ margin: 0;
opacity: 0;
position: absolute;
right: 0;
Modified: sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-15 18:54:38 UTC (rev 20053)
+++ sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-15 19:38:06 UTC (rev 20054)
@@ -38,19 +38,21 @@
<div id="#{clientId}" class="rf-fu">
<div class="rf-fu-hdr">
<span class="rf-fu-btns-lft">
- <span class="rf-fu-btn-add">
- <span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7 only. -->
- <input type="file" class="rf-fu-inp" />
+ <span class="rf-fu-btn">
+ <span class="rf-fu-btn-add">
+ <span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7 only. -->
+ <input type="file" class="rf-fu-inp" />
+ </span>
+ Add...
</span>
- <span class="rf-fu-btn-cnt-add">Add...</span>
</span>
<span class="rf-fu-btn">
- <span class="rf-fu-btn-cnt-uld">Upload</span>
+ <span class="rf-fu-btn-uld">Upload</span>
</span>
</span>
<span class="rf-fu-btns-rgh">
<span class="rf-fu-btn">
- <span class="rf-fu-btn-cnt-clr">Clear All</span>
+ <span class="rf-fu-btn-clr">Clear All</span>
</span>
</span>
</div>
14 years, 1 month
JBoss Rich Faces SVN: r20053 - in sandbox/trunk/ui/fileupload/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-15 13:54:38 -0500 (Mon, 15 Nov 2010)
New Revision: 20053
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss
sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
Log:
RF-9496
Modified: sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss 2010-11-15 17:15:43 UTC (rev 20052)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss 2010-11-15 18:54:38 UTC (rev 20053)
@@ -1,22 +1,19 @@
.rf-fu {
- background: '#{richSkin.tableBackgroundColor}';
- border-color: '#{richSkin.tableBorderColor}';
+ background: '#{richSkin.generalBackgroundColor}';
+ border-color: '#{richSkin.panelBorderColor}';
border-style: solid;
border-width: 1px;
width: 400px; /*TODO Remove it*/
}
.rf-fu-hdr {
- background-color: '#{richSkin.additionalBackgroundColor}';
- border-bottom-color: '#{richSkin.tableBorderColor}';
- border-bottom-style: solid;
- border-bottom-width: 1px;
- border-left-color: '#{richSkin.tableBackgroundColor}';
- border-left-style: solid;
- border-left-width: 1px;
- border-top-color: '#{richSkin.tableBackgroundColor}';
- border-top-style: solid;
- border-top-width: 1px;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-image: url("#{resource['org.richfaces.renderkit.html.GradientA']}");
+ border-color: '#{richSkin.headerBackgroundColor}';
+ border-style: solid;
+ border-width: 1px;
+ margin-left: 1px;
+ margin-top: 1px;
white-space: nowrap;
}
@@ -40,19 +37,28 @@
width: 34%;
}
-.rf-fu-btn {
+.rf-fu-btn-add, .rf-fu-btn {
background-color: '#{richSkin.trimColor}';
background-image: url("#{resource['org.richfaces.images:fuBtnGrad.png']}");
background-position:left top;
background-repeat:repeat-x;
- border-color: '#{richSkin.tableBorderColor}';
+ border-color: '#{richSkin.panelBorderColor}';
border-style: solid;
border-width: 1px;
+ display: inline-block;
margin: 4px;
- padding: 0px;
+ padding: 1px 3px 1px 3px;
+ vertical-align: top;
}
-.rf-fu-btn-add, .rf-fu-btn-uld, .rf-fu-btn-clr {
+/*TODO Add disabled state for buttons*/
+
+.rf-fu-btn-add {
+ position: relative;
+ overflow: hidden;
+}
+
+.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-uld, .rf-fu-btn-cnt-clr {
background-repeat: no-repeat;
color: '#{richSkin.generalTextColor}';
display: inline-block;
@@ -61,15 +67,33 @@
padding: 2px 2px 2px 19px;
}
-.rf-fu-btn-add {
+.rf-fu-btn-cnt-add {
background-image: url("#{resource['org.richfaces:fu-add.gif']}");
}
-.rf-fu-btn-uld {
+.rf-fu-btn-cnt-uld {
background-image: url("#{resource['org.richfaces:fu-uld.gif']}");
font-weight: bold;
}
-.rf-fu-btn-clr {
+.rf-fu-btn-cnt-clr {
background-image: url("#{resource['org.richfaces:fu-clr.gif']}");
-}
\ No newline at end of file
+}
+
+.rf-fu-inp-cntr {
+ display: block;
+ height: 1px;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+.rf-fu-inp {
+ filter: "alpha(opacity=0)";
+ font-size: 10em;
+ opacity: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
Modified: sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-15 17:15:43 UTC (rev 20052)
+++ sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-15 18:54:38 UTC (rev 20053)
@@ -35,20 +35,23 @@
<cdk:resource-dependency library="org.richfaces" name="base-component.reslib" />
</cc:interface>
<cc:implementation>
- <div class="rf-fu">
+ <div id="#{clientId}" class="rf-fu">
<div class="rf-fu-hdr">
<span class="rf-fu-btns-lft">
- <button class="rf-fu-btn">
- <span class="rf-fu-btn-add">Add...</span>
- </button>
- <button class="rf-fu-btn">
- <span class="rf-fu-btn-uld">Upload</span>
- </button>
+ <span class="rf-fu-btn-add">
+ <span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7 only. -->
+ <input type="file" class="rf-fu-inp" />
+ </span>
+ <span class="rf-fu-btn-cnt-add">Add...</span>
+ </span>
+ <span class="rf-fu-btn">
+ <span class="rf-fu-btn-cnt-uld">Upload</span>
+ </span>
</span>
<span class="rf-fu-btns-rgh">
- <button class="rf-fu-btn">
- <span class="rf-fu-btn-clr">Clear All</span>
- </button>
+ <span class="rf-fu-btn">
+ <span class="rf-fu-btn-cnt-clr">Clear All</span>
+ </span>
</span>
</div>
<div class="rf-fu-lst" />
14 years, 1 month
JBoss Rich Faces SVN: r20052 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richAccordionItem and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 12:15:43 -0500 (Mon, 15 Nov 2010)
New Revision: 20052
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java
Log:
https://jira.jboss.org/browse/RFPL-753
* added 34 tests for rich:accordionItem
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java 2010-11-15 17:15:43 UTC (rev 20052)
@@ -0,0 +1,312 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richAccordionItem;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page faces/components/richAccordionItem/simple.xhtml.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestRichAccordionItem extends AbstractMetamerTest {
+
+ private JQueryLocator accordion = pjq("div[id$=accordion]");
+ private JQueryLocator item1 = pjq("div[id$=item1].rf-ac-itm");
+ private JQueryLocator[] itemHeaders = {pjq("div[id$=item1:header]"), pjq("div[id$=item2:header]"),
+ pjq("div[id$=item3:header]"), pjq("div[id$=item4:header]"), pjq("div[id$=item5:header]")};
+ private JQueryLocator[] itemContents = {pjq("div[id$=item1:content]"), pjq("div[id$=item2:content]"),
+ pjq("div[id$=item3:content]"), pjq("div[id$=item4:content]"), pjq("div[id$=item5:content]")};
+ private JQueryLocator[] activeHeaders = {pjq("div.rf-ac-itm-hdr-act:eq(0)"), pjq("div.rf-ac-itm-hdr-act:eq(1)"),
+ pjq("div.rf-ac-itm-hdr-act:eq(2)"), pjq("div.rf-ac-itm-hdr-act:eq(3)"), pjq("div.rf-ac-itm-hdr-act:eq(4)")};
+ private JQueryLocator[] inactiveHeaders = {pjq("div.rf-ac-itm-hdr-inact:eq(0)"),
+ pjq("div.rf-ac-itm-hdr-inact:eq(1)"), pjq("div.rf-ac-itm-hdr-inact:eq(2)"),
+ pjq("div.rf-ac-itm-hdr-inact:eq(3)"), pjq("div.rf-ac-itm-hdr-inact:eq(4)")};
+ private JQueryLocator[] disabledHeaders = {pjq("div.rf-ac-itm-hdr-dis:eq(0)"), pjq("div.rf-ac-itm-hdr-dis:eq(1)"),
+ pjq("div.rf-ac-itm-hdr-dis:eq(2)"), pjq("div.rf-ac-itm-hdr-dis:eq(3)"), pjq("div.rf-ac-itm-hdr-dis:eq(4)")};
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richAccordionItem/simple.xhtml");
+ }
+
+ @Test
+ public void testInit() {
+ boolean accordionDisplayed = selenium.isDisplayed(accordion);
+ assertTrue(accordionDisplayed, "Accordion is not present on the page.");
+
+ accordionDisplayed = selenium.isDisplayed(itemHeaders[2]);
+ assertTrue(accordionDisplayed, "Item3's header should be visible.");
+
+
+ accordionDisplayed = selenium.isDisplayed(itemContents[2]);
+ assertTrue(accordionDisplayed, "Content of item3 should be visible.");
+
+ accordionDisplayed = selenium.isDisplayed(itemContents[0]);
+ assertFalse(accordionDisplayed, "Item1's content should not be visible.");
+ }
+
+ @Test
+ public void testContentClass() {
+ testStyleClass(itemContents[0], "contentClass");
+ }
+
+ @Test
+ public void testDir() {
+ testDir(item1);
+ }
+
+ @Test
+ public void testDisabled() {
+ JQueryLocator selectOption = pjq("input[type=radio][name$=disabledInput][value=true]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ guardNoRequest(selenium).click(itemHeaders[0]);
+ boolean accordionDisplayed = selenium.isDisplayed(itemContents[0]);
+ assertFalse(accordionDisplayed, "Item1's content should not be visible.");
+ }
+
+ @Test
+ public void testHeader() {
+ selenium.type(pjq("input[id$=headerInput]"), "new header");
+ selenium.waitForPageToLoad();
+
+ String header = selenium.getText(itemHeaders[0]);
+ assertEquals(header, "new header", "Header of item1 did not change.");
+ }
+
+ @Test
+ public void testHeaderClass() {
+ testStyleClass(itemHeaders[0], "headerClass");
+ assertFalse(selenium.belongsClass(itemHeaders[1], "metamer-ftest-class"), "headerClass should be set only on first item");
+ assertFalse(selenium.belongsClass(itemHeaders[2], "metamer-ftest-class"), "headerClass should be set only on first item");
+ assertFalse(selenium.belongsClass(itemHeaders[3], "metamer-ftest-class"), "headerClass should be set only on first item");
+ }
+
+ @Test
+ public void testHeaderClassActive() {
+ testStyleClass(activeHeaders[0], "headerClassActive");
+ assertFalse(selenium.belongsClass(activeHeaders[1], "metamer-ftest-class"), "headerClassActive should be set only on first item");
+ assertFalse(selenium.belongsClass(activeHeaders[2], "metamer-ftest-class"), "headerClassActive should be set only on first item");
+ assertFalse(selenium.belongsClass(activeHeaders[3], "metamer-ftest-class"), "headerClassActive should be set only on first item");
+ }
+
+ @Test
+ public void testHeaderClassDisabled() {
+ testStyleClass(disabledHeaders[0], "headerClassDisabled");
+ assertFalse(selenium.belongsClass(disabledHeaders[1], "metamer-ftest-class"), "headerClassDisabled should be set only on first item");
+ assertFalse(selenium.belongsClass(disabledHeaders[2], "metamer-ftest-class"), "headerClassDisabled should be set only on first item");
+ assertFalse(selenium.belongsClass(disabledHeaders[3], "metamer-ftest-class"), "headerClassDisabled should be set only on first item");
+ }
+
+ @Test
+ public void testHeaderClassInactive() {
+ testStyleClass(inactiveHeaders[0], "headerClassInactive");
+ assertFalse(selenium.belongsClass(inactiveHeaders[1], "metamer-ftest-class"), "headerClassInactive should be set only on first item");
+ assertFalse(selenium.belongsClass(inactiveHeaders[2], "metamer-ftest-class"), "headerClassInactive should be set only on first item");
+ assertFalse(selenium.belongsClass(inactiveHeaders[3], "metamer-ftest-class"), "headerClassInactive should be set only on first item");
+ }
+
+ @Test
+ public void testHeaderStyle() {
+ testStyle(itemHeaders[0], "headerStyle");
+ }
+
+ @Test
+ public void testLang() {
+ testLang(item1);
+ }
+
+ @Test
+ public void testName() {
+ selenium.type(pjq("input[id$=nameInput]"), "new name");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(pjq("input[type=submit][name$=switchButtonCustom]"));
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireEvent(Event.CLICK, item1);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireEvent(Event.DBLCLICK, item1);
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9821")
+ public void testOnenter() {
+ testFireEvent(Event.CLICK, item1, "enter");
+ }
+
+ @Test
+ public void testOnheaderclick() {
+ testFireEvent(Event.CLICK, itemHeaders[0], "headerclick");
+ }
+
+ @Test
+ public void testOnheaderdblclick() {
+ testFireEvent(Event.DBLCLICK, itemHeaders[0], "headerdblclick");
+ }
+
+ @Test
+ public void testOnheadermousedown() {
+ testFireEvent(Event.MOUSEDOWN, itemHeaders[0], "headermousedown");
+ }
+
+ @Test
+ public void testOnheadermousemove() {
+ testFireEvent(Event.MOUSEMOVE, itemHeaders[0], "headermousemove");
+ }
+
+ @Test
+ public void testOnheadermouseup() {
+ testFireEvent(Event.MOUSEUP, itemHeaders[0], "headermouseup");
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9821")
+ public void testOnleave() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+
+ selenium.type(pjq("input[type=text][id$=onleaveInput]"), "metamerEvents += \"leave \"");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+ String time1Value = selenium.getText(time);
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Page was not updated").waitForChange(time1Value, retrieveText.locator(time));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "leave", "Attribute onleave doesn't work");
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireEvent(Event.MOUSEDOWN, item1);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireEvent(Event.MOUSEMOVE, item1);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireEvent(Event.MOUSEOUT, item1);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireEvent(Event.MOUSEOVER, item1);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireEvent(Event.MOUSEUP, item1);
+ }
+
+ @Test
+ public void testRendered() {
+ JQueryLocator input = pjq("input[type=radio][name$=renderedInput][value=false]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ assertFalse(selenium.isElementPresent(item1), "Item1 should not be rendered when rendered=false.");
+ }
+
+ @Test
+ public void testStyle() {
+ testStyle(item1, "style");
+ }
+
+ @Test
+ public void testStyleClass() {
+ testStyleClass(item1, "styleClass");
+ }
+
+ @Test
+ public void testSwitchTypeNull() {
+ guardXhr(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ JQueryLocator selectOption = pjq("input[type=radio][name$=switchTypeInput][value=ajax]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ JQueryLocator selectOption = pjq("input[type=radio][name$=switchTypeInput][value=client]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ guardNoRequest(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+ }
+
+ @Test
+ public void testSwitchTypeServer() {
+ JQueryLocator selectOption = pjq("input[type=radio][name$=switchTypeInput][value=server]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ guardHttp(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+ }
+
+ @Test
+ public void testTitle() {
+ testTitle(item1);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 1 month
JBoss Rich Faces SVN: r20051 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 12:04:19 -0500 (Mon, 15 Nov 2010)
New Revision: 20051
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml
Log:
https://jira.jboss.org/browse/RFPL-753
* accordion item sample fixed
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2010-11-15 16:53:41 UTC (rev 20050)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2010-11-15 17:04:19 UTC (rev 20051)
@@ -54,12 +54,11 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getUIComponentAttributes(HtmlAccordionItem.class, getClass());
+ attributes = Attributes.getUIComponentAttributes(HtmlAccordionItem.class, getClass(), false);
attributes.setAttribute("header", "Item 1");
attributes.setAttribute("name", "item1");
attributes.setAttribute("rendered", true);
-
}
public Attributes getAttributes() {
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionItemBean.properties 2010-11-15 17:04:19 UTC (rev 20051)
@@ -0,0 +1,8 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.null=
+
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml 2010-11-15 16:53:41 UTC (rev 20050)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml 2010-11-15 17:04:19 UTC (rev 20051)
@@ -42,9 +42,7 @@
<ui:define name="component">
<rich:accordion id="accordion" activeItem="item3">
<rich:accordionItem id="item1"
- active="#{richAccordionItemBean.attributes['active'].value}"
contentClass="#{richAccordionItemBean.attributes['contentClass'].value}"
- converter="#{richAccordionItemBean.attributes['converter'].value}"
dir="#{richAccordionItemBean.attributes['dir'].value}"
disabled="#{richAccordionItemBean.attributes['disabled'].value}"
header="#{richAccordionItemBean.attributes['header'].value}"
@@ -54,7 +52,6 @@
headerClassInactive="#{richAccordionItemBean.attributes['headerClassInactive'].value}"
headerStyle="#{richAccordionItemBean.attributes['headerStyle'].value}"
lang="#{richAccordionItemBean.attributes['lang'].value}"
- localValue="#{richAccordionItemBean.attributes['localValue'].value}"
name="#{richAccordionItemBean.attributes['name'].value}"
onclick="#{richAccordionItemBean.attributes['onclick'].value}"
ondblclick="#{richAccordionItemBean.attributes['ondblclick'].value}"
@@ -75,7 +72,7 @@
styleClass="#{richAccordionItemBean.attributes['styleClass'].value}"
switchType="#{richAccordionItemBean.attributes['switchType'].value}"
title="#{richAccordionItemBean.attributes['title'].value}"
- value="#{richAccordionItemBean.attributes['value'].value}">
+ >
content of item 1
</rich:accordionItem>
<rich:accordionItem id="item2" name="item2" header="Item 2">
14 years, 1 month
JBoss Rich Faces SVN: r20050 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: a4jOutputPanel and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 11:53:41 -0500 (Mon, 15 Nov 2010)
New Revision: 20050
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/a4jOutputPanel/TestA4JOutputPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
* testTitle added to AbstractMetamerTest
* all tests for attribute title refactored
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 2010-11-15 15:26:58 UTC (rev 20049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-11-15 16:53:41 UTC (rev 20050)
@@ -156,7 +156,7 @@
selenium.fireEvent(element, event);
- waitGui.failWith(event.getEventName() + " attribute did not change correctly").until(
+ waitGui.failWith("Attribute on" + attributeName + " does not work correctly").until(
new EventFiredCondition(event));
}
@@ -251,6 +251,28 @@
}
/**
+ * A helper method for testing attribute "title".
+ *
+ * @param element
+ * locator of tested element
+ */
+ protected void testTitle(ElementLocator<?> element) {
+ JQueryLocator input = pjq("input[type=text][id$=titleInput]");
+ AttributeLocator<?> attribute = element.getAttribute(new Attribute("title"));
+
+ // title = null
+ assertFalse(selenium.isAttributePresent(attribute), "Attribute title should not be present.");
+
+ // title = "RichFaces 4"
+ selenium.type(input, "RichFaces 4");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ assertTrue(selenium.isAttributePresent(attribute), "Attribute title should be present.");
+ String value = selenium.getAttribute(attribute);
+ assertEquals(value, "RichFaces 4", "Attribute title");
+ }
+
+ /**
* Hides header, footer and inputs for attributes.
*/
protected void hideControls() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 15:26:58 UTC (rev 20049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 16:53:41 UTC (rev 20050)
@@ -227,22 +227,6 @@
@Test
public void testTitle() {
- String title = "a4j:outputPanel title";
- JQueryLocator titleInput = pjq("input[id$=titleInput]");
- AttributeLocator<?> attributeTitle = outputDiv.getAttribute(new Attribute("title"));
-
- selenium.typeKeys(titleInput, title);
- selenium.waitForPageToLoad(TIMEOUT);
-
- String attributeValue = selenium.getAttribute(attributeTitle);
- assertEquals(attributeValue, title, "Value of attribute title.");
-
- selenium.typeKeys(titleInput, "");
- selenium.waitForPageToLoad(TIMEOUT);
-
- if (selenium.isAttributePresent(attributeTitle)) {
- attributeValue = selenium.getAttribute(attributeTitle);
- assertEquals(attributeValue, "", "Value of attribute style.");
- }
+ testTitle(outputDiv);
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 15:26:58 UTC (rev 20049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 16:53:41 UTC (rev 20050)
@@ -352,19 +352,7 @@
@Test
public void testTitle() {
- JQueryLocator input = pjq("input[type=text][id$=titleInput]");
- AttributeLocator<?> attribute = accordion.getAttribute(new Attribute("title"));
-
- // title = null
- assertFalse(selenium.isAttributePresent(attribute), "Attribute title should not be present.");
-
- // title = "RichFaces Accordion"
- selenium.type(input, "RichFaces Accordion");
- selenium.waitForPageToLoad(TIMEOUT);
-
- assertTrue(selenium.isAttributePresent(attribute), "Attribute title should be present.");
- String value = selenium.getAttribute(attribute);
- assertEquals(value, "RichFaces Accordion", "Attribute title");
+ testTitle(accordion);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 15:26:58 UTC (rev 20049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 16:53:41 UTC (rev 20050)
@@ -283,7 +283,7 @@
public void testOnleave() {
JQueryLocator time = jq("span[id$=requestTime]");
- selenium.type(pjq("input[type=text][id$=onleaveInput]"), "metamerEvents += \"enter \"");
+ selenium.type(pjq("input[type=text][id$=onleaveInput]"), "metamerEvents += \"leave \"");
selenium.waitForPageToLoad();
selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
@@ -390,18 +390,6 @@
@Test
public void testTitle() {
- JQueryLocator input = pjq("input[type=text][id$=titleInput]");
- AttributeLocator<?> attribute = tab.getAttribute(new Attribute("title"));
-
- // title = null
- assertFalse(selenium.isAttributePresent(attribute), "Attribute title should not be present.");
-
- // title = "RichFaces Tab Panel"
- selenium.type(input, "RichFaces Tab Panel");
- selenium.waitForPageToLoad(TIMEOUT);
-
- assertTrue(selenium.isAttributePresent(attribute), "Attribute title should be present.");
- String value = selenium.getAttribute(attribute);
- assertEquals(value, "RichFaces Tab Panel", "Attribute title");
+ testTitle(tab);
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 15:26:58 UTC (rev 20049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 16:53:41 UTC (rev 20050)
@@ -411,18 +411,6 @@
@Test
public void testTitle() {
- JQueryLocator input = pjq("input[type=text][id$=titleInput]");
- AttributeLocator<?> attribute = panel.getAttribute(new Attribute("title"));
-
- // title = null
- assertFalse(selenium.isAttributePresent(attribute), "Attribute title should not be present.");
-
- // title = "RichFaces Tab Panel"
- selenium.type(input, "RichFaces Tab Panel");
- selenium.waitForPageToLoad(TIMEOUT);
-
- assertTrue(selenium.isAttributePresent(attribute), "Attribute title should be present.");
- String value = selenium.getAttribute(attribute);
- assertEquals(value, "RichFaces Tab Panel", "Attribute title");
+ testTitle(panel);
}
}
14 years, 1 month
JBoss Rich Faces SVN: r20049 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richAccordion and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 10:26:58 -0500 (Mon, 15 Nov 2010)
New Revision: 20049
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/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
* testStyle refactored
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 2010-11-15 15:22:36 UTC (rev 20048)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-11-15 15:26:58 UTC (rev 20049)
@@ -163,12 +163,14 @@
/**
* A helper method for testing attribute "style". It sets "background-color: yellow; font-size: 1.5em;" to the input
* field and checks that it was changed on the page.
- *
+ *
* @param element
* locator of tested element
+ * @param attribute
+ * name of the attribute that will be set (e.g. style, headerStyle, itemContentStyle)
*/
- protected void testStyle(ElementLocator<?> element) {
- ElementLocator<?> styleInput = pjq("input[id$=styleInput]");
+ protected void testStyle(ElementLocator<?> element, String attribute) {
+ ElementLocator<?> styleInput = pjq("input[id$=" + attribute + "Input]");
final String value = "background-color: yellow; font-size: 1.5em;";
selenium.type(styleInput, value);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 15:22:36 UTC (rev 20048)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 15:26:58 UTC (rev 20049)
@@ -342,7 +342,7 @@
@Test
public void testStyle() {
- testStyle(accordion);
+ testStyle(accordion, "style");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java 2010-11-15 15:22:36 UTC (rev 20048)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java 2010-11-15 15:26:58 UTC (rev 20049)
@@ -474,7 +474,7 @@
@Test
public void testStyle() {
- testStyle(spinner);
+ testStyle(spinner, "style");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 15:22:36 UTC (rev 20048)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 15:26:58 UTC (rev 20049)
@@ -336,7 +336,7 @@
@Test
public void testStyle() {
- testStyle(tab);
+ testStyle(tab, "style");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 15:22:36 UTC (rev 20048)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 15:26:58 UTC (rev 20049)
@@ -316,7 +316,7 @@
@Test
public void testStyle() {
- testStyle(panel);
+ testStyle(panel, "style");
}
@Test
14 years, 1 month
JBoss Rich Faces SVN: r20048 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: a4jOutputPanel and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 10:22:36 -0500 (Mon, 15 Nov 2010)
New Revision: 20048
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/a4jOutputPanel/TestA4JOutputPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
* testLang added to AbstractMetamerTest
* all tests for lang attribute refactored
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 2010-11-15 14:36:50 UTC (rev 20047)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-11-15 15:22:36 UTC (rev 20048)
@@ -185,7 +185,7 @@
* @param element
* locator of tested element
* @param attribute
- * name of the attribute that will be set (e.g. styleClass, headerClass, itemContentClass
+ * name of the attribute that will be set (e.g. styleClass, headerClass, itemContentClass)
*/
protected void testStyleClass(ElementLocator<?> element, String attribute) {
ElementLocator<?> classInput = pjq("input[id$=" + attribute + "Input]");
@@ -227,6 +227,28 @@
}
/**
+ * A helper method for testing attribute "lang".
+ *
+ * @param element
+ * locator of tested element
+ */
+ protected void testLang(ElementLocator<?> element) {
+ JQueryLocator langInput = pjq("input[type=text][id$=langInput]");
+
+ // lang = null
+ AttributeLocator<?> langAttr = element.getAttribute(new Attribute("lang"));
+ assertFalse(selenium.isAttributePresent(langAttr), "Attribute xml:lang should not be present.");
+
+ selenium.type(langInput, "sk");
+ selenium.waitForPageToLoad();
+
+ // lang = sk
+ langAttr = element.getAttribute(new Attribute("lang"));
+ assertTrue(selenium.isAttributePresent(langAttr), "Attribute xml:lang should be present.");
+ assertEquals(selenium.getAttribute(langAttr), "sk", "Attribute xml:lang should be present.");
+ }
+
+ /**
* Hides header, footer and inputs for attributes.
*/
protected void hideControls() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 14:36:50 UTC (rev 20047)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 15:22:36 UTC (rev 20048)
@@ -129,20 +129,7 @@
@Test
public void testLang() {
- JQueryLocator langInput = pjq("input[id$=langInput]");
- AttributeLocator<?> attributeLang = outputDiv.getAttribute(new Attribute("lang"));
-
- selenium.typeKeys(langInput, "en");
- selenium.waitForPageToLoad(TIMEOUT);
-
- String attributeValue = selenium.getAttribute(attributeLang);
- assertEquals(attributeValue, "en", "Lang attribute");
-
- selenium.typeKeys(langInput, "sk");
- selenium.waitForPageToLoad(TIMEOUT);
-
- attributeValue = selenium.getAttribute(attributeLang);
- assertEquals(attributeValue, "sk", "Lang attribute");
+ testLang(outputDiv);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 14:36:50 UTC (rev 20047)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 15:22:36 UTC (rev 20048)
@@ -293,19 +293,7 @@
@Test
public void testLang() {
- JQueryLocator langInput = pjq("input[type=text][id$=langInput]");
-
- // lang = null
- AttributeLocator<?> langAttr = accordion.getAttribute(new Attribute("xml|lang"));
- assertFalse(selenium.isAttributePresent(langAttr), "Attribute xml:lang should not be present.");
-
- selenium.type(langInput, "sk");
- selenium.waitForPageToLoad();
-
- // lang = sk
- langAttr = accordion.getAttribute(new Attribute("lang"));
- assertTrue(selenium.isAttributePresent(langAttr), "Attribute xml:lang should be present.");
- assertEquals(selenium.getAttribute(langAttr), "sk", "Attribute xml:lang should be present.");
+ testLang(accordion);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 14:36:50 UTC (rev 20047)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 15:22:36 UTC (rev 20048)
@@ -219,19 +219,7 @@
@Test
public void testLang() {
- JQueryLocator langInput = pjq("input[type=text][id$=langInput]");
-
- // lang = null
- AttributeLocator<?> langAttr = tab.getAttribute(new Attribute("lang"));
- assertFalse(selenium.isAttributePresent(langAttr), "Attribute xml:lang should not be present.");
-
- selenium.type(langInput, "sk");
- selenium.waitForPageToLoad();
-
- // lang = sk
- langAttr = tab.getAttribute(new Attribute("lang"));
- assertTrue(selenium.isAttributePresent(langAttr), "Attribute xml:lang should be present.");
- assertEquals(selenium.getAttribute(langAttr), "sk", "Attribute xml:lang should be present.");
+ testLang(tab);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 14:36:50 UTC (rev 20047)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 15:22:36 UTC (rev 20048)
@@ -204,19 +204,7 @@
@Test
public void testLang() {
- JQueryLocator langInput = pjq("input[type=text][id$=langInput]");
-
- // lang = null
- AttributeLocator<?> langAttr = panel.getAttribute(new Attribute("xml|lang"));
- assertFalse(selenium.isAttributePresent(langAttr), "Attribute xml:lang should not be present.");
-
- selenium.type(langInput, "sk");
- selenium.waitForPageToLoad();
-
- // lang = sk
- langAttr = panel.getAttribute(new Attribute("lang"));
- assertTrue(selenium.isAttributePresent(langAttr), "Attribute xml:lang should be present.");
- assertEquals(selenium.getAttribute(langAttr), "sk", "Attribute xml:lang should be present.");
+ testLang(panel);
}
@Test
14 years, 1 month
JBoss Rich Faces SVN: r20047 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 09:36:50 -0500 (Mon, 15 Nov 2010)
New Revision: 20047
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
Log:
* javadoc of testDir fixed
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 2010-11-15 14:01:25 UTC (rev 20046)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-11-15 14:36:50 UTC (rev 20047)
@@ -198,13 +198,10 @@
}
/**
- * A helper method for testing attribute "class". It sets "metamer-ftest-class" to the input field and checks that
- * it was changed on the page.
+ * A helper method for testing attribute "dir". It tries null, ltr and rtl.
*
* @param element
* locator of tested element
- * @param attribute
- * name of the attribute that will be set (e.g. styleClass, headerClass, itemContentClass
*/
protected void testDir(ElementLocator<?> element) {
JQueryLocator ltrInput = pjq("input[type=radio][name$=dirInput][value=ltr]");
14 years, 1 month
JBoss Rich Faces SVN: r20046 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-15 09:01:25 -0500 (Mon, 15 Nov 2010)
New Revision: 20046
Modified:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties
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/a4jOutputPanel/TestA4JOutputPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
* new (common) implementation of testDir
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties 2010-11-15 14:01:25 UTC (rev 20046)
@@ -1,5 +1,5 @@
-attr.dir.LTR=LTR
-attr.dir.RTL=RTL
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
attr.dir.null=
attr.headerAlignment.left=left
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 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-11-15 14:01:25 UTC (rev 20046)
@@ -24,6 +24,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import java.net.URL;
@@ -197,6 +198,38 @@
}
/**
+ * A helper method for testing attribute "class". It sets "metamer-ftest-class" to the input field and checks that
+ * it was changed on the page.
+ *
+ * @param element
+ * locator of tested element
+ * @param attribute
+ * name of the attribute that will be set (e.g. styleClass, headerClass, itemContentClass
+ */
+ protected void testDir(ElementLocator<?> element) {
+ JQueryLocator ltrInput = pjq("input[type=radio][name$=dirInput][value=ltr]");
+ JQueryLocator rtlInput = pjq("input[type=radio][name$=dirInput][value=rtl]");
+ AttributeLocator<?> dirAttribute = element.getAttribute(new Attribute("dir"));
+
+ // dir = null
+ assertFalse(selenium.isAttributePresent(dirAttribute), "Attribute dir should not be present.");
+
+ // dir = ltr
+ selenium.click(ltrInput);
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
+ String value = selenium.getAttribute(dirAttribute);
+ assertEquals(value, "ltr", "Attribute dir");
+
+ // dir = rtl
+ selenium.click(rtlInput);
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
+ value = selenium.getAttribute(dirAttribute);
+ assertEquals(value, "rtl", "Attribute dir");
+ }
+
+ /**
* Hides header, footer and inputs for attributes.
*/
protected void hideControls() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2010-11-15 14:01:25 UTC (rev 20046)
@@ -19,7 +19,6 @@
* 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.a4jOutputPanel;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
@@ -49,19 +48,15 @@
*/
public class TestA4JOutputPanel extends AbstractMetamerTest {
- Event[] events = new Event[] { CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE, MOUSEOUT,
- MOUSEOVER, MOUSEUP };
-
- String[] layouts = new String[] { "block", "inline" };
-
+ Event[] events = new Event[]{CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN, MOUSEMOVE, MOUSEOUT,
+ MOUSEOVER, MOUSEUP};
+ String[] layouts = new String[]{"block", "inline"};
@Inject
@Use(empty = true)
Event event;
-
@Inject
@Use(empty = true)
String layout;
-
private JQueryLocator increaseCounterButton = pjq("input[id$=button]");
private JQueryLocator outputDiv = pjq("div[id$=outputPanel]");
private JQueryLocator outputSpan = pjq("span[id$=outputPanel]");
@@ -72,9 +67,11 @@
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/a4jOutputPanel/simple.xhtml");
}
-
+
@Test
- @Uses({ @Use(field = "event", value = "events"), @Use(field = "layout", value = "layouts") })
+ @Uses({
+ @Use(field = "event", value = "events"),
+ @Use(field = "layout", value = "layouts")})
public void testEvent() {
JQueryLocator element = null;
@@ -127,30 +124,7 @@
@Test
public void testDir() {
- JQueryLocator optionLtr = pjq("input[name$=dirInput][value=ltr]");
- JQueryLocator optionRtl = pjq("input[name$=dirInput][value=rtl]");
- JQueryLocator optionNone = pjq("input[name$=dirInput][value=]");
- AttributeLocator<?> attributeDir = outputDiv.getAttribute(new Attribute("dir"));
-
- // right-to-left
- selenium.click(optionRtl);
- selenium.waitForPageToLoad(TIMEOUT);
- String attributeValue = selenium.getAttribute(attributeDir);
- assertEquals(attributeValue, "rtl", "Attribute dir after rtl was set.");
-
- // left-to-right
- selenium.click(optionLtr);
- selenium.waitForPageToLoad(TIMEOUT);
- attributeValue = selenium.getAttribute(attributeDir);
- assertEquals(attributeValue, "ltr", "Attribute dir after ltr was set.");
-
- // not specified
- selenium.click(optionNone);
- selenium.waitForPageToLoad(TIMEOUT);
- if (selenium.isAttributePresent(attributeDir)) {
- attributeValue = selenium.getAttribute(attributeDir);
- assertEquals(attributeValue, "", "Attribute dir after none was set.");
- }
+ testDir(outputDiv);
}
@Test
@@ -246,21 +220,21 @@
selenium.waitForPageToLoad(TIMEOUT);
assertTrue(selenium.belongsClass(outputDiv, "blue-background"), "Panel should have class blue-background set.");
assertFalse(selenium.belongsClass(outputDiv, "gray-background"),
- "Panel should not have class gray-background set.");
+ "Panel should not have class gray-background set.");
selenium.click(optionGray);
selenium.waitForPageToLoad(TIMEOUT);
assertTrue(selenium.belongsClass(outputDiv, "gray-background"), "Panel should have class gray-background set.");
assertFalse(selenium.belongsClass(outputDiv, "blue-background"),
- "Panel should not have class blue-background set.");
+ "Panel should not have class blue-background set.");
selenium.click(optionNone);
selenium.waitForPageToLoad(TIMEOUT);
if (selenium.isAttributePresent(attributeClass)) {
assertFalse(selenium.belongsClass(outputDiv, "blue-background"),
- "Panel should not have class blue-background set.");
+ "Panel should not have class blue-background set.");
assertFalse(selenium.belongsClass(outputDiv, "gray-background"),
- "Panel should not have class gray-background set.");
+ "Panel should not have class gray-background set.");
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-11-15 14:01:25 UTC (rev 20046)
@@ -57,7 +57,6 @@
pjq("div[id$=item3:header]"), pjq("div[id$=item4:header]"), pjq("div[id$=item5:header]")};
private JQueryLocator[] itemContents = {pjq("div[id$=item1:content]"), pjq("div[id$=item2:content]"),
pjq("div[id$=item3:content]"), pjq("div[id$=item4:content]"), pjq("div[id$=item5:content]")};
- private IsDisplayed isDisplayed = IsDisplayed.getInstance();
private JQueryLocator[] activeHeaders = {pjq("div.rf-ac-itm-hdr-act:eq(0)"), pjq("div.rf-ac-itm-hdr-act:eq(1)"),
pjq("div.rf-ac-itm-hdr-act:eq(2)"), pjq("div.rf-ac-itm-hdr-act:eq(3)"), pjq("div.rf-ac-itm-hdr-act:eq(4)")};
private JQueryLocator[] inactiveHeaders = {pjq("div.rf-ac-itm-hdr-inact:eq(0)"),
@@ -144,7 +143,7 @@
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
- PhaseId.RENDER_RESPONSE);
+ PhaseId.RENDER_RESPONSE);
}
@Test
@@ -175,26 +174,7 @@
@Test
public void testDir() {
- JQueryLocator ltrInput = pjq("input[type=radio][id$=dirInput:0]");
- JQueryLocator rtlInput = pjq("input[type=radio][id$=dirInput:2]");
- AttributeLocator<?> dirAttribute = accordion.getAttribute(new Attribute("dir"));
-
- // dir = null
- assertFalse(selenium.isAttributePresent(dirAttribute), "Attribute dir should not be present.");
-
- // dir = ltr
- selenium.click(ltrInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- String value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "ltr", "Attribute dir");
-
- // dir = rtl
- selenium.click(rtlInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "rtl", "Attribute dir");
+ testDir(accordion);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTab/TestRichTab.java 2010-11-15 14:01:25 UTC (rev 20046)
@@ -102,26 +102,7 @@
@Test
public void testDir() {
- JQueryLocator ltrInput = pjq("input[type=radio][name$=dirInput][value=ltr]");
- JQueryLocator rtlInput = pjq("input[type=radio][name$=dirInput][value=rtl]");
- AttributeLocator<?> dirAttribute = tab.getAttribute(new Attribute("dir"));
-
- // dir = null
- assertFalse(selenium.isAttributePresent(dirAttribute), "Attribute dir should not be present.");
-
- // dir = ltr
- selenium.click(ltrInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- String value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "ltr", "Attribute dir");
-
- // dir = rtl
- selenium.click(rtlInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "rtl", "Attribute dir");
+ testDir(tab);
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 10:56:27 UTC (rev 20045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-11-15 14:01:25 UTC (rev 20046)
@@ -187,26 +187,7 @@
@Test
public void testDir() {
- JQueryLocator ltrInput = pjq("input[type=radio][name$=dirInput][value=LTR]");
- JQueryLocator rtlInput = pjq("input[type=radio][name$=dirInput][value=RTL]");
- AttributeLocator<?> dirAttribute = panel.getAttribute(new Attribute("dir"));
-
- // dir = null
- assertFalse(selenium.isAttributePresent(dirAttribute), "Attribute dir should not be present.");
-
- // dir = ltr
- selenium.click(ltrInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- String value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "LTR", "Attribute dir");
-
- // dir = rtl
- selenium.click(rtlInput);
- selenium.waitForPageToLoad();
- assertTrue(selenium.isAttributePresent(dirAttribute), "Attribute dir should be present.");
- value = selenium.getAttribute(dirAttribute);
- assertEquals(value, "RTL", "Attribute dir");
+ super.testDir(panel);
}
@Test
14 years, 1 month