JBoss Rich Faces SVN: r21393 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richInplaceInput and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-02 10:55:57 -0500 (Wed, 02 Feb 2011)
New Revision: 21393
Removed:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/collapsiblePanel/
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
Log:
* added 8 tests for inplace input RFPL-757
* removed empty directory collapsiblePanel
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-02-02 15:39:03 UTC (rev 21392)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-02-02 15:55:57 UTC (rev 21393)
@@ -63,8 +63,16 @@
attributes.setAttribute("value", "RichFaces 4");
// TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("converterMessage");
+ attributes.remove("required");
+ attributes.remove("requiredMessage");
attributes.remove("validator");
+ attributes.remove("validatorMessage");
attributes.remove("valueChangeListener");
+
+ // TODO remove as soon as RF-10411 is fixed
+ attributes.setAttribute("style", null);
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-02-02 15:39:03 UTC (rev 21392)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-02-02 15:55:57 UTC (rev 21393)
@@ -46,7 +46,7 @@
converterMessage="#{richInplaceInputBean.attributes['converterMessage'].value}"
defaultLabel="#{richInplaceInputBean.attributes['defaultLabel'].value}"
disabled="#{richInplaceInputBean.attributes['disabled'].value}"
- disabledStateClass="#{richInplaceInputBean.attributes['disableStateClass'].value}"
+ disabledStateClass="#{richInplaceInputBean.attributes['disabledStateClass'].value}"
editClass="#{richInplaceInputBean.attributes['editClass'].value}"
editEvent="#{richInplaceInputBean.attributes['editEvent'].value}"
editStateClass="#{richInplaceInputBean.attributes['editStateClass'].value}"
@@ -83,7 +83,7 @@
requiredMessage="#{richInplaceInputBean.attributes['requiredMessage'].value}"
saveOnBlur="#{richInplaceInputBean.attributes['saveOnBlur'].value}"
showControls="#{richInplaceInputBean.attributes['showControls'].value}"
- state="#{richInplaceInputBean.attributes['state'].value}"
+ style="#{richInplaceInputBean.attributes['style'].value}"
tabindex="#{richInplaceInputBean.attributes['tabindex'].value}"
validatorMessage="#{richInplaceInputBean.attributes['validatorMessage'].value}"
value="#{richInplaceInputBean.attributes['value'].value}"
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-02-02 15:39:03 UTC (rev 21392)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-02-02 15:55:57 UTC (rev 21393)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -30,11 +30,13 @@
import static org.testng.Assert.assertTrue;
import java.net.URL;
+
import javax.faces.event.PhaseId;
+
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;
@@ -67,7 +69,7 @@
assertTrue(selenium.isElementPresent(inplaceInput), "Inplace input is not on the page.");
assertTrue(selenium.isElementPresent(label), "Default label should be present on the page.");
assertEquals(selenium.getText(label), "RichFaces 4", "Default label");
- assertTrue(selenium.isElementPresent(inplaceInput), "Input should be present on the page.");
+ assertTrue(selenium.isElementPresent(input), "Input should be present on the page.");
assertFalse(selenium.isElementPresent(okButton), "OK button should not be present on the page.");
assertFalse(selenium.isElementPresent(cancelButton), "Cancel button should not be present on the page.");
assertEquals(selenium.getValue(input), "RichFaces 4", "Value of inplace input.");
@@ -89,9 +91,27 @@
String listenerText = selenium.getText(jq("div#phasesPanel li:eq(3)"));
assertEquals(listenerText, "* value changed: RichFaces 4 -> new value", "Value change listener was not invoked.");
+
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "value changed: RichFaces 4 -> new value");
}
@Test
+ public void testChangedStateClass() {
+ selenium.type(pjq("input[id$=changedStateClassInput]"), "metamer-ftest-class");
+ selenium.waitForPageToLoad();
+
+ selenium.click(inplaceInput);
+ selenium.type(input, "new value");
+ selenium.fireEvent(input, Event.BLUR);
+
+ JQueryLocator elementWhichHasntThatClass = jq(inplaceInput.getRawLocator() + ":not(.metamer-ftest-class)");
+ assertTrue(selenium.isElementPresent(inplaceInput));
+ assertFalse(selenium.isElementPresent(elementWhichHasntThatClass));
+ }
+
+ @Test
public void testDefaultLabel() {
selenium.type(pjq("input[type=text][id$=valueInput]"), "");
selenium.waitForPageToLoad();
@@ -107,6 +127,28 @@
}
@Test
+ public void testDisabled() {
+ selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.isElementPresent(inplaceInput), "Inplace input is not on the page.");
+ assertTrue(selenium.isElementPresent(label), "Default label should be present on the page.");
+ assertEquals(selenium.getText(label), "RichFaces 4", "Default label");
+ assertFalse(selenium.isElementPresent(input), "Input should not be present on the page.");
+ assertFalse(selenium.isElementPresent(okButton), "OK button should not be present on the page.");
+ assertFalse(selenium.isElementPresent(cancelButton), "Cancel button should not be present on the page.");
+ assertFalse(selenium.isElementPresent(edit), "Edit should not be present on the page.");
+ }
+
+ @Test
+ public void testDisabledStateClass() {
+ selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ testStyleClass(inplaceInput, "disabledStateClass");
+ }
+
+ @Test
public void testEditClass() {
testStyleClass(edit, "editClass");
}
@@ -123,6 +165,20 @@
}
@Test
+ public void testEditStateClass() {
+ selenium.type(pjq("input[id$=editStateClassInput]"), "metamer-ftest-class");
+ selenium.waitForPageToLoad();
+
+ assertFalse(selenium.belongsClass(inplaceInput, "metamer-ftest-class"), "Inplace input should not have class metamer-ftest-class.");
+
+ selenium.click(inplaceInput);
+ assertTrue(selenium.belongsClass(inplaceInput, "metamer-ftest-class"), "Inplace input should have class metamer-ftest-class.");
+
+ selenium.fireEvent(input, Event.BLUR);
+ assertFalse(selenium.belongsClass(inplaceInput, "metamer-ftest-class"), "Inplace input should not have class metamer-ftest-class.");
+ }
+
+ @Test
public void testImmediate() {
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
@@ -133,10 +189,9 @@
selenium.fireEvent(input, Event.BLUR);
waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
- String listenerText = selenium.getText(jq("div#phasesPanel li:eq(2)"));
- assertEquals(listenerText, "* value changed: RichFaces 4 -> new value", "Value change listener was not invoked.");
+ phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "value changed: RichFaces 4 -> new value");
}
@Test
@@ -312,6 +367,11 @@
}
@Test
+ public void testReadyStateClass() {
+ testStyleClass(inplaceInput, "readyStateClass");
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -320,6 +380,24 @@
}
@Test
+ public void testSaveOnBlur() {
+ selenium.click(pjq("input[type=radio][name$=saveOnBlurInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ selenium.click(inplaceInput);
+ assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit should not contain class rf-is-none when popup is open.");
+ assertTrue(selenium.isDisplayed(input), "Input should be displayed.");
+
+ selenium.type(input, "new value");
+ selenium.fireEvent(input, Event.BLUR);
+ assertFalse(selenium.belongsClass(inplaceInput, "rf-ii-c-s"), "New class rf-ii-c-s should not be added to inplace input.");
+ assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should contain class rf-is-none when popup is closed.");
+
+ assertEquals(selenium.getText(label), "RichFaces 4", "Label should not change.");
+ assertEquals(selenium.getText(output), "RichFaces 4", "Output should not change.");
+ }
+
+ @Test
public void testShowControls() {
selenium.click(pjq("input[type=radio][name$=showControlsInput][value=true]"));
selenium.waitForPageToLoad();
@@ -361,6 +439,21 @@
}
@Test
+ public void testStyle() {
+ testStyle(inplaceInput, "style");
+ }
+
+ @Test
+ public void testTabindex() {
+ AttributeLocator<?> attr = input.getAttribute(new Attribute("tabindex"));
+
+ selenium.type(pjq("input[id$=tabindexInput]"), "47");
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.getAttribute(attr).contains("47"), "Attribute tabindex should contain \"47\".");
+ }
+
+ @Test
public void testValue() {
selenium.type(pjq("input[type=text][id$=valueInput]"), "new value");
selenium.waitForPageToLoad();
13 years, 11 months
JBoss Rich Faces SVN: r21392 - trunk/examples/richfaces-showcase.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-02 10:39:03 -0500 (Wed, 02 Feb 2011)
New Revision: 21392
Modified:
trunk/examples/richfaces-showcase/pom.xml
Log:
Removed validation stuff from JEE6 profile
Modified: trunk/examples/richfaces-showcase/pom.xml
===================================================================
--- trunk/examples/richfaces-showcase/pom.xml 2011-02-02 15:14:02 UTC (rev 21391)
+++ trunk/examples/richfaces-showcase/pom.xml 2011-02-02 15:39:03 UTC (rev 21392)
@@ -49,21 +49,21 @@
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>4.1.0.Final</version>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.6</version>
- </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>1.5.6</version>
+ </dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
@@ -303,8 +303,8 @@
<configuration>
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
<classifier>jee6</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*,WEB-INF/lib/validation-api-*</packagingExcludes>
- <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*,WEB-INF/lib/validation-api-*</warSourceExcludes>
+ <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*,WEB-INF/lib/validation-api-*,WEB-INF/lib/hibernate-validator-*,WEB-INF/lib/slf4j-*</packagingExcludes>
+ <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*,WEB-INF/lib/validation-api-*,WEB-INF/lib/hibernate-validator-*,WEB-INF/lib/slf4j-*</warSourceExcludes>
<webResources>
<resource>
<directory>${basedir}/src/main/java</directory>
@@ -400,6 +400,17 @@
<artifactId>jstl</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</profile>
<profile>
13 years, 11 months
JBoss Rich Faces SVN: r21391 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-02-02 10:14:02 -0500 (Wed, 02 Feb 2011)
New Revision: 21391
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml
Log:
value set in order to see initial value when minValue=0 by default
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml 2011-02-02 15:09:53 UTC (rev 21390)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/clientProgressBar-sample.xhtml 2011-02-02 15:14:02 UTC (rev 21391)
@@ -32,17 +32,21 @@
clearInterval(intervalID);
}
//]]>
- </script>
- <h:form id="form2">
- <rich:progressBar mode="client" id="progressBar">
- <f:facet name="initial">
- <h:outputText value="Process doesn't started yet"/>
- </f:facet>
- <f:facet name="complete">
- <h:outputText value="Process Done"/>
- </f:facet>
- </rich:progressBar>
- <h:commandButton type="button" onclick="startProgress(); return false;" style="margin: 9px 0px 5px;" id="start" value="Start Progress"/>
- <h:commandButton type="button" onclick="pauseProgress(); return false;" style="margin: 9px 0px 5px;" id="pause" disabled="true" value="Pause Progress"/>
- </h:form>
+ </script>
+ <h:form id="form2">
+ <rich:progressBar mode="client" id="progressBar" value="-1">
+ <f:facet name="initial">
+ <h:outputText value="Process doesn't started yet" />
+ </f:facet>
+ <f:facet name="complete">
+ <h:outputText value="Process Done" />
+ </f:facet>
+ </rich:progressBar>
+ <h:commandButton type="button"
+ onclick="startProgress(); return false;" style="margin: 9px 0px 5px;"
+ id="start" value="Start Progress" />
+ <h:commandButton type="button"
+ onclick="pauseProgress(); return false;" style="margin: 9px 0px 5px;"
+ id="pause" disabled="true" value="Pause Progress" />
+ </h:form>
</ui:composition>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21390 - trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-02 10:09:53 -0500 (Wed, 02 Feb 2011)
New Revision: 21390
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss
Log:
RF-8722 SubTableToggleControl: vertical alignment should be set
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss 2011-02-02 14:20:52 UTC (rev 21389)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss 2011-02-02 15:09:53 UTC (rev 21390)
@@ -1,7 +1,22 @@
.rf-csttg {
cursor: pointer;
+ vertical-align: middle;
+ margin:0px;
+ padding:0px;
}
+.rf-csttg-exp {
+ vertical-align: middle;
+ margin:0px;
+ padding:0px;
+}
+
+.rf-csttg-colps {
+ vertical-align: middle;
+ margin:0px;
+ padding:0px;
+}
+
.rf-cst {
}
13 years, 11 months
JBoss Rich Faces SVN: r21389 - trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-02 09:20:52 -0500 (Wed, 02 Feb 2011)
New Revision: 21389
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
RF-10067 Data table: rendered wrong in IE7
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-02-02 13:38:32 UTC (rev 21388)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-02-02 14:20:52 UTC (rev 21389)
@@ -61,9 +61,9 @@
writer.startElement(HtmlConstants.TBODY_ELEMENT, dataTable);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, dataTable.getContainerClientId(context) + HIDDEN_CONTAINER_ID, null);
- writer.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, "display: none", null);
writer.startElement(HtmlConstants.TR_ELEMENT, dataTable);
writer.startElement(HtmlConstants.TD_ELEM, dataTable);
+ writer.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, "display: none", null);
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
13 years, 11 months
JBoss Rich Faces SVN: r21388 - in trunk/ui/iteration/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-02 08:38:32 -0500 (Wed, 02 Feb 2011)
New Revision: 21388
Removed:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss
Log:
Optimization for https://issues.jboss.org/browse/RF-10207
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02 13:35:04 UTC (rev 21387)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02 13:38:32 UTC (rev 21388)
@@ -50,7 +50,7 @@
{@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(name = "richfaces.js"),
@ResourceDependency(name = "richfaces-event.js"),
- @ResourceDependency(library="org.richfaces", name = "collapsible-subtable-toggler.ecss"),
+ @ResourceDependency(library="org.richfaces", name = "collapsible-subtable.ecss"),
@ResourceDependency(library="org.richfaces", name = "collapsible-subtable-toggler.js")
})
public class CollapsibleSubTableTogglerRendererBase extends RendererBase {
Deleted: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02 13:35:04 UTC (rev 21387)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02 13:38:32 UTC (rev 21388)
@@ -1,3 +0,0 @@
-.rf-csttg {
- cursor: pointer;
-}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss 2011-02-02 13:35:04 UTC (rev 21387)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.ecss 2011-02-02 13:38:32 UTC (rev 21388)
@@ -1,6 +1,10 @@
-.rf-cst{
+.rf-csttg {
+ cursor: pointer;
}
+.rf-cst {
+}
+
.rf-cst-r{
}
13 years, 11 months
JBoss Rich Faces SVN: r21387 - in trunk/ui/iteration/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-02 08:35:04 -0500 (Wed, 02 Feb 2011)
New Revision: 21387
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml
Log:
https://issues.jboss.org/browse/RF-10207
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02 13:05:01 UTC (rev 21386)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02 13:35:04 UTC (rev 21387)
@@ -70,6 +70,10 @@
private static final String COLLAPSED_STATE = "collapsed";
+ private static final String EXPANDED_CONTROL_CLASS = "rf-csttg-exp";
+
+ private static final String COLLAPSED_CONTROL_CLASS = "rf-csttg-colps";
+
@Override
protected void doDecode(FacesContext context, UIComponent component) {
//TODO - review
@@ -116,7 +120,8 @@
}
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, control.getClientId(context) + ":" + state, null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, concatClasses(getIconClass(expanded), styleClass), null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, concatClasses(styleClass,
+ expanded ? EXPANDED_CONTROL_CLASS : COLLAPSED_CONTROL_CLASS), null);
writer.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, style, null);
UIComponent controlFacet = control.getFacet(state);
@@ -207,15 +212,4 @@
return expanded ? EXPANDED_STATE : COLLAPSED_STATE;
}
- protected String getIconClass(boolean expanded) {
- return expanded ? getExpandedIconClass() : getCollapsedIconClass();
- }
-
- public String getExpandedIconClass() {
- return "rf-csttg-exp";
- }
-
- public String getCollapsedIconClass() {
- return "rf-csttg-colps";
- }
}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02 13:05:01 UTC (rev 21386)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02 13:35:04 UTC (rev 21387)
@@ -1,7 +1,3 @@
-.rf-csttg-exp {
- cursor:pointer;
-}
-
-.rf-csttg-colps {
- cursor:pointer;
+.rf-csttg {
+ cursor: pointer;
}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml 2011-02-02 13:05:01 UTC (rev 21386)
+++ trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml 2011-02-02 13:35:04 UTC (rev 21387)
@@ -13,7 +13,7 @@
</cc:interface>
<cc:implementation>
- <span id="#{clientId}" class="#{component.attributes['styleClass']}">
+ <span id="#{clientId}" class="#{concatClasses(component.attributes['styleClass'], 'rf-csttg')}">
<cdk:call expression="encodeControl(facesContext, component);" />
</span>
</cc:implementation>
13 years, 11 months
JBoss Rich Faces SVN: r21386 - trunk/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-02-02 08:05:01 -0500 (Wed, 02 Feb 2011)
New Revision: 21386
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
Log:
RF-10009: cycledSwitching, itemChangeListener, onbeforeitemchange, and onitemchange attributes of collapsiblePanel are hidden
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-02-02 13:03:10 UTC (rev 21385)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-02-02 13:05:01 UTC (rev 21386)
@@ -86,6 +86,9 @@
@Attribute(defaultValue="true")
public abstract boolean isExpanded();
+ @Attribute(hidden = true)
+ public abstract boolean isCycledSwitching();
+
@Override
public void queueEvent(FacesEvent facesEvent) {
PanelToggleEvent event = null;
@@ -106,6 +109,9 @@
@Attribute
public abstract MethodExpression getToggleListener();
+ @Attribute(hidden = true)
+ public abstract MethodExpression getItemChangeListener();
+
// ------------------------------------------------ Html Attributes
@Attribute
@@ -138,6 +144,12 @@
@Attribute(events = @EventName("beforeswitch"))
public abstract String getOnbeforeswitch();
+ @Attribute(events = @EventName("beforeitemchange"), hidden = true)
+ public abstract String getOnbeforeitemchange();
+
+ @Attribute(events = @EventName("itemchange"), hidden = true)
+ public abstract String getOnitemchange();
+
@Attribute
public abstract String getLang();
13 years, 11 months
JBoss Rich Faces SVN: r21385 - in trunk/ui/iteration/ui/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-02 08:03:10 -0500 (Wed, 02 Feb 2011)
New Revision: 21385
Added:
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/dataGrid-rows-props.xml
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataGrid.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SelectionRenderer.java
Log:
https://issues.jboss.org/browse/RF-10375
https://issues.jboss.org/browse/RF-10376
https://issues.jboss.org/browse/RF-10377
https://issues.jboss.org/browse/RF-10379
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataGrid.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataGrid.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataGrid.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -56,7 +56,8 @@
family = AbstractDataGrid.COMPONENT_FAMILY,
generate = "org.richfaces.component.UIDataGrid",
renderer = @JsfRenderer(type = "org.richfaces.DataGridRenderer"),
- tag = @Tag(name="dataGrid", handler="org.richfaces.taglib.DataGridHandler", type=TagType.Facelets)
+ tag = @Tag(name="dataGrid", handler="org.richfaces.taglib.DataGridHandler", type=TagType.Facelets),
+ attributes = {"dataGrid-rows-props.xml"}
)
public abstract class AbstractDataGrid extends UISequence implements Row, MetaComponentResolver, MetaComponentEncoder {
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -23,6 +23,7 @@
package org.richfaces.component;
import java.io.IOException;
+import java.util.Collection;
import java.util.Map;
import javax.el.ValueExpression;
@@ -79,9 +80,6 @@
public abstract int getFrozenColumns();
@Attribute
- public abstract String getCaptionClass();
-
- @Attribute
public abstract String getStyleClass();
@Attribute
@@ -208,4 +206,8 @@
updateState();
}
}
+
+ @Attribute
+ public abstract Collection<Object> getSelection();
+
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -107,9 +107,6 @@
}
@Attribute
- public abstract int getColumns();
-
- @Attribute
public abstract String getNoDataLabel();
@Attribute
@@ -134,9 +131,6 @@
public abstract String getStyle();
@Attribute
- public abstract Collection<Object> getSelection();
-
- @Attribute
public abstract Collection<Object> getSortPriority();
@Attribute
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -108,11 +108,6 @@
|| isColumnAttributeSet(table, "filterBy");
}
- protected int getColumnsCount(UIDataTableBase table) {
- int columns = table.getColumns();
- return (columns > 0) ? columns : getColumnsCount(table.columns());
- }
-
public void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
//DataTableRenderer override this method
}
@@ -272,7 +267,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dt-tft", null);
}
- int columns = getColumnsCount(dataTable);
+ int columns = getColumnsCount(dataTable.columns());
boolean encodePartialUpdateForChildren = (encodePartialUpdate && !partialUpdateEncoded);
@@ -374,7 +369,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dt-thd", null);
}
- int columns = getColumnsCount(dataTable);
+ int columns = getColumnsCount(dataTable.columns());
boolean encodePartialUpdateForChildren = (encodePartialUpdate && !partialUpdateEncoded);
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -101,7 +101,7 @@
// TODO nick - do we need this element if "columnsWidth" is absent?
writer.startElement(HtmlConstants.COLGROUP_ELEMENT, dataTable);
- int columns = getColumnsCount(dataTable);
+ int columns = getColumnsCount(dataTable.columns());
writer.writeAttribute(HtmlConstants.SPAN_ELEM, String.valueOf(columns), null);
String columnsWidth = (String) dataTable.getAttributes().get("columnsWidth");
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -762,7 +762,7 @@
public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase rowHolder)
throws IOException {
RendererState state = (RendererState) rowHolder;
- UIDataTableBase table = state.getRow();
+ AbstractExtendedDataTable table = (AbstractExtendedDataTable) state.getRow();
writer.startElement(HtmlConstants.TR_ELEMENT, table);
if (rowHolder.getRow() instanceof UIDataTableBase) {
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SelectionRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SelectionRenderer.java 2011-02-02 12:49:07 UTC (rev 21384)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SelectionRenderer.java 2011-02-02 13:03:10 UTC (rev 21385)
@@ -33,6 +33,7 @@
import org.ajax4jsf.model.DataVisitResult;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.SequenceRange;
+import org.richfaces.component.AbstractExtendedDataTable;
import org.richfaces.component.UIDataTableBase;
/**
@@ -170,7 +171,7 @@
if (selectionString != null && selectionString.length() > 0) {
final ClientSelection clientSelection = new ClientSelection(selectionString);
final Map<String, Object> attributes = component.getAttributes();
- UIDataTableBase table = (UIDataTableBase) component;
+ AbstractExtendedDataTable table = (AbstractExtendedDataTable) component;
Collection<Object> selection = table.getSelection();
if (selection == null) {
selection = new HashSet<Object>();
@@ -209,7 +210,7 @@
}
- private void encodeSelectionOutsideCurrentRange(FacesContext context, UIDataTableBase table, String selectionFlag) { //TODO Rename method
+ private void encodeSelectionOutsideCurrentRange(FacesContext context, AbstractExtendedDataTable table, String selectionFlag) { //TODO Rename method
Object key = table.getRowKey();
table.captureOrigValue(context);
SequenceRange range = (SequenceRange) table.getComponentState().getRange();
Added: trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/dataGrid-rows-props.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/dataGrid-rows-props.xml (rev 0)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/dataGrid-rows-props.xml 2011-02-02 13:03:10 UTC (rev 21385)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee">
+
+ <property>
+ <property-name>rows</property-name>
+ <property-class>java.lang.Integer</property-class>
+ <property-extension>
+ <cdk:hidden>true</cdk:hidden>
+ </property-extension>
+ </property>
+
+</cdk:properties>
13 years, 11 months
JBoss Rich Faces SVN: r21384 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-02 07:49:07 -0500 (Wed, 02 Feb 2011)
New Revision: 21384
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java
Log:
* fixed tests and samples for accordion and accordion item
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2011-02-02 12:22:44 UTC (rev 21383)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2011-02-02 12:49:07 UTC (rev 21384)
@@ -59,6 +59,9 @@
attributes.setAttribute("header", "Item 1");
attributes.setAttribute("name", "item1");
attributes.setAttribute("rendered", true);
+
+ // TODO will be tested in another way
+ attributes.remove("converter");
}
public Attributes getAttributes() {
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 2011-02-02 12:22:44 UTC (rev 21383)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-02-02 12:49:07 UTC (rev 21384)
@@ -264,7 +264,7 @@
assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
}
- verifyStandardIcons(input, icon, image, "");
+ verifyStandardIcons(input, icon, image, "-hdr");
}
@Test
@@ -326,7 +326,7 @@
JQueryLocator input = pjq("select[id$=itemInactiveLeftIconInput]");
JQueryLocator image = leftIcon.format(3).getChild(jq("img"));
- verifyStandardIcons(input, icon, image, "");
+ verifyStandardIcons(input, icon, image, "-hdr");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java 2011-02-02 12:22:44 UTC (rev 21383)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordionItem/TestRichAccordionItem.java 2011-02-02 12:49:07 UTC (rev 21384)
@@ -24,15 +24,19 @@
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.locator.option.OptionLocatorFactory.optionLabel;
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.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
@@ -61,6 +65,8 @@
private JQueryLocator[] disabledHeaders = {pjq("div[id$=item1:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item2:header] div.rf-ac-itm-lbl-dis"), pjq("div[id$=item3:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item4:header] div.rf-ac-itm-lbl-dis"), pjq("div[id$=item5:header] div.rf-ac-itm-lbl-dis")};
+ private JQueryLocator leftIcon = pjq("div[id$=item{0}] td.rf-ac-itm-ico");
+ private JQueryLocator rightIcon = pjq("div[id$=item{0}] td.rf-ac-itm-exp-ico");
@Override
public URL getTestUrl() {
@@ -113,6 +119,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10297")
public void testHeaderActiveClass() {
testStyleClass(activeHeaders[0], "headerActiveClass");
assertFalse(selenium.belongsClass(activeHeaders[1], "metamer-ftest-class"), "headerActiveClass should be set only on first item");
@@ -129,6 +136,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10297")
public void testHeaderDisabledClass() {
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
selenium.waitForPageToLoad();
@@ -137,6 +145,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10297")
public void testHeaderInactiveClass() {
testStyleClass(inactiveHeaders[0], "headerInactiveClass");
assertFalse(selenium.belongsClass(inactiveHeaders[1], "metamer-ftest-class"), "headerInactiveClass should be set only on first item");
@@ -155,6 +164,54 @@
}
@Test
+ public void testLeftActiveIcon() {
+ JQueryLocator icon = leftIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=leftActiveIconInput]");
+ JQueryLocator image = leftIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
+ }
+
+ guardXhr(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
+ public void testLeftDisabledIcon() {
+ JQueryLocator icon = leftIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=leftDisabledIconInput]");
+ JQueryLocator image = leftIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
+ }
+
+ selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ verifyStandardIcons(input, icon, image, "-dis");
+ }
+
+ @Test
+ public void testLeftInactiveIcon() {
+ JQueryLocator icon = leftIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=leftInactiveIconInput]");
+ JQueryLocator image = leftIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
+ }
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
public void testName() {
selenium.type(pjq("input[id$=nameInput]"), "new name");
selenium.waitForPageToLoad();
@@ -258,6 +315,54 @@
}
@Test
+ public void testRightActiveIcon() {
+ JQueryLocator icon = rightIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=rightActiveIconInput]");
+ JQueryLocator image = rightIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(rightIcon.format(i)), "Right icon of item" + i + " should not be present on the page.");
+ }
+
+ guardXhr(selenium).click(itemHeaders[0]);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(itemContents[0]));
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
+ public void testRightDisabledIcon() {
+ JQueryLocator icon = rightIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=rightDisabledIconInput]");
+ JQueryLocator image = rightIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(rightIcon.format(i)), "Right icon of item" + i + " should not be present on the page.");
+ }
+
+ selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ verifyStandardIcons(input, icon, image, "-dis");
+ }
+
+ @Test
+ public void testRightInactiveIcon() {
+ JQueryLocator icon = rightIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=rightInactiveIconInput]");
+ JQueryLocator image = rightIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(rightIcon.format(i)), "Right icon of item" + i + " should not be present on the page.");
+ }
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
public void testStyle() {
testStyle(item1, "style");
}
@@ -303,4 +408,66 @@
public void testTitle() {
testTitle(item1);
}
+
+ private void verifyStandardIcons(JQueryLocator input, JQueryLocator icon, JQueryLocator image, String classSuffix) {
+ String imageNameSuffix = "";
+ if (classSuffix.contains("dis")) {
+ imageNameSuffix = "Disabled";
+ }
+
+ selenium.select(input, optionLabel("chevronDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-down-hdr" + classSuffix), "Div should have set class rf-ico-chevron-down" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("ChevronDown" + imageNameSuffix + ".png"), "Icon should contain a chevron down.");
+
+ selenium.select(input, optionLabel("chevronUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-up-hdr" + classSuffix), "Div should have set class rf-ico-chevron-up" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("ChevronUp" + imageNameSuffix + ".png"), "Icon should contain a chevron up.");
+
+ selenium.select(input, optionLabel("disc"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-disc-hdr" + classSuffix), "Div should have set class rf-ico-disc" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Disc" + imageNameSuffix + ".png"), "Icon should contain a disc.");
+
+ for (int i = 2; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
+ }
+
+ selenium.select(input, optionLabel("grid"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-grid-hdr" + classSuffix), "Div should have set class rf-ico-grid" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Grid" + imageNameSuffix + ".png"), "Icon should contain a grid.");
+
+ selenium.select(input, optionLabel("triangle"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-hdr" + classSuffix), "Div should have set class rf-ico-triangle" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Triangle" + imageNameSuffix + ".png"), "Icon should contain a triangle.");
+
+ selenium.select(input, optionLabel("triangleDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-down-hdr" + classSuffix), "Div should have set class rf-ico-triangle-down" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("TriangleDown" + imageNameSuffix + ".png"), "Icon should contain a triangle down.");
+
+ selenium.select(input, optionLabel("triangleUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-up-hdr" + classSuffix), "Div should have set class rf-ico-triangle-up" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("TriangleUp" + imageNameSuffix + ".png"), "Icon should contain a triangle up.");
+
+ selenium.select(input, optionLabel("none"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon should not be present when icon=none.");
+
+ selenium.select(input, optionLabel("star"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be present when icon=star.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be rendered.");
+ assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("star.png"), "Icon's src attribute should contain star.png.");
+
+ selenium.select(input, optionLabel("nonexisting"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be present when icon=nonexisting.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be rendered.");
+ assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("nonexisting"), "Icon's src attribute should contain nonexisting.");
+ }
}
13 years, 11 months