You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/12/03 19:29:26 UTC

[6/6] git commit: Fix broken tests

Fix broken tests


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7166c2a3
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7166c2a3
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7166c2a3

Branch: refs/heads/5.4-js-rewrite
Commit: 7166c2a37bceb174fdd244eecfaa4d43d25d70b4
Parents: aa4ccaa
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Dec 3 08:40:09 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Dec 3 08:40:09 2012 -0800

----------------------------------------------------------------------
 .../tapestry5/integration/app1/AlertsTests.groovy  |    6 +++---
 .../integration/app1/CanceledEventTests.groovy     |    4 ++--
 .../integration/app1/FormFieldFocusTest.groovy     |    6 +++++-
 .../tapestry5/integration/app1/FormTests.java      |    4 +++-
 4 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7166c2a3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
index b174b03..f949610 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
@@ -1,4 +1,4 @@
-// Copyright  2011 The Apache Software Foundation
+// Copyright 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -66,9 +66,9 @@ class AlertsTests extends TapestryCoreTestCase {
         select "css=#ajax select[name=\"duration\"]", "Until Dismissed"
         type "css=#ajax input[name=\"message\"]", "ajax error until"
 
-        click "//input[@value='Ajax Update']"
+        waitForPageLoaded()
 
-        sleep 50  // Give page time to fully initialize
+        click "//input[@value='Ajax Update']"
 
         waitForCSSSelectedElementToAppear "$CONTAINER .alert"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7166c2a3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/CanceledEventTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/CanceledEventTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/CanceledEventTests.groovy
index a6f7ddc..49adef0 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/CanceledEventTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/CanceledEventTests.groovy
@@ -10,7 +10,7 @@ class CanceledEventTests extends TapestryCoreTestCase
     {
         openLinks "Canceled Event Demo"
 
-        sleep 100
+        waitForPageLoaded()
 
         clickAndWait SUBMIT
 
@@ -22,7 +22,7 @@ class CanceledEventTests extends TapestryCoreTestCase
     {
         openLinks "Canceled Event Demo"
 
-        sleep 100
+        waitForPageLoaded()
 
         clickAndWait "link=Cancel Form"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7166c2a3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy
index e33126c..e06aab2 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/FormFieldFocusTest.groovy
@@ -1,4 +1,4 @@
-// Copyright (c) 2011. The Apache Software Foundation
+// Copyright (c) 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -29,6 +29,8 @@ class FormFieldFocusTest extends TapestryCoreTestCase
     {
         openLinks "FormFieldFocus (DEPRECATED) Demo"
 
+        waitForPageLoaded()
+
         assertEquals getEval("window.document.activeElement.value"), "But I got the focus!"
 
     }
@@ -38,6 +40,8 @@ class FormFieldFocusTest extends TapestryCoreTestCase
     {
         openLinks "OverrideFieldFocus Demo"
 
+        waitForPageLoaded()
+
         assertEquals getEval("window.document.activeElement.value"), "But I got the focus!"
 
     }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7166c2a3/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
index 500d49c..ca9b851 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
@@ -1,4 +1,4 @@
-// Copyright 2009, 2010, 2011 The Apache Software Foundation
+// Copyright 2009, 2010, 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -163,6 +163,8 @@ public class FormTests extends TapestryCoreTestCase
 
         clickAndWait("link=Clear Data");
 
+        waitForPageLoaded();
+
         clickAndWait("//input[@value='Cancel']");
 
         assertText("message", "Form was cancelled.");