Author: dsvyatobatsko
Date: 2008-10-24 08:53:20 -0400 (Fri, 24 Oct 2008)
New Revision: 10896
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollAutoTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4688
https://jira.jboss.org/jira/browse/RF-4689
https://jira.jboss.org/jira/browse/RF-4690
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollAutoTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollAutoTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-10-24
11:58:24 UTC (rev 10895)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-10-24
12:53:20 UTC (rev 10896)
@@ -3,7 +3,11 @@
*/
package org.richfaces.testng;
+import java.util.HashMap;
+import java.util.Map;
+
import org.ajax4jsf.template.Template;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -14,6 +18,14 @@
*/
public class AjaxPollTest extends SeleniumTestBase {
+ private static Map<String, String> params = new HashMap<String,
String>();
+
+ static {
+ params.put("parameter1", "value1");
+ params.put("parameter2", "value2");
+ params.put("parameter3", "value3");
+ }
+
@Test
public void testAjaxPollComponent(Template template) {
renderPage(template);
@@ -40,6 +52,27 @@
}
+ @Test
+ public void testRenderedAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component with rendered = false is not present on the
page");
+ tester.testRendered();
+ }
+
+ @Test
+ public void testNestedParams(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component encodes nested f:param tags and their values are
present as request parameters");
+ tester.testRequestParameters(params);
+ }
+
+ @Override
+ public void sendAjax() {
+ delay(2000);
+ }
+
private void enablePoll(String id) {
writeStatus("Enable polling...");
try {
@@ -59,4 +92,8 @@
return "pages/ajaxPoll/ajaxPollTest.xhtml";
}
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/ajaxPoll/ajaxPollAutoTest.xhtml";
+ }
}