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/06 01:29:13 UTC

[3/10] git commit: Fix yet more broken tests

Fix yet more 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/771ebc46
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/771ebc46
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/771ebc46

Branch: refs/heads/5.4-js-rewrite
Commit: 771ebc46acfa20590cfe4efd204765952c20f9cb
Parents: 3e7e8a5
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Wed Dec 5 16:06:47 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Wed Dec 5 16:06:47 2012 -0800

----------------------------------------------------------------------
 .../tapestry5/integration/app1/AjaxTests.java      |   33 ++++++++++-----
 .../tapestry5/integration/app1/GridTests.java      |    2 +
 .../tapestry5/integration/app1/ZoneTests.java      |    2 +
 3 files changed, 26 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/771ebc46/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
index 33cd40a..bccab9a 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
@@ -34,7 +34,11 @@ public class AjaxTests extends TapestryCoreTestCase
     @Test
     public void form_fragment()
     {
-        openLinks("Form Fragment Demo", "Clear");
+        // setSpeed("250");
+
+        openLinks("Form Fragment Demo", "Clear Errors");
+
+        waitForPageInitialized();
 
         type("name", "Fred");
 
@@ -51,25 +55,27 @@ public class AjaxTests extends TapestryCoreTestCase
         assertText("email", "");
 
         clickAndWait("link=Back");
-        clickAndWait("link=Clear");
+        clickAndWait("link=Clear Errors");
+
+        waitForPageInitialized();
 
         click("subscribeToEmail");
         click("on");
 
+        // Type a value into the "always submit" field ...
         type("sub", "subvalue");
 
-        waitForCondition("selenium.browserbot.getCurrentWindow().$('code').isDeepVisible() == true", PAGE_LOAD_TIMEOUT);
-
+        // And the other fields ...
         type("name", "Barney");
         type("email", "rubble@bedrock.gov");
         type("code", "ABC123");
 
+        // Now turn off the fragment for the "code" field
         click("off");
 
+        // And hide the subcode fields (but they still always submit)
         click("subVisible");
 
-        waitForCondition("selenium.browserbot.getCurrentWindow().$('code').isDeepVisible() == false", PAGE_LOAD_TIMEOUT);
-
         clickAndWait(SUBMIT);
 
         assertText("name", "Barney");
@@ -85,6 +91,9 @@ public class AjaxTests extends TapestryCoreTestCase
     public void nested_form_fragment()
     {
         openLinks("Nested Form Fragment Demo");
+
+        waitForPageInitialized();
+
         assertTrue(isVisible("outertext1"));
         assertTrue(isVisible("innertext1"));
         assertTrue(isChecked("innertrigger1"));
@@ -189,6 +198,8 @@ public class AjaxTests extends TapestryCoreTestCase
     {
         openLinks("FormInjector Demo");
 
+        waitForPageInitialized();
+
         assertText("sum", "0.0");
 
         click("link=Add a row");
@@ -222,11 +233,9 @@ public class AjaxTests extends TapestryCoreTestCase
 
         click("link=Failure on the server side");
 
-        // Wait for the console to appear
-
-        waitForCSSSelectedElementToAppear("div.t-console div");
-
-        assertTextPresent("Communication with the server failed: Server-side exception.");
+        // Not more more testing can be done; there's no client-side console
+        // because Tapestry now favors the native console (when present),
+        // and the iframe containing the server-side Ajax exception is opaque.
     }
 
     /**
@@ -237,6 +246,8 @@ public class AjaxTests extends TapestryCoreTestCase
     {
         openLinks("ProgressiveDisplay Demo");
 
+        waitForPageInitialized();
+
         waitForElementToAppear("content1");
         assertText("content1", "Progressive Display content #1.");
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/771ebc46/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
index d820a63..5172831 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
@@ -258,6 +258,8 @@ public class GridTests extends TapestryCoreTestCase
     {
         openLinks("In-Place Grid Demo");
 
+        waitForPageInitialized();
+
         String timestamp = getText("lastupdate");
 
         click("link=2");

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/771ebc46/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
index 2cc205f..18e87ea 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneTests.java
@@ -58,6 +58,8 @@ public class ZoneTests extends TapestryCoreTestCase
 
         select("carMaker", "Mercedes");
 
+        sleep(100);
+
         waitForElementToAppear("carModelContainer");
 
         select(selectLocator, "E-Class");