myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch master updated: TobagoTestTools can now be run with jQuery 2 and 3
Date Fri, 15 Jun 2018 21:32:17 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 5ed7697  TobagoTestTools can now be run with jQuery 2 and 3
5ed7697 is described below

commit 5ed7697b117f6157af91154cd6d2d41c7a2bfffd
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Fri Jun 15 23:32:07 2018 +0200

    TobagoTestTools can now be run with jQuery 2 and 3
---
 .../tobago-example-demo/src/main/webapp/script/tobago-test.js    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js b/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
index a091dc4..88ee127 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/script/tobago-test.js
@@ -160,7 +160,14 @@ TobagoTestTools.prototype = {
 
     jQuery("#page\\:testframe").on("load", function () {
       if (!isFinished() && !isTimeout()) {
-        responses++;
+
+        /**
+         * we need to wait for the fully loaded DOM, otherwise an action function may executed
to early and some events
+         * like 'componentFn().click()' cannot triggered correctly.
+         */
+        jQuery("#page\\:testframe").ready(function () {
+          responses++;
+        });
 
         // we need to re-initiate the ajax listener
         TobagoFrame().registerListener(detectAjaxResponse, TobagoFrame().Phase.AFTER_UPDATE);

-- 
To stop receiving notification emails like this one, please contact
hnoeth@apache.org.

Mime
View raw message