JBoss Rich Faces SVN: r20155 - in sandbox/trunk/examples/fileupload-demo/src/main: webapp and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-23 20:34:46 -0500 (Tue, 23 Nov 2010)
New Revision: 20155
Modified:
sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml
Log:
RF-9501
Modified: sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
===================================================================
--- sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-11-24 01:33:02 UTC (rev 20154)
+++ sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-11-24 01:34:46 UTC (rev 20155)
@@ -35,6 +35,7 @@
@SessionScoped
public class FileUploadBean {
+ private boolean enabled = true;
private UploadItem item;
public UploadItem getItem() {
@@ -47,6 +48,14 @@
public void listener(UploadEvent event) throws Exception {
item = event.getUploadItem();
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public boolean isEnabled() {
+ return enabled;
}
}
Modified: sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml
===================================================================
--- sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml 2010-11-24 01:33:02 UTC (rev 20154)
+++ sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml 2010-11-24 01:34:46 UTC (rev 20155)
@@ -40,9 +40,15 @@
<f:selectItems value="#{skinBean.skins}"/>
</h:selectOneMenu>
<br />
- <fu:fileUpload fileUploadListener="#{fileUploadBean.listener}"/>
+ <fu:fileUpload id="fu" enabled="#{fileUploadBean.enabled}" fileUploadListener="#{fileUploadBean.listener}"/>
<h:outputText value="File name:" />
<a4j:outputPanel ajaxRendered="true">#{fileUploadBean.item.fileName}</a4j:outputPanel>
+ <br />
+ <h:outputText value="Enabled: " />
+ <h:selectBooleanCheckbox value="#{fileUploadBean.enabled}">
+ <f:ajax render="fu"/>
+ </h:selectBooleanCheckbox>
+ <br />
<input type="submit" />
</h:form>
</h:body>
14 years, 1 month
JBoss Rich Faces SVN: r20154 - in sandbox/trunk/ui/fileupload/ui/src/main: resources/META-INF/resources/org.richfaces and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-23 20:33:02 -0500 (Tue, 23 Nov 2010)
New Revision: 20154
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
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/richfaces/resource-mappings.properties
sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
Log:
RF-9497
Modified: sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-11-23 19:55:10 UTC (rev 20153)
+++ sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-11-24 01:33:02 UTC (rev 20154)
@@ -32,6 +32,7 @@
import javax.faces.event.ListenerFor;
import javax.faces.event.PostAddToViewEvent;
+import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
@@ -48,6 +49,9 @@
@ListenerFor(systemEventClass = PostAddToViewEvent.class)
public abstract class AbstractFileUpload extends UIComponentBase implements ComponentSystemEventListener {
+ @Attribute(defaultValue = "true")
+ public abstract boolean isEnabled();
+
@Override
public void decode(FacesContext context) {
super.decode(context);
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-23 19:55:10 UTC (rev 20153)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.ecss 2010-11-24 01:33:02 UTC (rev 20154)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
.rf-fu {
background: '#{richSkin.generalBackgroundColor}';
border-color: '#{richSkin.panelBorderColor}';
@@ -41,12 +62,9 @@
width: 34%;
}
-.rf-fu-btn-add, .rf-fu-btn-upl, .rf-fu-btn-clr {
- background-color: '#{richSkin.trimColor}';
- background-image: url("#{resource['org.richfaces.images:fuBtnGrad.png']}");
+.rf-fu-btn-add, .rf-fu-btn-add-dis, .rf-fu-btn-upl, .rf-fu-btn-clr {
background-position:left top;
background-repeat:repeat-x;
- border-color: '#{richSkin.panelBorderColor}';
border-style: solid;
border-width: 1px;
cursor: default;
@@ -55,11 +73,23 @@
vertical-align: top;
}
+.rf-fu-btn-add, .rf-fu-btn-upl, .rf-fu-btn-clr {
+ background-color: '#{richSkin.trimColor}';
+ background-image: url("#{resource['org.richfaces.images:fuBtnGrad.png']}");
+ border-color: '#{richSkin.panelBorderColor}';
+}
+
+.rf-fu-btn-add-dis {
+ background-color: '#{richSkin.tableFooterBackgroundColor}';
+ background-image: url("#{resource['org.richfaces.images:fuBtnDisGrad.png']}");
+ border-color: '#{richSkin.tableFooterBackgroundColor}';
+}
+
.rf-fu-btn-upl, .rf-fu-btn-clr {
display: none;
}
-.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-upl, .rf-fu-btn-cnt-clr, .rf-fu-itm-lbl, .rf-fu-itm-st, .rf-fu-itm-lnk {
+.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-add-dis, .rf-fu-btn-cnt-upl, .rf-fu-btn-cnt-clr, .rf-fu-itm-lbl, .rf-fu-itm-st, .rf-fu-itm-lnk {
font-family: '#{richSkin.generalFamilyFont}';
font-size: '#{richSkin.generalSizeFont}';
}
@@ -68,7 +98,7 @@
color: '#{richSkin.generalTextColor}';
}
-.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-upl, .rf-fu-btn-cnt-clr {
+.rf-fu-btn-cnt-add, .rf-fu-btn-cnt-add-dis, .rf-fu-btn-cnt-upl, .rf-fu-btn-cnt-clr {
background-position: 2px 2px;
background-repeat: no-repeat;
display: inline-block;
@@ -80,6 +110,10 @@
overflow: hidden;
position: relative;
}
+.rf-fu-btn-cnt-add-dis {
+ background-image: url("#{resource['org.richfaces:fu-add.gif']}");
+ color: '#{richSkin.tabDisabledTextColor}';
+}
.rf-fu-btn-cnt-upl, .rf-fu-itm-st {
font-weight: bold;
Modified: sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-23 19:55:10 UTC (rev 20153)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-24 01:33:02 UTC (rev 20154)
@@ -1,2 +1,4 @@
org.richfaces.images\:fuBtnGrad.png=org.richfaces.renderkit.html.BaseGradient\
- {baseColorParam=additionalBackgroundColor, gradientColorParam=trimColor, height=18, width=1}
\ No newline at end of file
+ {baseColorParam=additionalBackgroundColor, gradientColorParam=trimColor, height=18, width=1}
+org.richfaces.images\:fuBtnDisGrad.png=org.richfaces.renderkit.html.BaseGradient\
+ {baseColorParam=tableSubfooterBackgroundColor, gradientColorParam=tableFooterBackgroundColor, height=18, width=1}
\ No newline at end of file
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-23 19:55:10 UTC (rev 20153)
+++ sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-24 01:33:02 UTC (rev 20154)
@@ -37,34 +37,43 @@
<cdk:resource-dependency library="org.richfaces" name="fileupload.js" />
</cc:interface>
<cc:implementation>
+ <cdk:object name="enabled" value="#{component.attributes['enabled']}"/>
<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-btn-cnt-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-add#{enabled ? '' : '-dis'}">
+ <span class="rf-fu-btn-cnt-add#{enabled ? '' : '-dis'}">
+ <c:if test="#{enabled}">
+ <span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7 only. -->
+ <input type="file" class="rf-fu-inp"/>
+ </span>
+ </c:if>
Add...
</span>
</span>
- <span class="rf-fu-btn-upl">
- <span class="rf-fu-btn-cnt-upl">Upload</span>
- </span>
+ <c:if test="#{enabled}">
+ <span class="rf-fu-btn-upl">
+ <span class="rf-fu-btn-cnt-upl">Upload</span>
+ </span>
+ </c:if>
</span>
- <span class="rf-fu-btns-rgh">
- <span class="rf-fu-btn-clr">
- <span class="rf-fu-btn-cnt-clr">Clear All</span>
+ <c:if test="#{enabled}">
+ <span class="rf-fu-btns-rgh">
+ <span class="rf-fu-btn-clr">
+ <span class="rf-fu-btn-cnt-clr">Clear All</span>
+ </span>
</span>
- </span>
+ </c:if>
</div>
<div class="rf-fu-lst"/>
- <cdk:object name="progressBar" value="#{component.facets['progress']}"/>
- <c:if test="#{progressBar.isRendered()}">
- <cdk:call expression="progressBar.encodeAll(facesContext)" />
+ <c:if test="#{enabled}">
+ <cdk:object name="progressBar" value="#{component.facets['progress']}"/>
+ <c:if test="#{progressBar.isRendered()}">
+ <cdk:call expression="progressBar.encodeAll(facesContext)" />
+ </c:if>
+ <iframe name="#{clientId}" class="rf-fu-frm"/>
+ <script type="text/javascript">new RichFaces.ui.FileUpload('#{clientId}');</script>
</c:if>
- <iframe name="#{clientId}" class="rf-fu-frm"/>
- <script type="text/javascript">new RichFaces.ui.FileUpload('#{clientId}');</script>
</div>
</cc:implementation>
</cdk:root>
14 years, 1 month
JBoss Rich Faces SVN: r20153 - sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-23 14:55:10 -0500 (Tue, 23 Nov 2010)
New Revision: 20153
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
Log:
RF-9496
Modified: sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-23 19:54:43 UTC (rev 20152)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-23 19:55:10 UTC (rev 20153)
@@ -39,20 +39,22 @@
this.id = id;
this.element = jQuery(this.attachToDom());
this.form = this.element.parents("form:first");
- this.iframe = this.element.children("iframe:first");
var header = this.element.children(".rf-fu-hdr:first");
var leftButtons = header.children(".rf-fu-btns-lft:first");
this.addButton = leftButtons.children(".rf-fu-btn-add:first");
- this.uploadButton = leftButtons.children(".rf-fu-btn-upl:first");
- this.clearButton = header.children(".rf-fu-btns-rgh:first").children(".rf-fu-btn-clr:first");
+ this.uploadButton = this.addButton.next();
+ this.clearButton = leftButtons.next().children(".rf-fu-btn-clr:first");
this.inputContainer = this.addButton.find(".rf-fu-inp-cntr:first");
this.input = this.inputContainer.children("input");
- this.list = this.element.children(".rf-fu-lst:first");
+ this.list = header.next();
+ this.progressBar = this.list.next();
+ this.iframe = this.progressBar.next();
this.cleanInput = this.input.clone();
this.addProxy = jQuery.proxy(this.__addItem, this);
this.input.change(this.addProxy);
this.uploadButton.click(jQuery.proxy(this.__startUpload, this));
this.clearButton.click(jQuery.proxy(this.__removeAllItems, this));
+ this.iframe.load(jQuery.proxy(this.__load, this));
},
__addItem: function() {
@@ -95,7 +97,6 @@
__startUpload: function() {
this.loadableItem = this.items.shift();
- this.loadableItem.startUploading();
this.__updateButtons();
this.__submit();
},
@@ -109,7 +110,6 @@
this.form.attr("action", originalAction + "?" + UID + "=1");
this.form.attr("encoding", "multipart/form-data");
this.form.attr("enctype", "multipart/form-data");
- this.iframe.load(jQuery.proxy(this.__load, this));
richfaces.submitForm(this.form, {"org.richfaces.ajax.component": this.id}, this.id);
} finally {
this.form.attr("action", originalAction);
@@ -117,6 +117,7 @@
this.form.attr("enctype", originalEnctype);
this.loadableItem.input.removeAttr("name");
}
+ this.loadableItem.startUploading();
},
__load: function(event) {
@@ -150,8 +151,8 @@
this.element = jQuery(ITEM_HTML);
var leftArea = this.element.children(".rf-fu-itm-lft:first");
this.label = leftArea.children(".rf-fu-itm-lbl:first");
- this.state = leftArea.children(".rf-fu-itm-st:first");
- this.link = this.element.children(".rf-fu-itm-rgh:first").children("a");
+ this.state = this.label.nextAll(".rf-fu-itm-st:first");
+ this.link = leftArea.next().children("a");
this.label.html(this.input.val());
this.link.html("Delete");
@@ -166,7 +167,10 @@
},
startUploading: function() {
- this.state.css("display", "block");;
+ this.input.attr("name", this.fileUpload.id);
+// this.state.html(this.fileUpload.progressBar.detach());
+// richfaces.$(this.fileUpload.progressBar).poll();
+ this.state.css("display", "block");
this.link.html("");
},
14 years, 1 month
JBoss Rich Faces SVN: r20152 - 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-23 14:54:43 -0500 (Tue, 23 Nov 2010)
New Revision: 20152
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/context/FileUploadPartialViewContextFactory.java
sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
Log:
RF-9497
Modified: sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/context/FileUploadPartialViewContextFactory.java
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/context/FileUploadPartialViewContextFactory.java 2010-11-23 17:02:21 UTC (rev 20151)
+++ sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/context/FileUploadPartialViewContextFactory.java 2010-11-23 19:54:43 UTC (rev 20152)
@@ -48,7 +48,7 @@
*/
public class FileUploadPartialViewContextFactory extends PartialViewContextFactory {
- private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+ private static final Logger LOGGER = RichfacesLogger.CONTEXT.getLogger();
private static final Pattern AMPERSAND = Pattern.compile("&+");
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-23 17:02:21 UTC (rev 20151)
+++ sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-11-23 19:54:43 UTC (rev 20152)
@@ -59,6 +59,10 @@
</span>
</div>
<div class="rf-fu-lst"/>
+ <cdk:object name="progressBar" value="#{component.facets['progress']}"/>
+ <c:if test="#{progressBar.isRendered()}">
+ <cdk:call expression="progressBar.encodeAll(facesContext)" />
+ </c:if>
<iframe name="#{clientId}" class="rf-fu-frm"/>
<script type="text/javascript">new RichFaces.ui.FileUpload('#{clientId}');</script>
</div>
14 years, 1 month
JBoss Rich Faces SVN: r20151 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-23 12:02:21 -0500 (Tue, 23 Nov 2010)
New Revision: 20151
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
Log:
* attributes modified to reduce parsing XML and log output
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-11-23 15:12:38 UTC (rev 20150)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-11-23 17:02:21 UTC (rev 20151)
@@ -59,6 +59,15 @@
this.name = name;
}
+ public Attribute(Attribute attr) {
+ this.name = attr.name;
+ this.value = null;
+ this.type = attr.type;
+ this.help = attr.help;
+ this.selectOptions = attr.selectOptions;
+ this.extensions = attr.extensions;
+ }
+
public Object getValue() {
return value;
}
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-11-23 15:12:38 UTC (rev 20150)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-11-23 17:02:21 UTC (rev 20151)
@@ -71,7 +71,7 @@
private static final long serialVersionUID = -1L;
private static Logger logger = LoggerFactory.getLogger(Attributes.class);
- private Map<Class<?>, List<Attribute>> richfacesAttributes;
+ private static Map<Class<?>, List<Attribute>> richfacesAttributes;
// K - name of a component attribute, V - value of the component attribute
private Map<String, Attribute> attributes;
// class object of managed bean
@@ -100,7 +100,8 @@
attributes = new TreeMap<String, Attribute>();
}
for (Attribute a : richfacesAttributes.get(componentClass)) {
- attributes.put(a.getName(), a);
+ Attribute newAttr = new Attribute(a);
+ attributes.put(newAttr.getName(), newAttr);
}
} else {
logger.debug("retrieving attributes of " + componentClass.getName() + " from class descriptor");
14 years, 1 month
JBoss Rich Faces SVN: r20150 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richSelect and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-23 10:12:38 -0500 (Tue, 23 Nov 2010)
New Revision: 20150
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
Log:
https://jira.jboss.org/browse/RFPL-885
* added 39 tests for rich:select
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2010-11-23 15:12:38 UTC (rev 20150)
@@ -0,0 +1,473 @@
+/*******************************************************************************
+ * 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.richSelect;
+
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+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.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.css.CssProperty;
+
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.AttributeLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
+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/richSelect/simple.xhtml.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestRichSelect extends AbstractMetamerTest {
+
+ private JQueryLocator select = pjq("div[id$=select]");
+ private JQueryLocator input = pjq("input.rf-sel-inp[id$=selectInput]");
+ private AttributeLocator inputValue = input.getAttribute(Attribute.VALUE);
+ private JQueryLocator popup = jq("div.rf-sel-lst-cord");
+ private JQueryLocator options = jq("div.rf-sel-opt:eq({0})"); // 00..49
+ private JQueryLocator button = pjq("div.rf-sel-btn");
+ private JQueryLocator output = pjq("span[id$=output]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richSelect/simple.xhtml");
+ }
+
+ @Test
+ public void testInit() {
+ assertTrue(selenium.isElementPresent(select), "Inplace select is not on the page.");
+ assertTrue(selenium.isElementPresent(button), "Button should be present on the page.");
+ assertEquals(selenium.getAttribute(inputValue), "Click here to edit", "Default label");
+ assertTrue(selenium.isElementPresent(input), "Input should be present on the page.");
+ assertFalse(selenium.isVisible(popup), "Popup should not be displayed on the page.");
+ }
+
+ @Test
+ public void testSelectWithMouse() {
+ guardNoRequest(selenium).click(button);
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ for (int i = 0; i < 50; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ }
+
+ String[] selectOptions = {"Alabama", "Hawaii", "Massachusetts", "New Mexico", "South Dakota"};
+ for (int i = 0; i < 50; i += 10) {
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i / 10], "Select option nr. " + i);
+ }
+
+ guardNoRequest(selenium).click(options.format(10));
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
+
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
+ }
+
+ @Test
+ public void testSelectWithKeyboard() {
+ guardNoRequest(selenium).focus(input);
+ guardNoRequest(selenium).keyDown(input, "\\40"); // arrow down
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ for (int i = 0; i < 50; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ }
+
+ String[] selectOptions = {"Alabama", "Hawaii", "Massachusetts", "New Mexico", "South Dakota"};
+ for (int i = 0; i < 50; i += 10) {
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i / 10], "Select option nr. " + i);
+ }
+
+ for (int i = 0; i < 11; i++) {
+ selenium.keyDown(input, "\\40"); // arrow down
+ }
+ guardNoRequest(selenium).keyDown(input, "\\13"); // enter
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
+
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
+ }
+
+ @Test
+ public void testFiltering() {
+ selenium.focus(input);
+ guardNoRequest(selenium).keyPress(input, "a");
+ selenium.keyDown(input, "\\40"); // arrow down
+
+ assertEquals(selenium.getCount(jq("div.rf-sel-opt")), 4, "Count of filtered options ('a')");
+
+ String[] selectOptions = {"Alabama", "Alaska", "Arizona", "Arkansas"};
+ for (int i = 0; i < 4; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i], "Select option nr. " + i);
+ }
+
+ for (int i = 0; i < 3; i++) {
+ selenium.keyDown(input, "\\40"); // arrow down
+ }
+ selenium.keyDown(input, "\\13"); // enter
+ assertTrue(selenium.belongsClass(options.format(2), "rf-sel-sel"));
+
+ selenium.type(input, "NoRtH");
+ selenium.keyDown(input, "\\40"); // arrow down
+ assertEquals(selenium.getCount(jq("div.rf-sel-opt")), 2, "Count of filtered options ('NoRtH')");
+
+ selenium.keyDown(input, "\\40"); // arrow down
+ selenium.keyDown(input, "\\13"); // enter
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("North Carolina"));
+ }
+
+ @Test
+ public void testDefaultLabel() {
+ selenium.type(pjq("input[type=text][id$=defaultLabelInput]"), "new label");
+ selenium.waitForPageToLoad();
+ assertEquals(selenium.getAttribute(inputValue), "new label", "Default label should change");
+
+ selenium.type(pjq("input[type=text][id$=defaultLabelInput]"), "");
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.isElementPresent(select), "Inplace select is not on the page.");
+ assertTrue(selenium.isElementPresent(input), "Input should be present on the page.");
+ assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed on the page.");
+ if (selenium.isAttributePresent(inputValue)) {
+ assertEquals(selenium.getAttribute(inputValue), "", "Default value should be empty");
+ }
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9855")
+ public void testEnableManualInput() {
+ selenium.click(pjq("input[type=radio][name$=enableManualInputInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ AttributeLocator readonlyAttr = input.getAttribute(new Attribute("readonly"));
+ assertEquals(selenium.getAttribute(readonlyAttr), "readonly", "Input should be read-only");
+
+ selenium.click(button);
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ selenium.click(options.format(10));
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
+
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
+ }
+
+ @Test
+ public void testItemClass() {
+ final String value = "metamer-ftest-class";
+ selenium.type(pjq("input[type=text][id$=itemClassInput]"), value);
+ selenium.waitForPageToLoad();
+
+ for (int i = 0; i < 50; i++) {
+ assertTrue(selenium.belongsClass(options.format(i), value), "Select option "
+ + selenium.getText(options.format(i)) + " does not contain class " + value);
+ }
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9735")
+ public void testListClass() {
+ testStyleClass(popup, "listClass");
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9737")
+ public void testListHeight() {
+ selenium.type(pjq("input[type=text][id$=listHeightInput]"), "300px");
+ selenium.waitForPageToLoad();
+
+ String height = selenium.getStyle(jq("div.rf-sel-lst-scrl"), CssProperty.HEIGHT);
+ assertEquals(height, "300px", "Height of list did not change");
+
+ selenium.type(pjq("input[type=text][id$=listHeightInput]"), "");
+ selenium.waitForPageToLoad();
+
+ // it cannot handle null because of a bug in Mojarra and Myfaces and
+ // generates style="height: ; " instead of default value
+ height = selenium.getStyle(jq("span.rf-is-lst-scrl"), CssProperty.HEIGHT);
+ assertEquals(height, "200px", "Height of list did not change");
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9737")
+ public void testListWidth() {
+ selenium.type(pjq("input[type=text][id$=listWidthInput]"), "300px");
+ selenium.waitForPageToLoad();
+
+ String width = selenium.getStyle(jq("span.rf-is-lst-pos"), CssProperty.WIDTH);
+ assertEquals(width, "300px", "Width of list did not change");
+
+ selenium.type(pjq("input[type=text][id$=listWidthInput]"), "");
+ selenium.waitForPageToLoad();
+
+ // it cannot handle null because of a bug in Mojarra and Myfaces and
+ // generates style="width: ; " instead of default value
+ width = selenium.getStyle(jq("span.rf-is-lst-pos"), CssProperty.WIDTH);
+ assertEquals(width, "200px", "Width of list did not change");
+ }
+
+ @Test
+ public void testOnblur() {
+ testFireEvent(Event.BLUR, input);
+ }
+
+ @Test
+ public void testOnchange() {
+ selenium.type(pjq("input[type=text][id$=onchangeInput]"), "metamerEvents += \"change \"");
+ selenium.waitForPageToLoad();
+
+ selenium.click(button);
+ selenium.click(options.format(10));
+ selenium.fireEvent(input, Event.BLUR);
+
+ waitGui.failWith("Attribute onchange does not work correctly").until(
+ new EventFiredCondition(Event.CHANGE));
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireEvent(Event.CLICK, input);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireEvent(Event.DBLCLICK, input);
+ }
+
+ @Test
+ public void testOnfocus() {
+ testFireEvent(Event.FOCUS, input);
+ }
+
+ @Test
+ public void testOnkeydown() {
+ testFireEvent(Event.KEYDOWN, input);
+ }
+
+ @Test
+ public void testOnkeypress() {
+ testFireEvent(Event.KEYPRESS, input);
+ }
+
+ @Test
+ public void testOnkeyup() {
+ testFireEvent(Event.KEYUP, input);
+ }
+
+ @Test
+ public void testOnlistclick() {
+ testFireEvent(Event.CLICK, popup, "listclick");
+ }
+
+ @Test
+ public void testOnlistdblclick() {
+ testFireEvent(Event.DBLCLICK, popup, "listdblclick");
+ }
+
+ @Test
+ public void testOnlistkeydown() {
+ testFireEvent(Event.KEYDOWN, popup, "listkeydown");
+ }
+
+ @Test
+ public void testOnlistkeypress() {
+ testFireEvent(Event.KEYPRESS, popup, "listkeypress");
+ }
+
+ @Test
+ public void testOnlistkeyup() {
+ testFireEvent(Event.KEYUP, popup, "listkeyup");
+ }
+
+ @Test
+ public void testOnlistmousedown() {
+ testFireEvent(Event.MOUSEDOWN, popup, "listmousedown");
+ }
+
+ @Test
+ public void testOnlistmousemove() {
+ testFireEvent(Event.MOUSEMOVE, popup, "listmousemove");
+ }
+
+ @Test
+ public void testOnlistmouseout() {
+ testFireEvent(Event.MOUSEOUT, popup, "listmouseout");
+ }
+
+ @Test
+ public void testOnlistmouseover() {
+ testFireEvent(Event.MOUSEOVER, popup, "listmouseover");
+ }
+
+ @Test
+ public void testOnlistmouseup() {
+ testFireEvent(Event.MOUSEUP, popup, "listmouseup");
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireEvent(Event.MOUSEDOWN, input);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireEvent(Event.MOUSEMOVE, input);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireEvent(Event.MOUSEOUT, input);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireEvent(Event.MOUSEOVER, input);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireEvent(Event.MOUSEUP, input);
+ }
+
+ @Test
+ public void testOnselect() {
+ testFireEvent(Event.SELECT, input);
+ }
+
+ @Test
+ public void testRendered() {
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ assertFalse(selenium.isElementPresent(select), "Component should not be rendered when rendered=false.");
+ }
+
+ @Test
+ public void testSelectFirst() {
+ selenium.click(pjq("input[type=radio][name$=selectFirstInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ selenium.focus(input);
+ selenium.keyPress(input, "a");
+ selenium.keyDown(input, "\\40"); // arrow down
+
+ waitFor(5000);
+ assertEquals(selenium.getCount(jq("div.rf-sel-opt")), 4, "Count of filtered options ('a')");
+
+ String[] selectOptions = {"Alabama", "Alaska", "Arizona", "Arkansas"};
+ for (int i = 0; i < 4; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i], "Select option nr. " + i);
+ }
+
+ assertTrue(selenium.belongsClass(options.format(0), "rf-sel-sel"), "First filtered option should be selected");
+ }
+
+ @Test
+ public void testSelectItemClass() {
+ selenium.type(pjq("input[type=text][id$=selectItemClassInput]"), "metamer-ftest-class");
+ selenium.waitForPageToLoad();
+
+ selenium.focus(input);
+ selenium.keyDown(input, "\\40"); // arrow down
+ selenium.keyDown(input, "\\40"); // arrow down
+
+ assertTrue(selenium.belongsClass(options.format(0), "metamer-ftest-class"), "Selected item does not contains defined class.");
+ for (int i = 1; i < 50; i++) {
+ assertFalse(selenium.belongsClass(options.format(i), "metamer-ftest-class"), "Not selected item " + i + " should not contain defined class.");
+ }
+ }
+
+ @Test
+ public void testShowButton() {
+ selenium.click(pjq("input[type=radio][name$=showButtonInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ selenium.click(select);
+ if (selenium.isElementPresent(button)) {
+ assertFalse(selenium.isVisible(button), "Button should not be visible.");
+ }
+
+ selenium.focus(input);
+ selenium.keyDown(input, "\\40"); // arrow down
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ for (int i = 0; i < 50; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ }
+
+ String[] selectOptions = {"Alabama", "Hawaii", "Massachusetts", "New Mexico", "South Dakota"};
+ for (int i = 0; i < 50; i += 10) {
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i / 10], "Select option nr. " + i);
+ }
+
+ for (int i = 0; i < 11; i++) {
+ selenium.keyDown(input, "\\40"); // arrow down
+ }
+ selenium.keyDown(input, "\\13"); // enter
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
+
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
+ }
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9663")
+ public void testShowButtonClick() {
+ selenium.click(pjq("input[type=radio][name$=showButtonInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ selenium.click(select);
+ if (selenium.isElementPresent(button)) {
+ assertFalse(selenium.isVisible(button), "Button should not be visible.");
+ }
+
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ for (int i = 0; i < 50; i++) {
+ assertTrue(selenium.isDisplayed(options.format(i)), "Select option " + i + " should be displayed.");
+ }
+
+ String[] selectOptions = {"Alabama", "Hawaii", "Massachusetts", "New Mexico", "South Dakota"};
+ for (int i = 0; i < 50; i += 10) {
+ assertEquals(selenium.getText(options.format(i)), selectOptions[i / 10], "Select option nr. " + i);
+ }
+
+ selenium.click(options.format(10));
+ guardXhr(selenium).fireEvent(input, Event.BLUR);
+ assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
+
+ waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 1 month
JBoss Rich Faces SVN: r20149 - modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-23 10:11:31 -0500 (Tue, 23 Nov 2010)
New Revision: 20149
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
Log:
https://jira.jboss.org/browse/RFPL-885
* id of component changed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2010-11-23 15:04:22 UTC (rev 20148)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2010-11-23 15:11:31 UTC (rev 20149)
@@ -40,7 +40,7 @@
</ui:define>
<ui:define name="component">
- <rich:select id="inplaceSelect"
+ <rich:select id="select"
converterMessage="#{richSelectBean.attributes['converterMessage'].value}"
defaultLabel="#{richSelectBean.attributes['defaultLabel'].value}"
enableManualInput="#{richSelectBean.attributes['enableManualInput'].value}"
14 years, 1 month
JBoss Rich Faces SVN: r20148 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-23 10:04:22 -0500 (Tue, 23 Nov 2010)
New Revision: 20148
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
Log:
* testEditEvent modified because RF-9844 was rejected
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2010-11-23 13:29:42 UTC (rev 20147)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2010-11-23 15:04:22 UTC (rev 20148)
@@ -109,7 +109,6 @@
}
@Test
- @IssueTracking("https://jira.jboss.org/browse/RF-9844")
public void testEditEvent() {
selenium.type(pjq("input[type=text][id$=editEventInput]"), "mouseup");
selenium.waitForPageToLoad();
@@ -118,12 +117,6 @@
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
selenium.mouseUp(select);
assertTrue(selenium.isDisplayed(popup), "Popup should be displayed.");
-
- selenium.type(pjq("input[type=text][id$=editEventInput]"), "nonexistingevent");
- selenium.waitForPageToLoad();
-
- selenium.click(select);
- assertTrue(selenium.isDisplayed(popup), "Popup should be displayed.");
}
@Test
14 years, 1 month
JBoss Rich Faces SVN: r20147 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-23 08:29:42 -0500 (Tue, 23 Nov 2010)
New Revision: 20147
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
Log:
https://jira.jboss.org/browse/RF-9037
* added test for selectItemClass
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2010-11-23 11:55:28 UTC (rev 20146)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2010-11-23 13:29:42 UTC (rev 20147)
@@ -394,7 +394,7 @@
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
- assertFalse(selenium.isElementPresent(select), "Panel should not be rendered when rendered=false.");
+ assertFalse(selenium.isElementPresent(select), "Component should not be rendered when rendered=false.");
}
@Test
@@ -463,6 +463,21 @@
}
@Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9854")
+ public void testSelectItemClass() {
+ selenium.type(pjq("input[type=text][id$=selectItemClassInput]"), "metamer-ftest-class");
+ selenium.waitForPageToLoad();
+
+ selenium.click(select);
+ selenium.mouseOver(options.format(0));
+
+ assertTrue(selenium.belongsClass(options.format(0), "metamer-ftest-class"), "Selected item does not contains defined class.");
+ for (int i = 1; i < 50; i++) {
+ assertFalse(selenium.belongsClass(options.format(i), "metamer-ftest-class"), "Not selected item " + i + " should not contain defined class.");
+ }
+ }
+
+ @Test
public void testShowControls() {
selenium.click(pjq("input[type=radio][name$=showControlsInput][value=true]"));
selenium.waitForPageToLoad();
14 years, 1 month
JBoss Rich Faces SVN: r20146 - 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: 2010-11-23 06:55:28 -0500 (Tue, 23 Nov 2010)
New Revision: 20146
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
Log:
* testButtonIconDisabled fixed
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 2010-11-23 11:33:21 UTC (rev 20145)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2010-11-23 11:55:28 UTC (rev 20146)
@@ -212,7 +212,7 @@
selenium.waitForPageToLoad();
src = selenium.getAttribute(attr);
- assertTrue(src.contains("calendarIcon.png"), "Calendar's icon was not updated.");
+ assertTrue(src.contains("disabledCalendarIcon.png"), "Calendar's icon was not updated.");
}
@Test
14 years, 1 month