Author: lfryc(a)redhat.com
Date: 2010-09-14 07:19:55 -0400 (Tue, 14 Sep 2010)
New Revision: 19191
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java
Log:
a4j:queue - added test case for rendered=false (RFPL-733, RFPL-9328)
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java 2010-09-14
10:58:27 UTC (rev 19190)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java 2010-09-14
11:19:55 UTC (rev 19191)
@@ -34,6 +34,7 @@
import org.jboss.test.selenium.waiting.retrievers.Retriever;
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.testng.annotations.Test;
@@ -157,6 +158,20 @@
XHRHalter.disable();
}
+
+ @Test
+ @IssueTracking("https://jira.jboss.org/browse/RF-9328")
+ public void testRendered() {
+ attributes.setRequestDelay(1500);
+ attributes.setRendered(false);
+
+ initializeTimes();
+ fireEvents(1);
+
+ // check that no requestDelay is applied while renderer=false
+ checkTimes(0);
+ // TODO should check that no attributes is applied with renderes=false
+ }
// TODO not implemented yet
public void testTimeout() {
@@ -222,8 +237,12 @@
assertEquals(retrieveCount.retrieve(), eventCount);
}
}
+
+ private void checkTimes() {
+ checkTimes(requestDelay);
+ }
- private void checkTimes() {
+ private void checkTimes(long requestDelay) {
long eventTime = waitAjax.waitForChangeAndReturn(queue.retrieveEvent1Time);
long beginTime = waitAjax.waitForChangeAndReturn(queue.retrieveBeginTime);
long actualDelay = beginTime - eventTime;