Author: lfryc(a)redhat.com
Date: 2011-02-22 09:30:05 -0500 (Tue, 22 Feb 2011)
New Revision: 21868
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/a4jActionListener/TestA4JActionListener.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAttachQueue/TestNestedAttachQueue.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
Log:
test fixes + issue tracking
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 2011-02-22
12:48:54 UTC (rev 21867)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-02-22
14:30:05 UTC (rev 21868)
@@ -198,8 +198,7 @@
ElementLocator<?> eventInput = pjq("input[id$=on" + attributeName
+ "Input]");
String value = "metamerEvents += \"" + event.getEventName() +
" \"";
- selenium.type(eventInput, value);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).type(eventInput, value);
selenium.fireEvent(element, event);
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2011-02-22
12:48:54 UTC (rev 21867)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2011-02-22
14:30:05 UTC (rev 21868)
@@ -29,6 +29,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
@@ -111,6 +112,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10585")
public void testInvokeListenerMethodCC() {
final String msg = "Method expression listener called from composite
component";
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAttachQueue/TestNestedAttachQueue.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAttachQueue/TestNestedAttachQueue.java 2011-02-22
12:48:54 UTC (rev 21867)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAttachQueue/TestNestedAttachQueue.java 2011-02-22
14:30:05 UTC (rev 21868)
@@ -22,10 +22,12 @@
package org.richfaces.tests.metamer.ftest.a4jAttachQueue;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertFalse;
import java.net.URL;
import org.jboss.cheiron.halt.XHRHalter;
+import org.jboss.test.selenium.encapsulated.JavaScript;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.a4jQueue.QueueAttributes;
import org.richfaces.tests.metamer.ftest.a4jQueue.QueueModel;
@@ -72,6 +74,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RFPL-1186")
public void testNoDelay() {
attributesAttachQueue1.setRequestDelay(0);
@@ -96,6 +99,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RFPL-1186")
public void testTimingOneQueueTwoEvents() {
queue.initializeTimes();
@@ -114,9 +118,10 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9328")
public void testRendered() {
attributesAttachQueue1.setRequestDelay(1500);
+
attributesAttachQueue1.setOnRequestQueue(JavaScript.js("alert('requestQueued')"));
+
attributesAttachQueue1.setOnRequestDequeue(JavaScript.js("alert('requestDequeued')"));
attributesAttachQueue1.setRendered(false);
queue.initializeTimes();
@@ -124,6 +129,6 @@
// check that no requestDelay is applied while renderer=false
queue.checkTimes(0);
- // TODO should check that no attributes is applied with renderes=false
+ assertFalse(selenium.isAlertPresent());
}
}
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-02-22
12:48:54 UTC (rev 21867)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-02-22
14:30:05 UTC (rev 21868)
@@ -21,6 +21,7 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.a4jOutputPanel;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
@@ -35,6 +36,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.annotations.Uses;
import org.testng.annotations.Test;
@@ -75,8 +77,7 @@
JQueryLocator element = null;
if ("inline".equals(layout)) {
- selenium.click(pjq("input[name$=layoutInput][value=inline]"));
- selenium.waitForPageToLoad(TIMEOUT);
+
guardHttp(selenium).click(pjq("input[name$=layoutInput][value=inline]"));
element = outputSpan;
} else {
element = outputDiv;
@@ -95,12 +96,12 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10555")
public void testAjaxRendered() {
JQueryLocator ajaxRenderedInput =
pjq("input[type=radio][name$=ajaxRenderedInput][value=false]");
JQueryLocator reRenderAllImage = jq("div.header
img[id$=reRenderAllImage]");
- selenium.click(ajaxRenderedInput);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).click(ajaxRenderedInput);
selenium.click(increaseCounterButton);
selenium.click(increaseCounterButton);
@@ -131,13 +132,11 @@
assertTrue(selenium.isElementPresent(outputDiv), "Div should be rendered on
the beginning.");
assertFalse(selenium.isElementPresent(outputSpan), "Div should be rendered
on the beginning.");
- selenium.click(optionInline);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).click(optionInline);
assertFalse(selenium.isElementPresent(outputDiv), "Span should be rendered
when inline is set.");
assertTrue(selenium.isElementPresent(outputSpan), "Span should be rendered
when inline is set.");
- selenium.click(optionBlock);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).click(optionBlock);
assertTrue(selenium.isElementPresent(outputDiv), "Div should be rendered
when block is set.");
assertFalse(selenium.isElementPresent(outputSpan), "Div should be rendered
when block is set.");
@@ -153,8 +152,7 @@
JQueryLocator renderedInputFalse =
pjq("input[type=radio][name$=renderedInput][value=false]");
JQueryLocator renderedInputTrue =
pjq("input[type=radio][name$=renderedInput][value=true]");
- selenium.click(renderedInputFalse);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).click(renderedInputFalse);
assertFalse(selenium.isElementPresent(outputDiv), "Panel should not be
rendered.");
String timeValue = selenium.getText(time);
@@ -164,8 +162,7 @@
guardXhr(selenium).click(increaseCounterButton);
waitGui.failWith("Page was not updated").waitForChange(timeValue,
retrieveText.locator(time));
- selenium.click(renderedInputTrue);
- selenium.waitForPageToLoad(TIMEOUT);
+ guardHttp(selenium).click(renderedInputTrue);
assertTrue(selenium.isElementPresent(outputDiv), "Panel should be
rendered.");
String counter = selenium.getText(outputDiv);
Show replies by date