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 23:18:39 UTC

svn commit: r1242141 - in /myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test: MultiSuffixSeleniumTest.java tc/button/LinkAttributeSeleniumTest.java tc/button/ResourceAttributeSeleniumTest.java

Author: lofwyr
Date: Wed Feb  8 22:18:39 2012
New Revision: 1242141

URL: http://svn.apache.org/viewvc?rev=1242141&view=rev
Log:
selenium: using waitForPageToLoad()

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/MultiSuffixSeleniumTest.java
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/LinkAttributeSeleniumTest.java
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/ResourceAttributeSeleniumTest.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/MultiSuffixSeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/MultiSuffixSeleniumTest.java?rev=1242141&r1=1242140&r2=1242141&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/MultiSuffixSeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/MultiSuffixSeleniumTest.java Wed Feb  8 22:18:39 2012
@@ -36,10 +36,6 @@ public abstract class MultiSuffixSeleniu
     getSelenium().open(createUrl(urlFragment + suffix));
   }
 
-  protected void sleep() throws InterruptedException {
-    Thread.sleep(5000L);
-  }
-
   @Parameterized.Parameters
   public static Collection<Object[]> findFormats() {
     return Arrays.asList(

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/LinkAttributeSeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/LinkAttributeSeleniumTest.java?rev=1242141&r1=1242140&r2=1242141&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/LinkAttributeSeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/LinkAttributeSeleniumTest.java Wed Feb  8 22:18:39 2012
@@ -34,6 +34,7 @@ public class LinkAttributeSeleniumTest e
   public void testInternalLinkWithSlash() {
     open("/tc/button/link-attribute.");
     getSelenium().click("page:button-internal-link-with-slash");
+    getSelenium().waitForPageToLoad("5000");
     Assert.assertEquals(
         getHtmlSource(),
         "A simple page for the resource test (static).", getSelenium().getText("//html/body"));
@@ -43,6 +44,7 @@ public class LinkAttributeSeleniumTest e
   public void testInternalLinkWithoutSlash() {
     open("/tc/button/link-attribute.");
     getSelenium().click("page:button-internal-link-without-slash");
+    getSelenium().waitForPageToLoad("5000");
     Assert.assertEquals(
         getHtmlSource(),
         "A simple page for the resource test (static).", getSelenium().getText("//html/body"));
@@ -52,8 +54,7 @@ public class LinkAttributeSeleniumTest e
   public void testExternalLink() throws InterruptedException {
     open("/tc/button/link-attribute.");
     getSelenium().click("page:button-external-link");
-    // XXX This sleep call is not nice...
-    sleep();
+    getSelenium().waitForPageToLoad("5000");
     // go to the apache home page
     Assert.assertTrue(
         getHtmlSource(),

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/ResourceAttributeSeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/ResourceAttributeSeleniumTest.java?rev=1242141&r1=1242140&r2=1242141&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/ResourceAttributeSeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/ResourceAttributeSeleniumTest.java Wed Feb  8 22:18:39 2012
@@ -34,8 +34,7 @@ public class ResourceAttributeSeleniumTe
   public void testHtmlResource() throws InterruptedException {
     open("/tc/button/resource-attribute.");
     getSelenium().click("page:button-html-resource");
-    // XXX This sleep call is not nice...
-    sleep();
+    getSelenium().waitForPageToLoad("5000");
     Assert.assertEquals(getHtmlSource(),
         "Eine einfache Seite für den Resourcen-Test (statisch).", getSelenium().getText("//html/body"));
   }
@@ -44,8 +43,7 @@ public class ResourceAttributeSeleniumTe
   public void testXhtmlResource() throws InterruptedException {
     open("/tc/button/resource-attribute.");
     getSelenium().click("page:button-xhtml-resource");
-    // XXX This sleep call is not nice...
-    sleep();
+    getSelenium().waitForPageToLoad("5000");
     Assert.assertTrue(getHtmlSource(),
         getSelenium().getText("//html/body").contains("Eine einfache Seite für den Resourcen-Test (dynamisch)."));
   }