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:33 UTC
[47/50] git commit: Fix more broken tests
Fix 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/d48f199e
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d48f199e
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d48f199e
Branch: refs/heads/master
Commit: d48f199eeadcac2a87de0e17b00b41f96f607959
Parents: d8120f3
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Nov 30 09:36:38 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Nov 30 09:36:38 2012 -0800
----------------------------------------------------------------------
.../integration/app3/PageCatalogTests.groovy | 2 +-
.../integration/app1/ZoneRefreshTest.java | 67 ++++++++-------
2 files changed, 37 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d48f199e/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app3/PageCatalogTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app3/PageCatalogTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app3/PageCatalogTests.groovy
index 7d1dbb5..3ca3efd 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app3/PageCatalogTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app3/PageCatalogTests.groovy
@@ -21,7 +21,7 @@ class PageCatalogTests extends TapestryCoreTestCase
sleep 1000
- assertTextPresent "Page cache cleared"
+ assertTextPresent "Page cache cleared" bzonref
click "link=Run the GC"
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d48f199e/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 e44b7b7..f105000 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
@@ -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.
@@ -19,35 +19,40 @@ import org.testng.annotations.Test;
public class ZoneRefreshTest extends SeleniumTestCase
{
- @Test
- public void test_if_zone_with_event_handler_returning_void_works() throws Exception
- {
- openBaseURL();
- clickAndWait("link=Zone Refresh With Event Handler Returning Void");
- checkZoneValues("zone", 3);
- }
-
- @Test
- public void test_if_zone_with_event_handler_returning_zone_works() throws Exception
- {
- openBaseURL();
- clickAndWait("link=Zone Refresh With Event Handler Returning Zone");
- checkZoneValues("zone", 3);
- }
-
- private void checkZoneValues(String zone, int times) throws Exception
- {
- for(int i = 1; i <= times; ++i)
- {
- //Wait for ajax call to begin
- waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount != 0", "20000");
-
- //Wait for ajax call from end
- waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 0", "20000");
-
- //Check the value changed
- assertText(zone, String.valueOf(i));
- }
- }
+ @Test
+ public void test_if_zone_with_event_handler_returning_void_works() throws Exception
+ {
+ openBaseURL();
+
+ clickAndWait("link=Zone Refresh With Event Handler Returning Void");
+
+ checkZoneValues("zone", 3);
+ }
+
+ @Test
+ public void test_if_zone_with_event_handler_returning_zone_works() throws Exception
+ {
+ openBaseURL();
+ clickAndWait("link=Zone Refresh With Event Handler Returning Zone");
+ checkZoneValues("zone", 3);
+ }
+
+ private void checkZoneValues(String zone, int times) throws Exception
+ {
+ // Wait until Prototype is loaded ...
+ waitForCondition("selenium.browserbot.getCurrentWindow().Ajax", "20000");
+
+ for (int i = 1; i <= times; ++i)
+ {
+ // Wait for ajax call to begin
+ waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount != 0", "20000");
+
+ // Wait for ajax call from end
+ waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount == 0", "20000");
+
+ // Check the value changed
+ assertText(zone, String.valueOf(i));
+ }
+ }
}