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/16 02:17:32 UTC

[3/50] git commit: Address a few tests broken by the merge

Address a few tests broken by the merge


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

Branch: refs/heads/master
Commit: 489f1fe340acfd0ae0251e6401b552ac8136e901
Parents: 3805b93
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Sat Dec 15 16:59:18 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Sat Dec 15 16:59:18 2012 -0800

----------------------------------------------------------------------
 .../tapestry5/corelib/components/Alerts.java       |   13 +++++++------
 .../integration/app1/ZoneRefreshTest.java          |    6 ++++++
 .../tapestry5/test/SanityCheckTestSuite.java       |    1 +
 3 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/489f1fe3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
index b577a89..19a3182 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
@@ -71,11 +71,7 @@ public class Alerts extends BaseClientElement
         resources.renderInformalParameters(writer);
         writer.end();
 
-        if (storage != null)
-        {
-            addAlertsFromStorage();
-        }
-
+        addAlertsFromStorage();
 
         return false;
     }
@@ -101,9 +97,14 @@ public class Alerts extends BaseClientElement
     @HeartbeatDeferred
     void addAlertsFromStorage()
     {
+        if (storage == null)
+        {
+            return;
+        }
+
         for (Alert alert : storage.getAlerts())
         {
-            javaScriptSupport.addInitializerCall("addAlert", alert.toJSON());
+            javaScriptSupport.require("core/alert").with(alert.toJSON());
         }
 
         storage.dismissNonPersistent();

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/489f1fe3/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneRefreshTest.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneRefreshTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneRefreshTest.java
index f105000..46807e3 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneRefreshTest.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ZoneRefreshTest.java
@@ -24,6 +24,8 @@ public class ZoneRefreshTest extends SeleniumTestCase
     {
         openBaseURL();
 
+        waitForPageInitialized();
+
         clickAndWait("link=Zone Refresh With Event Handler Returning Void");
 
         checkZoneValues("zone", 3);
@@ -33,7 +35,11 @@ public class ZoneRefreshTest extends SeleniumTestCase
     public void test_if_zone_with_event_handler_returning_zone_works() throws Exception
     {
         openBaseURL();
+
+        waitForPageInitialized();
+
         clickAndWait("link=Zone Refresh With Event Handler Returning Zone");
+
         checkZoneValues("zone", 3);
     }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/489f1fe3/tapestry-test/src/test/java/org/apache/tapestry5/test/SanityCheckTestSuite.java
----------------------------------------------------------------------
diff --git a/tapestry-test/src/test/java/org/apache/tapestry5/test/SanityCheckTestSuite.java b/tapestry-test/src/test/java/org/apache/tapestry5/test/SanityCheckTestSuite.java
index abdf1f4..f4d2477 100644
--- a/tapestry-test/src/test/java/org/apache/tapestry5/test/SanityCheckTestSuite.java
+++ b/tapestry-test/src/test/java/org/apache/tapestry5/test/SanityCheckTestSuite.java
@@ -17,6 +17,7 @@ package org.apache.tapestry5.test;
 import org.testng.ITestContext;
 import org.testng.annotations.Test;
 
+@TapestryTestConfiguration(webAppFolder = "src/test/webapp")
 public class SanityCheckTestSuite extends SeleniumTestCase
 {
     @Test