JBoss Rich Faces SVN: r8161 - trunk/test-applications/jsp/src/main/webapp/InplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-25 07:07:04 -0400 (Fri, 25 Apr 2008)
New Revision: 8161
Modified:
trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
Log:
Add tests for immediate and required
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-04-25 10:21:20 UTC (rev 8160)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-04-25 11:07:04 UTC (rev 8161)
@@ -27,6 +27,8 @@
rendered="#{inplaceSelect.rendered}"
immediate="#{inplaceSelect.immediate}"
binding="#{inplaceSelect.myInplaceSelect}"
+ required="#{inplaceSelect.required}"
+ requiredMessage="#{inplaceSelect.requiredMessage}"
onblur="#{event.onblur}"
onchange="#{event.onchange}"
@@ -139,6 +141,17 @@
<h:commandButton actionListener="#{inplaceSelect.checkBinding}" value="Binding"></h:commandButton>
<h:outputText value = "#{inplaceSelect.bindLabel}"/>
+
+ <h:outputText value="immediate"></h:outputText>
+ <h:selectBooleanCheckbox value="#{inplaceSelect.immediate}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="required"></h:outputText>
+ <h:selectBooleanCheckbox value="#{inplaceSelect.required}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="requiredMessage"></h:outputText>
+ <h:inputText value="#{inplaceSelect.requiredMessage}" onchange="submit();"></h:inputText>
</h:panelGrid>
16 years, 8 months
JBoss Rich Faces SVN: r8160 - trunk/test-applications/jsp/src/main/java/inplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-25 06:21:20 -0400 (Fri, 25 Apr 2008)
New Revision: 8160
Modified:
trunk/test-applications/jsp/src/main/java/inplaceSelect/InplaceSelect.java
Log:
Delete test for selectOnEdit
Modified: trunk/test-applications/jsp/src/main/java/inplaceSelect/InplaceSelect.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/inplaceSelect/InplaceSelect.java 2008-04-25 10:21:08 UTC (rev 8159)
+++ trunk/test-applications/jsp/src/main/java/inplaceSelect/InplaceSelect.java 2008-04-25 10:21:20 UTC (rev 8160)
@@ -19,7 +19,6 @@
private String minSelectWidth;
private boolean openOnEdit;
private boolean rendered;
- private boolean selectOnEdit;
private String selectWidth;
private boolean showControls;
private boolean changedClass;
@@ -42,7 +41,6 @@
value = "errors";
listWidth = "200";
listHeight = "50";
- selectOnEdit = false;
showControls = false;
applyFromControlsOnly = false;
editOnTab = false;
@@ -155,10 +153,6 @@
return rendered;
}
- public boolean isSelectOnEdit() {
- return selectOnEdit;
- }
-
public boolean isShowControls() {
return showControls;
}
@@ -215,10 +209,6 @@
this.rendered = rendered;
}
- public void setSelectOnEdit(boolean selectOnEdit) {
- this.selectOnEdit = selectOnEdit;
- }
-
public void setSelectWidth(String selectWidth) {
this.selectWidth = selectWidth;
}
16 years, 8 months
JBoss Rich Faces SVN: r8159 - trunk/test-applications/facelets/src/main/java/inplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-25 06:21:08 -0400 (Fri, 25 Apr 2008)
New Revision: 8159
Modified:
trunk/test-applications/facelets/src/main/java/inplaceSelect/InplaceSelect.java
Log:
Delete test for selectOnEdit
Modified: trunk/test-applications/facelets/src/main/java/inplaceSelect/InplaceSelect.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/inplaceSelect/InplaceSelect.java 2008-04-25 10:19:10 UTC (rev 8158)
+++ trunk/test-applications/facelets/src/main/java/inplaceSelect/InplaceSelect.java 2008-04-25 10:21:08 UTC (rev 8159)
@@ -19,7 +19,6 @@
private String minSelectWidth;
private boolean openOnEdit;
private boolean rendered;
- private boolean selectOnEdit;
private String selectWidth;
private boolean showControls;
private int tabindex;
@@ -40,7 +39,6 @@
value = "errors";
listWidth = "200";
listHeight = "150";
- selectOnEdit = false;
showControls = false;
applyFromControlsOnly = false;
editOnTab = false;
@@ -151,10 +149,6 @@
return rendered;
}
- public boolean isSelectOnEdit() {
- return selectOnEdit;
- }
-
public boolean isShowControls() {
return showControls;
}
@@ -211,10 +205,6 @@
this.rendered = rendered;
}
- public void setSelectOnEdit(boolean selectOnEdit) {
- this.selectOnEdit = selectOnEdit;
- }
-
public void setSelectWidth(String selectWidth) {
this.selectWidth = selectWidth;
}
16 years, 8 months
JBoss Rich Faces SVN: r8158 - trunk/test-applications/facelets/src/main/webapp/InplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-25 06:19:10 -0400 (Fri, 25 Apr 2008)
New Revision: 8158
Modified:
trunk/test-applications/facelets/src/main/webapp/InplaceSelect/InplaceSelect.xhtml
Log:
Delete test for selectOnEdit
Modified: trunk/test-applications/facelets/src/main/webapp/InplaceSelect/InplaceSelect.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/InplaceSelect/InplaceSelect.xhtml 2008-04-25 10:18:59 UTC (rev 8157)
+++ trunk/test-applications/facelets/src/main/webapp/InplaceSelect/InplaceSelect.xhtml 2008-04-25 10:19:10 UTC (rev 8158)
@@ -14,9 +14,8 @@
defaultLabel="#{inplaceSelect.defaultLabel}"
controlsVerticalPosition="#{inplaceSelect.controlsVerticalPosition}"
controlsHorizontalPosition="#{inplaceSelect.controlsHorizontalPosition}"
- value="#{inplaceSelect.value}" listWidth="#{inplaceSelect.listWidth}"
+ listWidth="#{inplaceSelect.listWidth}"
listHeight="#{inplaceSelect.listHeight}"
- selectOnEdit="#{inplaceSelect.selectOnEdit}"
showControls="#{inplaceSelect.showControls}"
editOnTab="#{inplaceSelect.editOnTab}"
openOnEdit="#{inplaceSelect.openOnEdit}"
@@ -112,10 +111,6 @@
<h:outputText value="tabindex"></h:outputText>
<h:inputText value="#{inplaceSelect.tabindex}" onchange="submit();"></h:inputText>
- <h:outputText value="selectOnEdit"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceSelect.selectOnEdit}"
- onchange="submit();"></h:selectBooleanCheckbox>
-
<h:outputText value="showControls"></h:outputText>
<h:selectBooleanCheckbox value="#{inplaceSelect.showControls}"
onchange="submit();"></h:selectBooleanCheckbox>
16 years, 8 months
JBoss Rich Faces SVN: r8157 - trunk/test-applications/jsp/src/main/webapp/InplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-25 06:18:59 -0400 (Fri, 25 Apr 2008)
New Revision: 8157
Modified:
trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
Log:
Delete test for selectOnEdit
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-04-25 10:16:12 UTC (rev 8156)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-04-25 10:18:59 UTC (rev 8157)
@@ -19,9 +19,8 @@
defaultLabel="#{inplaceSelect.defaultLabel}"
controlsVerticalPosition="#{inplaceSelect.controlsVerticalPosition}"
controlsHorizontalPosition="#{inplaceSelect.controlsHorizontalPosition}"
- value="#{inplaceSelect.value}" listWidth="#{inplaceSelect.listWidth}"
+ listWidth="#{inplaceSelect.listWidth}"
listHeight="#{inplaceSelect.listHeight}"
- selectOnEdit="#{inplaceSelect.selectOnEdit}"
showControls="#{inplaceSelect.showControls}"
editOnTab="#{inplaceSelect.editOnTab}"
openOnEdit="#{inplaceSelect.openOnEdit}"
@@ -29,13 +28,13 @@
immediate="#{inplaceSelect.immediate}"
binding="#{inplaceSelect.myInplaceSelect}"
- onblur="#{event.onblur}"
+ onblur="#{event.onblur}"
onchange="#{event.onchange}"
onclick="#{event.onclick}"
ondblclick="#{event.ondblclick}"
oneditactivated="#{event.oneditactivated}"
oneditactivation="#{event.oneditactivation}"
- onfocus="#{event.onfocus}"
+ onfocus="#{event.onfocus}"
oninputblur="#{event.oninputblur}"
oninputclick="#{event.oninputclick}"
oninputdblclick="#{event.oninputdblclick}"
@@ -57,7 +56,7 @@
onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
onselect="#{event.onselect}"
- onviewactivated="#{evant.onviewactivated}"
+ onviewactivated="#{event.onviewactivated}"
onviewactivation="#{event.onviewactivation}">
<f:selectItem itemLabel="errors" itemValue="errors" />
<f:selectItem itemLabel="fatals" itemValue="fatals" />
@@ -118,10 +117,6 @@
<h:outputText value="tabindex"></h:outputText>
<h:inputText value="#{inplaceSelect.tabindex}" onchange="submit();"></h:inputText>
- <h:outputText value="selectOnEdit"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceSelect.selectOnEdit}"
- onchange="submit();"></h:selectBooleanCheckbox>
-
<h:outputText value="showControls"></h:outputText>
<h:selectBooleanCheckbox value="#{inplaceSelect.showControls}"
onchange="submit();"></h:selectBooleanCheckbox>
16 years, 8 months
JBoss Rich Faces SVN: r8156 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-25 06:16:12 -0400 (Fri, 25 Apr 2008)
New Revision: 8156
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/UploadItem.java
Log:
Modified: trunk/framework/api/src/main/java/org/richfaces/model/UploadItem.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/UploadItem.java 2008-04-25 10:16:02 UTC (rev 8155)
+++ trunk/framework/api/src/main/java/org/richfaces/model/UploadItem.java 2008-04-25 10:16:12 UTC (rev 8156)
@@ -57,12 +57,12 @@
* In another case getData method should be invoked to get file's bytes.
* @return
*/
- public boolean isFile () {
+ public boolean isTempFile () {
return (null != file);
}
/**
- * This method should called only in case of TRUE value returned by {@link #isFile()} method.
+ * This method should called only in case of TRUE value returned by {@link #isTempFile()} method.
* Otherwise null value will be returned by this method.
* @return the file
*/
@@ -71,7 +71,7 @@
}
/**
- * This method should called only in case of FALSE value returned by {@link #isFile()} method.
+ * This method should called only in case of FALSE value returned by {@link #isTempFile()} method.
* Otherwise null value will be returned by this method.
* @return the bytes
* @throws Exception
16 years, 8 months
JBoss Rich Faces SVN: r8155 - in trunk/test-applications/seleniumTest/src: main/webapp/WEB-INF and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-25 06:16:02 -0400 (Fri, 25 Apr 2008)
New Revision: 8155
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TemplateBean.java
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/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
Removed:
trunk/test-applications/seleniumTest/src/main/webapp/template/dataTableTemplate.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanelTemplate.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/template/simpleTemplate.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java
Log:
Selenium tests refactoring.
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TemplateBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TemplateBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TemplateBean.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+public class TemplateBean {
+ public static final String PARAM_NAME = "t";
+
+ public String getTemplate() {
+ Map<String, String> reqMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ String template = reqMap.get(PARAM_NAME);
+ if (null != template) {
+ return "/template/" + template + ".xhtml";
+ } else {
+ return "/template/simple.xhtml";
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -20,6 +20,11 @@
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>templateBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.TemplateBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<managed-bean>
<managed-bean-name>commandBean</managed-bean-name>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -47,10 +47,12 @@
</tr>
</table>
</h:form>
-<div id="_Selenium_Test_ControlPoint1" style="display: none;">Control1</div>
-<h:panelGrid id="_Selenium_Test_Common_Grid">
- <ui:insert name="template"/>
-</h:panelGrid>
+<div id="_Selenium_Test_ControlPoint1" style="display: none;">Control1</div>
+<h:form id="_Selenium_Test_Form" >
+ <h:panelGrid id="_Selenium_Test_Common_Grid">
+ <ui:insert name="template"/>
+ </h:panelGrid>
+</h:form>
<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/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -6,7 +6,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition template="../../layout/template.xhtml">
+<ui:composition template="#{templateBean.template}">
<ui:define name="style">
.link {margin: 0px 5px}
@@ -92,10 +92,11 @@
</h:panelGroup>
<br/>
- <a4j:outputPanel ajaxRendered="true" >
+ <!--a4j:outputPanel ajaxRendered="true" id="outputPanel" >
<h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
<h:outputText value="#{panelBean.value2}" id="_value2"></h:outputText>
- </a4j:outputPanel>
+ </a4j:outputPanel-->
+ <a4j:log popup="false" />
<br/>
</ui:define>
<ui:define name="description">
Copied: trunk/test-applications/seleniumTest/src/main/webapp/template/dataTable.xhtml (from rev 8110, trunk/test-applications/seleniumTest/src/main/webapp/template/dataTableTemplate.xhtml)
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/dataTable.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/dataTable.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,20 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<ui:composition template="../layout/layout.xhtml">
+ <ui:define name="template">
+ <rich:dataTable value="1" id="_Selenium_Test_DataTable">
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Data Table" />
+ </f:facet>
+ <ui:insert name="component" />
+ </rich:column>
+ </rich:dataTable>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: trunk/test-applications/seleniumTest/src/main/webapp/template/dataTableTemplate.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/dataTableTemplate.xhtml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/dataTableTemplate.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,17 +0,0 @@
-<!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:a4j="http://richfaces.org/a4j"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition template="../layout/layout.xhtml">
- <rich:dataTable value="1" id="_Selenium_Test_DataTable">
- <rich:column>
- <f:facet name="header">
- <ui:insert name="body" />
- </f:facet>
- </rich:column>
- </rich:dataTable>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanel.xhtml (from rev 8110, trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanelTemplate.xhtml)
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanel.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanel.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,13 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<ui:composition template="../layout/layout.xhtml">
+ <rich:modalPanel id="_Selenium_Test_ModelPanel">
+ <ui:insert name="body" />
+ </rich:modalPanel>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanelTemplate.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanelTemplate.xhtml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/modalPanelTemplate.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,13 +0,0 @@
-<!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:a4j="http://richfaces.org/a4j"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition template="../layout/layout.xhtml">
- <rich:modalPanel id="_Selenium_Test_ModelPanel">
- <ui:insert name="body" />
- </rich:modalPanel>
-</ui:composition>
-</html>
\ No newline at end of file
Copied: trunk/test-applications/seleniumTest/src/main/webapp/template/simple.xhtml (from rev 8110, trunk/test-applications/seleniumTest/src/main/webapp/template/simpleTemplate.xhtml)
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/simple.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/simple.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,13 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<ui:composition template="../layout/layout.xhtml">
+ <ui:define name="template">
+ <ui:insert name="component" />
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Deleted: trunk/test-applications/seleniumTest/src/main/webapp/template/simpleTemplate.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/template/simpleTemplate.xhtml 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/main/webapp/template/simpleTemplate.xhtml 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,11 +0,0 @@
-<!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:a4j="http://richfaces.org/a4j"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition template="../layout/layout.xhtml">
- <ui:insert name="body" />
-</ui:composition>
-</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.test.base;
import org.ajax4jsf.javascript.ScriptUtils;
@@ -20,7 +41,7 @@
protected static final int ajaxCompletionTime = 3000;
private static final String WINDOW_JS_RESOLVER = "selenium.browserbot.getCurrentWindow().";
-
+
/** The default selenium instance */
public DefaultSelenium selenium;
@@ -36,10 +57,14 @@
/** Defines the name of current j2ee application name */
public static final String APPLICATION_NAME = "seleniumTest";
- public static final String COMPONENT_PREFIX_INSIDE_TABLE = "_Selenium_Test_Form1:_Selenium_Test_DataTable:0:";
+ public static final String COMPONENT_PREFIX_INSIDE_TABLE = "_Selenium_Test_Form:_Selenium_Test_DataTable:0:";
- public static final String COMPONENT_PREFIX_INSIDE_PANEL = "_Selenium_Test_Form2:";
-
+ public static final String COMPONENT_PREFIX_SIMPLE = "_Selenium_Test_Form:";
+
+ public static final String DATA_TABLE_TEMPLATE = "dataTable";
+ public static final String MODAL_PANEL_TEMPLATE = "modalPanel";
+ public static final String SIMPLE_TEMPLATE = "simple";
+
public SeleniumTestBase(String protocol, String host, String port) {
this.host = host;
this.port = port;
@@ -74,10 +99,10 @@
// rendered
checkJSError(); // At the second we check if JS errors occurred
- reRenderForm(); // ReRender component
+ //reRenderForm(); // ReRender component
- checkPageRendering(); // Check all again
- checkJSError();
+ //checkPageRendering(); // Check all again
+ //checkJSError();
}
@@ -98,7 +123,7 @@
* @return
*/
public String getComponentIdInsidePanel(String id) {
- return COMPONENT_PREFIX_INSIDE_PANEL + id;
+ return COMPONENT_PREFIX_SIMPLE + id;
}
/**
@@ -347,5 +372,4 @@
runScript(script.toString());
selenium.waitForCondition(WINDOW_JS_RESOLVER + "pauseHolder['" + id + "'] == true;", String.valueOf(miliSeconds + 1000));
}
-
}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,92 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-
-public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public AjaxCommandButtonTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxCommandButtonComponent() throws Exception {
- renderPage("/faces/pages/ajaxCommandButton/ajaxButtonTest.xhtml");
-
- _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- }
-
- private void _testAjaxCommandButtonComponent(String parentId) {
- // test inside DataTable
- String buttonId = parentId + "b1";
- String inputId = parentId + "_value";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "3");
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b2";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b3";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b4";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "1");
-
- buttonId = parentId + "b5";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "2");
-
- buttonId = parentId + "b1";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "5");
-
- buttonId = parentId + "b3";
-
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "5");
- }
-
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,92 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+
+public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest {
+
+ public AjaxCommandButtonTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testAjaxCommandButtonComponent() throws Exception {
+ renderPage("/faces/pages/ajaxCommandButton/ajaxButtonTest.xhtml");
+
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_SIMPLE);
+ }
+
+ private void _testAjaxCommandButtonComponent(String parentId) {
+ // test inside DataTable
+ String buttonId = parentId + "b1";
+ String inputId = parentId + "_value";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "3");
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b2";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b3";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b4";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "1");
+
+ buttonId = parentId + "b5";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "2");
+
+ buttonId = parentId + "b1";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "5");
+
+ buttonId = parentId + "b3";
+
+ clickById(buttonId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "5");
+ }
+
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,91 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-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() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxCommandLinkComponent() throws Exception {
- renderPage("/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml");
-
- _testAjaxCommandLinkComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- _testAjaxCommandLinkComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- }
-
- private void _testAjaxCommandLinkComponent(String parentId) {
- // test inside DataTable
- String LinkId = parentId + "l1";
- String inputId = parentId + "_value";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "3");
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- LinkId = parentId + "l2";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- LinkId = parentId + "l3";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "6");
-
- LinkId = parentId + "l4";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "1");
-
- LinkId = parentId + "l5";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "2");
-
- LinkId = parentId + "l1";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "5");
-
- LinkId = parentId + "l3";
-
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "5");
- }
-
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,91 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+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() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testAjaxCommandLinkComponent() throws Exception {
+ renderPage("/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml");
+
+ _testAjaxCommandLinkComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testAjaxCommandLinkComponent(COMPONENT_PREFIX_SIMPLE);
+ }
+
+ private void _testAjaxCommandLinkComponent(String parentId) {
+ // test inside DataTable
+ String LinkId = parentId + "l1";
+ String inputId = parentId + "_value";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "3");
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l2";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l3";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l4";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "1");
+
+ LinkId = parentId + "l5";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "2");
+
+ LinkId = parentId + "l1";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "5");
+
+ LinkId = parentId + "l3";
+
+ clickById(LinkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "5");
+ }
+
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,98 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-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 PanelBarTest extends SeleniumTestBase implements RichSeleniumTest {
-
-
- public PanelBarTest() {
- super("http", "localhost", "8080");
- }
-
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testPanelBarComponent() throws Exception {
- renderPage("/faces/pages/panelBar/panelBarTest.xhtml");
-
- _testPanelBarComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- _testPanelBarComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- }
-
- private void _testPanelBarComponent(String parentId) {
- String label2 = parentId + "label2";
- String label3 = parentId + "label3";
-
- String output1 = parentId + "output1";
- String output2 = parentId + "output2";
- String output3 = parentId + "output3";
-
- String ajaxButton = parentId + "button_ajax";
- String simpleButton = parentId + "button_simple";
-
- clickById(label2);
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertTrue(isVisibleById(output2));
- Assert.assertFalse(isVisibleById(output3));
-
- clickById(simpleButton);
- waitForPageToLoad();
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertTrue(isVisibleById(output2));
- Assert.assertFalse(isVisibleById(output3));
-
- clickById(label3);
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertFalse(isVisibleById(output2));
- Assert.assertTrue(isVisibleById(output3));
-
- clickById(ajaxButton);
- waitForAjaxCompletion();
- Assert.assertFalse(isVisibleById(output1));
- Assert.assertFalse(isVisibleById(output2));
- Assert.assertTrue(isVisibleById(output3));
- }
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelBarTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+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 PanelBarTest extends SeleniumTestBase implements RichSeleniumTest {
+
+
+ public PanelBarTest() {
+ super("http", "localhost", "8080");
+ }
+
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testPanelBarComponent() throws Exception {
+ renderPage("/faces/pages/panelBar/panelBarTest.xhtml");
+
+ _testPanelBarComponent(COMPONENT_PREFIX_SIMPLE);
+ _testPanelBarComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ }
+
+ private void _testPanelBarComponent(String parentId) {
+ String label2 = parentId + "label2";
+ String label3 = parentId + "label3";
+
+ String output1 = parentId + "output1";
+ String output2 = parentId + "output2";
+ String output3 = parentId + "output3";
+
+ String ajaxButton = parentId + "button_ajax";
+ String simpleButton = parentId + "button_simple";
+
+ clickById(label2);
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertTrue(isVisibleById(output2));
+ Assert.assertFalse(isVisibleById(output3));
+
+ clickById(simpleButton);
+ waitForPageToLoad();
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertTrue(isVisibleById(output2));
+ Assert.assertFalse(isVisibleById(output3));
+
+ clickById(label3);
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertFalse(isVisibleById(output2));
+ Assert.assertTrue(isVisibleById(output3));
+
+ clickById(ajaxButton);
+ waitForAjaxCompletion();
+ Assert.assertFalse(isVisibleById(output1));
+ Assert.assertFalse(isVisibleById(output2));
+ Assert.assertTrue(isVisibleById(output3));
+ }
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,198 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-import com.thoughtworks.selenium.SeleniumException;
-
-public class PanelMenuTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public PanelMenuTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testPanelMenuComponent() throws Exception {
- renderPage("/faces/pages/panelMenu/panelMenuTest.xhtml");
-
- _testPanelMenuComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- _testPanelMenuComponent(COMPONENT_PREFIX_INSIDE_TABLE);
-
- _testPanelMenuComponentSingleMode(COMPONENT_PREFIX_INSIDE_PANEL);
- _testPanelMenuComponentSingleMode(COMPONENT_PREFIX_INSIDE_TABLE);
-
- _testPanelMenuItemAction(COMPONENT_PREFIX_INSIDE_PANEL);
- _testPanelMenuItemAction(COMPONENT_PREFIX_INSIDE_TABLE);
- }
-
- private void _testPanelMenuComponent(String parentId) {
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- String ajaxGroup = "tablehide" + parentId + "pGroup1";
- String serverGroup = "tablehide" + parentId + "pGroup2";
- String clientGroup = "tablehide" + parentId + "pGroup3";
- String disabledGroup = "tablehide" + parentId + "pGroup4";
-
- String ajaxItem = "tablehide" + parentId + "pItem1";
- String serverItem = "tablehide" + parentId + "pItem2";
- String clientItem = "tablehide" + parentId + "pItem3";
- String disabledItem = "tablehide" + parentId + "pItem4";
-
- clickById(ajaxGroup);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(serverGroup);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pGroup2");
- AssertTextEquals(outputId, "2");
- Assert.assertTrue(isVisibleById(ajaxItem));
- Assert.assertTrue(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(ajaxGroup);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
- AssertTextEquals(outputId, "3");
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertTrue(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(serverGroup);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pGroup2");
- AssertTextEquals(outputId, "4");
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(clientGroup);
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertTrue(isVisibleById(clientItem));
-
- clickById(clientGroup);
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(disabledGroup);
- Assert.assertFalse(isVisibleById(disabledItem));
- }
-
- private void _testPanelMenuComponentSingleMode(String parentId) {
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- String ajaxGroup = "tablehide" + parentId + "pGroup1_single";
- String serverGroup = "tablehide" + parentId + "pGroup2_single";
- String clientGroup = "tablehide" + parentId + "pGroup3_single";
- String disabledGroup = "tablehide" + parentId + "pGroup4_single";
-
- String ajaxItem = "tablehide" + parentId + "pItem1_single";
- String serverItem = "tablehide" + parentId + "pItem2_single";
- String clientItem = "tablehide" + parentId + "pItem3_single";
- String disabledItem = "tablehide" + parentId + "pItem4_single";
-
- clickById(ajaxGroup);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(serverGroup);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pGroup2_single");
- AssertTextEquals(outputId, "2");
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertTrue(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(ajaxGroup);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
- AssertTextEquals(outputId, "3");
- Assert.assertTrue(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(serverGroup);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pGroup2_single");
- AssertTextEquals(outputId, "4");
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertTrue(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(clientGroup);
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertTrue(isVisibleById(clientItem));
-
- clickById(clientGroup);
- Assert.assertFalse(isVisibleById(ajaxItem));
- Assert.assertFalse(isVisibleById(serverItem));
- Assert.assertFalse(isVisibleById(clientItem));
-
- clickById(disabledGroup);
- Assert.assertFalse(isVisibleById(disabledItem));
- }
-
- private void _testPanelMenuItemAction(String parentId) {
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- String group = "tablehide" + parentId + "pGroup1";
- String groupSingle = "tablehide" + parentId + "pGroup1_single";
-
- String item = "tablehide" + parentId + "pItem1";
- String itemSingle = "tablehide" + parentId + "pItem1_single";
-
- clickById(group);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1");
-
- clickById(groupSingle);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "pGroup1_single");
-
- clickById(item);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pItem1");
- AssertTextEquals(outputId, "1");
-
- clickById(itemSingle);
- waitForPageToLoad();
- AssertValueEquals(inputId, "pItem1_single");
- AssertTextEquals(outputId, "2");
- }
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PanelMenuTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,198 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class PanelMenuTest extends SeleniumTestBase implements RichSeleniumTest {
+
+ public PanelMenuTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testPanelMenuComponent() throws Exception {
+ renderPage("/faces/pages/panelMenu/panelMenuTest.xhtml");
+
+ _testPanelMenuComponent(COMPONENT_PREFIX_SIMPLE);
+ _testPanelMenuComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+
+ _testPanelMenuComponentSingleMode(COMPONENT_PREFIX_SIMPLE);
+ _testPanelMenuComponentSingleMode(COMPONENT_PREFIX_INSIDE_TABLE);
+
+ _testPanelMenuItemAction(COMPONENT_PREFIX_SIMPLE);
+ _testPanelMenuItemAction(COMPONENT_PREFIX_INSIDE_TABLE);
+ }
+
+ private void _testPanelMenuComponent(String parentId) {
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String ajaxGroup = "tablehide" + parentId + "pGroup1";
+ String serverGroup = "tablehide" + parentId + "pGroup2";
+ String clientGroup = "tablehide" + parentId + "pGroup3";
+ String disabledGroup = "tablehide" + parentId + "pGroup4";
+
+ String ajaxItem = "tablehide" + parentId + "pItem1";
+ String serverItem = "tablehide" + parentId + "pItem2";
+ String clientItem = "tablehide" + parentId + "pItem3";
+ String disabledItem = "tablehide" + parentId + "pItem4";
+
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(serverGroup);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pGroup2");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1");
+ AssertTextEquals(outputId, "3");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(serverGroup);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pGroup2");
+ AssertTextEquals(outputId, "4");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(disabledGroup);
+ Assert.assertFalse(isVisibleById(disabledItem));
+ }
+
+ private void _testPanelMenuComponentSingleMode(String parentId) {
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String ajaxGroup = "tablehide" + parentId + "pGroup1_single";
+ String serverGroup = "tablehide" + parentId + "pGroup2_single";
+ String clientGroup = "tablehide" + parentId + "pGroup3_single";
+ String disabledGroup = "tablehide" + parentId + "pGroup4_single";
+
+ String ajaxItem = "tablehide" + parentId + "pItem1_single";
+ String serverItem = "tablehide" + parentId + "pItem2_single";
+ String clientItem = "tablehide" + parentId + "pItem3_single";
+ String disabledItem = "tablehide" + parentId + "pItem4_single";
+
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1_single");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(serverGroup);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pGroup2_single");
+ AssertTextEquals(outputId, "2");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(ajaxGroup);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1_single");
+ AssertTextEquals(outputId, "3");
+ Assert.assertTrue(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(serverGroup);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pGroup2_single");
+ AssertTextEquals(outputId, "4");
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertTrue(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertTrue(isVisibleById(clientItem));
+
+ clickById(clientGroup);
+ Assert.assertFalse(isVisibleById(ajaxItem));
+ Assert.assertFalse(isVisibleById(serverItem));
+ Assert.assertFalse(isVisibleById(clientItem));
+
+ clickById(disabledGroup);
+ Assert.assertFalse(isVisibleById(disabledItem));
+ }
+
+ private void _testPanelMenuItemAction(String parentId) {
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String group = "tablehide" + parentId + "pGroup1";
+ String groupSingle = "tablehide" + parentId + "pGroup1_single";
+
+ String item = "tablehide" + parentId + "pItem1";
+ String itemSingle = "tablehide" + parentId + "pItem1_single";
+
+ clickById(group);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1");
+
+ clickById(groupSingle);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "pGroup1_single");
+
+ clickById(item);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pItem1");
+ AssertTextEquals(outputId, "1");
+
+ clickById(itemSingle);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "pItem1_single");
+ AssertTextEquals(outputId, "2");
+ }
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,110 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-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 ProgressBarTest extends SeleniumTestBase implements
- RichSeleniumTest {
-
- public ProgressBarTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testProgressBarComponent() {
- renderPage("/faces/pages/progressBar/progressBarTest.xhtml");
-
- _testProgressBarComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- _testProgressBarComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- }
-
- private void _testProgressBarComponent(String parentId) {
-
- //- Test ajax mode
-
- String progressBarId = parentId + "progressBar1";
- int value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value < 0);
- String text = getTextById(progressBarId);
- Assert.assertTrue(text.startsWith("Process not started"));
-
- enableProgressBar(progressBarId, true);
-
- pause(5000, progressBarId);
-
- enableProgressBar(progressBarId, false);
-
- text = getTextById(progressBarId + ":remain");
- Assert.assertTrue(text.endsWith("%"));
-
- value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value > 0);
-
- enableProgressBar(progressBarId, true);
-
- pause(5000, progressBarId);
- Assert.assertTrue((getProgressBarValue(progressBarId).intValue() != value));
-
- enableProgressBar(progressBarId, false);
-
- value = getProgressBarValue(progressBarId);
- delay(1500);
- Assert.assertTrue(getProgressBarValue(progressBarId) == value);
-
-
- // - Test client mode
-
- progressBarId = parentId + "progressBar2";
- value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value == -5);
-
- text = getTextById(progressBarId);
- Assert.assertTrue(text.startsWith("Process not started"));
-
- setProgressBarValue(progressBarId, 20);
- value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value == 20);
-
- setProgressBarValue(progressBarId, 60);
- value = getProgressBarValue(progressBarId);
- Assert.assertTrue(value == 60);
-
- }
-
- private void enableProgressBar(String id, boolean enable) {
- invokeFromComponent(id, (enable ? "enable" : "disable"), null);
- }
-
- private void setProgressBarValue(String id, Object value) {
- invokeFromComponent(id, "setValue", value);
- }
-
- private Integer getProgressBarValue(String id) {
- String value = invokeFromComponent(id, "getValue", null); //runScript(script.toString());
- Integer v = Integer.parseInt(value);
- return v;
- }
-
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ProgressBarTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,110 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+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 ProgressBarTest extends SeleniumTestBase implements
+ RichSeleniumTest {
+
+ public ProgressBarTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testProgressBarComponent() {
+ renderPage("/faces/pages/progressBar/progressBarTest.xhtml");
+
+ _testProgressBarComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testProgressBarComponent(COMPONENT_PREFIX_SIMPLE);
+ }
+
+ private void _testProgressBarComponent(String parentId) {
+
+ //- Test ajax mode
+
+ String progressBarId = parentId + "progressBar1";
+ int value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value < 0);
+ String text = getTextById(progressBarId);
+ Assert.assertTrue(text.startsWith("Process not started"));
+
+ enableProgressBar(progressBarId, true);
+
+ pause(5000, progressBarId);
+
+ enableProgressBar(progressBarId, false);
+
+ text = getTextById(progressBarId + ":remain");
+ Assert.assertTrue(text.endsWith("%"));
+
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value > 0);
+
+ enableProgressBar(progressBarId, true);
+
+ pause(5000, progressBarId);
+ Assert.assertTrue((getProgressBarValue(progressBarId).intValue() != value));
+
+ enableProgressBar(progressBarId, false);
+
+ value = getProgressBarValue(progressBarId);
+ delay(1500);
+ Assert.assertTrue(getProgressBarValue(progressBarId) == value);
+
+
+ // - Test client mode
+
+ progressBarId = parentId + "progressBar2";
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value == -5);
+
+ text = getTextById(progressBarId);
+ Assert.assertTrue(text.startsWith("Process not started"));
+
+ setProgressBarValue(progressBarId, 20);
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value == 20);
+
+ setProgressBarValue(progressBarId, 60);
+ value = getProgressBarValue(progressBarId);
+ Assert.assertTrue(value == 60);
+
+ }
+
+ private void enableProgressBar(String id, boolean enable) {
+ invokeFromComponent(id, (enable ? "enable" : "disable"), null);
+ }
+
+ private void setProgressBarValue(String id, Object value) {
+ invokeFromComponent(id, "setValue", value);
+ }
+
+ private Integer getProgressBarValue(String id) {
+ String value = invokeFromComponent(id, "getValue", null); //runScript(script.toString());
+ Integer v = Integer.parseInt(value);
+ return v;
+ }
+
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,61 +0,0 @@
-/**
- *
- */
-package org.richfaces;
-
-/**
- * @author asmirnov
- *
- */
-import static org.testng.Assert.assertEquals;
-
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-import com.thoughtworks.selenium.DefaultSelenium;
-
-public class SeleniumExampleTest
-
-{
- private DefaultSelenium selenium;
-
- protected DefaultSelenium createSeleniumClient(String url, String browser){
- return new DefaultSelenium("localhost", 4444,
- browser, url);
- }
- @BeforeTest
- @Parameters({ "browser" })
- public void startSelenium(String browser){
- selenium = createSeleniumClient("http://localhost:8080/", browser);
- selenium.start();
- }
-
- @Test(enabled=true)
- public void testSomethingSimple() throws Exception {
- selenium.open("http://localhost:8080/seleniumTest/faces/test.xhtml");
- selenium.waitForPageToLoad("5000");
-
- //
- System.out.println("body [" + selenium.getHtmlSource() + "]");
- //
- // selenium.getEval("window.done=false;A4J.AJAX.AddListener(new
- // A4J.AJAX.Listener(function(){window.done=true}))");
- selenium.click("id=fff:lnk");
- selenium.waitForCondition(
- "selenium.browserbot.getCurrentWindow().done==true", "3000");
- System.out.println("ajax body [" + selenium.getHtmlSource() + "]");
- assertEquals("testOk", selenium.getText("id=fff:out"));
-
- // Test help link
- }
- /**
- *
- */
- @AfterTest
- public void stopSelenium() {
- selenium.stop();
- selenium = null;
- }
-}
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumExampleTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,61 @@
+/**
+ *
+ */
+package org.richfaces;
+
+/**
+ * @author asmirnov
+ *
+ */
+import static org.testng.Assert.assertEquals;
+
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+
+public class SeleniumExampleTest
+
+{
+ private DefaultSelenium selenium;
+
+ protected DefaultSelenium createSeleniumClient(String url, String browser){
+ return new DefaultSelenium("localhost", 4444,
+ browser, url);
+ }
+ @BeforeTest
+ @Parameters({ "browser" })
+ public void startSelenium(String browser){
+ selenium = createSeleniumClient("http://localhost:8080/", browser);
+ selenium.start();
+ }
+
+ @Test(enabled=true)
+ public void testSomethingSimple() throws Exception {
+ selenium.open("http://localhost:8080/seleniumTest/faces/test.xhtml");
+ selenium.waitForPageToLoad("5000");
+
+ //
+ System.out.println("body [" + selenium.getHtmlSource() + "]");
+ //
+ // selenium.getEval("window.done=false;A4J.AJAX.AddListener(new
+ // A4J.AJAX.Listener(function(){window.done=true}))");
+ selenium.click("id=fff:lnk");
+ selenium.waitForCondition(
+ "selenium.browserbot.getCurrentWindow().done==true", "3000");
+ System.out.println("ajax body [" + selenium.getHtmlSource() + "]");
+ assertEquals("testOk", selenium.getText("id=fff:out"));
+
+ // Test help link
+ }
+ /**
+ *
+ */
+ @AfterTest
+ public void stopSelenium() {
+ selenium.stop();
+ selenium = null;
+ }
+}
\ No newline at end of file
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,105 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-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 SimpleTogglePanelTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public SimpleTogglePanelTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testSimpleTogglePanelComponent() throws Exception {
- renderPage("/faces/pages/simpleTogglePanel/simpleTogglePanel.xhtml");
-
- _testSimpleTogglePanelComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- _testSimpleTogglePanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- }
-
- private void _testSimpleTogglePanelComponent(String parentId) {
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- String ajaxHeader = parentId + "panel1_header";
- String serverHeader = parentId + "panel2_header";
- String clientHeader = parentId + "panel3_header";
-
- String ajaxBody = parentId + "panel1_body";
- String serverBody = parentId + "panel2_body";
- String clientBody = parentId + "panel3_body";
-
- clickById(clientHeader);
- Assert.assertTrue(isVisibleById(clientBody));
- clickById(clientHeader);
- Assert.assertFalse(isVisibleById(clientBody));
-
- clickById(ajaxHeader);
- waitForAjaxCompletion(5000);
- AssertValueEquals(inputId, "panel1");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(ajaxBody));
-
- clickById(ajaxHeader);
- waitForAjaxCompletion(5000);
- AssertValueEquals(inputId, "panel1");
- AssertTextEquals(outputId, "2");
- Assert.assertFalse(isVisibleById(ajaxBody));
-
- clickById(serverHeader);
- waitForPageToLoad();
- AssertValueEquals(inputId, "panel2");
- AssertTextEquals(outputId, "3");
- Assert.assertTrue(isVisibleById(serverBody));
-
- clickById(serverHeader);
- waitForPageToLoad();
- AssertValueEquals(inputId, "panel2");
- AssertTextEquals(outputId, "4");
- Assert.assertFalse(isVisibleById(serverBody));
- }
-
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SimpleTogglePanelTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,105 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+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 SimpleTogglePanelTest extends SeleniumTestBase implements RichSeleniumTest {
+
+ public SimpleTogglePanelTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testSimpleTogglePanelComponent() throws Exception {
+ renderPage("/faces/pages/simpleTogglePanel/simpleTogglePanel.xhtml");
+
+ _testSimpleTogglePanelComponent(COMPONENT_PREFIX_SIMPLE);
+ _testSimpleTogglePanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ }
+
+ private void _testSimpleTogglePanelComponent(String parentId) {
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String ajaxHeader = parentId + "panel1_header";
+ String serverHeader = parentId + "panel2_header";
+ String clientHeader = parentId + "panel3_header";
+
+ String ajaxBody = parentId + "panel1_body";
+ String serverBody = parentId + "panel2_body";
+ String clientBody = parentId + "panel3_body";
+
+ clickById(clientHeader);
+ Assert.assertTrue(isVisibleById(clientBody));
+ clickById(clientHeader);
+ Assert.assertFalse(isVisibleById(clientBody));
+
+ clickById(ajaxHeader);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "panel1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(ajaxBody));
+
+ clickById(ajaxHeader);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "panel1");
+ AssertTextEquals(outputId, "2");
+ Assert.assertFalse(isVisibleById(ajaxBody));
+
+ clickById(serverHeader);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "panel2");
+ AssertTextEquals(outputId, "3");
+ Assert.assertTrue(isVisibleById(serverBody));
+
+ clickById(serverHeader);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "panel2");
+ AssertTextEquals(outputId, "4");
+ Assert.assertFalse(isVisibleById(serverBody));
+ }
+
+}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -1,123 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-import com.thoughtworks.selenium.SeleniumException;
-
-public class TabPanelTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public TabPanelTest() {
- super("http", "localhost", "8080");
- }
-
- public TabPanelTest(String protocol, String host, String port) {
- super(protocol, host, port);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testTabPanelComponent() throws Exception {
- renderPage("/faces/pages/tabPanel/tabPanelTest.xhtml");
-
- _testRichTabPanelComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- _testRichTabPanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- }
-
- private void _testRichTabPanelComponent(String parentId) {
- String linkId = parentId + "tab2_lbl";
- String tabId1 = parentId + "tab1";
- String tabId2 = parentId + "tab2";
- String tabId4 = parentId + "tab4";
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- clickById(linkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "tab2");
- AssertTextEquals(outputId, "2");
- Assert.assertTrue(isVisibleById(tabId2));
- Assert.assertFalse(isVisibleById(tabId4));
- try {
- getTextById(tabId1);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
-
-
- linkId = parentId + "tab1_lbl";
- clickById(linkId);
- waitForPageToLoad();
- AssertValueEquals(inputId, "tab1");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(tabId1));
- Assert.assertFalse(isVisibleById(tabId4));
- try {
- getTextById(tabId2);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
-
- linkId = parentId + "tab3_lbl";
- clickById(linkId);
- AssertValueEquals(inputId, "tab1");
- Assert.assertTrue(isVisibleById(tabId1));
-
- linkId = parentId + "tab4_lbl";
- clickById(linkId);
- Assert.assertTrue(isVisibleById(tabId4));
- Assert.assertFalse(isVisibleById(tabId1));
- try {
- getTextById(tabId2);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
- }
-
-}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class TabPanelTest extends SeleniumTestBase implements RichSeleniumTest {
+
+ public TabPanelTest() {
+ super("http", "localhost", "8080");
+ }
+
+ public TabPanelTest(String protocol, String host, String port) {
+ super(protocol, host, port);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testTabPanelComponent() throws Exception {
+ renderPage("/faces/pages/tabPanel/tabPanelTest.xhtml");
+
+ _testRichTabPanelComponent(COMPONENT_PREFIX_SIMPLE);
+ _testRichTabPanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ }
+
+ private void _testRichTabPanelComponent(String parentId) {
+ String linkId = parentId + "tab2_lbl";
+ String tabId1 = parentId + "tab1";
+ String tabId2 = parentId + "tab2";
+ String tabId4 = parentId + "tab4";
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "tab2");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(tabId2));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId1);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+
+ linkId = parentId + "tab1_lbl";
+ clickById(linkId);
+ waitForPageToLoad();
+ AssertValueEquals(inputId, "tab1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(tabId1));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ linkId = parentId + "tab3_lbl";
+ clickById(linkId);
+ AssertValueEquals(inputId, "tab1");
+ Assert.assertTrue(isVisibleById(tabId1));
+
+ linkId = parentId + "tab4_lbl";
+ clickById(linkId);
+ Assert.assertTrue(isVisibleById(tabId4));
+ Assert.assertFalse(isVisibleById(tabId1));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+ }
+
+}
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java 2008-04-25 09:17:25 UTC (rev 8154)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java 2008-04-25 10:16:02 UTC (rev 8155)
@@ -21,6 +21,7 @@
package org.richfaces;
+import org.ajax4jsf.TemplateBean;
import org.ajax4jsf.test.base.RichSeleniumTest;
import org.ajax4jsf.test.base.SeleniumTestBase;
import org.testng.Assert;
@@ -32,6 +33,7 @@
import com.thoughtworks.selenium.SeleniumException;
public class TogglePanelTest extends SeleniumTestBase implements RichSeleniumTest {
+ private static final String PAGE = "/faces/pages/togglePanel/togglePanelTest.xhtml";
public TogglePanelTest() {
super("http", "localhost", "8080");
@@ -56,13 +58,13 @@
@Test
public void testTogglePanelComponent() throws Exception {
- renderPage("/faces/pages/togglePanel/togglePanelTest.xhtml");
-
- _testTogglePanelComponent(COMPONENT_PREFIX_INSIDE_PANEL);
- _testTogglePanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testTogglePanelComponent(DATA_TABLE_TEMPLATE, COMPONENT_PREFIX_INSIDE_TABLE);
+ _testTogglePanelComponent(SIMPLE_TEMPLATE, COMPONENT_PREFIX_SIMPLE);
}
- private void _testTogglePanelComponent(String parentId) {
+ private void _testTogglePanelComponent(String template, String parentId) {
+ renderPage(PAGE + "?" + TemplateBean.PARAM_NAME + "=" + template);
+
String inputId = parentId + "_value";
String outputId = parentId + "_value2";
@@ -75,6 +77,7 @@
clickById(controlNext);
waitForAjaxCompletion(5000);
+ pause(60000, "");
AssertValueEquals(inputId, "ajax_next");
AssertTextEquals(outputId, "1");
Assert.assertTrue(isVisibleById(twoFacet));
16 years, 8 months
JBoss Rich Faces SVN: r8154 - trunk/framework/test.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-25 05:17:25 -0400 (Fri, 25 Apr 2008)
New Revision: 8154
Modified:
trunk/framework/test/pom.xml
Log:
SkinTestCase excluded from build
Modified: trunk/framework/test/pom.xml
===================================================================
--- trunk/framework/test/pom.xml 2008-04-25 09:14:17 UTC (rev 8153)
+++ trunk/framework/test/pom.xml 2008-04-25 09:17:25 UTC (rev 8154)
@@ -70,4 +70,19 @@
<version>1.6R7</version>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/SkinTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ </build>
</project>
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8153 - trunk/test-applications/jsp/src/main/java/rich.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-04-25 05:14:17 -0400 (Fri, 25 Apr 2008)
New Revision: 8153
Modified:
trunk/test-applications/jsp/src/main/java/rich/Options.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/rich/Options.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/rich/Options.java 2008-04-25 09:08:00 UTC (rev 8152)
+++ trunk/test-applications/jsp/src/main/java/rich/Options.java 2008-04-25 09:14:17 UTC (rev 8153)
@@ -25,7 +25,7 @@
private static String [] INPUTNUMBERSLIDER_EVENT = {"onblur", "onchange", "onclick", "ondblclick", "onerror", "onfocus", "onkeydown", "onkeypress", "onkeyup", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onselect", "onslide"};
private static String [] INPUTNUMBERSLIDER_STYLE = {"barClass", "barStyle", "handleClass", "inputClass", "handleSelectedClass", "inputSize", "styleClass", "inputStyle", "tipStyle", "style", "tipClass"};
-
+ private boolean consol;
private boolean reDefault;
private boolean reComponent;
private boolean reProperty;
@@ -65,4 +65,12 @@
public void setReDefault(boolean reDefault) {
this.reDefault = reDefault;
}
+
+ public boolean isConsol() {
+ return consol;
+ }
+
+ public void setConsol(boolean consol) {
+ this.consol = consol;
+ }
}
16 years, 8 months
JBoss Rich Faces SVN: r8152 - trunk/test-applications/facelets/src/main/webapp/styles.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-25 05:08:00 -0400 (Fri, 25 Apr 2008)
New Revision: 8152
Modified:
trunk/test-applications/facelets/src/main/webapp/styles/styles.css
Log:
+.test
Modified: trunk/test-applications/facelets/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/styles/styles.css 2008-04-25 08:29:13 UTC (rev 8151)
+++ trunk/test-applications/facelets/src/main/webapp/styles/styles.css 2008-04-25 09:08:00 UTC (rev 8152)
@@ -249,4 +249,7 @@
.body {
background-color: pink;
+}
+.test{
+ color: green;
}
\ No newline at end of file
16 years, 8 months