Author: ppitonak(a)redhat.com
Date: 2011-01-27 11:40:36 -0500 (Thu, 27 Jan 2011)
New Revision: 21287
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButtonWrapped.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandLink.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputSecret.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputText.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextWrapped.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextarea.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandButton.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandLink.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHGraphicImage.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
Log:
* added 26 tests for a4j:ajax
* refactoring
* samples for a4j:ajax fixed
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButton.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -52,6 +52,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButtonWrapped.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButtonWrapped.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandButtonWrapped.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -51,6 +51,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandLink.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandLink.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hCommandLink.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -52,6 +52,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -53,6 +53,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputSecret.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputSecret.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputSecret.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -51,6 +51,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputText.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputText.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputText.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -51,6 +51,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextWrapped.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextWrapped.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextWrapped.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -51,6 +51,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextarea.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextarea.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hInputTextarea.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -51,6 +51,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -50,6 +50,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -56,6 +56,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -57,6 +57,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -57,6 +57,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -56,6 +56,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -57,6 +57,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -56,6 +56,7 @@
limitRender="#{a4jAjaxBean.attributes['limitRender'].value}"
listener="#{a4jAjaxBean.attributes.listener}"
onbeforedomupdate="#{a4jAjaxBean.attributes['onbeforedomupdate'].value}"
+
onbeforesubmit="#{a4jAjaxBean.attributes['onbeforesubmit'].value}"
onbegin="#{a4jAjaxBean.attributes['onbegin'].value}"
oncomplete="#{a4jAjaxBean.attributes['oncomplete'].value}"
onerror="#{a4jAjaxBean.attributes['onerror'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -4,7 +4,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-01-27
16:09:53 UTC (rev 21286)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-01-27
16:40:36 UTC (rev 21287)
@@ -5,6 +5,7 @@
<packages>
<package name="org.richfaces.tests.metamer.ftest.hCommandButton"
/>
<package
name="org.richfaces.tests.metamer.ftest.richComponentControl" />
+ <package
name="org.richfaces.tests.metamer.ftest.richDropDownMenu" />
<package name="org.richfaces.tests.metamer.ftest.richFunctions"
/>
<package name="org.richfaces.tests.metamer.ftest.richJQuery"
/>
<package name="org.richfaces.tests.metamer.ftest.richMenuGroup"
/>
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -55,17 +55,17 @@
}
public void testBypassUpdates(JQueryLocator command) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
selenium.type(input, "RichFaces 4");
guardXhr(selenium).click(command);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "", "Output should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -76,16 +76,29 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.type(input, "some input text");
guardXhr(selenium).click(command);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4", "Data sent with ajax
request");
}
+ public void testDisabled(JQueryLocator command) {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ selenium.type(input, "RichFaces 4");
+ guardXhr(selenium).click(command);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "", "Output1 should not
change");
+ assertEquals(selenium.getText(output2), "", "Output2 should not
change");
+ }
+
public void testExecute(JQueryLocator command) {
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
@@ -105,22 +118,22 @@
}
public void testImmediate(JQueryLocator command) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
selenium.type(input, "RichFaces 4");
guardXhr(selenium).click(command);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "RichFaces 4", "Output
should change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
public void testImmediateBypassUpdates(JQueryLocator command) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -129,26 +142,28 @@
selenium.type(input, "RichFaces 4");
guardXhr(selenium).click(command);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "", "Output should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
public void testLimitRender(JQueryLocator command) {
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.type(input, "RichFaces 4");
guardXhr(selenium).click(command);
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
public void testEvents(JQueryLocator command) {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -164,10 +179,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events.length, 3, "3 events should be fired.");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
public void testRender(JQueryLocator command) {
@@ -181,6 +197,14 @@
assertEquals(outputValue, "RichFaces 4", "Wrong output1");
assertEquals(selenium.getText(output2), "", "Wrong
output2");
+ }
+ public void testStatus(JQueryLocator command) {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(command);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
}
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -55,16 +55,16 @@
}
public void testBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).addSelection(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output should not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -75,22 +75,33 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
-
+ String reqTime = selenium.getText(time);
guardXhr(selenium).addSelection(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testDisabled(JQueryLocator input) {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output1 should not change");
+ assertEquals(selenium.getText(output2), "[Ferrari, Lexus]",
"Output2 should not change");
+ }
+
public void testExecute(JQueryLocator input) {
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).addSelection(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -103,21 +114,21 @@
}
public void testImmediate(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).addSelection(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Audi, Ferrari, Lexus]",
"Output should change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
public void testImmediateBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -125,25 +136,26 @@
selenium.waitForPageToLoad();
guardXhr(selenium).addSelection(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output should not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
public void testLimitRender(JQueryLocator input) {
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
-
+ String reqTime = selenium.getText(time);
guardXhr(selenium).addSelection(input, optionValue("Audi"));
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -158,9 +170,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
public void testRender(JQueryLocator input) {
@@ -174,4 +188,13 @@
assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong
output1");
assertEquals(selenium.getText(output2), "[Ferrari, Lexus]", "Wrong
output2");
}
+
+ public void testStatus(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -55,16 +55,16 @@
}
public void testBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).select(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Ferrari", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -75,22 +75,33 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
-
+ String reqTime = selenium.getText(time);
guardXhr(selenium).select(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testDisabled(JQueryLocator input) {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output1 should
not change");
+ assertEquals(selenium.getText(output2), "Ferrari", "Output2 should
not change");
+ }
+
public void testExecute(JQueryLocator input) {
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).select(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -103,21 +114,21 @@
}
public void testImmediate(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).select(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Audi", "Output should
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
public void testImmediateBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -125,25 +136,27 @@
selenium.waitForPageToLoad();
guardXhr(selenium).select(input, optionValue("Audi"));
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Ferrari", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
public void testLimitRender(JQueryLocator input) {
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).select(input, optionValue("Audi"));
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -158,9 +171,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
public void testRender(JQueryLocator input) {
@@ -174,4 +189,13 @@
assertEquals(outputValue, "Audi", "Wrong output1");
assertEquals(selenium.getText(output2), "Ferrari", "Wrong
output2");
}
+
+ public void testStatus(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -61,16 +61,16 @@
}
public void testBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
typeToInput(input, "RichFaces 4");
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "", "Output should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -81,22 +81,34 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
typeToInput(input, "RichFaces 4");
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testDisabled(JQueryLocator input) {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "", "Output1 should not
change");
+ assertEquals(selenium.getText(output2), "", "Output2 should not
change");
+ }
+
public void testExecute(JQueryLocator input) {
selenium.type(pjq("input[type=text][id$=executeInput]"), "@this
executeChecker");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
typeToInput(input, "RichFaces 4");
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -109,21 +121,21 @@
}
public void testImmediate(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
typeToInput(input, "RichFaces 4");
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "RichFaces 4", "Output
should change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
public void testImmediateBypassUpdates(JQueryLocator input) {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -131,25 +143,27 @@
selenium.waitForPageToLoad();
typeToInput(input, "RichFaces 4");
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "", "Output should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
public void testLimitRender(JQueryLocator input) {
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
typeToInput(input, "RichFaces 4");
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -164,9 +178,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 44, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
public void testRender(JQueryLocator input) {
@@ -180,4 +196,13 @@
assertEquals(outputValue, "RichFaces 4", "Wrong output1");
assertEquals(selenium.getText(output2), "", "Wrong
output2");
}
+
+ public void testStatus(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandButton.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandButton.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandButton.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -38,7 +38,7 @@
public class TestHCommandButton extends AbstractTestCommand {
private JQueryLocator button =
pjq("input[type=submit][id$=commandButton]");
-
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/a4jAjax/hCommandButton.xhtml");
@@ -46,52 +46,62 @@
@Test
public void testSimpleClick() {
- super.testClick(button, "RichFaces 4");
+ testClick(button, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")//
</editor-fold>
public void testSimpleClickUnicode() {
- super.testClick(button, "ľščťžýáíéúôň фывацукйешгщь");
+ testClick(button, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(button);
+ testBypassUpdates(button);
}
@Test
public void testData() {
- super.testData(button);
+ testData(button);
}
@Test
+ public void testDisabled() {
+ testDisabled(button);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(button);
+ testExecute(button);
}
@Test
public void testImmediate() {
- super.testImmediate(button);
+ testImmediate(button);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(button);
+ testImmediateBypassUpdates(button);
}
@Test
public void testLimitRender() {
- super.testLimitRender(button);
+ testLimitRender(button);
}
@Test
public void testEvents() {
- super.testEvents(button);
+ testEvents(button);
}
@Test
public void testRender() {
- super.testRender(button);
+ testRender(button);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(button);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandLink.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandLink.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandLink.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -46,52 +46,62 @@
@Test
public void testSimpleClick() {
- super.testClick(link, "RichFaces 4");
+ testClick(link, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")
public void testSimpleClickUnicode() {
- super.testClick(link, "ľščťžýáíéúôň фывацукйешгщь");
+ testClick(link, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(link);
+ testBypassUpdates(link);
}
@Test
public void testData() {
- super.testData(link);
+ testData(link);
}
@Test
+ public void testDisabled() {
+ testDisabled(link);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(link);
+ testExecute(link);
}
@Test
public void testImmediate() {
- super.testImmediate(link);
+ testImmediate(link);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(link);
+ testImmediateBypassUpdates(link);
}
@Test
public void testLimitRender() {
- super.testLimitRender(link);
+ testLimitRender(link);
}
@Test
public void testEvents() {
- super.testEvents(link);
+ testEvents(link);
}
@Test
public void testRender() {
- super.testRender(link);
+ testRender(link);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(link);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHGraphicImage.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHGraphicImage.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHGraphicImage.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -46,52 +46,62 @@
@Test
public void testSimpleClick() {
- super.testClick(button, "RichFaces 4");
+ testClick(button, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")
public void testSimpleClickUnicode() {
- super.testClick(button, "ľščťžýáíéúôň фывацукйешгщь");
+ testClick(button, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(button);
+ testBypassUpdates(button);
}
@Test
public void testData() {
- super.testData(button);
+ testData(button);
}
@Test
+ public void testDisabled() {
+ testDisabled(button);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(button);
+ testExecute(button);
}
@Test
public void testImmediate() {
- super.testImmediate(button);
+ testImmediate(button);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(button);
+ testImmediateBypassUpdates(button);
}
@Test
public void testLimitRender() {
- super.testLimitRender(button);
+ testLimitRender(button);
}
@Test
public void testEvents() {
- super.testEvents(button);
+ testEvents(button);
}
@Test
public void testRender() {
- super.testRender(button);
+ testRender(button);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(button);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,9 +24,9 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
-
import org.testng.annotations.Test;
/**
@@ -46,52 +46,62 @@
@Test
public void testSimpleType() {
- super.testType(input, "RichFaces 4");
+ testType(input, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")
public void testSimpleTypeUnicode() {
- super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ testType(input, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,9 +24,9 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
-
import org.testng.annotations.Test;
/**
@@ -46,52 +46,62 @@
@Test
public void testSimpleType() {
- super.testType(input, "RichFaces 4");
+ testType(input, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")
public void testSimpleTypeUnicode() {
- super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ testType(input, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,9 +24,9 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
-
import org.testng.annotations.Test;
/**
@@ -46,52 +46,62 @@
@Test
public void testSimpleType() {
- super.testType(input, "RichFaces 4");
+ testType(input, "RichFaces 4");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-9665")
public void testSimpleTypeUnicode() {
- super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ testType(input, "ľščťžýáíéúôň фывацукйешгщь");
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -66,16 +66,16 @@
@Test
public void testBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "false", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -87,23 +87,36 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
@Test
+ public void testDisabled() {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "false", "Output1 should
not change");
+ assertEquals(selenium.getText(output2), "false", "Output2 should
not change");
+ }
+
+ @Test
public void testExecute() {
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -117,22 +130,22 @@
@Test
public void testImmediate() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "true", "Output should
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
@Test
public void testImmediateBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -140,10 +153,10 @@
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "false", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
@Test
@@ -151,16 +164,18 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
@Test
public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -175,9 +190,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
@Test
@@ -192,4 +209,14 @@
assertEquals(outputValue, "true", "Wrong output1");
assertEquals(selenium.getText(output2), "false", "Wrong
output2");
}
+
+ @Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -66,16 +66,16 @@
@Test
public void testBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output should not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -87,23 +87,35 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
-
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
@Test
+ public void testDisabled() {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output1 should not change");
+ assertEquals(selenium.getText(output2), "[Ferrari, Lexus]",
"Output2 should not change");
+ }
+
+ @Test
public void testExecute() {
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -117,22 +129,22 @@
@Test
public void testImmediate() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Audi, Ferrari, Lexus]",
"Output should change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
@Test
public void testImmediateBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -140,10 +152,10 @@
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "[Ferrari, Lexus]",
"Output should not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
@Test
@@ -151,16 +163,18 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
@Test
public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -175,9 +189,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
@Test
@@ -192,4 +208,14 @@
assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong
output1");
assertEquals(selenium.getText(output2), "[Ferrari, Lexus]", "Wrong
output2");
}
+
+ @Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,8 +24,8 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
-
import org.testng.annotations.Test;
/**
@@ -45,46 +45,56 @@
@Test
public void testSimpleClick() {
- super.testClick(input);
+ testClick(input);
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,8 +24,8 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
-
import org.testng.annotations.Test;
/**
@@ -45,46 +45,56 @@
@Test
public void testSimpleClick() {
- super.testClick(input);
+ testClick(input);
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,8 +24,8 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
-
import org.testng.annotations.Test;
/**
@@ -45,46 +45,56 @@
@Test
public void testSimpleClick() {
- super.testClick(input);
+ testClick(input);
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -24,8 +24,8 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
+
import org.jboss.test.selenium.locator.JQueryLocator;
-
import org.testng.annotations.Test;
/**
@@ -45,46 +45,56 @@
@Test
public void testSimpleClick() {
- super.testClick(input);
+ testClick(input);
}
@Test
public void testBypassUpdates() {
- super.testBypassUpdates(input);
+ testBypassUpdates(input);
}
@Test
public void testData() {
- super.testData(input);
+ testData(input);
}
@Test
+ public void testDisabled() {
+ testDisabled(input);
+ }
+
+ @Test
public void testExecute() {
- super.testExecute(input);
+ testExecute(input);
}
@Test
public void testImmediate() {
- super.testImmediate(input);
+ testImmediate(input);
}
@Test
public void testImmediateBypassUpdates() {
- super.testImmediateBypassUpdates(input);
+ testImmediateBypassUpdates(input);
}
@Test
public void testLimitRender() {
- super.testLimitRender(input);
+ testLimitRender(input);
}
@Test
public void testEvents() {
- super.testEvents(input);
+ testEvents(input);
}
@Test
public void testRender() {
- super.testRender(input);
+ testRender(input);
}
+
+ @Test
+ public void testStatus() {
+ testStatus(input);
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -28,7 +28,9 @@
import static org.testng.Assert.fail;
import java.net.URL;
+
import javax.faces.event.PhaseId;
+
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
@@ -64,16 +66,16 @@
@Test
public void testBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Ferrari", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -85,39 +87,51 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
-
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
String data = selenium.getEval(new JavaScript("window.data"));
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
@Test
+ public void testDisabled() {
+
selenium.click(pjq("input[type=radio][name$=disabledInput][value=true]"));
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output1 should
not change");
+ assertEquals(selenium.getText(output2), "Ferrari", "Output2 should
not change");
+ }
+
+ @Test
public void testImmediate() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Audi", "Output should
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION,
PhaseId.RENDER_RESPONSE);
}
@Test
public void testExecute() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
for (int i = 0; i < 6; i++) {
@@ -131,7 +145,7 @@
@Test
public void testImmediateBypassUpdates() {
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
@@ -139,10 +153,10 @@
selenium.waitForPageToLoad();
guardXhr(selenium).click(input);
- waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+ waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
assertEquals(selenium.getText(output1), "Ferrari", "Output should
not change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
}
@Test
@@ -150,16 +164,18 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- String timeValue = selenium.getText(time);
+ String reqTime = selenium.getText(time);
guardXhr(selenium).click(input);
waitGui.failWith("Page was not updated").waitForChange("",
retrieveText.locator(output1));
- assertEquals(selenium.getText(time), timeValue, "Ajax-rendered
a4j:outputPanel shouldn't change");
+ assertEquals(selenium.getText(time), reqTime, "Ajax-rendered a4j:outputPanel
shouldn't change");
}
@Test
public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeforesubmitInput]"),
"metamerEvents += \"beforesubmit \"");
+ selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeginInput]"),
"metamerEvents += \"begin \"");
selenium.waitForPageToLoad();
selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"),
"metamerEvents += \"beforedomupdate \"");
@@ -174,9 +190,11 @@
String[] events = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
- assertEquals(events[0], "begin", "Attribute onbegin doesn't
work");
- assertEquals(events[1], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
- assertEquals(events[2], "complete", "Attribute oncomplete
doesn't work");
+ assertEquals(events.length, 4, "4 events should be fired.");
+ assertEquals(events[0], "beforesubmit", "Attribute onbeforesubmit
doesn't work");
+ assertEquals(events[1], "begin", "Attribute onbegin doesn't
work");
+ assertEquals(events[2], "beforedomupdate", "Attribute
onbeforedomupdate doesn't work");
+ assertEquals(events[3], "complete", "Attribute oncomplete
doesn't work");
}
@Test
@@ -191,4 +209,14 @@
assertEquals(outputValue, "Audi", "Wrong output1");
assertEquals(selenium.getText(output2), "Ferrari", "Wrong
output2");
}
+
+ @Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"),
"statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Attribute status doesn't
work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2011-01-27
16:09:53 UTC (rev 21286)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jCommandButton/TestA4JCommandButton.java 2011-01-27
16:40:36 UTC (rev 21287)
@@ -166,7 +166,7 @@
assertEquals(selenium.getText(output1), "", "Output 1 should not
change");
assertEquals(selenium.getText(output2), "", "Output 2 should not
change");
assertEquals(selenium.getText(output3), "", "Output 3 should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(3)"));
@@ -235,7 +235,7 @@
assertEquals(selenium.getText(output1), "", "Output 1 should not
change");
assertEquals(selenium.getText(output2), "", "Output 2 should not
change");
assertEquals(selenium.getText(output3), "", "Output 3 should not
change");
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel
li:eq(2)"));
assertEquals(listenerOutput, "* action listener invoked", "Action
listener's output");