Author: abelevich
Date: 2009-03-25 08:19:52 -0400 (Wed, 25 Mar 2009)
New Revision: 13173
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
add possibility to user to define a set of html layout templates per test class in which
tests methods will be executing. (now default templates are: simple, data_table,
data_table2, modal_panel);
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-03-25
12:14:06 UTC (rev 13172)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-03-25
12:19:52 UTC (rev 13173)
@@ -222,10 +222,27 @@
protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy,
@Optional String templates) throws Exception {
Configurator.setLoadScriptStrategy(loadScriptStrategy);
Configurator.setLoadStyleStrategy(loadStyleStrategy);
- Configurator.setTemplates(templates);
+ String processTemplates = templates;
+ if(!useDefaultTemplates()) {
+ processTemplates = getTestDependedTemplates();
+ }
+ Configurator.setTemplates(processTemplates);
}
-
+
+
/**
+ * override this methods if you want use set custom templates per test class
+ *
+ */
+ protected String getTestDependedTemplates() {
+ return null;
+ }
+
+ public boolean useDefaultTemplates() {
+ return true;
+ }
+
+ /**
* This method are invoked after selenium tests completed
*/
@AfterClass(alwaysRun=true)