tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject git commit: TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when using Prototype
Date Sat, 11 Oct 2014 00:09:50 GMT
Repository: tapestry-5
Updated Branches:
  refs/heads/master c501986cb -> f6de4c4ec


TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when using Prototype


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

Branch: refs/heads/master
Commit: f6de4c4ec497b902dfcfe1b591ecae8bc38c65ec
Parents: c501986
Author: Howard M. Lewis Ship <hlship@apache.org>
Authored: Fri Oct 10 17:09:43 2014 -0700
Committer: Howard M. Lewis Ship <hlship@apache.org>
Committed: Fri Oct 10 17:09:43 2014 -0700

----------------------------------------------------------------------
 .../main/coffeescript/META-INF/modules/t5/core/pageinit.coffee | 4 ++--
 .../org/apache/tapestry5/t5-core-dom.coffee                    | 6 ++----
 .../main/java/org/apache/tapestry5/test/SeleniumTestCase.java  | 4 +---
 3 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
index fba32ab..18e95ff 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
@@ -122,8 +122,8 @@ define ["underscore", "./console", "./dom", "./events"],
             # At this point, all libraries have been loaded, and all inits should have executed.
Unless some of
             # the inits triggered Ajax updates (such as a core/ProgressiveDisplay component),
then the page should
             # be ready to go. We set a flag, mostly used by test suites, to ensure that all
is ready.
-            # Later Ajax requests will cause the data-ajax-active attribute to switch between
"true" and "false",
-            # so some test logic may need to be driven by that instead.
+            # Later Ajax requests will cause the data-ajax-active attribute to be incremented
(from 0)
+            # and decremented (when the requests complete).
 
             dom.body.attr "data-page-initialized", "true"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
index cfb5ecc..dedec57 100644
--- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
+++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
@@ -1,5 +1,3 @@
-# Copyright 2012-2013 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.
 # You may obtain a copy of the License at
@@ -685,7 +683,7 @@ define ["underscore", "./utils", "./events", "jquery"],
 
   # Used to track how many active Ajax requests are currently in-process. This is incremented
   # when an Ajax request is started, and decremented when an Ajax request completes or fails.
-  # The body attribute `data-ajax-active` is set to "true" or "false" whenever the
+  # The body attribute `data-ajax-active` is set to the number of active Ajax requests, whenever
the
   # count changes. This only applies to Ajax requests that are filtered through the t5/core/dom
API;
   # other libraries (including RequireJS) which bypass this API are not counted.
 
@@ -694,7 +692,7 @@ define ["underscore", "./utils", "./events", "jquery"],
   adjustAjaxCount = (delta) ->
     activeAjaxCount += delta
 
-    exports.body.attr "data-ajax-active", (activeAjaxCount > 0)
+    exports.body.attr "data-ajax-active", activeAjaxCount
 
   # Performs an asynchronous Ajax request, invoking callbacks when it completes.
   #

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f6de4c4e/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
----------------------------------------------------------------------
diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
index fda70c5..1add197 100644
--- a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
+++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
@@ -1,5 +1,3 @@
-// Copyright 2009-2014 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.
 // You may obtain a copy of the License at
@@ -1753,7 +1751,7 @@ public abstract class SeleniumTestCase extends Assert implements Selenium
                 sleep(100);
             }
 
-            if (getCssCount("body[data-ajax-active=false]").equals(1))
+            if (getCssCount("body[data-ajax-active='0']").equals(1))
             {
                 return;
             }


Mime
View raw message