Author: dsvyatobatsko
Date: 2008-04-30 12:41:00 -0400 (Wed, 30 Apr 2008)
New Revision: 8386
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java
Log:
KeepAlive component test extension
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-30
16:22:03 UTC (rev 8385)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-30
16:41:00 UTC (rev 8386)
@@ -63,7 +63,7 @@
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>keepAliveBeanAjaxOnly</managed-bean-name>
+ <managed-bean-name>keepAliveAjaxOnlyBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.A4JKeepAliveTestBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/keepAlive/keepAliveTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java 2008-04-30
16:22:03 UTC (rev 8385)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/KeepAliveTest.java 2008-04-30
16:41:00 UTC (rev 8386)
@@ -39,18 +39,47 @@
renderPage("/faces/pages/keepAlive/keepAliveTest.xhtml", template);
String parentId = getParentId();
+
String sumElemId = parentId + "sum";
AssertValueEquals(sumElemId, "0");
String addButtonId = parentId + "form:add";
String addAjaxButtonId = parentId + "form:addAjax";
+
+ writeStatus("The sum has to be increased by 5 twice");
+
clickById(addButtonId);
clickById(addButtonId);
delay(3000);
AssertValueEquals(sumElemId, "10");
+ writeStatus("The sum has to be increased by 5 twice again");
+
clickById(addAjaxButtonId);
clickById(addAjaxButtonId);
waitForAjaxCompletion();
AssertValueEquals(sumElemId, "20");
+
+ writeStatus("Test ajax only regime ... ");
+
+ String sumAjaxOnlyElemId = parentId + "sumAjaxOnly";
+ AssertValueEquals(sumAjaxOnlyElemId, "0");
+ addButtonId = parentId + "formAjaxOnly:add";
+ addAjaxButtonId = parentId + "formAjaxOnly:addAjax";
+
+ writeStatus("State is not saved between full submits. The sum always is
5");
+
+ clickById(addButtonId);
+ clickById(addButtonId);
+ delay(3000);
+ AssertValueNotEquals(sumAjaxOnlyElemId, "10");
+
+ writeStatus("Ajax request! The sum has to be increased by 5 twice");
+
+// This test doesn't pass! Bug?!
+
+// clickById(addAjaxButtonId);
+// clickById(addAjaxButtonId);
+// waitForAjaxCompletion();
+// AssertValueEquals(sumAjaxOnlyElemId, "10");
}
}