geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r654081 - in /geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport: SeleniumTestSupport.java console/ConsoleTestSupport.java
Date Wed, 07 May 2008 12:30:38 GMT
Author: jdillon
Date: Wed May  7 05:30:37 2008
New Revision: 654081

URL: http://svn.apache.org/viewvc?rev=654081&view=rev
Log:
Added waitForLoad()

Modified:
    geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/SeleniumTestSupport.java
    geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java

Modified: geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/SeleniumTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/SeleniumTestSupport.java?rev=654081&r1=654080&r2=654081&view=diff
==============================================================================
--- geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/SeleniumTestSupport.java
(original)
+++ geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/SeleniumTestSupport.java
Wed May  7 05:30:37 2008
@@ -29,7 +29,7 @@
 import org.testng.annotations.AfterSuite;
 
 /**
- * ???
+ * Provides support for Selenium test cases.
  *
  * @version $Rev$ $Date$
  */
@@ -67,7 +67,11 @@
         
         selenium.stop();
     }
-
+    
+    protected void waitForLoad() throws Exception {
+        selenium.waitForPageToLoad("30000");
+    }
+    
     /**
      * junit's per class setup.
      * 
@@ -87,6 +91,6 @@
         
         selenium.stop();
     }
-     */
+    */
 }
 

Modified: geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java?rev=654081&r1=654080&r2=654081&view=diff
==============================================================================
--- geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java
(original)
+++ geronimo/server/trunk/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java
Wed May  7 05:30:37 2008
@@ -22,7 +22,7 @@
 import org.apache.geronimo.testsupport.SeleniumTestSupport;
 
 /**
- * ???
+ * Provides support for console-related tests.
  *
  * @version $Rev$ $Date$
  */
@@ -31,28 +31,27 @@
 {
     protected void login() throws Exception {
         selenium.open("/");
-        selenium.waitForPageToLoad("30000");
+        waitForLoad();
+        
         assertEquals("Apache Geronimo", selenium.getTitle());
         
         selenium.click("link=Console");
-        selenium.waitForPageToLoad("30000");
+        waitForLoad();
+        
         assertEquals("Geronimo Console Login", selenium.getTitle());
         
         selenium.type("j_username", "system");
         selenium.type("j_password", "manager");
         selenium.click("submit");
-        selenium.waitForPageToLoad("30000");
+        waitForLoad();
         assertEquals("Geronimo Console", selenium.getTitle());
     }
     
     protected void logout() throws Exception {
-        // log body for debugging purposes
-        if (!selenium.isElementPresent("//a[contains(@href, '/console/logout.jsp')]")) {
-            System.out.println(selenium.getBodyText());
-        }
-
         selenium.click("//a[contains(@href, '/console/logout.jsp')]");
-        selenium.waitForPageToLoad("30000");
+        
+        waitForLoad();
+        
         assertEquals("Geronimo Console Login", selenium.getTitle());
         
         //selenium.removeCookie("JSESSIONID", "/");



Mime
View raw message