JBoss Rich Faces SVN: r22631 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-15 08:41:51 -0400 (Mon, 15 Aug 2011)
New Revision: 22631
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java
Log:
tests for rich:collapsibleSubTable facets tests fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml 2011-08-15 09:10:11 UTC (rev 22630)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml 2011-08-15 12:41:51 UTC (rev 22631)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 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:metamer="http://java.sun.com/jsf/composite/metamer"
- xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
- <!--
+<!--
JBoss, Home of Professional Open Source
Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
@@ -26,132 +26,130 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
- <ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
+<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataTable" />
- <ui:define name="view">
- <f:metadata>
- <f:viewParam name="templates" value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
- </ui:define>
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
- <ui:define name="outOfTemplateBefore">
- <br/>
- <h:outputText value="Show data in table: " />
- <h:selectBooleanCheckbox id="noDataCheckbox" value="#{richSubTableBean.state}">
- <a4j:ajax render="#{nestedComponentId}"/>
- </h:selectBooleanCheckbox>
- <br/><br/>
- </ui:define>
+ <ui:define name="outOfTemplateBefore">
+ <br />
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox" value="#{richSubTableBean.state}">
+ <a4j:ajax render="#{nestedComponentId}" />
+ </h:selectBooleanCheckbox>
+ <br />
+ <br />
+ </ui:define>
- <ui:define name="component">
+ <ui:define name="component">
- <rich:dataTable id="richDataTable" value="#{richSubTableBean.lists}" var="list" keepSaved="true">
- <f:facet name="header">
- <rich:columnGroup id="columnGroup">
- <rich:column id="columnHeaderEmployees" colspan="3">
- <h:outputText id="columnHeaderEmployeesText" value="Employees" />
- </rich:column>
- <rich:column id="columnHeaderName" breakRowBefore="true">
- <h:outputText id="columnHeaderNameText" value="Name" />
- </rich:column>
- <rich:column id="columnHeaderTitle">
- <h:outputText id="columnHeaderTitleText" value="Title" />
- </rich:column>
- <rich:column id="columnHeaderBirthdate">
- <h:outputText id="columnHeaderBirthdateText" value="Birthdate" />
- </rich:column>
- </rich:columnGroup>
- </f:facet>
+ <rich:dataTable id="richDataTable" value="#{richSubTableBean.lists}" var="list" keepSaved="true">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees" colspan="3">
+ <h:outputText id="columnHeaderEmployeesText" value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName" breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText" value="Name" />
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText" value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText" value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
- <rich:column id="columnSubTable" colspan="3">
- <rich:collapsibleSubTableToggler id="subTableTC" for="richSubTable"/>
- <h:outputText value="#{list[0].sex == 'MALE' ? 'Men' : 'Women'}" />
- </rich:column>
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC" for="richSubTable" />
+ <h:outputText value="#{list[0].sex == 'MALE' ? 'Men' : 'Women'}" />
+ </rich:column>
- <rich:collapsibleSubTable id="richSubTable"
- expanded="#{richSubTableBean.expanded[list]}"
- expandMode="#{richSubTableBean.attributes['expandMode'].value}"
- filterVar="#{richSubTableBean.attributes['filterVar'].value}"
- first="#{richSubTableBean.attributes['first'].value}"
- iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
- noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
- onrowclick="#{richSubTableBean.attributes['onrowclick'].value}"
- onrowdblclick="#{richSubTableBean.attributes['onrowdblclick'].value}"
- onrowkeydown="#{richSubTableBean.attributes['onrowkeydown'].value}"
- onrowkeypress="#{richSubTableBean.attributes['onrowkeypress'].value}"
- onrowkeyup="#{richSubTableBean.attributes['onrowkeyup'].value}"
- onrowmousedown="#{richSubTableBean.attributes['onrowmousedown'].value}"
- onrowmousemove="#{richSubTableBean.attributes['onrowmousemove'].value}"
- onrowmouseout="#{richSubTableBean.attributes['onrowmouseout'].value}"
- onrowmouseover="#{richSubTableBean.attributes['onrowmouseover'].value}"
- onrowmouseup="#{richSubTableBean.attributes['onrowmouseup'].value}"
- rendered="#{richSubTableBean.attributes['rendered'].value}"
- rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
- rows="#{richSubTableBean.attributes['rows'].value}"
- sortMode="#{richSubTableBean.attributes['sortMode'].value}"
- sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
- columnClasses="#{richSubTableBean.attributes['columnClasses'].value}"
- footerClass="#{richSubTableBean.attributes['footerClass'].value}"
- headerClass="#{richSubTableBean.attributes['headerClass'].value}"
- rowClass="#{richSubTableBean.attributes['rowClass'].value}"
- rowClasses="#{richSubTableBean.attributes['rowClasses'].value}"
- style="#{richSubTableBean.attributes['style'].value}"
- styleClass="#{richSubTableBean.attributes['styleClass'].value}"
- value="#{richSubTableBean.state ? list : null}"
- var="item">
+ <rich:collapsibleSubTable id="richSubTable" expanded="#{richSubTableBean.expanded[list]}"
+ expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+ filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+ first="#{richSubTableBean.attributes['first'].value}"
+ iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+ noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+ onrowclick="#{richSubTableBean.attributes['onrowclick'].value}"
+ onrowdblclick="#{richSubTableBean.attributes['onrowdblclick'].value}"
+ onrowkeydown="#{richSubTableBean.attributes['onrowkeydown'].value}"
+ onrowkeypress="#{richSubTableBean.attributes['onrowkeypress'].value}"
+ onrowkeyup="#{richSubTableBean.attributes['onrowkeyup'].value}"
+ onrowmousedown="#{richSubTableBean.attributes['onrowmousedown'].value}"
+ onrowmousemove="#{richSubTableBean.attributes['onrowmousemove'].value}"
+ onrowmouseout="#{richSubTableBean.attributes['onrowmouseout'].value}"
+ onrowmouseover="#{richSubTableBean.attributes['onrowmouseover'].value}"
+ onrowmouseup="#{richSubTableBean.attributes['onrowmouseup'].value}"
+ rendered="#{richSubTableBean.attributes['rendered'].value}"
+ rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+ rows="#{richSubTableBean.attributes['rows'].value}" sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+ sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+ columnClasses="#{richSubTableBean.attributes['columnClasses'].value}"
+ footerClass="#{richSubTableBean.attributes['footerClass'].value}"
+ headerClass="#{richSubTableBean.attributes['headerClass'].value}"
+ rowClass="#{richSubTableBean.attributes['rowClass'].value}"
+ rowClasses="#{richSubTableBean.attributes['rowClasses'].value}"
+ style="#{richSubTableBean.attributes['style'].value}"
+ styleClass="#{richSubTableBean.attributes['styleClass'].value}" value="#{richSubTableBean.state ? list : null}"
+ var="item">
- <f:facet name="noData">
- <h:outputText id="noData" value="#{richSubTableBean.facets['noData']}" style="color: red;"
- rendered="#{not empty richSubTableBean.facets['noData']}"/>
- </f:facet>
+ <f:facet name="noData">
+ <h:outputText id="noData" value="#{richSubTableBean.facets['noData']}" style="color: red;"
+ rendered="#{not empty richSubTableBean.facets['noData']}" />
+ </f:facet>
- <f:facet name="header">
- <h:outputText id="header" value="#{richSubTableBean.facets['header']}"
- rendered="#{not empty richSubTableBean.facets['header']}" />
- </f:facet>
+ <f:facet name="header">
+ <h:outputText id="header" value="#{richSubTableBean.facets['header']}"
+ rendered="#{not empty richSubTableBean.facets['header']}" />
+ </f:facet>
- <f:facet name="footer">
- <h:outputText id="footer" value="#{richSubTableBean.facets['footer']}"
- rendered="#{not empty richSubTableBean.facets['footer']}" />
- </f:facet>
+ <f:facet name="footer">
+ <h:outputText id="footer" value="#{richSubTableBean.facets['footer']}"
+ rendered="#{not empty richSubTableBean.facets['footer']}" />
+ </f:facet>
- <rich:column id="columnName">
- <h:outputText id="name" value="#{item.name}" />
- </rich:column>
- <rich:column id="columnTitle">
- <h:outputText id="title" value="#{item.title}" />
- </rich:column>
- <rich:column id="columnBirthdate">
- <h:outputText id="birthdate" value="#{item.birthdate}">
- <f:convertDateTime pattern="d MMM yyyy"/>
- </h:outputText>
- </rich:column>
+ <rich:column id="columnName">
+ <h:outputText id="name" value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title" value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate" value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy" />
+ </h:outputText>
+ </rich:column>
- </rich:collapsibleSubTable>
- </rich:dataTable>
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
- </ui:define>
+ </ui:define>
- <ui:define name="outOfTemplateAfter">
- <a4j:ajax render="#{nestedComponentId}">
- <h:panelGrid columns="2">
- <h:outputLabel value="No Data Facet: " />
- <h:inputText id="noDataInput" value="#{richSubTableBean.facets['noData']}" />
+ <ui:define name="outOfTemplateAfter">
+ <a4j:ajax render="#{nestedComponentId}">
+ <h:panelGrid columns="2">
+ <h:outputLabel value="No Data Facet: " />
+ <h:inputText id="noDataInput" value="#{richSubTableBean.facets['noData']}" />
- <h:outputLabel value="Header Facet:" />
- <h:inputText id="headerInput" value="#{richSubTableBean.facets['header']}" />
+ <h:outputLabel value="Header Facet:" />
+ <h:inputText id="headerInput" value="#{richSubTableBean.facets['header']}" />
- <h:outputLabel value="Footer Facet:" />
- <h:inputText id="footerInput" value="#{richSubTableBean.facets['footer']}" />
- </h:panelGrid>
- </a4j:ajax>
+ <h:outputLabel value="Footer Facet:" />
+ <h:inputText id="footerInput" value="#{richSubTableBean.facets['footer']}" />
+ </h:panelGrid>
+ </a4j:ajax>
- <metamer:attributes value="#{richSubTableBean.attributes}" id="attributes" />
- </ui:define>
+ <metamer:attributes value="#{richSubTableBean.attributes}" id="attributes" />
+ </ui:define>
- </ui:composition>
+</ui:composition>
</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java 2011-08-15 09:10:11 UTC (rev 22630)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java 2011-08-15 12:41:51 UTC (rev 22631)
@@ -49,7 +49,7 @@
private static final List<Employee> EMPLOYEES = Model.unmarshallEmployees();
CollapsibleSubTableAttributes attributes = new CollapsibleSubTableAttributes();
- DataTable dataTable = new DataTable(pjq("table.rf-dt"));;
+ DataTable dataTable = new DataTable(pjq("table[id$=richDataTable]"));;
DataTableFacets facets = new DataTableFacets();
@Inject
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java 2011-08-15 09:10:11 UTC (rev 22630)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java 2011-08-15 12:41:51 UTC (rev 22631)
@@ -28,6 +28,7 @@
import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
@@ -55,12 +56,14 @@
return subtable.hasVisibleRows();
}
});
- // assertTrue(subtable.hasVisibleRows());
attributes.setShowData(false);
assertFalse(subtable.hasVisibleRows());
- assertTrue(subtable.isNoData());
-
+ JQueryLocator noDataFacet = pjq("table[id$=richDataTable] > tbody.rf-cst:eq(0) > tr.rf-cst-nd > td.rf-cst-nd-c");
+ assertTrue(selenium.isElementPresent(noDataFacet));
+ assertTrue(selenium.isVisible(noDataFacet));
+ assertTrue(selenium.getText(noDataFacet).isEmpty());
+
facets.setNoData(SAMPLE_STRING);
attributes.setShowData(true);
@@ -70,6 +73,7 @@
assertFalse(subtable.hasVisibleRows());
assertTrue(subtable.isNoData());
+ assertEquals(selenium.getText(noDataFacet), SAMPLE_STRING);
}
@Test
13 years, 4 months
JBoss Rich Faces SVN: r22630 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPopupPanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-15 05:10:11 -0400 (Mon, 15 Aug 2011)
New Revision: 22630
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPopupPanel/TestRichPopupPanel.java
Log:
sample and tests for rich:popupPanel fixed
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java 2011-08-12 13:59:42 UTC (rev 22629)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichPopupPanelBean.java 2011-08-15 09:10:11 UTC (rev 22630)
@@ -72,6 +72,7 @@
attributes.setAttribute("top", "auto");
attributes.setAttribute("trimOverlayedElements", true);
attributes.setAttribute("width", 500);
+ attributes.setAttribute("zindex", 4);
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPopupPanel/TestRichPopupPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPopupPanel/TestRichPopupPanel.java 2011-08-12 13:59:42 UTC (rev 22629)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPopupPanel/TestRichPopupPanel.java 2011-08-15 09:10:11 UTC (rev 22630)
@@ -49,21 +49,21 @@
private JQueryLocator openButton = pjq("input[id$=openPanelButton]");
private JQueryLocator panel = pjq("div[id$=popupPanel]");
- private JQueryLocator panelContainer = jq("div.rf-pp-cntr");
- private JQueryLocator content = jq("div.rf-pp-cnt");
- private JQueryLocator header = jq("div.rf-pp-hdr");
- private JQueryLocator controls = jq("div.rf-pp-hdr-cntrls a");
- private JQueryLocator scroller = jq("div.rf-pp-cnt-scrlr");
- private JQueryLocator shadow = jq("div.rf-pp-shdw");
- private JQueryLocator resizerW = jq("div.rf-pp-hndlr-l");
- private JQueryLocator resizerN = jq("div.rf-pp-hndlr-t");
- private JQueryLocator resizerE = jq("div.rf-pp-hndlr-r");
- private JQueryLocator resizerS = jq("div.rf-pp-hndlr-b");
- private JQueryLocator resizerNW = jq("div.rf-pp-hndlr-tl");
- private JQueryLocator resizerNE = jq("div.rf-pp-hndlr-tr");
- private JQueryLocator resizerSW = jq("div.rf-pp-hndlr-bl");
- private JQueryLocator resizerSE = jq("div.rf-pp-hndlr-br");
- private JQueryLocator mask = jq("div.rf-pp-shade");
+ private JQueryLocator panelContainer = jq("div[id$=popupPanel_container].rf-pp-cntr");
+ private JQueryLocator content = jq("div[id$=popupPanel_container] div.rf-pp-cnt");
+ private JQueryLocator header = jq("div[id$=popupPanel_container] div.rf-pp-hdr");
+ private JQueryLocator controls = jq("div[id$=popupPanel_container] div.rf-pp-hdr-cntrls a");
+ private JQueryLocator scroller = jq("div[id$=popupPanel_container] div.rf-pp-cnt-scrlr");
+ private JQueryLocator shadow = jq("div[id$=popupPanel_container] div.rf-pp-shdw");
+ private JQueryLocator resizerW = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-l");
+ private JQueryLocator resizerN = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-t");
+ private JQueryLocator resizerE = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-r");
+ private JQueryLocator resizerS = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-b");
+ private JQueryLocator resizerNW = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-tl");
+ private JQueryLocator resizerNE = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-tr");
+ private JQueryLocator resizerSW = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-bl");
+ private JQueryLocator resizerSE = jq("div[id$=popupPanel_container] div.rf-pp-hndlr-br");
+ private JQueryLocator mask = jq("div[id$=popupPanel_shade].rf-pp-shade");
@Override
public URL getTestUrl() {
@@ -512,7 +512,7 @@
public void testZindex() {
selenium.click(openButton);
waitGui.failWith("Panel was not opened.").until(isDisplayed.locator(panel));
- assertEquals(selenium.getStyle(panelContainer, new CssProperty("z-index")), "0", "Zindex of the panel");
+ assertEquals(selenium.getStyle(panelContainer, new CssProperty("z-index")), "4", "Zindex of the panel");
selenium.type(pjq("input[id$=zindexInput]"), "30");
selenium.waitForPageToLoad();
13 years, 4 months
JBoss Rich Faces SVN: r22629 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-12 09:59:42 -0400 (Fri, 12 Aug 2011)
New Revision: 22629
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/richTogglePanel.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
Log:
template with rich:togglePanel fixed
test for collapsible panel fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/richTogglePanel.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/richTogglePanel.xhtml 2011-08-12 12:20:35 UTC (rev 22628)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/richTogglePanel.xhtml 2011-08-12 13:59:42 UTC (rev 22629)
@@ -26,23 +26,23 @@
-->
<ui:composition>
- <h:commandLink id="tcLink1" value="Item 1">
+ <h:commandLink id="containerTcLink1" value="Item 1">
<rich:toggleControl targetPanel="containerRichTogglePanel" targetItem="containerItem1" />
</h:commandLink>
<h:outputText value=" | " />
- <h:commandLink id="tcLink2" value="Item 2">
+ <h:commandLink id="containerTcLink2" value="Item 2">
<rich:toggleControl targetPanel="containerRichTogglePanel" targetItem="containerItem2" />
</h:commandLink>
<h:outputText value=" | " />
- <h:commandLink id="tcLink3" value="Item 3">
+ <h:commandLink id="containerTcLink3" value="Item 3">
<rich:toggleControl targetPanel="containerRichTogglePanel" targetItem="containerItem3" />
</h:commandLink>
<h:outputText value=" | " />
- <h:commandLink id="tcLink4" value="Item 4">
+ <h:commandLink id="containerTcLink4" value="Item 4">
<rich:toggleControl targetPanel="containerRichTogglePanel" targetItem="containerItem4" />
</h:commandLink>
<h:outputText value=" | " />
- <h:commandLink id="tcLink5" value="Item 5">
+ <h:commandLink id="containerTcLink5" value="Item 5">
<rich:toggleControl targetPanel="containerRichTogglePanel" targetItem="containerItem5" />
</h:commandLink>
<br />
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-08-12 12:20:35 UTC (rev 22628)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-08-12 13:59:42 UTC (rev 22629)
@@ -58,7 +58,7 @@
private JQueryLocator headerExp = pjq("div[id$=collapsiblePanel:header] div.rf-cp-lbl-exp");
private JQueryLocator headerColps = pjq("div[id$=collapsiblePanel:header] div.rf-cp-lbl-colps");
private JQueryLocator content = pjq("div[id$=collapsiblePanel:content]");
- private JQueryLocator leftIcon = pjq("td.rf-cp-ico");
+ private JQueryLocator leftIcon = pjq("div[id$=collapsiblePanel] td.rf-cp-ico");
private JQueryLocator rightIcon = pjq("td.rf-cp-exp-ico");
@Override
13 years, 4 months
JBoss Rich Faces SVN: r22628 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-12 08:20:35 -0400 (Fri, 12 Aug 2011)
New Revision: 22628
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
Log:
test for rich:graphValidator fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java 2011-08-12 12:19:48 UTC (rev 22627)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java 2011-08-12 12:20:35 UTC (rev 22628)
@@ -135,7 +135,7 @@
// wait for success validation
waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
+ .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf span.rf-msgs-sum")))
.text("Action sucessfully done!"));
}
13 years, 4 months
JBoss Rich Faces SVN: r22627 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-12 08:19:48 -0400 (Fri, 12 Aug 2011)
New Revision: 22627
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
Log:
issue tracking info updated
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-08-11 15:44:32 UTC (rev 22626)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-08-12 12:19:48 UTC (rev 22627)
@@ -34,6 +34,7 @@
import org.jboss.test.selenium.request.RequestType;
import org.richfaces.ExpandMode;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.model.DataScroller;
import org.richfaces.tests.metamer.ftest.richDataScroller.PaginationTester;
@@ -88,6 +89,7 @@
@Test
@Use(field = "expandMode", enumeration = true)
+ @IssueTracking("https://issues.jboss.org/browse/RF-11301")
public void testScroller() {
paginationTester.testNumberedPages();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java 2011-08-11 15:44:32 UTC (rev 22626)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java 2011-08-12 12:19:48 UTC (rev 22627)
@@ -69,7 +69,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RFPL-1518")
+ @IssueTracking("https://issues.jboss.org/browse/RF-11302")
public void testSorting() {
attributes.setRows(rows);
attributes.setSortMode(sortMode);
13 years, 4 months
JBoss Rich Faces SVN: r22626 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-11 11:44:32 -0400 (Thu, 11 Aug 2011)
New Revision: 22626
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
Log:
added issue tracking information
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2011-08-11 15:28:23 UTC (rev 22625)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2011-08-11 15:44:32 UTC (rev 22626)
@@ -26,6 +26,7 @@
import java.net.URL;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -58,6 +59,7 @@
// list of called test methods
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2011-08-11 15:28:23 UTC (rev 22625)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2011-08-11 15:44:32 UTC (rev 22626)
@@ -26,6 +26,7 @@
import java.net.URL;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -58,6 +59,7 @@
// list of called test methods
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2011-08-11 15:28:23 UTC (rev 22625)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2011-08-11 15:44:32 UTC (rev 22626)
@@ -26,6 +26,7 @@
import java.net.URL;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -58,6 +59,7 @@
// list of called test methods
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11298")
public void testFor() {
super.testFor();
}
13 years, 4 months
JBoss Rich Faces SVN: r22625 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-11 11:28:23 -0400 (Thu, 11 Aug 2011)
New Revision: 22625
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
Log:
added issue tracking
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-08-11 15:01:12 UTC (rev 22624)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-08-11 15:28:23 UTC (rev 22625)
@@ -31,6 +31,7 @@
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -87,6 +88,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11296")
public void testAccesskey() {
testHtmlAttribute(button, "accesskey", "b");
}
13 years, 4 months
JBoss Rich Faces SVN: r22624 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-11 11:01:12 -0400 (Thu, 11 Aug 2011)
New Revision: 22624
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
Removed:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java
Log:
test for rich:graphValidator renamed
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java 2011-08-11 14:54:08 UTC (rev 22623)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java 2011-08-11 15:01:12 UTC (rev 22624)
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.richGraphValidator;
-
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-
-import java.net.URL;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.jboss.test.selenium.locator.option.OptionValueLocator;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.testng.annotations.Test;
-
-/**
- * Test for page /faces/components/richGraphValidator/all.xhtml
- *
- * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- * @version $Revision$
- */
-public class RichGraphValidatorTest extends AbstractMetamerTest {
-
- private static final String SMILE = ":-)";
-
- private static final String[] GROUPS = {"", "javax.validation.groups.Default",
- "org.richfaces.tests.metamer.validation.groups.ValidationGroupAllComponents",
- "org.richfaces.tests.metamer.validation.groups.ValidationGroupBooleanInputs",
- "org.richfaces.tests.metamer.validation.groups.ValidationGroupNumericInputs"};
-
- private static final int BOOLEAN_INPUTS_GROUP = 3;
- private static final int NUMERIC_INPUTS_GROUP = 4;
-
- private GraphValidatorAttributes attributes = new GraphValidatorAttributes();
-
- private JQueryLocator autocomplete = pjq("input[id$=autocompleteInput]");
- private JQueryLocator inputSecret = pjq("input[id$=inputSecret]");
- private JQueryLocator inputText = pjq("input[id$=inputText]");
- private JQueryLocator calendar = pjq("input[id$=calendarInputDate]");
- private JQueryLocator inputTextArea = pjq("textarea[id$=inputTextarea]");
- private JQueryLocator inplaceSelect = pjq("span[id$=inplaceSelect] input[id$=inplaceSelectFocus]");
- private JQueryLocator inplaceInput = pjq("span[id$=inplaceInput] input[id$=inplaceInputFocus]");
- private JQueryLocator selectManyCheckbox = pjq("input[id$=selectManyCheckbox:4]");
- private JQueryLocator selectManyListbox = pjq("select[id$=selectManyListbox]");
- private JQueryLocator selectManyMenu = pjq("select[id$=selectManyMenu]");
- private JQueryLocator selectBooleanCheckbox = pjq("input[id$=selectBooleanCheckbox]");
- private JQueryLocator inputNumberSliderInput = pjq("span[id$=inputNumberSlider] input.rf-insl-inp");
- private JQueryLocator inputNumberSpinnerInput = pjq("span[id$=inputNumberSpinner] input.rf-insp-inp");
-
- private JQueryLocator globalMessagesContainer = pjq("span[id$=_globalMessages]");
- private JQueryLocator errorMessagesContainer = pjq("span.rf-msgs");
- private JQueryLocator header = pjq("div.rf-p-hdr[id$=gv1h_header]");
-
- private OptionValueLocator optionSmile = new OptionValueLocator(SMILE);
-
- private JQueryLocator applyChangesBtn = pjq("input[id$=applyChanges]");
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richGraphValidator/all.xhtml");
- }
-
- @Test
- public void testGroups() {
- for (int i=0; i<GROUPS.length; ++i) {
- attributes.setGroups(GROUPS[i]);
-
- setAllValidatedFields();
-
- if (i == BOOLEAN_INPUTS_GROUP) {
- // only Boolean inputs validated
- allFieldsSetToWrong();
- selenium.check(selectBooleanCheckbox, true);
- } else if (i == NUMERIC_INPUTS_GROUP) {
- // only numeric inputs validated
- allFieldsSetToWrong();
- selenium.type(inputNumberSliderInput, "10");
- selenium.type(inputNumberSpinnerInput, "10");
- }
-
- // let's submit the form
- selenium.click(applyChangesBtn);
-
- // wait for success validation
- waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf span.rf-msgs-sum")))
- .text("Action sucessfully done!"));
- }
- }
-
- @Test
- public void testSummary() {
- String msg = "My own validation message!";
- attributes.setSummary(msg);
-
- setAllValidatedFields();
- allFieldsSetToWrong();
-
- selenium.click(applyChangesBtn);
-
- waitGui.until(textEquals
- .locator(errorMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
- .text(msg));
- }
-
- @Test
- public void testValue() {
-
- attributes.setValue("testValue");
-
- setAllValidatedFields();
-
- // let's submit the form
- selenium.click(applyChangesBtn);
-
- // wait for success validation
- waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
- .text("Action sucessfully done!"));
- }
-
- @Test
- public void testRendered() {
- setAllValidatedFields();
-
- attributes.setRendered(Boolean.FALSE);
-
- waitGui.until(isNotDisplayed.locator(header));
- }
-
- private void setAllValidatedFields() {
- // inputSecret don't keed entered value after submit
- selenium.type(inputSecret, SMILE);
-
- // input returning List/Set are by default without any element checked
- selenium.check(selectManyCheckbox, true);
- selenium.select(selectManyListbox, optionSmile);
- selenium.select(selectManyMenu, optionSmile);
- }
-
- private void allFieldsSetToWrong() {
- String wrongString = "---";
- SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy");
- String wrongDate = sdf.format(new Date(System.currentTimeMillis() + 24*60*60*1000));
-
- selenium.type(inplaceSelect, wrongString);
- selenium.type(inplaceInput, wrongString);
- selenium.type(inputNumberSpinnerInput, "10");
- selenium.check(selectBooleanCheckbox, false);
- selenium.type(inputSecret, wrongString);
-
- selenium.type(inputNumberSliderInput, "15");
- selenium.type(inputNumberSpinnerInput, "15");
- selenium.type(autocomplete, wrongString);
- selenium.type(inputText, wrongString);
- selenium.type(calendar, wrongDate);
- selenium.type(inputTextArea, wrongString);
- }
-}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/TestRichGraphValidator.java 2011-08-11 15:01:12 UTC (rev 22624)
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richGraphValidator;
+
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.option.OptionValueLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test for page /faces/components/richGraphValidator/all.xhtml
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision: 22622 $
+ */
+public class TestRichGraphValidator extends AbstractMetamerTest {
+
+ private static final String SMILE = ":-)";
+
+ private static final String[] GROUPS = {"", "javax.validation.groups.Default",
+ "org.richfaces.tests.metamer.validation.groups.ValidationGroupAllComponents",
+ "org.richfaces.tests.metamer.validation.groups.ValidationGroupBooleanInputs",
+ "org.richfaces.tests.metamer.validation.groups.ValidationGroupNumericInputs"};
+
+ private static final int BOOLEAN_INPUTS_GROUP = 3;
+ private static final int NUMERIC_INPUTS_GROUP = 4;
+
+ private GraphValidatorAttributes attributes = new GraphValidatorAttributes();
+
+ private JQueryLocator autocomplete = pjq("input[id$=autocompleteInput]");
+ private JQueryLocator inputSecret = pjq("input[id$=inputSecret]");
+ private JQueryLocator inputText = pjq("input[id$=inputText]");
+ private JQueryLocator calendar = pjq("input[id$=calendarInputDate]");
+ private JQueryLocator inputTextArea = pjq("textarea[id$=inputTextarea]");
+ private JQueryLocator inplaceSelect = pjq("span[id$=inplaceSelect] input[id$=inplaceSelectFocus]");
+ private JQueryLocator inplaceInput = pjq("span[id$=inplaceInput] input[id$=inplaceInputFocus]");
+ private JQueryLocator selectManyCheckbox = pjq("input[id$=selectManyCheckbox:4]");
+ private JQueryLocator selectManyListbox = pjq("select[id$=selectManyListbox]");
+ private JQueryLocator selectManyMenu = pjq("select[id$=selectManyMenu]");
+ private JQueryLocator selectBooleanCheckbox = pjq("input[id$=selectBooleanCheckbox]");
+ private JQueryLocator inputNumberSliderInput = pjq("span[id$=inputNumberSlider] input.rf-insl-inp");
+ private JQueryLocator inputNumberSpinnerInput = pjq("span[id$=inputNumberSpinner] input.rf-insp-inp");
+
+ private JQueryLocator globalMessagesContainer = pjq("span[id$=_globalMessages]");
+ private JQueryLocator errorMessagesContainer = pjq("span.rf-msgs");
+ private JQueryLocator header = pjq("div.rf-p-hdr[id$=gv1h_header]");
+
+ private OptionValueLocator optionSmile = new OptionValueLocator(SMILE);
+
+ private JQueryLocator applyChangesBtn = pjq("input[id$=applyChanges]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richGraphValidator/all.xhtml");
+ }
+
+ @Test
+ public void testGroups() {
+ for (int i=0; i<GROUPS.length; ++i) {
+ attributes.setGroups(GROUPS[i]);
+
+ setAllValidatedFields();
+
+ if (i == BOOLEAN_INPUTS_GROUP) {
+ // only Boolean inputs validated
+ allFieldsSetToWrong();
+ selenium.check(selectBooleanCheckbox, true);
+ } else if (i == NUMERIC_INPUTS_GROUP) {
+ // only numeric inputs validated
+ allFieldsSetToWrong();
+ selenium.type(inputNumberSliderInput, "10");
+ selenium.type(inputNumberSpinnerInput, "10");
+ }
+
+ // let's submit the form
+ selenium.click(applyChangesBtn);
+
+ // wait for success validation
+ waitGui.until(textEquals
+ .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf span.rf-msgs-sum")))
+ .text("Action sucessfully done!"));
+ }
+ }
+
+ @Test
+ public void testSummary() {
+ String msg = "My own validation message!";
+ attributes.setSummary(msg);
+
+ setAllValidatedFields();
+ allFieldsSetToWrong();
+
+ selenium.click(applyChangesBtn);
+
+ waitGui.until(textEquals
+ .locator(errorMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
+ .text(msg));
+ }
+
+ @Test
+ public void testValue() {
+
+ attributes.setValue("testValue");
+
+ setAllValidatedFields();
+
+ // let's submit the form
+ selenium.click(applyChangesBtn);
+
+ // wait for success validation
+ waitGui.until(textEquals
+ .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
+ .text("Action sucessfully done!"));
+ }
+
+ @Test
+ public void testRendered() {
+ setAllValidatedFields();
+
+ attributes.setRendered(Boolean.FALSE);
+
+ waitGui.until(isNotDisplayed.locator(header));
+ }
+
+ private void setAllValidatedFields() {
+ // inputSecret don't keed entered value after submit
+ selenium.type(inputSecret, SMILE);
+
+ // input returning List/Set are by default without any element checked
+ selenium.check(selectManyCheckbox, true);
+ selenium.select(selectManyListbox, optionSmile);
+ selenium.select(selectManyMenu, optionSmile);
+ }
+
+ private void allFieldsSetToWrong() {
+ String wrongString = "---";
+ SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy");
+ String wrongDate = sdf.format(new Date(System.currentTimeMillis() + 24*60*60*1000));
+
+ selenium.type(inplaceSelect, wrongString);
+ selenium.type(inplaceInput, wrongString);
+ selenium.type(inputNumberSpinnerInput, "10");
+ selenium.check(selectBooleanCheckbox, false);
+ selenium.type(inputSecret, wrongString);
+
+ selenium.type(inputNumberSliderInput, "15");
+ selenium.type(inputNumberSpinnerInput, "15");
+ selenium.type(autocomplete, wrongString);
+ selenium.type(inputText, wrongString);
+ selenium.type(calendar, wrongDate);
+ selenium.type(inputTextArea, wrongString);
+ }
+}
13 years, 4 months
JBoss Rich Faces SVN: r22623 - modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-11 10:54:08 -0400 (Thu, 11 Aug 2011)
New Revision: 22623
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml
Log:
page with graph validator fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml 2011-08-11 14:28:22 UTC (rev 22622)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml 2011-08-11 14:54:08 UTC (rev 22623)
@@ -165,7 +165,7 @@
&& richGraphValidatorBean.attributes['summary'].value!=''}" >
<rich:graphValidator id="gv2"
value="#{richGraphValidatorBean}"
- groups="#{richGraphValidatorBean.attributes['groups'].value}"
+ groups="#{richGraphValidatorBean.validationGroups}"
rendered="#{richGraphValidatorBean.attributes['rendered'].value}"
summary="#{richGraphValidatorBean.attributes['summary'].value}"
type="#{richGraphValidatorBean.attributes['type'].value}" >
13 years, 4 months
JBoss Rich Faces SVN: r22622 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-08-11 10:28:22 -0400 (Thu, 11 Aug 2011)
New Revision: 22622
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java
Log:
testGroups fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java 2011-08-11 14:27:45 UTC (rev 22621)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richGraphValidator/RichGraphValidatorTest.java 2011-08-11 14:28:22 UTC (rev 22622)
@@ -103,7 +103,7 @@
// wait for success validation
waitGui.until(textEquals
- .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-sum")))
+ .locator(globalMessagesContainer.getDescendant(jq("span.rf-msgs-inf span.rf-msgs-sum")))
.text("Action sucessfully done!"));
}
}
13 years, 4 months