[richfaces-svn-commits] JBoss Rich Faces SVN: r12248 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/template and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Tue Jan 13 07:01:24 EST 2009
Author: andrei_exadel
Date: 2009-01-13 07:01:24 -0500 (Tue, 13 Jan 2009)
New Revision: 12248
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/default.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/controlLayout.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
Default template added to reset session variables to avoid test failure after server exception
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/controlLayout.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/default.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/default.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/default.xhtml 2009-01-13 12:01:24 UTC (rev 12248)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core">
+<ui:composition template="../layout/layout.xhtml">
+ <ui:define name="template">
+ <h:inputHidden value="" name=""></h:inputHidden>
+ </ui:define>
+ <ui:define name="control">
+ <ui:include src="../layout/controlLayout.xhtml" />
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 11:53:18 UTC (rev 12247)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 12:01:24 UTC (rev 12248)
@@ -62,6 +62,8 @@
protected static final String serverPort = "8085";
protected static final String WINDOW_JS_RESOLVER = "selenium.browserbot.getCurrentWindow().";
+
+ private static final String DEFAULT_PAGE_URL = "/template/default.xhtml";
/** Parent component id */
private String parentId;
@@ -286,18 +288,27 @@
if (null == url) {
postfix = getTestUrl();
}
- selenium.open(protocol + "://" + host + ":" + port + "/" + APPLICATION_NAME + filterPrefix + postfix);
- selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+ selenium.open(protocol + "://" + host + ":" + port + "/" + APPLICATION_NAME + filterPrefix + DEFAULT_PAGE_URL);
+ waitForPageToLoad();
setParentId(template.getPrefix());
- runScript("loadTemplate('" + template + "');", false);
+ runScript("loadTemplate('" + template + "', '" + resetMethodName + "');", false);
waitForPageToLoad();
+
+ selenium.open(protocol + "://" + host + ":" + port + "/" + APPLICATION_NAME + filterPrefix + postfix);
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+// setParentId(template.getPrefix());
+// runScript("loadTemplate('" + template + "', '" + resetMethodName + "');", false);
+// waitForPageToLoad();
+
checkPageRendering(); // At the first we check if page has been
// rendered
checkJSError(); // At the second we check if JS errors occurred
- reRenderForm(resetMethodName); // ReRender component
+ reRenderForm(); // ReRender component
checkPageRendering(); // Check all again
checkJSError();
More information about the richfaces-svn-commits
mailing list