Author: ppitonak(a)redhat.com
Date: 2010-12-21 11:00:55 -0500 (Tue, 21 Dec 2010)
New Revision: 20723
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
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
Log:
* added tests for attribute execute of a4j:ajax
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -32,15 +32,11 @@
import java.net.URL;
import java.util.Locale;
-import java.util.Random;
-import java.util.Set;
import javax.faces.event.PhaseId;
import org.apache.commons.lang.LocaleUtils;
import org.jboss.test.selenium.AbstractTestCase;
-import org.jboss.test.selenium.cookie.Cookie;
-import org.jboss.test.selenium.cookie.DeleteCookieOptions;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.Attribute;
@@ -64,6 +60,7 @@
*/
public abstract class AbstractMetamerTest extends AbstractTestCase {
+ protected JQueryLocator time = jq("span[id$=requestTime]");
/**
* timeout in miliseconds
*/
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -24,6 +24,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import javax.faces.event.PhaseId;
@@ -54,7 +55,6 @@
}
public void testBypassUpdates(JQueryLocator command) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -76,7 +76,6 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.type(input, "some input text");
@@ -87,8 +86,25 @@
assertEquals(data, "RichFaces 4", "Data sent with ajax
request");
}
+ public void testExecute(JQueryLocator command) {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
+ selenium.waitForPageToLoad();
+
+ selenium.type(input, "RichFaces 4");
+ guardXhr(selenium).click(command);
+ waitGui.failWith("Page was not
updated").waitForChangeAndReturn("", retrieveText.locator(output1));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
public void testImmediate(JQueryLocator command) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
@@ -104,7 +120,6 @@
}
public void testImmediateBypassUpdates(JQueryLocator command) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -124,7 +139,6 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.type(input, "RichFaces 4");
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionValue;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import javax.faces.event.PhaseId;
@@ -54,7 +55,6 @@
}
public void testBypassUpdates(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -75,7 +75,6 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).addSelection(input, optionValue("Audi"));
@@ -85,8 +84,25 @@
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testExecute(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
+ selenium.waitForPageToLoad();
+
+ String timeValue = selenium.getText(time);
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
public void testImmediate(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
@@ -101,7 +117,6 @@
}
public void testImmediateBypassUpdates(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -120,7 +135,6 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).addSelection(input, optionValue("Audi"));
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionValue;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import javax.faces.event.PhaseId;
@@ -54,7 +55,6 @@
}
public void testBypassUpdates(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -75,7 +75,6 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).select(input, optionValue("Audi"));
@@ -85,8 +84,25 @@
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testExecute(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
+ selenium.waitForPageToLoad();
+
+ String timeValue = selenium.getText(time);
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
public void testImmediate(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
@@ -101,7 +117,6 @@
}
public void testImmediateBypassUpdates(JQueryLocator input) {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -120,7 +135,6 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).select(input, optionValue("Audi"));
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -24,6 +24,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import javax.faces.event.PhaseId;
import org.jboss.test.selenium.dom.Event;
@@ -91,6 +92,25 @@
assertEquals(data, "RichFaces 4 data", "Data sent with ajax
request");
}
+ public void testExecute(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "@this
executeChecker");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
public void testImmediate(JQueryLocator input) {
JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandButton.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(button);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHCommandLink.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -38,7 +38,7 @@
public class TestHCommandLink extends AbstractTestCommand {
private JQueryLocator link = pjq("a[id$=commandLink]");
-
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/a4jAjax/hCommandLink.xhtml");
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(link);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHGraphicImage.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -38,7 +38,7 @@
public class TestHGraphicImage extends AbstractTestCommand {
private JQueryLocator button = pjq("img[id$=image]");
-
+
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/a4jAjax/hGraphicImage.xhtml");
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(button);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -66,6 +66,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import java.net.URL;
@@ -65,7 +66,6 @@
@Test
public void testBypassUpdates() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -87,7 +87,6 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).click(input);
@@ -98,8 +97,26 @@
}
@Test
+ public void testExecute() {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
+ selenium.waitForPageToLoad();
+
+ String timeValue = selenium.getText(time);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
public void testImmediate() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
@@ -115,7 +132,6 @@
@Test
public void testImmediateBypassUpdates() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -135,7 +151,6 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).click(input);
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import java.net.URL;
@@ -98,6 +99,26 @@
}
@Test
+ public void testExecute() {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "input
executeChecker");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
public void testImmediate() {
JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -59,6 +59,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -59,6 +59,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -59,6 +59,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -59,6 +59,11 @@
}
@Test
+ public void testExecute() {
+ super.testExecute(input);
+ }
+
+ @Test
public void testImmediate() {
super.testImmediate(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 2010-12-21
14:45:31 UTC (rev 20722)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java 2010-12-21
16:00:55 UTC (rev 20723)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
import java.net.URL;
import javax.faces.event.PhaseId;
@@ -63,7 +64,6 @@
@Test
public void testBypassUpdates() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -85,7 +85,6 @@
selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data
= event.data");
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).click(input);
@@ -97,7 +96,6 @@
@Test
public void testImmediate() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
@@ -112,8 +110,27 @@
}
@Test
+ public void testExecute() {
+ String timeValue = 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));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("*
executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
public void testImmediateBypassUpdates() {
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
@@ -133,7 +150,6 @@
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
- JQueryLocator time = jq("span[id$=requestTime]");
String timeValue = selenium.getText(time);
guardXhr(selenium).click(input);