Author: konstantin.mishin
Date: 2009-03-05 12:06:46 -0500 (Thu, 05 Mar 2009)
New Revision: 12844
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step1.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
Log:
RF-6304
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxInclude/step1.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java 2009-03-05
15:41:28 UTC (rev 12843)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxIncludeTest.java 2009-03-05
17:06:46 UTC (rev 12844)
@@ -51,6 +51,8 @@
private String submit;
+ private String messages;
+
private String setTransient;
private void init(Template template) {
@@ -63,6 +65,7 @@
text = include + ":text";
transientState = include + ":transientState";
submit = include + ":submit";
+ messages = include + ":messages";
setTransient = mainForm + ":setTransient";
}
@@ -77,6 +80,25 @@
}
/**
+ * components in included page pass through all JSF lifecycle,
+ * navigation works after include is re-rendered and viewId expression is updated
+ */
+ @Test
+ public void testLifecycleAndNavigation(Template template) {
+ init(template);
+ Assert.assertTrue(selenium.getText(messages).length() == 0);
+ selenium.type(text, "");
+ clickAjaxCommandAndWait(submit);
+ Assert.assertFalse(selenium.getText(messages).length() == 0);
+ selenium.type(text, "q");
+ clickAjaxCommandAndWait(submit);
+ Assert.assertTrue(selenium.getText(messages).length() == 0);
+ selenium.type(text, "next");
+ clickAjaxCommandAndWait(submit);
+ Assert.assertEquals(selenium.getText(text), "next");
+ }
+
+ /**
* transient components are kept when keepTransient = true
*/
@Test
Show replies by date