You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2019/11/15 16:22:39 UTC

[wicket] branch WICKET-6703-replace-eval-with-domEval updated: WICKET-6703 test for multiple suspensions

This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch WICKET-6703-replace-eval-with-domEval
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/WICKET-6703-replace-eval-with-domEval by this push:
     new cfe1a41  WICKET-6703 test for multiple suspensions
cfe1a41 is described below

commit cfe1a410e091479872273200cbc0640506ec8fe3
Author: Sven Meier <sv...@apache.org>
AuthorDate: Fri Nov 15 17:22:14 2019 +0100

    WICKET-6703 test for multiple suspensions
---
 wicket-core/src/test/js/ajax.js                       |  6 +++---
 wicket-core/src/test/js/all.html                      |  2 +-
 ...fier.xml => multipleEvaluationsWithIdentifier.xml} | 19 ++++++++++++++++---
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index 0f2caf7..da073c6 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -102,11 +102,11 @@ jQuery(document).ready(function() {
 		 */
 		asyncTest('processEvaluation*s* with suspend.', function () {
 
-			expect(3);
+			expect(4);
 
 			var attrs = {
-				u: 'data/ajax/twoEvaluationsWithIdentifier.xml',
-				c: 'twoEvaluationsWithIdentifier'
+				u: 'data/ajax/multipleEvaluationsWithIdentifier.xml',
+				c: 'multipleEvaluationsWithIdentifier'
 			};
 			execute(attrs);
 		});
diff --git a/wicket-core/src/test/js/all.html b/wicket-core/src/test/js/all.html
index 1babc7a..5263285 100644
--- a/wicket-core/src/test/js/all.html
+++ b/wicket-core/src/test/js/all.html
@@ -45,7 +45,7 @@
 		<div id="evaluationId"></div>
 		<div id="priorityEvaluationId"></div>
 		<div id="evaluationIdentifierAndCodeId"></div>
-		<div id="twoEvaluationsWithIdentifier"></div>
+		<div id="multipleEvaluationsWithIdentifier"></div>
 
 		<div id="componentToReplace">old body</div>
 
diff --git a/wicket-core/src/test/js/data/ajax/twoEvaluationsWithIdentifier.xml b/wicket-core/src/test/js/data/ajax/multipleEvaluationsWithIdentifier.xml
similarity index 73%
rename from wicket-core/src/test/js/data/ajax/twoEvaluationsWithIdentifier.xml
rename to wicket-core/src/test/js/data/ajax/multipleEvaluationsWithIdentifier.xml
index 0c65d38..e4ba430 100644
--- a/wicket-core/src/test/js/data/ajax/twoEvaluationsWithIdentifier.xml
+++ b/wicket-core/src/test/js/data/ajax/multipleEvaluationsWithIdentifier.xml
@@ -20,14 +20,27 @@
 <head xmlns:wicket="http://wicket.apache.org">
 <script type="text/javascript">
 /*<![CDATA[*/
-ok(true, 'Evaluation must be executed!');
-Wicket.Ajax.suspendCall()();
+ok(true, 'Evaluation 1 must be executed!');
+var suspension = Wicket.Ajax.suspendCall();
+setTimeout(function() {
+	suspension();
+	suspension();
+}, 0);
 /*]]]]><![CDATA[>*/
 </script>
 <script type="text/javascript">
 /*<![CDATA[*/
-ok(true, 'Evaluation must be executed!');
+ok(true, 'Evaluation 2 must be executed!');
 Wicket.Ajax.suspendCall()();
+/*]]]]><![CDATA[>*/
+</script>
+<script type="text/javascript">
+/*<![CDATA[*/
+ok(true, 'Evaluation 3 must be executed!');
+var suspension = Wicket.Ajax.suspendCall();
+setTimeout(function() {
+	suspension();
+}, 0);
 start();
 /*]]]]><![CDATA[>*/
 </script>