You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/02/08 15:11:37 UTC

svn commit: r1241904 - /myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java

Author: lofwyr
Date: Wed Feb  8 14:11:37 2012
New Revision: 1241904

URL: http://svn.apache.org/viewvc?rev=1241904&view=rev
Log:
selenium tests: no matter, if the test will be started in the project dir or the tobago main dir.

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java?rev=1241904&r1=1241903&r2=1241904&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/AutomaticSeleniumTest.java Wed Feb  8 14:11:37 2012
@@ -48,7 +48,14 @@ public class AutomaticSeleniumTest exten
   public static Collection<Object[]> findPages() {
     List<String> paths = new ArrayList<String>();
 
-    collect(paths, MAVEN_TARGET + '/', "");
+    String base = MAVEN_TARGET + '/';
+
+    // e.g. in the IDE normally the base dir is the tobago project root
+    if (! new File(base).exists()) {
+      base = "tobago-example/tobago-example-test/" + base;
+    }
+    
+    collect(paths, base, "");
 
     Collections.sort(paths);