JBoss Rich Faces SVN: r8792 - trunk/samples/richfaces-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2008-05-27 18:22:38 -0400 (Tue, 27 May 2008)
New Revision: 8792
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
Log:
set load strategy to DEFAULT in the demo
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-05-27 21:19:37 UTC (rev 8791)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-05-27 22:22:38 UTC (rev 8792)
@@ -29,9 +29,9 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
- <param-value>#{skinBean.skin}</param-value>
+ <param-value> #{skinBean.skin}</param-value>
</context-param>
- <context-param>
+ <context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
@@ -54,11 +54,11 @@
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>ALL</param-value>
+ <param-value>DEFAULT</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>ALL</param-value>
+ <param-value>DEFAULT</param-value>
</context-param>
<filter>
16 years, 7 months
JBoss Rich Faces SVN: r8791 - in trunk: test-applications/jsp/src/main/webapp/pages/Rich and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-05-27 17:19:37 -0400 (Tue, 27 May 2008)
New Revision: 8791
Modified:
trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
Log:
set encodind to avoid http://jira.jboss.com/jira/browse/RF-3557
replace deprecated classes
Modified: trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2008-05-27 17:46:43 UTC (rev 8790)
+++ trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2008-05-27 21:19:37 UTC (rev 8791)
@@ -23,6 +23,7 @@
import java.util.Iterator;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
@@ -124,9 +125,9 @@
}
//TODO UIInput should update the model, not the switchable panel itself
- ValueBinding valueBinding = getValueBinding("value");
+ ValueExpression valueBinding = getValueExpression("value");
if (valueBinding != null) {
- valueBinding.setValue(facesContext, newValue);
+ valueBinding.setValue(facesContext.getELContext(), newValue);
setValue(null);
setLocalValueSet(false);
} else {
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-05-27 17:46:43 UTC (rev 8790)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2008-05-27 21:19:37 UTC (rev 8791)
@@ -3,6 +3,7 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
+<%@page contentType="text/html; charset=UTF-8" %>
<html>
<f:view>
16 years, 7 months
JBoss Rich Faces SVN: r8790 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-05-27 13:46:43 -0400 (Tue, 27 May 2008)
New Revision: 8790
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
restored the version erased by rename folder commit
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-05-27 17:08:13 UTC (rev 8789)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-05-27 17:46:43 UTC (rev 8790)
@@ -62,14 +62,41 @@
selenium.type(predefinedCBId + "comboboxField", "Hunt");
selenium.typeKeys(predefinedCBId + "comboboxField", "Hunt");
- Assert.assertTrue(isVisibleById(predefinedCBId + "list"), "Component pop-up should show up on click");
+ Assert.assertTrue(isVisibleById(predefinedCBId + "list"), "Component's pop-up must show up on key typing");
clickById(predefinedCBId + "list");
- Assert.assertFalse(isVisibleById(predefinedCBId + "list"), "Component pop-up has to be closed");
+ Assert.assertFalse(isVisibleById(predefinedCBId + "list"), "Component's pop-up has to be closed");
Assert.assertEquals(getValue(predefinedCBId), "Hunter");
- delay(2000);
+ writeStatus("check a combobox with dynamic suggestions list");
+
+ clickById(selectItemsCBId);
+
+ writeStatus("verify \"directInputSuggestions\" component's attribute");
+
+ writeStatus("type \"O\"");
+
+ selenium.type(selectItemsCBId + "comboboxField", "O");
+ selenium.typeKeys(selectItemsCBId + "comboboxField", "O");
+
+ Assert.assertTrue(isVisibleById(selectItemsCBId + "list"), "Component's pop-up must show up on key typing");
+ Assert.assertEquals(getValue(selectItemsCBId), "Oak");
+
+ writeStatus("check a combobox with a simple String list as suggestions list");
+
+ clickById(suggestionValuesCBId);
+ writeStatus("type \"Ma\"");
+
+ selenium.type(suggestionValuesCBId + "comboboxField", "Ma");
+ selenium.typeKeys(suggestionValuesCBId + "comboboxField", "Ma");
+
+ Assert.assertTrue(isVisibleById(suggestionValuesCBId + "list"), "Component's pop-up must show up on key typing");
+
+ clickById(suggestionValuesCBId + "list");
+
+ Assert.assertFalse(isVisibleById(suggestionValuesCBId + "list"), "Component's pop-up has to be closed");
+ Assert.assertEquals(getValue(suggestionValuesCBId), "Maple");
}
/**
@@ -81,8 +108,8 @@
return runScript("$('" + clientId + "comboboxValue').value;");
}
- public String getTestUrl() {
- return "/faces/pages/comboBox/comboBoxTest.xhtml";
- }
+ public String getTestUrl() {
+ return "/faces/pages/comboBox/comboBoxTest.xhtml";
+ }
-}
+}
\ No newline at end of file
16 years, 7 months
JBoss Rich Faces SVN: r8789 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/panelMenu and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-05-27 13:08:13 -0400 (Tue, 27 May 2008)
New Revision: 8789
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java
Log:
Selenium: Fixed panel menu test.
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-05-27 16:43:06 UTC (rev 8788)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-05-27 17:08:13 UTC (rev 8789)
@@ -26,6 +26,8 @@
public class RichPanelTestBean {
private String value;
private int value2;
+ private Object panelValue;
+ private Object panelValue2;
public RichPanelTestBean() {
value = "";
@@ -69,5 +71,28 @@
public void setValue2(int value2) {
this.value2 = value2;
}
+
+ public Object getPanelValue() {
+ return panelValue;
+ }
+ public void setPanelValue(Object panelValue) {
+ this.panelValue = panelValue;
+ }
+
+ public void cleanValues(ActionEvent event) {
+ value = "";
+ value2 = 0;
+ panelValue = null;
+ panelValue2 = null;
+ }
+
+ public Object getPanelValue2() {
+ return panelValue2;
+ }
+
+ public void setPanelValue2(Object panelValue2) {
+ this.panelValue2 = panelValue2;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml 2008-05-27 16:43:06 UTC (rev 8788)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/panelMenu/panelMenuTest.xhtml 2008-05-27 17:08:13 UTC (rev 8789)
@@ -16,7 +16,7 @@
}
</ui:define>
<ui:define name="component">
- <h:form id="_form">
+ <h:form id="_form1" >
<h:panelGroup layout="block" styleClass="component_div" >
<b>Multiple</b>
<rich:panelMenu id="pMenu" >
@@ -24,7 +24,8 @@
label="Ajax group"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"
- reRender="_value,_value2" >
+ reRender="_value,_value2"
+ value="#{panelBean.panelValue2}" >
<rich:panelMenuItem id="pItem1"
label="Item 1"
action="#{panelBean.action1}"
@@ -33,7 +34,8 @@
<rich:panelMenuGroup id="pGroup2" expandMode="server"
label="Server group"
action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}" >
+ actionListener="#{panelBean.actionListener}"
+ value="#{panelBean.panelValue}" >
<rich:panelMenuItem id="pItem2"
label="Item 2" />
</rich:panelMenuGroup>
@@ -49,7 +51,9 @@
</rich:panelMenuGroup>
</rich:panelMenu>
</h:panelGroup>
-
+ </h:form>
+
+ <h:form id="_form2" >
<h:panelGroup layout="block" styleClass="component_div" >
<b>Single</b>
<rich:panelMenu id="pMenu_single" expandSingle="true" >
@@ -57,7 +61,8 @@
label="Ajax group"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"
- reRender="_value,_value2" >
+ reRender="_value,_value2"
+ value="#{panelBean.panelValue2}" >
<rich:panelMenuItem id="pItem1_single"
label="Item 1"
action="#{panelBean.action2}"
@@ -66,7 +71,8 @@
<rich:panelMenuGroup id="pGroup2_single" expandMode="server"
label="Server group"
action="#{panelBean.increment}"
- actionListener="#{panelBean.actionListener}" >
+ actionListener="#{panelBean.actionListener}"
+ value="#{panelBean.panelValue}" >
<rich:panelMenuItem id="pItem2_single"
label="Item 2" />
</rich:panelMenuGroup>
@@ -82,12 +88,13 @@
</rich:panelMenuGroup>
</rich:panelMenu>
</h:panelGroup>
+ <a4j:commandButton value="Clean values" id="clean" actionListener="#{panelBean.cleanValues}" ajaxSingle="true" />
+ </h:form>
<br/>
- <h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
- <h:outputText value="#{panelBean.value2}" id="_value2"></h:outputText>
- <br/>
- </h:form>
+ <h:outputText value="#{panelBean.value}" id="_value" />
+ <h:outputText value="#{panelBean.value2}" id="_value2" />
+ <br/>
</ui:define>
</ui:composition>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-05-27 16:43:06 UTC (rev 8788)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-05-27 17:08:13 UTC (rev 8789)
@@ -46,7 +46,8 @@
<h:panelGroup layout="block" styleClass="component_div" >
<rich:togglePanel id="panel_server" switchType="server" initialState="one"
- stateOrder="one,two">
+ stateOrder="one,two"
+ value="#{panelBean.panelValue}" >
<f:facet name="one">
<h:outputText id="server_state_one" value="State One" />
</f:facet>
@@ -100,7 +101,8 @@
<h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
<h:outputText value="#{panelBean.value2}" id="_value2"></h:outputText>
</a4j:outputPanel>
- <br/>
+ <br/>
+ <a4j:commandButton value="Clean values" id="clean" actionListener="#{panelBean.cleanValues}" ajaxSingle="true" />
</h:form>
</ui:define>
</ui:composition>
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-05-27 16:43:06 UTC (rev 8788)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-05-27 17:08:13 UTC (rev 8789)
@@ -51,10 +51,10 @@
private void _testPanelMenuComponent(Templates template) {
renderPage(getTestUrl(), template);
- String parentId = getParentId() + "_form:";
+ String parentId = getParentId() + "_form1:";
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
String ajaxGroup = "tablehide" + parentId + "pGroup1";
String serverGroup = "tablehide" + parentId + "pGroup2";
@@ -69,16 +69,16 @@
writeStatus("Click on ajax group");
clickById(ajaxGroup);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
- AssertTextEquals(outputId, "1");
+ AssertTextEquals(value1Id, "pGroup1");
+ AssertTextEquals(value2Id, "1");
Assert.assertTrue(isVisibleById(ajaxItem));
Assert.assertFalse(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
writeStatus("Click on server group");
clickCommandAndWait(serverGroup);
- AssertValueEquals(inputId, "pGroup2");
- AssertTextEquals(outputId, "2");
+ AssertTextEquals(value1Id, "pGroup2");
+ AssertTextEquals(value2Id, "2");
Assert.assertTrue(isVisibleById(ajaxItem));
Assert.assertTrue(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
@@ -86,8 +86,8 @@
writeStatus("Click on ajax group");
clickById(ajaxGroup);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
- AssertTextEquals(outputId, "3");
+ AssertTextEquals(value1Id, "pGroup1");
+ AssertTextEquals(value2Id, "3");
Assert.assertFalse(isVisibleById(ajaxItem));
Assert.assertTrue(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
@@ -95,8 +95,8 @@
writeStatus("Click on server group");
clickCommandAndWait(serverGroup);
- AssertValueEquals(inputId, "pGroup2");
- AssertTextEquals(outputId, "4");
+ AssertTextEquals(value1Id, "pGroup2");
+ AssertTextEquals(value2Id, "4");
Assert.assertFalse(isVisibleById(ajaxItem));
Assert.assertFalse(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
@@ -116,14 +116,16 @@
writeStatus("Click on disabled client group");
clickById(disabledGroup);
Assert.assertFalse(isVisibleById(disabledItem));
+
+ tearDown();
}
private void _testPanelMenuComponentSingleMode(Templates template) {
renderPage(getTestUrl(), template);
- String parentId = getParentId() + "_form:";
+ String parentId = getParentId() + "_form2:";
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
String ajaxGroup = "tablehide" + parentId + "pGroup1_single";
String serverGroup = "tablehide" + parentId + "pGroup2_single";
@@ -138,16 +140,16 @@
writeStatus("Click on ajax group");
clickById(ajaxGroup);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
- AssertTextEquals(outputId, "1");
+ AssertTextEquals(value1Id, "pGroup1_single");
+ AssertTextEquals(value2Id, "1");
Assert.assertTrue(isVisibleById(ajaxItem));
Assert.assertFalse(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
writeStatus("Click on server group");
clickCommandAndWait(serverGroup);
- AssertValueEquals(inputId, "pGroup2_single");
- AssertTextEquals(outputId, "2");
+ AssertTextEquals(value1Id, "pGroup2_single");
+ AssertTextEquals(value2Id, "2");
Assert.assertFalse(isVisibleById(ajaxItem));
Assert.assertTrue(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
@@ -155,16 +157,16 @@
writeStatus("Click on ajax group");
clickById(ajaxGroup);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
- AssertTextEquals(outputId, "3");
+ AssertTextEquals(value1Id, "pGroup1_single");
+ AssertTextEquals(value2Id, "3");
Assert.assertTrue(isVisibleById(ajaxItem));
Assert.assertFalse(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
writeStatus("Click on server group");
clickCommandAndWait(serverGroup);
- AssertValueEquals(inputId, "pGroup2_single");
- AssertTextEquals(outputId, "4");
+ AssertTextEquals(value1Id, "pGroup2_single");
+ AssertTextEquals(value2Id, "4");
Assert.assertFalse(isVisibleById(ajaxItem));
Assert.assertTrue(isVisibleById(serverItem));
Assert.assertFalse(isVisibleById(clientItem));
@@ -184,44 +186,54 @@
writeStatus("Click on disabled client group");
clickById(disabledGroup);
Assert.assertFalse(isVisibleById(disabledItem));
+
+ tearDown();
}
private void _testPanelMenuItemAction(Templates template) {
renderPage(getTestUrl(), template);
- String parentId = getParentId() + "_form:";
+ String parentId = getParentId() + "_form";
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
+ String value1Id = getParentId() + "_value";
+ String value2Id = getParentId() + "_value2";
- String group = "tablehide" + parentId + "pGroup1";
- String groupSingle = "tablehide" + parentId + "pGroup1_single";
+ String group = "tablehide" + parentId + "1:pGroup1";
+ String groupSingle = "tablehide" + parentId + "2:pGroup1_single";
- String item = "tablehide" + parentId + "pItem1";
- String itemSingle = "tablehide" + parentId + "pItem1_single";
+ String item = "tablehide" + parentId + "1:pItem1";
+ String itemSingle = "tablehide" + parentId + "2:pItem1_single";
writeStatus("Click on ajax group");
clickById(group);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
+ AssertTextEquals(value1Id, "pGroup1");
writeStatus("Click on ajax group");
clickById(groupSingle);
waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
+ AssertTextEquals(value1Id, "pGroup1_single");
writeStatus("Click on server group");
clickCommandAndWait(item);
- AssertValueEquals(inputId, "pItem1");
- AssertTextEquals(outputId, "1");
+ AssertTextEquals(value1Id, "pItem1");
+ AssertTextEquals(value2Id, "1");
writeStatus("Click on server group");
clickCommandAndWait(itemSingle);
- AssertValueEquals(inputId, "pItem1_single");
- AssertTextEquals(outputId, "2");
+ AssertTextEquals(value1Id, "pItem1_single");
+ AssertTextEquals(value2Id, "2");
+
+ tearDown();
}
public String getTestUrl() {
return "/faces/pages/panelMenu/panelMenuTest.xhtml";
}
+
+ private void tearDown() {
+ writeStatus("Clean bean values");
+ clickById(getParentId() + "_form2:clean");
+ waitForAjaxCompletion();
+ }
}
16 years, 7 months
JBoss Rich Faces SVN: r8788 - trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-27 12:43:06 -0400 (Tue, 27 May 2008)
New Revision: 8788
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
Log:
component list sorting
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-05-27 16:31:17 UTC (rev 8787)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-05-27 16:43:06 UTC (rev 8788)
@@ -1,7 +1,10 @@
package org.ajax4jsf.bean;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
public class IndexBean {
@@ -31,33 +34,32 @@
return link;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof ComponentItem)) {
- return false;
- }
-
- if (obj == null) {
- return true;
- }
- return name.equals(((ComponentItem)obj).name);
- }
-
};
+ private void sortList () {
+ String [] names = new String [list.size()];
+ Map<String, ComponentItem> map = new HashMap<String, ComponentItem>();
+ for (int i=0; i < list.size(); i++) {
+ names [i] = list.get(i).name;
+ map.put(list.get(i).name, list.get(i));
+ }
+ Arrays.sort(names);
+ list = new ArrayList<ComponentItem>();
+ for (String name : names) {
+ list.add(map.get(name));
+ }
+ }
+
public IndexBean() {
list.add(new ComponentItem("<a4j:commandButton>", "ajaxCommandButton/ajaxButtonTest.xhtml"));
list.add(new ComponentItem("<a4j:commandLink>", "ajaxCommandLink/ajaxLinkTest.xhtml"));
list.add(new ComponentItem("<a4j:poll>", "ajaxPoll/ajaxPollTest.xhtml"));
list.add(new ComponentItem("<a4j:region>", "ajaxRegion/ajaxRegionTest.xhtml"));
- list.add(new ComponentItem("<rich:calendar>", "ajaxStatus/ajaxStatusTest.xhtml"));
- list.add(new ComponentItem("<rich:combobox>", "calendar/calendarTest.xhtml"));
- list.add(new ComponentItem("<rich:contextMenu>", "comboBox/comboBoxTest.xhtml"));
- list.add(new ComponentItem("<rich:dataTable>", "contextMenu/contextMenu.xhtml"));
- list.add(new ComponentItem("<rich:dropDownMenu>", "dataTable/dataTableTest.xhtml"));
+ list.add(new ComponentItem("<rich:calendar>", "calendar/calendarTest.xhtml"));
+ list.add(new ComponentItem("<rich:combobox>", "comboBox/comboBoxTest.xhtml"));
+ list.add(new ComponentItem("<rich:contextMenu>", "contextMenu/contextMenu.xhtml"));
+ list.add(new ComponentItem("<rich:dataTable>", "dataTable/dataTableTest.xhtml"));
+ list.add(new ComponentItem("<rich:dropDownMenu>", "dropDownMenu/dropDownMenuTest.xhtml"));
list.add(new ComponentItem("<rich:inplaceSelect>", "inplaceSelect/inplaceSelectTest.xhtml"));
list.add(new ComponentItem("<rich:inputNumberSpinner>", "inputNumberSpinner/inputNumberSpinnerTest.xhtml"));
list.add(new ComponentItem("<rich:jsFunction>", "jsFunction/jsFunctionTest.xhtml"));
@@ -73,6 +75,8 @@
list.add(new ComponentItem("<rich:tabPanel>", "tabPanel/tabPanelTest.xhtml"));
list.add(new ComponentItem("<rich:togglePanel>", "togglePanel/togglePanelTest.xhtml"));
+ sortList();
+
}
/**
16 years, 7 months
JBoss Rich Faces SVN: r8787 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-05-27 12:31:17 -0400 (Tue, 27 May 2008)
New Revision: 8787
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
Log:
Fix toggle panel test.
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-05-27 16:21:24 UTC (rev 8786)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-05-27 16:31:17 UTC (rev 8787)
@@ -76,6 +76,8 @@
String oneFacet = parentId + "ajax_state_one";
String twoFacet = parentId + "ajax_state_two";
+
+ String cleanButton = parentId + "clean";
writeStatus("Click on ajax controlNext");
clickById(controlNext);
@@ -185,6 +187,10 @@
clickById(controlTwo);
Assert.assertTrue(isVisibleById(twoFacet));
Assert.assertFalse(isVisibleById(oneFacet));
+
+ writeStatus("Clean bean values");
+ clickById(cleanButton);
+ waitForAjaxCompletion();
}
public String getTestUrl() {
16 years, 7 months
JBoss Rich Faces SVN: r8786 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/ajaxCommandLink and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-27 12:21:24 -0400 (Tue, 27 May 2008)
New Revision: 8786
Removed:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkDescription.xhtml
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
ajax link test
Deleted: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonDescription.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonDescription.xhtml 2008-05-27 16:00:11 UTC (rev 8785)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonDescription.xhtml 2008-05-27 16:21:24 UTC (rev 8786)
@@ -1,13 +0,0 @@
-<html>
-<table border="1" style="border-color: #F1EEE9" cellpadding="5" cellspacing="0">
-<tr><th></th><th>Action</th><th>Result</th></tr>
-<tr><td>1</td><td>Click 1st button</td><td>Input value == 3</td></tr>
-<tr><td>2</td><td>Click 1st button</td><td>Input value == 6</td></tr>
-<tr><td>3</td><td>Click 2nd button</td><td>Input value == 6</td></tr>
-<tr><td>4</td><td>Click 3td button</td><td>Input value == 6</td></tr>
-<tr><td>5</td><td>Click 4th button</td><td>Input value == 1</td></tr>
-<tr><td>6</td><td>Click 5th button</td><td>Input value == 2</td></tr>
-<tr><td>7</td><td>Click 1st button</td><td>Input value == 5</td></tr>
-<tr><td>8</td><td>Click 3th button</td><td>Input value == 5</td></tr>
-</table>
-</html>
\ No newline at end of file
Deleted: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkDescription.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-05-27 16:00:11 UTC (rev 8785)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-05-27 16:21:24 UTC (rev 8786)
@@ -3,11 +3,13 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.richfaces.Templates;
+import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
+
public class AjaxCommandLinkTest extends SeleniumTestBase implements RichSeleniumTest {
public AjaxCommandLinkTest() {
@@ -39,54 +41,88 @@
}
private void _testAjaxCommandLinkComponent(Templates template) {
- renderPage(getTestUrl(), template);
-
- String parentId = getParentId() + "_form:";
-
- String LinkId = parentId + "l1";
- String inputId = parentId + "_value";
-
- writeStatus("Click link 1 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345");
-
- writeStatus("Click link 1 again: ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- LinkId = parentId + "l2";
-
- writeStatus("Click link 2 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "1234523455");
-
- LinkId = parentId + "l3";
-
- writeStatus("Click link 3 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "1234523455");
-
- LinkId = parentId + "l4";
-
- writeStatus("Click link 4 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
- LinkId = parentId + "l5";
-
- writeStatus("Click link 5 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
+ renderPage(getTestUrl(), template);
+
+ String parentId = getParentId() + "_form:";
+
+ String linkId = parentId + "l1";
+ boolean ajaxSingle = false;
+ boolean immediate = false;
+ writeStatus("Click link 1");
+ setValidation(true);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, true);
+
+ linkId = parentId + "l2";
+ ajaxSingle = false;
+ immediate = false;
+ writeStatus("Click link 2");
+ setValidation(false);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, false, ajaxSingle, immediate, false, false, false, false);
+
+ linkId = parentId + "l3";
+ ajaxSingle = false;
+ immediate = true;
+ writeStatus("Click link 3");
+ setValidation(true);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, false);
+
+ linkId = parentId + "l4";
+ ajaxSingle = true;
+ immediate = true;
+ writeStatus("Click link 4");
+ setValidation(false);
+ clickById(linkId);
+ waitForAjaxCompletion();
+ waitForOnCompleteHndler();
+ checkButton(linkId, true, ajaxSingle, immediate, true, true, true, false);
+
+
}
+
+ private void setValidation(boolean success) {
+ StringBuffer buffer = new StringBuffer("setValidation(");
+ buffer.append(success);
+ buffer.append(");");
+ runScript(buffer.toString());
+ }
+
+ private void waitForOnCompleteHndler () {
+ waiteForCondition("_onCompleteHandler == true;", 3000);
+ runScript("_onCompleteHandler = false;");
+ }
+
+ private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean testInput) {
+ writeStatus("Checking link...");
+ StringBuffer buffer = new StringBuffer("checkLink('");
+ buffer.append(id);
+ buffer.append("',");
+ buffer.append(testData);
+ buffer.append(",");
+ buffer.append(testAction);
+ buffer.append(",");
+ buffer.append(testActionListener);
+ buffer.append(",");
+ buffer.append(testFListener);
+ buffer.append(",");
+ buffer.append(testInput);
+ buffer.append(");");
+ String result = runScript(buffer.toString());
+ if (result != null && result.length() > 0) {
+ Assert.fail("<a4j:commandLink> [ajaxSingle="+ajaxSingle+" ; immediate="+immediate+"] test failure caused by " + result);
+ }
+
+ }
- public String getTestUrl() {
+ public String getTestUrl() {
return "/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml";
}
16 years, 7 months
JBoss Rich Faces SVN: r8785 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/ajaxCommandButton and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-27 12:00:11 -0400 (Tue, 27 May 2008)
New Revision: 8785
Added:
trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/template/dataTable.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanel.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/template/simple.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
Log:
command button test
Added: trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml 2008-05-27 16:00:11 UTC (rev 8785)
@@ -0,0 +1,34 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<hr />
+<h:form id="_Selenium_Test_Template_Form">
+<table style="background-color: #F2F2F2">
+<tr>
+<td>
+Current Template:
+</td>
+<td>
+ <h:selectOneMenu value="#{templateBean.templateId}" id="_Selenium_Test_Template_id">
+ <f:selectItem itemValue="simple" itemLabel="Simple"/>
+ <f:selectItem itemValue="dataTable" itemLabel="DataTable"/>
+ <f:selectItem itemValue="modalPanel" itemLabel="Modal Panel"/>
+ </h:selectOneMenu>
+</td>
+<td>
+ <h:commandLink id="_Selenium_Test_loadTemplate" value="Load"></h:commandLink>
+</td>
+</tr>
+</table>
+</h:form>
+<h:form id="_Selenium_Test_ReRender_Form">
+<div>
+ <a href="#{facesContext.externalContext.requestContextPath}/faces/index.xhtml">Home</a>
+</div>
+<div>
+ <a4j:commandLink ajaxSingle="true" reRender="_Selenium_Test_Common_Grid" value="ReRenderAll" id="_reRender"/>
+</div>
+</h:form>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-05-27 15:41:11 UTC (rev 8784)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-05-27 16:00:11 UTC (rev 8785)
@@ -27,7 +27,7 @@
}
function reRenderAll () {
- document.getElementById('_Selenium_Test_Template_Form:_reRender').onclick();
+ document.getElementById('_Selenium_Test_ReRender_Form:_reRender').onclick();
return;
}
@@ -44,6 +44,7 @@
function writeStatus (mess) {
document.getElementById('_Selenium_Test_Status_Message').value = mess;
}
+
</script>
<style type="text/css">
<ui:insert name="style"/>
@@ -65,34 +66,9 @@
</h:panelGrid>
<div id="_Selenium_Test_ControlPoint2" style="display: none;">Control2</div>
-<hr />
-<h:form id="_Selenium_Test_Template_Form">
-<table style="background-color: #F2F2F2">
-<tr>
-<td>
-Current Template:
-</td>
-<td>
- <h:selectOneMenu value="#{templateBean.templateId}" id="_Selenium_Test_Template_id">
- <f:selectItem itemValue="simple" itemLabel="Simple"/>
- <f:selectItem itemValue="dataTable" itemLabel="DataTable"/>
- <f:selectItem itemValue="modalPanel" itemLabel="Modal Panel"/>
- </h:selectOneMenu>
-</td>
-<td>
- <h:commandLink id="_Selenium_Test_loadTemplate" value="Load"></h:commandLink>
-</td>
-</tr>
-<tr>
-<td>
- <a href="#{facesContext.externalContext.requestContextPath}/faces/index.xhtml">Home</a>
-</td>
-<td>
- <a4j:commandLink ajaxSingle="true" reRender="_Selenium_Test_Common_Grid" value="ReRenderAll" id="_reRender"/>
-</td>
-</tr>
-</table>
-</h:form>
+
+<ui:insert name="control" />
+
<script type="text/javascript">
window.done=false; A4J.AJAX.AddListener(new A4J.AJAX.Listener(function(){window.done=true;}));
</script>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml 2008-05-27 15:41:11 UTC (rev 8784)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml 2008-05-27 16:00:11 UTC (rev 8785)
@@ -20,8 +20,13 @@
<script type="text/javascript">
<!--
var responseData = null;
+ var _onCompleteHandler = false;
+
function onCompleteHandler (data) {
- responseData = data;
+ if (data) {
+ responseData = data;
+ }
+ _onCompleteHandler = true;
}
function checkButton(id, testData ,testAction, testActionListener, testFListener, testInput) {
@@ -45,8 +50,10 @@
responseData = null;
if (b == '') {
writeStatus('Test button id=['+id+'] passed succesfully');
+ markButton(id, true);
}else {
writeStatus('Test button id=['+id+'] failed');
+ markButton(id, false);
}
return b;
}
@@ -57,6 +64,14 @@
}
return true;
}
+
+ function markButton(id, success) {
+ if (success) {
+ document.getElementById(id).style.cssText = 'background-color: green';
+ }else {
+ document.getElementById(id).style.cssText = 'background-color: red';
+ }
+ }
function setValidation(success) {
var i = document.getElementById(getParentId() + '_form:_value');
@@ -68,10 +83,9 @@
}
}
}
-
-->
</script>
-
+
<h:form id="_form">
<table border="1px" cellspacing="0" cellpadding="3">
<thead style="font-size: 13px; color: green; font-style: italic;">
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-05-27 15:41:11 UTC (rev 8784)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-05-27 16:00:11 UTC (rev 8785)
@@ -29,7 +29,8 @@
</rich:togglePanel>
<rich:toggleControl id="ajax_next" for="panel_ajax"
action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Ajax next" />
+ <h:outputText value="Ajax next" />
+ <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"></a4j:ajaxListener>
</rich:toggleControl>
<br />
<rich:toggleControl id="ajax_one" for="panel_ajax" switchToState="one"
@@ -65,8 +66,10 @@
<br />
<rich:toggleControl id="server_two" for="panel_server" switchToState="two"
action="#{panelBean.increment}" actionListener="#{panelBean.actionListener}" >
- <h:outputText value="Server two" />
- </rich:toggleControl>
+ <h:outputText value="Server two" />
+
+ </rich:toggleControl>
+
</h:panelGroup>
<h:panelGroup layout="block" styleClass="component_div" >
Modified: trunk/test-applications/seleniumTest/src/main/webapp/template/dataTable.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/main/webapp/template/simple.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-05-27 15:41:11 UTC (rev 8784)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-05-27 16:00:11 UTC (rev 8785)
@@ -52,6 +52,7 @@
setValidation(true);
clickById(buttonId);
waitForAjaxCompletion();
+ waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, true);
buttonId = parentId + "b2";
@@ -61,6 +62,7 @@
setValidation(false);
clickById(buttonId);
waitForAjaxCompletion();
+ waitForOnCompleteHndler();
checkButton(buttonId, false, ajaxSingle, immediate, false, false, false, false);
buttonId = parentId + "b3";
@@ -70,6 +72,7 @@
setValidation(true);
clickById(buttonId);
waitForAjaxCompletion();
+ waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
buttonId = parentId + "b4";
@@ -79,6 +82,7 @@
setValidation(false);
clickById(buttonId);
waitForAjaxCompletion();
+ waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
@@ -91,6 +95,11 @@
runScript(buffer.toString());
}
+ private void waitForOnCompleteHndler () {
+ waiteForCondition("_onCompleteHandler == true;", 3000);
+ runScript("_onCompleteHandler = false;");
+ }
+
private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean testInput) {
writeStatus("Checking button...");
StringBuffer buffer = new StringBuffer("checkButton('");
16 years, 7 months
JBoss Rich Faces SVN: r8784 - trunk/test-applications/seleniumTest/src/test/testng/unix.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-05-27 11:41:11 -0400 (Tue, 27 May 2008)
New Revision: 8784
Modified:
trunk/test-applications/seleniumTest/src/test/testng/unix/testng.xml
Log:
Fix package names.
Modified: trunk/test-applications/seleniumTest/src/test/testng/unix/testng.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/unix/testng.xml 2008-05-27 14:33:06 UTC (rev 8783)
+++ trunk/test-applications/seleniumTest/src/test/testng/unix/testng.xml 2008-05-27 15:41:11 UTC (rev 8784)
@@ -3,13 +3,13 @@
<test name="FireFoxFunctionalTests">
<parameter name="browser" value="*firefox"/>
<packages>
- <package name="org.richfaces" />
+ <package name="org.richfaces.testng" />
</packages>
</test>
<test name="OperaFunctionalTests">
<parameter name="browser" value="*opera"/>
<packages>
- <package name="org.richfaces" />
+ <package name="org.richfaces.testng" />
</packages>
</test>
</suite>
16 years, 7 months
JBoss Rich Faces SVN: r8783 - trunk/docs/userguide/en/src/main/resources/css.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-05-27 10:33:06 -0400 (Tue, 27 May 2008)
New Revision: 8783
Modified:
trunk/docs/userguide/en/src/main/resources/css/html.css
Log:
http://jira.jboss.com/jira/browse/RF-3189 - width of the page was resized to 80em
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-05-27 14:26:56 UTC (rev 8782)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-05-27 14:33:06 UTC (rev 8783)
@@ -14,7 +14,7 @@
font-size:12px;
line-height:150%;
margin:0pt auto;
-max-width:60em;
+max-width:80em;
padding:0em 2em;
text-align:justify;
}
16 years, 7 months