Author: abelevich
Date: 2009-03-05 05:20:09 -0500 (Thu, 05 Mar 2009)
New Revision: 12834
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
Log:
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-05
10:19:33 UTC (rev 12833)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-05
10:20:09 UTC (rev 12834)
@@ -34,10 +34,19 @@
private static final String RESET_METHOD = "#{panelBean.cleanValues}";
+ 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 testRendered(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component render attribute");
autoTester.testRendered();
}
@@ -58,6 +67,7 @@
styleAttributes.put("background-color", "blue");
styleAttributes.put("color", "yellow");
autoTester.testStyleAndClasses(new String[]{"className"},
styleAttributes);
+ writeStatus("Test component html events");
autoTester.testHTMLEvents();
}
@@ -65,6 +75,7 @@
public void testImmediate(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component immediate attribute");
autoTester.testImmediate(false);
}
@@ -81,6 +92,7 @@
public void testAjaxSingle(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test ajaxSingle attribute");
tester.testAjaxSingle();
}
@@ -89,6 +101,7 @@
public void testAjaxSingleWithProcessExternalValidation(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test ajaxSingle attribute with external validation failed");
tester.testAjaxSingleWithProcesExternalValidation(true);
}
@@ -116,6 +129,22 @@
tester.testLimitToList();
}
+ @Test
+ public void testNestedParams(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component encodes nested f:param tags and their values are
present as request parameters");
+ tester.testRequestParameters(params);
+ }
+
+ @Test
+ public void testNestedActionListener(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test nested listener");
+ tester.testNestedActionListener();
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));