JBoss Rich Faces SVN: r19245 - branches/RF-9151/ui/input/ui/src/main/config.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-17 13:52:10 -0400 (Fri, 17 Sep 2010)
New Revision: 19245
Modified:
branches/RF-9151/ui/input/ui/src/main/config/faces-config.xml
Log:
RF-9194
Modified: branches/RF-9151/ui/input/ui/src/main/config/faces-config.xml
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/config/faces-config.xml 2010-09-17 17:50:16 UTC (rev 19244)
+++ branches/RF-9151/ui/input/ui/src/main/config/faces-config.xml 2010-09-17 17:52:10 UTC (rev 19245)
@@ -256,6 +256,14 @@
</property-extension>
</property>
<property>
+ <property-name>cycled</property-name>
+ <property-class>boolean</property-class>
+ <default-value>true</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
<property-name>enableManualInput</property-name>
<property-class>boolean</property-class>
<default-value>true</default-value>
14 years, 3 months
JBoss Rich Faces SVN: r19244 - branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-17 13:50:16 -0400 (Fri, 17 Sep 2010)
New Revision: 19244
Added:
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java
Modified:
branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
Log:
RF-9194
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.resource.DynamicResource;
+import org.richfaces.resource.ImageType;
+import org.richfaces.resource.Java2DUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+@DynamicResource
+public abstract class ArrowBase implements Java2DUserResource, StateHolderResource {
+
+ private int color;
+ private String colorName = Skin.GENERAL_TEXT_COLOR;
+
+ private void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ this.color = skin.getColorParameter(context, colorName);
+ }
+
+ protected final void setColorName(String colorName) {
+ this.colorName = colorName;
+ }
+
+ public abstract Dimension getDimension();
+
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2d.setColor(new Color(color));
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ initialize();
+ dataOutput.writeInt(this.color);
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ this.color = dataInput.readInt();
+ }
+
+ public Map<String, String> getResponseHeaders() {
+ return null;
+ }
+
+ public Date getLastModified() {
+ return null;
+ }
+
+ public ImageType getImageType() {
+ return ImageType.PNG;
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+}
Modified: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-09-17 15:23:45 UTC (rev 19243)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -22,77 +22,18 @@
package org.richfaces.renderkit.html.images;
-import java.awt.Color;
import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Date;
-import java.util.Map;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.DynamicResource;
-import org.richfaces.resource.ImageType;
-import org.richfaces.resource.Java2DUserResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
/**
* @author Konstantin Mishin
*
*/
-@DynamicResource
-public abstract class SliderArrowBase implements Java2DUserResource, StateHolderResource {
+public abstract class SliderArrowBase extends ArrowBase {
private Dimension dimension = new Dimension(7, 7);
- private int color;
- private String colorName = Skin.GENERAL_TEXT_COLOR;
- private void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- this.color = skin.getColorParameter(context, colorName);
- }
-
- protected final void setColorName(String colorName) {
- this.colorName = colorName;
- }
-
+ @Override
public Dimension getDimension() {
return dimension;
}
- public void paint(Graphics2D graphics2d, Dimension dimension) {
- graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics2d.setColor(new Color(color));
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- initialize();
- dataOutput.writeInt(this.color);
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- this.color = dataInput.readInt();
- }
-
- public Map<String, String> getResponseHeaders() {
- return null;
- }
-
- public Date getLastModified() {
- return null;
- }
-
- public ImageType getImageType() {
- return ImageType.PNG;
- }
-
- public boolean isTransient() {
- return false;
- }
-
}
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBase.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Dimension;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public abstract class SpinnerArrowBase extends ArrowBase {
+
+ private Dimension dimension = new Dimension(5, 3);
+
+ @Override
+ public Dimension getDimension() {
+ return dimension;
+ }
+}
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowBottom.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerArrowBottom extends SpinnerArrowBase {
+
+ @Override
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ super.paint(graphics2d, dimension);
+ graphics2d.drawLine(0, 0, 4, 0);
+ graphics2d.drawLine(1, 1, 3, 1);
+ graphics2d.drawLine(2, 2, 2, 2);
+ }
+}
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerArrowTop.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerArrowTop extends SpinnerArrowBase {
+
+ @Override
+ public void paint(Graphics2D graphics2d, Dimension dimension) {
+ super.paint(graphics2d, dimension);
+ graphics2d.drawLine(2, 0, 2, 0);
+ graphics2d.drawLine(1, 1, 3, 1);
+ graphics2d.drawLine(0, 2, 4, 2);
+ }
+}
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowBottom.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerDisabledArrowBottom extends SpinnerArrowBottom {
+
+ public SpinnerDisabledArrowBottom() {
+ setColorName("tabDisabledTextColor");
+ }
+}
Added: branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java
===================================================================
--- branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java (rev 0)
+++ branches/RF-9151/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/SpinnerDisabledArrowTop.java 2010-09-17 17:50:16 UTC (rev 19244)
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SpinnerDisabledArrowTop extends SpinnerArrowTop {
+
+ public SpinnerDisabledArrowTop() {
+ setColorName("tabDisabledTextColor");
+ }
+}
14 years, 3 months
JBoss Rich Faces SVN: r19243 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-17 11:23:45 -0400 (Fri, 17 Sep 2010)
New Revision: 19243
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
Log:
* small fix in footer
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17 15:09:12 UTC (rev 19242)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17 15:23:45 UTC (rev 19243)
@@ -33,6 +33,5 @@
<li><h:outputText id="jsfVersion" value="#{metamer.jsfVersion}" /></li>
<li><h:outputText id="browserVersion" value="#{metamer.browserVersion}" /></li>
</ul>
- <hr />
</ui:composition>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19242 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-17 11:09:12 -0400 (Fri, 17 Sep 2010)
New Revision: 19242
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
Log:
https://jira.jboss.org/browse/RFPL-674
* small fix for page with accordion
* added 3 tests for accordion - width, height, title
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-09-17 14:11:41 UTC (rev 19241)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-09-17 15:09:12 UTC (rev 19242)
@@ -48,6 +48,7 @@
dir="#{richAccordionBean.attributes['dir'].value}"
execute="#{richAccordionBean.attributes['execute'].value}"
firstItem="#{richAccordionBean.attributes['firstItem'].value}"
+ height="#{richAccordionBean.attributes['height'].value}"
immediate="#{richAccordionBean.attributes['immediate'].value}"
itemByIndex="#{richAccordionBean.attributes['itemByIndex'].value}"
itemChangeListener="#{richAccordionBean.attributes['itemChangeListener'].value}"
@@ -75,6 +76,7 @@
prevItem="#{richAccordionBean.attributes['prevItem'].value}"
render="#{richAccordionBean.attributes['render'].value}"
rendered="#{richAccordionBean.attributes['rendered'].value}"
+ renderedItems="#{richAccordionBean.attributes['renderedItems'].value}"
required="#{richAccordionBean.attributes['required'].value}"
status="#{richAccordionBean.attributes['status'].value}"
style="#{richAccordionBean.attributes['style'].value}"
@@ -85,6 +87,7 @@
title="#{richAccordionBean.attributes['title'].value}"
valid="#{richAccordionBean.attributes['valid'].value}"
value="#{richAccordionBean.attributes['value'].value}"
+ width="#{richAccordionBean.attributes['width'].value}"
>
<rich:accordionItem id="item1" name="item1" header="Item 1">
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-09-17 14:11:41 UTC (rev 19241)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-09-17 15:09:12 UTC (rev 19242)
@@ -33,6 +33,7 @@
import java.net.URL;
+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;
@@ -199,6 +200,23 @@
}
@Test
+ public void testHeight() {
+ JQueryLocator input = pjq("input[type=text][id$=heightInput]");
+ AttributeLocator<?> attribute = accordion.getAttribute(new Attribute("style"));
+
+ // height = null
+ assertFalse(selenium.isAttributePresent(attribute), "Attribute style should not be present.");
+
+ // height = 300px
+ selenium.type(input, "300px");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ assertTrue(selenium.isAttributePresent(attribute), "Attribute style should be present.");
+ String value = selenium.getStyle(accordion, CssProperty.HEIGHT);
+ assertEquals(value, "300px", "Attribute width");
+ }
+
+ @Test
public void testImmediate() {
JQueryLocator input = pjq("input[type=checkbox][id$=immediateInput]");
selenium.click(input);
@@ -344,4 +362,37 @@
testStyleClass(accordion, "styleClass");
}
+ @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");
+ }
+
+ @Test
+ public void testWidth() {
+ JQueryLocator input = pjq("input[type=text][id$=widthInput]");
+ AttributeLocator<?> attribute = accordion.getAttribute(new Attribute("style"));
+
+ // width = null
+ assertFalse(selenium.isAttributePresent(attribute), "Attribute style should not be present.");
+
+ // width = 50%
+ selenium.type(input, "50%");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ assertTrue(selenium.isAttributePresent(attribute), "Attribute style should be present.");
+ String value = selenium.getStyle(accordion, CssProperty.WIDTH);
+ assertEquals(value, "50%", "Attribute width");
+ }
}
14 years, 3 months
JBoss Rich Faces SVN: r19241 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-17 10:11:41 -0400 (Fri, 17 Sep 2010)
New Revision: 19241
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/trunk/ftest/
Log:
https://jira.jboss.org/browse/RFPL-674
* added 26 tests for rich:accordion
Property changes on: modules/tests/metamer/trunk/ftest
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
.settings
target
profiles.xml
+ .classpath
.project
.settings
target
profiles.xml
.pom.xml.swp
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-09-17 13:57:14 UTC (rev 19240)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-17 14:11:41 UTC (rev 19241)
@@ -47,7 +47,7 @@
* Abstract test case used as a basis for majority of test cases.
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Rev$
+ * @version $Revision$
*/
public abstract class AbstractMetamerTest extends AbstractTestCase {
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: 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 (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-09-17 14:11:41 UTC (rev 19241)
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * 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.richAccordion;
+
+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.Attribute;
+import org.jboss.test.selenium.locator.AttributeLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.ajax.JavaScriptCondition;
+import org.jboss.test.selenium.waiting.conditions.IsDisplayed;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/richAccordion/simple.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestRichAccordion extends AbstractMetamerTest {
+
+ private JQueryLocator accordion = pjq("div[id$=accordion]");
+ 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 IsDisplayed isDisplayed = IsDisplayed.getInstance();
+ private String[] phasesNames = {"RESTORE_VIEW 1", "APPLY_REQUEST_VALUES 2", "PROCESS_VALIDATIONS 3",
+ "UPDATE_MODEL_VALUES 4", "INVOKE_APPLICATION 5", "RENDER_RESPONSE 6"};
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richAccordion/simple.xhtml");
+ }
+
+ @Test
+ public void testInit() {
+ boolean isDisplayed = selenium.isDisplayed(accordion);
+ assertTrue(isDisplayed, "Accordion is not present on the page.");
+
+ for (int i = 0; i < 5; i++) {
+ isDisplayed = selenium.isDisplayed(itemHeaders[i]);
+ assertTrue(isDisplayed, "Item" + (i + 1) + "'s header should be visible.");
+ }
+
+ isDisplayed = selenium.isDisplayed(itemContents[0]);
+ assertTrue(isDisplayed, "Content of item1 should be visible.");
+
+ for (int i = 1; i < 5; i++) {
+ isDisplayed = selenium.isDisplayed(itemContents[i]);
+ assertFalse(isDisplayed, "Item" + (i + 1) + "'s content should not be visible.");
+ }
+ }
+
+ @Test
+ public void testSwitchTypeNull() {
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardXhr(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:0]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:1]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardNoRequest(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeServer() {
+ JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:3]");
+ selenium.click(selectOption);
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardHttp(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ JQueryLocator input = pjq("input[type=checkbox][id$=bypassUpdatesInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ selenium.click(itemHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ JQueryLocator[] phases = {jq("div#phasesPanel li"), jq("div#phasesPanel li:eq(0)"),
+ jq("div#phasesPanel li:eq(1)"), jq("div#phasesPanel li:eq(2)"), jq("div#phasesPanel li:eq(3)")};
+
+ final String msg = "Update model values and Invoke application phases should be skipped.";
+ assertEquals(selenium.getCount(phases[0]), 4, msg);
+ assertEquals(selenium.getText(phases[1]), phasesNames[0], msg);
+ assertEquals(selenium.getText(phases[2]), phasesNames[1], msg);
+ assertEquals(selenium.getText(phases[3]), phasesNames[2], msg);
+ assertEquals(selenium.getText(phases[4]), phasesNames[5], msg);
+ }
+
+ @Test
+ public void testCycledSwitching() {
+ String accordionId = selenium.getEval(new JavaScript("window.testedComponentId"));
+ String result = null;
+
+ // RichFaces.$('form:accordion').nextItem('item4') will be null
+ result = selenium.getEval(new JavaScript("window.RichFaces.$('" + accordionId + "').nextItem('item4')"));
+ assertEquals(result, "null", "Result of function nextItem('item4')");
+
+ // RichFaces.$('form:accordion').prevItem('item1') will be null
+ result = selenium.getEval(new JavaScript("window.RichFaces.$('" + accordionId + "').prevItem('item1')"));
+ assertEquals(result, "null", "Result of function prevItem('item1')");
+
+ JQueryLocator input = pjq("input[type=checkbox][id$=cycledSwitchingInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ // RichFaces.$('form:accordion').nextItem('item5') will be item1
+ result = selenium.getEval(new JavaScript("window.RichFaces.$('" + accordionId + "').nextItem('item5')"));
+ assertEquals(result, "item1", "Result of function nextItem('item5')");
+
+ // RichFaces.$('form:accordion').prevItem('item1') will be item5
+ result = selenium.getEval(new JavaScript("window.RichFaces.$('" + accordionId + "').prevItem('item1')"));
+ assertEquals(result, "item5", "Result of function prevItem('item1')");
+ }
+
+ @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");
+ }
+
+ @Test
+ public void testImmediate() {
+ JQueryLocator input = pjq("input[type=checkbox][id$=immediateInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ selenium.click(itemHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ JQueryLocator[] phases = {jq("div#phasesPanel li"), jq("div#phasesPanel li:eq(0)"),
+ jq("div#phasesPanel li:eq(1)"), jq("div#phasesPanel li:eq(2)")};
+
+ final String msg = "Process validations, Update model values and Invoke application phases should be skipped.";
+ assertEquals(selenium.getCount(phases[0]), 3, msg);
+ assertEquals(selenium.getText(phases[1]), phasesNames[0], msg);
+ assertEquals(selenium.getText(phases[2]), phasesNames[1], msg);
+ assertEquals(selenium.getText(phases[3]), phasesNames[5], msg);
+ }
+
+ @Test
+ public void testItemContentClass() {
+ testStyleClass(itemContents[2], "itemContentClass");
+ }
+
+ @Test
+ public void testItemHeaderClass() {
+ testStyleClass(itemHeaders[2], "itemHeaderClass");
+ }
+
+ @Test
+ public void testItemHeaderClassActive() {
+ testStyleClass(itemHeaders[0], "itemHeaderClassActive");
+ }
+
+ @Test
+ public void testItemHeaderClassDisabled() {
+ testStyleClass(itemHeaders[3], "itemHeaderClassDisabled");
+ }
+
+ @Test
+ public void testItemHeaderClassInactive() {
+ testStyleClass(itemHeaders[1], "itemHeaderClassInactive");
+ }
+
+ @Test
+ public void testItemchangeEvents() {
+ JQueryLocator obicInput = pjq("input[id$=onbeforeitemchangeInput]");
+ JQueryLocator oicInput = pjq("input[id$=onitemchangeInput]");
+ final String obicValue = "alert('onbeforeitemchange')";
+ final String oicValue = "alert('onitemchange')";
+
+ selenium.type(obicInput, obicValue);
+ selenium.waitForPageToLoad(TIMEOUT);
+ selenium.type(oicInput, oicValue);
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ selenium.click(itemHeaders[2]);
+
+ waitGui.until(new JavaScriptCondition() {
+ public JavaScript getJavaScriptCondition() {
+ return new JavaScript("selenium.isAlertPresent()");
+ }
+ });
+
+ assertEquals(selenium.getAlert(), "onbeforeitemchange", "Event beforeitemchange was not fired");
+
+ waitGui.until(new JavaScriptCondition() {
+ public JavaScript getJavaScriptCondition() {
+ return new JavaScript("selenium.isAlertPresent()");
+ }
+ });
+
+ assertEquals(selenium.getAlert(), "onitemchange", "Event itemchange was not fired");
+ }
+
+ @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.");
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireEvent(Event.CLICK, accordion);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireEvent(Event.DBLCLICK, accordion);
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireEvent(Event.MOUSEDOWN, accordion);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireEvent(Event.MOUSEMOVE, accordion);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireEvent(Event.MOUSEOUT, accordion);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireEvent(Event.MOUSEOVER, accordion);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireEvent(Event.MOUSEUP, accordion);
+ }
+
+ @Test
+ public void testRendered() {
+ JQueryLocator input = pjq("input[type=checkbox][id$=renderedInput]");
+ selenium.click(input);
+ selenium.waitForPageToLoad();
+
+ assertFalse(selenium.isElementPresent(accordion), "Accordion should not be rendered when rendered=false.");
+ }
+
+ @Test
+ public void testStyle() {
+ testStyle(accordion);
+ }
+
+ @Test
+ public void testStyleClass() {
+ testStyleClass(accordion, "styleClass");
+ }
+
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 3 months
JBoss Rich Faces SVN: r19240 - 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-09-17 09:57:14 -0400 (Fri, 17 Sep 2010)
New Revision: 19240
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
Log:
* added methods for testing style and class attributes
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-09-17 13:40:20 UTC (rev 19239)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-17 13:57:14 UTC (rev 19240)
@@ -24,12 +24,15 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
import java.net.URL;
import org.jboss.test.selenium.AbstractTestCase;
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.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.ajax.JavaScriptCondition;
@@ -44,7 +47,7 @@
* Abstract test case used as a basis for majority of test cases.
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
+ * @version $Rev$
*/
public abstract class AbstractMetamerTest extends AbstractTestCase {
@@ -54,8 +57,8 @@
public static final long TIMEOUT = 5000;
@Inject
- @Templates({ "plain", "richDataTable1,redDiv", "richDataTable2,redDiv", "a4jRepeat1", "a4jRepeat2", "hDataTable1",
- "hDataTable2", "uiRepeat1", "uiRepeat2" })
+ @Templates({"plain", "richDataTable1,redDiv", "richDataTable2,redDiv", "a4jRepeat1", "a4jRepeat2", "hDataTable1",
+ "hDataTable2", "uiRepeat1", "uiRepeat2"})
private TemplatesList template;
/**
@@ -146,6 +149,43 @@
}
/**
+ * 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
+ */
+ protected void testStyle(ElementLocator<?> element) {
+ ElementLocator<?> styleInput = pjq("input[id$=styleInput]");
+ final String value = "background-color: yellow; font-size: 1.5em;";
+
+ selenium.type(styleInput, value);
+ selenium.waitForPageToLoad();
+
+ AttributeLocator<?> styleAttr = element.getAttribute(Attribute.STYLE);
+ assertEquals(selenium.getAttribute(styleAttr), value, "Attribute style");
+ }
+
+ /**
+ * 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 testStyleClass(ElementLocator<?> element, String attribute) {
+ ElementLocator<?> classInput = pjq("input[id$=" + attribute + "Input]");
+ final String value = "metamer-ftest-class";
+
+ selenium.type(classInput, value);
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.belongsClass(element, value), attribute + " does not work");
+ }
+
+ /**
* Hides header, footer and inputs for attributes.
*/
protected void hideControls() {
14 years, 3 months
JBoss Rich Faces SVN: r19239 - in modules/tests/metamer/trunk/application/src/main: webapp/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-17 09:40:20 -0400 (Fri, 17 Sep 2010)
New Revision: 19239
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
Log:
https://jira.jboss.org/browse/RFPL-799
* refactoring of footer (versions of Metamer and RichFaces)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-17 13:14:38 UTC (rev 19238)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-17 13:40:20 UTC (rev 19239)
@@ -56,6 +56,8 @@
private String scmRevision;
private String scmTimestamp;
private String fullVersion;
+ private String shortVersion;
+ private String richFacesVersion;
private String jsfVersion;
/**
@@ -104,14 +106,44 @@
}
if (implementationVersion == null) {
- implementationVersion = "Metamer: RichFaces Testing Application, version unknown";
+ implementationVersion = "Metamer, version unknown";
return implementationVersion;
}
fullVersion = implementationTitle + " by " + implementationVendor + ", version " + implementationVersion + " SVN r. " + scmRevision;
return fullVersion;
}
+
+ public String getShortVersion() {
+ if (shortVersion != null) {
+ return shortVersion;
+ }
+ if (implementationVersion == null) {
+ implementationVersion = "Metamer, version unknown";
+ return implementationVersion;
+ }
+
+ shortVersion = "Metamer " + implementationVersion + " SVN r. " + scmRevision;
+ return shortVersion;
+ }
+
+ public String getRichFacesVersion() {
+ if (richFacesVersion != null) {
+ return richFacesVersion;
+ }
+
+ org.richfaces.VersionBean rfVersionBean = new org.richfaces.VersionBean();
+ StringBuilder result = new StringBuilder();
+ result.append("RichFaces ");
+ result.append(rfVersionBean.getVersion().getImplementationVersion());
+ result.append(" SVN r.");
+ result.append(rfVersionBean.getVersion().getScmRevision());
+ richFacesVersion = result.toString();
+
+ return richFacesVersion;
+ }
+
public String getJavaVersion() {
return System.getProperty("java.runtime.name") + " " + System.getProperty("java.runtime.version");
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17 13:14:38 UTC (rev 19238)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17 13:40:20 UTC (rev 19239)
@@ -21,17 +21,18 @@
-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jsp/jstl/core">
+ xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jsp/jstl/core">
- <hr style="width: 1050px; margin-left: 0px;"/>
+ <hr style="width: 1050px; margin-left: 0px;" />
<ul>
- <li><h:outputText id="richfacesVersion" value="#{a4j.version}"/></li>
- <li><h:outputText id="metamerVersion" value="#{metamer.fullVersion}"/></li>
- <li><h:outputText id="javaVersion" value="#{metamer.javaVersion}"/></li>
- <li><h:outputText id="osVersion" value="#{metamer.osVersion}"/></li>
- <li><h:outputText id="jsfVersion" value="#{metamer.jsfVersion}"/></li>
- <li><h:outputText id="browserVersion" value="#{metamer.browserVersion}"/></li>
+ <li><h:outputText id="richfacesVersion" value="#{metamer.richFacesVersion}" /></li>
+ <li><h:outputText id="metamerVersion" value="#{metamer.shortVersion}" /></li>
+ <li><h:outputText id="javaVersion" value="#{metamer.javaVersion}" /> @ <h:outputText id="osVersion"
+ value="#{metamer.osVersion}" /></li>
+ <li><h:outputText id="jsfVersion" value="#{metamer.jsfVersion}" /></li>
+ <li><h:outputText id="browserVersion" value="#{metamer.browserVersion}" /></li>
</ul>
+ <hr />
</ui:composition>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19238 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-17 09:14:38 -0400 (Fri, 17 Sep 2010)
New Revision: 19238
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
Log:
no need for additional waiting for attribute present anymore
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-09-17 13:13:58 UTC (rev 19237)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-09-17 13:14:38 UTC (rev 19238)
@@ -66,7 +66,6 @@
final ElementLocator<?> locator = propertyLocator.format(propertyName);
final AttributeLocator<?> typeLocator = locator.getAttribute(Attribute.TYPE);
- waitGui.until(elementPresent.locator(locator));
String inputType = selenium.getAttribute(typeLocator);
if (value == null) {
14 years, 3 months
JBoss Rich Faces SVN: r19237 - in modules/tests/metamer/trunk: ftest-source and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-17 09:13:58 -0400 (Fri, 17 Sep 2010)
New Revision: 19237
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/ftest-source/pom.xml
Log:
source level upgraded to 1.6
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2010-09-17 11:31:48 UTC (rev 19236)
+++ modules/tests/metamer/trunk/application/pom.xml 2010-09-17 13:13:58 UTC (rev 19237)
@@ -108,11 +108,11 @@
</resources>
<plugins>
- <plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
<plugin>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2010-09-17 11:31:48 UTC (rev 19236)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2010-09-17 13:13:58 UTC (rev 19237)
@@ -65,6 +65,13 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
14 years, 3 months
JBoss Rich Faces SVN: r19236 - modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-17 07:31:48 -0400 (Fri, 17 Sep 2010)
New Revision: 19236
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
Log:
* a disabled item added to rich:accordion
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-09-17 09:12:32 UTC (rev 19235)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-09-17 11:31:48 UTC (rev 19236)
@@ -96,9 +96,12 @@
<rich:accordionItem id="item3" name="item3" header="Item 3">
content of item 3
</rich:accordionItem>
- <rich:accordionItem id="item4" name="item4" header="Item 4">
+ <rich:accordionItem id="item4" name="item4" header="Item 4" disabled="true">
content of item 4
</rich:accordionItem>
+ <rich:accordionItem id="item5" name="item5" header="Item 5">
+ content of item 5
+ </rich:accordionItem>
</rich:accordion>
<br/><br/>
@@ -120,15 +123,20 @@
</rich:componentControl>
</h:commandButton>
<h:commandButton id="switchButton3" value="switch to item3">
- <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <rich:componentControl id="componentControl3" event="click" operation="switchToItem" target="accordion" >
<f:param value="item3" />
</rich:componentControl>
</h:commandButton>
<h:commandButton id="switchButton4" value="switch to item4">
- <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <rich:componentControl id="componentControl4" event="click" operation="switchToItem" target="accordion" >
<f:param value="item4" />
</rich:componentControl>
</h:commandButton>
+ <h:commandButton id="switchButton5" value="switch to item5">
+ <rich:componentControl id="componentControl5" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item5" />
+ </rich:componentControl>
+ </h:commandButton>
</fieldset>
</ui:define>
14 years, 3 months