JBoss Rich Faces SVN: r22340 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richInputNumberSpinner and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-31 08:50:47 -0400 (Thu, 31 Mar 2011)
New Revision: 22340
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java
Log:
samples for spinner updated
added new tests for spinner
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.properties 2011-03-31 12:50:47 UTC (rev 22340)
@@ -0,0 +1,3 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.null=
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml 2011-03-31 12:07:19 UTC (rev 22339)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml 2011-03-31 12:50:47 UTC (rev 22340)
@@ -44,8 +44,6 @@
<ui:define name="component">
<rich:inputNumberSpinner id="spinner"
- valueChangeListener="#{richBean.valueChangeListener}"
-
accesskey="#{richInputNumberSpinnerBean.attributes['accesskey'].value}"
cycled="#{richInputNumberSpinnerBean.attributes['cycled'].value}"
dir="#{richInputNumberSpinnerBean.attributes['dir'].value}"
@@ -74,6 +72,9 @@
oninputmouseout="#{richInputNumberSpinnerBean.attributes['oninputmouseout'].value}"
oninputmouseover="#{richInputNumberSpinnerBean.attributes['oninputmouseover'].value}"
oninputmouseup="#{richInputNumberSpinnerBean.attributes['oninputmouseup'].value}"
+ onkeydown="#{richInputNumberSpinnerBean.attributes['onkeydown'].value}"
+ onkeypress="#{richInputNumberSpinnerBean.attributes['onkeypress'].value}"
+ onkeyup="#{richInputNumberSpinnerBean.attributes['onkeyup'].value}"
onmousedown="#{richInputNumberSpinnerBean.attributes['onmousedown'].value}"
onmousemove="#{richInputNumberSpinnerBean.attributes['onmousemove'].value}"
onmouseout="#{richInputNumberSpinnerBean.attributes['onmouseout'].value}"
@@ -81,14 +82,16 @@
onmouseup="#{richInputNumberSpinnerBean.attributes['onmouseup'].value}"
onselect="#{richInputNumberSpinnerBean.attributes['onselect'].value}"
onupclick="#{richInputNumberSpinnerBean.attributes['onupclick'].value}"
- readonly="#{richInputNumberSpinnerBean.attributes['readonly'].value}"
rendered="#{richInputNumberSpinnerBean.attributes['rendered'].value}"
+ required="#{richInputNumberSpinnerBean.attributes['required'].value}"
+ requiredMessage="#{richInputNumberSpinnerBean.attributes['requiredMessage'].value}"
step="#{richInputNumberSpinnerBean.attributes['step'].value}"
style="#{richInputNumberSpinnerBean.attributes['style'].value}"
styleClass="#{richInputNumberSpinnerBean.attributes['styleClass'].value}"
tabindex="#{richInputNumberSpinnerBean.attributes['tabindex'].value}"
title="#{richInputNumberSpinnerBean.attributes['title'].value}"
value="#{richInputNumberSpinnerBean.attributes['value'].value}"
+ valueChangeListener="#{richBean.valueChangeListener}"
>
<a4j:ajax event="change" render="output" />
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 2011-03-31 12:07:19 UTC (rev 22339)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSpinner/TestRichSpinner.java 2011-03-31 12:50:47 UTC (rev 22340)
@@ -133,6 +133,11 @@
}
@Test
+ public void testDir() {
+ testDir(spinner);
+ }
+
+ @Test
public void testDisabled() {
JQueryLocator selectOption = pjq("input[type=radio][name$=disabledInput][value=true]");
selenium.click(selectOption);
@@ -379,6 +384,21 @@
}
@Test
+ public void testOnkeydown() {
+ testFireEvent(Event.KEYDOWN, spinner);
+ }
+
+ @Test
+ public void testOnkeypress() {
+ testFireEvent(Event.KEYPRESS, spinner);
+ }
+
+ @Test
+ public void testOnkeyup() {
+ testFireEvent(Event.KEYUP, spinner);
+ }
+
+ @Test
public void testOnmousedown() {
testFireEvent(Event.MOUSEDOWN, spinner);
}
13 years, 8 months
JBoss Rich Faces SVN: r22339 - in branches/4.0.X/examples/richfaces-showcase/src/main: webapp-gae/WEB-INF and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-03-31 08:07:19 -0400 (Thu, 31 Mar 2011)
New Revision: 22339
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
Log:
RF-10832: "Data Table Edit" is fixed
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-03-30 15:21:27 UTC (rev 22338)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-03-31 12:07:19 UTC (rev 22339)
@@ -3,26 +3,20 @@
*/
package org.richfaces.demo.tables;
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.model.SelectItem;
-
import org.richfaces.demo.common.data.RandomHelper;
import org.richfaces.demo.tables.model.cars.InventoryItem;
import org.richfaces.demo.tables.model.cars.InventoryVendorItem;
import org.richfaces.demo.tables.model.cars.InventoryVendorList;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.model.SelectItem;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.*;
+
@ManagedBean(name = "carsBean")
-@SessionScoped
+@ViewScoped
public class CarsBean implements Serializable {
/**
*
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-03-30 15:21:27 UTC (rev 22338)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-03-31 12:07:19 UTC (rev 22339)
@@ -115,7 +115,7 @@
<managed-bean>
<managed-bean-name>carsBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.tables.CarsBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>view</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>carsFilteringBean</managed-bean-name>
13 years, 8 months
JBoss Rich Faces SVN: r22338 - in branches/4.0.X/examples/richfaces-showcase: src/main and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-03-30 11:21:27 -0400 (Wed, 30 Mar 2011)
New Revision: 22338
Added:
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/impl/
branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/impl/IdMapper.java
Modified:
branches/4.0.X/examples/richfaces-showcase/pom.xml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
Log:
https://issues.jboss.org/browse/RF-10823
https://issues.jboss.org/browse/RF-10828
Modified: branches/4.0.X/examples/richfaces-showcase/pom.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/pom.xml 2011-03-30 12:52:30 UTC (rev 22337)
+++ branches/4.0.X/examples/richfaces-showcase/pom.xml 2011-03-30 15:21:27 UTC (rev 22338)
@@ -193,6 +193,24 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/main/java-gae</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/impl/IdMapper.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/impl/IdMapper.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java-gae/com/sun/faces/facelets/impl/IdMapper.java 2011-03-30 15:21:27 UTC (rev 22338)
@@ -0,0 +1,102 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ *
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2005-2007 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.sun.faces.facelets.impl;
+
+import javax.faces.context.FacesContext;
+
+import com.sun.faces.util.Util;
+
+/**
+ * Used to provide aliases to Facelets generated unique IDs with tend to be
+ * womewhat long.
+ */
+public class IdMapper {
+
+ private static final String KEY = IdMapper.class.getName();
+
+ // ------------------------------------------------------------ Constructors
+
+
+ IdMapper() { }
+
+
+ // ---------------------------------------------------------- Public Methods
+
+
+ public String getAliasedId(String id) {
+ return "R" + id;
+ }
+
+
+ public static void setMapper(FacesContext ctx, IdMapper mapper) {
+
+ Util.notNull("ctx", ctx);
+ if (mapper == null) {
+ ctx.getAttributes().remove(KEY);
+ } else {
+ ctx.getAttributes().put(KEY, mapper);
+ }
+
+ }
+
+
+ public static IdMapper getMapper(FacesContext ctx) {
+
+ Util.notNull("ctx", ctx);
+ return ((IdMapper) ctx.getAttributes().get(KEY));
+
+ }
+}
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-03-30 12:52:30 UTC (rev 22337)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-03-30 15:21:27 UTC (rev 22338)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>richfaces-showcase</application>
- <version>28</version>
+ <version>42</version>
<sessions-enabled>true</sessions-enabled>
<system-properties>
13 years, 9 months
JBoss Rich Faces SVN: r22337 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richValidator and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-30 08:52:30 -0400 (Wed, 30 Mar 2011)
New Revision: 22337
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/StringSizeBean.java
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
Log:
rich:validator samples updated
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/StringSizeBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/StringSizeBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/StringSizeBean.java 2011-03-30 12:52:30 UTC (rev 22337)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Size;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class StringSizeBean extends Validable<String> {
+
+ public StringSizeBean() {
+ value = "JSF";
+ }
+
+ @Size(min = 2, max = 4)
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String getDescription() {
+ return "String size, from 2 to 4";
+ }
+
+ @Override
+ public String getLabel() {
+ return "stringSize";
+ }
+}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml 2011-03-30 12:30:54 UTC (rev 22336)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml 2011-03-30 12:52:30 UTC (rev 22337)
@@ -65,6 +65,7 @@
$('input[id$=custom]').val('RichFaces');
$('input[id$=past]').val(inPast.format("d mmm yyyy"));
$('input[id$=future]').val(inFuture.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF');
$('input[value=A]')[0].checked=true
$('input[value=B]')[0].checked=true
$('input[value=C]')[0].checked=false
@@ -91,6 +92,7 @@
$('input[id$=custom]').val('@@@');
$('input[id$=past]').val(inFuture.format("d mmm yyyy"));
$('input[id$=future]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF 2');
$('input[value=A]')[0].checked=false
$('input[value=B]')[0].checked=false
$('input[value=C]')[0].checked=false
@@ -316,6 +318,22 @@
</h:inputText>
<rich:message id="futureMsg" for="future" />
+ <h:outputLabel for="stringSize" value="#{stringSizeBean.description}" />
+ <h:inputText id="stringSize" value="#{stringSizeBean.value}" label="#{stringSizeBean.label}" >
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
+ />
+ </h:inputText>
+ <rich:message id="stringSizeMsg" for="stringSize" />
+
<h:outputLabel for="size" value="#{sizeBean.description}" />
<h:selectManyCheckbox id="size" value="#{sizeBean.value}" label="#{sizeBean.label}" >
<f:selectItem itemValue="A" itemLabel="A"/>
@@ -324,6 +342,17 @@
<f:selectItem itemValue="D" itemLabel="D"/>
<f:selectItem itemValue="E" itemLabel="E"/>
<f:selectItem itemValue="F" itemLabel="F"/>
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
+ />
</h:selectManyCheckbox>
<rich:message id="sizeMsg" for="size" />
</h:panelGrid>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml 2011-03-30 12:30:54 UTC (rev 22336)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml 2011-03-30 12:52:30 UTC (rev 22337)
@@ -64,6 +64,7 @@
$('input[id$=pattern]').val('richFaces 4');
$('input[id$=past]').val(inPast.format("d mmm yyyy"));
$('input[id$=future]').val(inFuture.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF');
$('input[value=A]')[0].checked=true
$('input[value=B]')[0].checked=true
$('input[value=C]')[0].checked=false
@@ -90,6 +91,7 @@
$('input[id$=custom]').val('@@@');
$('input[id$=past]').val(inFuture.format("d mmm yyyy"));
$('input[id$=future]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF 2');
$('input[value=A]')[0].checked=false
$('input[value=B]')[0].checked=false
$('input[value=C]')[0].checked=false
@@ -162,6 +164,10 @@
</h:inputText>
<rich:message id="futureMsg" for="future" />
+ <h:outputLabel for="stringSize" value="#{stringSizeBean.description}" />
+ <h:inputText id="stringSize" value="#{stringSizeBean.value}" label="#{stringSizeBean.label}" />
+ <rich:message id="stringSizeMsg" for="stringSize" />
+
<h:outputLabel for="size" value="#{sizeBean.description}" />
<h:selectManyCheckbox id="size" value="#{sizeBean.value}" label="#{sizeBean.label}" >
<f:selectItem itemValue="A" itemLabel="A"/>
13 years, 9 months
JBoss Rich Faces SVN: r22336 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-30 08:30:54 -0400 (Wed, 30 Mar 2011)
New Revision: 22336
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
a4j:log fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2011-03-30 09:34:57 UTC (rev 22335)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2011-03-30 12:30:54 UTC (rev 22336)
@@ -25,75 +25,75 @@
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-
+
<f:view>
-
- <ui:insert name="view"/>
-
- <h:head>
- <title><ui:insert name="pageTitle">Metamer</ui:insert></title>
- <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
- <!-- WORKAROUND for RF-9355 ( https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1810 ) -->
- <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
- <!-- WORKAROUND END -->
- <h:outputStylesheet library="css" name="common.ecss" />
- <h:outputScript library="script" name="common.js" />
- <ui:insert name="head"/>
-
- </h:head>
- <h:body>
-
- <h:form id="executeCheckerForm">
- <h:selectBooleanCheckbox id="executeChecker" value="#{richBean.executeChecker}" style="display: none" />
- </h:form>
+ <ui:insert name="view"/>
- <div class="header"><ui:decorate template="/templates/header.xhtml" /></div>
+ <h:head>
+ <title><ui:insert name="pageTitle">Metamer</ui:insert></title>
+ <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
+ <!-- WORKAROUND for RF-9355 ( https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1810 ) -->
+ <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
+ <!-- WORKAROUND END -->
+ <h:outputStylesheet library="css" name="common.ecss" />
+ <h:outputScript library="script" name="common.js" />
+ <ui:insert name="head"/>
- <div class="content">
- <div class="messages"><h:messages /></div>
+ </h:head>
- <h:panelGroup id="commonGrid" layout="block" rendered="#{richBean.reComponent}">
+ <h:body>
- <c:set var="nestedPrefix" value="#{templateBean.componentPrefix}" />
- <c:set var="nestedComponentId" value="#{templateBean.componentPrefix}#{componentId}" />
+ <h:form id="executeCheckerForm">
+ <h:selectBooleanCheckbox id="executeChecker" value="#{richBean.executeChecker}" style="display: none" />
+ </h:form>
- <c:choose>
- <c:when test="#{dontRenderForm}">
- <div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
- <ui:decorate template="/templates/#{templateBean.firstTemplate}.xhtml" />
- <div style="margin-top: 20px;"><ui:insert name="outOfTemplateAfter" /></div>
- </c:when>
+ <div class="header"><ui:decorate template="/templates/header.xhtml" /></div>
- <c:otherwise>
- <h:form id="beforeForm">
+ <div class="content">
+ <div class="messages"><h:messages /></div>
+
+ <h:panelGroup id="commonGrid" layout="block" rendered="#{richBean.reComponent}">
+
+ <c:set var="nestedPrefix" value="#{templateBean.componentPrefix}" />
+ <c:set var="nestedComponentId" value="#{templateBean.componentPrefix}#{componentId}" />
+
+ <c:choose>
+ <c:when test="#{dontRenderForm}">
<div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
- </h:form>
- <h:form id="form">
<ui:decorate template="/templates/#{templateBean.firstTemplate}.xhtml" />
- </h:form>
- <h:form id="afterForm">
<div style="margin-top: 20px;"><ui:insert name="outOfTemplateAfter" /></div>
- </h:form>
- </c:otherwise>
- </c:choose>
- </h:panelGroup> <br />
+ </c:when>
- </div>
+ <c:otherwise>
+ <h:form id="beforeForm">
+ <div style="margin-bottom: 20px;"><ui:insert name="outOfTemplateBefore" /></div>
+ </h:form>
+ <h:form id="form">
+ <ui:decorate template="/templates/#{templateBean.firstTemplate}.xhtml" />
+ </h:form>
+ <h:form id="afterForm">
+ <div style="margin-top: 20px;"><ui:insert name="outOfTemplateAfter" /></div>
+ </h:form>
+ </c:otherwise>
+ </c:choose>
+ </h:panelGroup> <br />
- <ui:insert name="beforeFooter">
- <h:panelGroup id="a4jLogPanel" styleClass="log-panel" layout="block">
- <a4j:log id="a4jLog" height="300px" level="debug"/>
- </h:panelGroup>
- </ui:insert>
+ </div>
- <div class="footer">
- <ui:insert name="footer">
- <ui:decorate template="/templates/footer.xhtml" />
+ <ui:insert name="beforeFooter">
+ <h:panelGroup id="a4jLogPanel" styleClass="log-panel" layout="block">
+ <a4j:log id="a4jLog" level="debug"/>
+ </h:panelGroup>
</ui:insert>
- </div>
- </h:body>
-
+ <div class="footer">
+ <ui:insert name="footer">
+ <ui:decorate template="/templates/footer.xhtml" />
+ </ui:insert>
+ </div>
+
+ </h:body>
+
</f:view>
</html>
13 years, 9 months
JBoss Rich Faces SVN: r22335 - in modules/tests/metamer/trunk: application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-30 05:34:57 -0400 (Wed, 30 Mar 2011)
New Revision: 22335
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
RichFaces upgraded to 4.1.0-SNAPSHOT
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-03-30 09:25:12 UTC (rev 22334)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-03-30 09:34:57 UTC (rev 22335)
@@ -19,7 +19,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-03-30 09:25:12 UTC (rev 22334)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-03-30 09:34:57 UTC (rev 22335)
@@ -30,7 +30,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-ftest</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<name>Metamer: RichFaces Testing Application - Functional Test</name>
<packaging>pom</packaging>
@@ -80,8 +80,8 @@
<properties>
<context.path>/metamer/</context.path>
<deployable.classifier>mojarra</deployable.classifier>
- <deployable.version>4.0.1-SNAPSHOT</deployable.version>
- <ftest.source.version>4.0.1-SNAPSHOT</ftest.source.version>
+ <deployable.version>4.1.0-SNAPSHOT</deployable.version>
+ <ftest.source.version>4.1.0-SNAPSHOT</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
<jsf.config>Mojarra-2.0</jsf.config>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-30 09:25:12 UTC (rev 22334)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-30 09:34:57 UTC (rev 22335)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-03-30 09:25:12 UTC (rev 22334)
+++ modules/tests/metamer/trunk/pom.xml 2011-03-30 09:34:57 UTC (rev 22335)
@@ -26,12 +26,12 @@
<parent>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-example-parent</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Metamer: RichFaces Testing Application - Project Root</name>
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>2</richfaces.checkstyle.version>
- <version.richfaces>4.0.1-SNAPSHOT</version.richfaces>
+ <version.richfaces>4.1.0-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
13 years, 9 months
JBoss Rich Faces SVN: r22333 - in modules/tests/metamer/trunk: application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-30 04:59:34 -0400 (Wed, 30 Mar 2011)
New Revision: 22333
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
RichFaces upgraded to 4.0.1-SNAPSHOT
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-03-30 08:59:14 UTC (rev 22332)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-03-30 08:59:34 UTC (rev 22333)
@@ -19,7 +19,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-03-30 08:59:14 UTC (rev 22332)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-03-30 08:59:34 UTC (rev 22333)
@@ -30,7 +30,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-ftest</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
<name>Metamer: RichFaces Testing Application - Functional Test</name>
<packaging>pom</packaging>
@@ -80,8 +80,8 @@
<properties>
<context.path>/metamer/</context.path>
<deployable.classifier>mojarra</deployable.classifier>
- <deployable.version>4.0.0-SNAPSHOT</deployable.version>
- <ftest.source.version>4.0.0-SNAPSHOT</ftest.source.version>
+ <deployable.version>4.0.1-SNAPSHOT</deployable.version>
+ <ftest.source.version>4.0.1-SNAPSHOT</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
<jsf.config>Mojarra-2.0</jsf.config>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-30 08:59:14 UTC (rev 22332)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-30 08:59:34 UTC (rev 22333)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-03-30 08:59:14 UTC (rev 22332)
+++ modules/tests/metamer/trunk/pom.xml 2011-03-30 08:59:34 UTC (rev 22333)
@@ -26,12 +26,12 @@
<parent>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-example-parent</artifactId>
- <version>4.0.0.Final</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Metamer: RichFaces Testing Application - Project Root</name>
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>2</richfaces.checkstyle.version>
- <version.richfaces>4.0.0-SNAPSHOT</version.richfaces>
+ <version.richfaces>4.0.1-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
13 years, 9 months
JBoss Rich Faces SVN: r22332 - 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: 2011-03-30 04:59:14 -0400 (Wed, 30 Mar 2011)
New Revision: 22332
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java
Log:
import fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java 2011-03-29 16:51:33 UTC (rev 22331)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MetamerProperties.java 2011-03-30 08:59:14 UTC (rev 22332)
@@ -26,7 +26,7 @@
import org.apache.commons.lang.StringUtils;
import org.richfaces.tests.metamer.TemplatesList;
-import org.richfaces.tests.metamer.TemplatesListConverter;
+import org.richfaces.tests.metamer.converter.TemplatesListConverter;
/**
* @author <a href="mailto:ppitonak@redhat.com">Lukas Fryc</a>
13 years, 9 months
JBoss Rich Faces SVN: r22331 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-29 12:51:33 -0400 (Tue, 29 Mar 2011)
New Revision: 22331
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
Log:
refactoring of tests
13 new tests added
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-03-29 16:51:04 UTC (rev 22330)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-03-29 16:51:33 UTC (rev 22331)
@@ -33,13 +33,18 @@
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
+
+import javax.faces.event.PhaseId;
+
import org.jboss.test.selenium.css.CssProperty;
-
import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
@@ -169,7 +174,7 @@
@Test
public void testButtonClassIcon() {
- selenium.click(pjq("td:has(label:contains(heart)) > input[name$=buttonIconInput]"));
+ selenium.click(pjq("input[name$=buttonIconInput][value*=heart]"));
selenium.waitForPageToLoad();
testStyleClass(image, "buttonClass");
@@ -177,7 +182,7 @@
@Test
public void testButtonIcon() {
- selenium.click(pjq("td:has(label:contains(star)) > input[name$=buttonIconInput]"));
+ selenium.click(pjq("input[name$=buttonIconInput][value*=star]"));
selenium.waitForPageToLoad();
AttributeLocator attr = image.getAttribute(Attribute.SRC);
@@ -197,14 +202,14 @@
selenium.click(pjq("input[name$=disabledInput][value=true]"));
selenium.waitForPageToLoad();
- selenium.click(pjq("td:has(label:contains(heart)) > input[name$=buttonDisabledIconInput]"));
+ selenium.click(pjq("input[name$=buttonDisabledIconInput][value*=heart]"));
selenium.waitForPageToLoad();
AttributeLocator attr = image.getAttribute(Attribute.SRC);
String src = selenium.getAttribute(attr);
assertTrue(src.contains("heart.png"), "Calendar's icon was not updated.");
- selenium.click(pjq("td:has(label:contains(null)) > input[name$=buttonDisabledIconInput]"));
+ selenium.click(pjq("input[name$=buttonDisabledIconInput][value=]"));
selenium.waitForPageToLoad();
src = selenium.getAttribute(attr);
@@ -222,7 +227,7 @@
assertFalse(selenium.isDisplayed(image), "Image should not be displayed.");
}
- selenium.click(pjq("td:has(label:contains(star)) > input[name$=buttonIconInput]"));
+ selenium.click(pjq("input[name$=buttonIconInput][value*=star]"));
selenium.waitForPageToLoad();
if (selenium.isElementPresent(image)) {
@@ -231,6 +236,22 @@
}
@Test
+ public void testConverterMessage() {
+ JQueryLocator message = pjq("span[id$=msg] .rf-msg-det");
+
+ selenium.click(pjq("input[name$=enableManualInputInput][value=true]"));
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=converterMessageInput]"), "conversion error");
+ selenium.waitForPageToLoad();
+
+ selenium.type(input, "xxx");
+ guardXhr(selenium).click(pjq("input[id$=a4jButton]"));
+ waitGui.until(isDisplayed.locator(message));
+
+ assertEquals(selenium.getText(message), "conversion error");
+ }
+
+ @Test
public void testDatePattern() {
selenium.type(pjq("input[type=text][id$=datePatternInput]"), "hh:mm:ss a MMMM d, yyyy");
selenium.waitForPageToLoad();
@@ -354,6 +375,35 @@
}
@Test
+ public void testImmediate() {
+ selenium.click(pjq("input[name$=immediateInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+
+ selenium.click(cellDay.format(6));
+ String day = selenium.getText(cellDay.format(6));
+ String month = selenium.getText(monthLabel);
+
+ String selectedDate = null;
+ try {
+ Date date = new SimpleDateFormat("d MMMM, yyyy hh:mm").parse(day + " " + month + " 12:00");
+ selectedDate = new SimpleDateFormat("MMM d, yyyy hh:mm").format(date);
+ } catch (ParseException ex) {
+ fail(ex.getMessage());
+ }
+
+ guardXhr(selenium).click(applyButton);
+ assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
+
+ String inputDate = selenium.getValue(input);
+ assertEquals(inputDate, selectedDate, "Input doesn't contain selected date.");
+ assertEquals(selenium.getText(output), selectedDate, "Input doesn't contain selected date.");
+
+ phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed: null -> " + selectedDate);
+ }
+
+ @Test
public void testInputClass() {
testStyleClass(input, "inputClass");
}
@@ -405,6 +455,146 @@
}
@Test
+ public void testMonthLabels() {
+ String[] labels = {"január", "február", "marec", "apríl", "máj", "jún", "júl", "august", "september", "október", "november", "december"};
+ String labelsString = "január,február,marec,apríl,máj,jún, júl,august,september,október,november,december";
+
+ selenium.type(pjq("input[id$=monthLabelsInput]"), labelsString);
+ selenium.waitForPageToLoad();
+
+ int currentMonth = Calendar.getInstance().get(Calendar.MONTH);
+ String month = null;
+
+ selenium.click(input);
+
+ for (int i = 0; i < 12; i++) {
+ month = selenium.getText(monthLabel);
+ month = month.substring(0, month.indexOf(","));
+ assertEquals(month, labels[(currentMonth + i) % 12], "Month label in calendar");
+ selenium.click(nextMonthButton);
+ }
+ }
+
+ @Test
+ public void testMonthLabelsShort() {
+ String[] labels = {"jan", "feb", "mar", "apr", "máj", "jún", "júl", "aug", "sep", "okt", "nov", "dec"};
+ String labelsString = "jan,feb,mar,apr,máj,jún, júl,aug,sep,okt,nov,dec";
+
+ selenium.type(pjq("input[id$=monthLabelsShortInput]"), labelsString);
+ selenium.waitForPageToLoad();
+
+ String month = null;
+
+ selenium.click(input);
+ selenium.click(monthLabel);
+
+ for (int i = 0; i < 12; i++) {
+ assertEquals(selenium.getText(dateEditorMonths.format(i)), labels[i], "Short month label in calendar");
+ }
+ }
+
+ @Test
+ public void testOnbeforetimeselectOntimeselect() {
+ selenium.type(pjq("input[id$=onbeforetimeselectInput]"), "metamerEvents += \"beforetimeselect \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[id$=ontimeselectInput]"), "metamerEvents += \"timeselect \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(cellDay.format(18));
+ selenium.click(timeButton);
+ selenium.runScript(new JavaScript("jQuery(\"" + hoursInputUp.getRawLocator() + "\").mousedown().mouseup()"));
+ selenium.click(timeEditorOk);
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 2, "2 events should be fired.");
+ assertEquals(events[0], "beforetimeselect", "Attribute onbeforetimeselect doesn't work");
+ assertEquals(events[1], "timeselect", "Attribute ontimeselect doesn't work");
+ }
+
+ @Test
+ public void testOnchange() {
+ selenium.type(pjq("input[id$=onchangeInput]"), "metamerEvents += \"change \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(cellDay.format(18));
+ selenium.click(applyButton);
+
+ waitGui.failWith("Attribute onchange does not work correctly").until(new EventFiredCondition(new Event("change")));
+ }
+
+ @Test
+ public void testOnclean() {
+ selenium.type(pjq("input[id$=oncleanInput]"), "metamerEvents += \"clean \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(cellDay.format(18));
+ selenium.click(cleanButton);
+
+ waitGui.failWith("Attribute onclean does not work correctly").until(new EventFiredCondition(new Event("clean")));
+ }
+
+ @Test
+ public void testOncomplete() {
+ selenium.click(pjq("input[name$=modeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ guardXhr(selenium).click(nextMonthButton);
+ waitGui.failWith("Attribute oncomplete does not work correctly").until(new EventFiredCondition(new Event("complete")));
+ }
+
+ @Test
+ public void testOndatemouseout() {
+ selenium.type(pjq("input[id$=ondatemouseoutInput]"), "metamerEvents += \"datemouseout \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.fireEvent(cellDay.format(18), Event.MOUSEOUT);
+
+ waitGui.failWith("Attribute ondatemouseout does not work correctly").until(new EventFiredCondition(new Event("datemouseout")));
+ }
+
+ @Test
+ public void testOndatemouseover() {
+ selenium.type(pjq("input[id$=ondatemouseoverInput]"), "metamerEvents += \"datemouseover \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.fireEvent(cellDay.format(18), Event.MOUSEOVER);
+
+ waitGui.failWith("Attribute ondatemouseover does not work correctly").until(new EventFiredCondition(new Event("datemouseover")));
+ }
+
+ @Test
+ public void testOndateselect() {
+ selenium.type(pjq("input[id$=ondateselectInput]"), "metamerEvents += \"dateselect \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(cellDay.format(18));
+
+ waitGui.failWith("Attribute ondateselect does not work correctly").until(new EventFiredCondition(new Event("dateselect")));
+ }
+
+ @Test
+ public void testOnhide() {
+ selenium.type(pjq("input[id$=onhideInput]"), "metamerEvents += \"hide \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(input);
+
+ waitGui.failWith("Attribute onhide does not work correctly").until(new EventFiredCondition(new Event("hide")));
+ }
+
+ @Test
public void testOninputblur() {
testFireEvent(Event.BLUR, input, "inputblur");
}
@@ -416,7 +606,7 @@
selenium.waitForPageToLoad();
selenium.type(pjq("input[id$=oninputchangeInput]"), "metamerEvents += \"inputchange \"");
- selenium.waitForPageToLoad(TIMEOUT);
+ selenium.waitForPageToLoad();
selenium.type(input, "Dec 23, 2010 19:27");
@@ -485,6 +675,17 @@
}
@Test
+ public void testOnshow() {
+ selenium.type(pjq("input[id$=onshowInput]"), "metamerEvents += \"show \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(input);
+ selenium.click(input);
+
+ waitGui.failWith("Attribute onshow does not work correctly").until(new EventFiredCondition(new Event("show")));
+ }
+
+ @Test
public void testPopup() {
selenium.click(pjq("input[name$=popupInput][value=false]"));
selenium.waitForPageToLoad();
13 years, 9 months