myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] 01/02: remove unnecessary TTT.waitForResponse();
Date Thu, 07 Jun 2018 14:44:56 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

commit e2bc3cebdd745e04f8068a8aecef482a58b2983e
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Thu Jun 7 14:31:48 2018 +0200

    remove unnecessary TTT.waitForResponse();
---
 .../20-component/010-input/10-in/in.test.js        |  4 +-
 .../090-tree/01-select/tree-select.test.js         | 46 +++++++++++-----------
 .../08-form/10-required/form-required.test.js      | 18 ++++-----
 .../content/40-test/6000-event/event.test.js       |  6 +--
 4 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.test.js
index d385e71..8bdbee8 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.test.js
@@ -24,7 +24,7 @@ QUnit.test("inputfield with label", function (assert) {
     assert.equal($label().text(), "Input");
     assert.equal($inputField().val(), "Some Text");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $inputField().val("abc");
   });
   TTT.asserts(1, function () {
@@ -42,7 +42,7 @@ QUnit.test("ajax change event", function (assert) {
     assert.equal($inputField().val(), "");
     assert.equal($outputField().text(), "");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $inputField().val("qwe").trigger("change");
   });
   TTT.waitForResponse();
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.test.js
index ae5027a..259aa3a 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.test.js
@@ -24,28 +24,28 @@ QUnit.test("single: select Music, select Mathematics", function (assert)
{
   var $input = jQueryFrameFn(".tobago-treeSelect input");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableNone().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableSingle().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.notEqual($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $music().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Music");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $mathematics().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
@@ -64,28 +64,28 @@ QUnit.test("singleLeafOnly: select Classic, select Mathematics", function
(asser
   var $input = jQueryFrameFn(".tobago-treeSelect input");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableNone().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableSingleLeafOnly().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.notEqual($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $classic().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Classic");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $mathematics().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
@@ -104,35 +104,35 @@ QUnit.test("multi: select Music, select Mathematics, deselect Music",
function (
   var $input = jQueryFrameFn(".tobago-treeSelect input");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableNone().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableMulti().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.notEqual($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $music().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Music");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $mathematics().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Music, Mathematics");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $music().prop("checked", false).trigger("change");
   });
   TTT.waitForResponse();
@@ -151,35 +151,35 @@ QUnit.test("multiLeafOnly: select Classic, select Mathematics, deselect
Classic"
   var $input = jQueryFrameFn(".tobago-treeSelect input");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableNone().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableMultiLeafOnly().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.notEqual($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $classic().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Classic");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $mathematics().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Classic, Mathematics");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $classic().prop("checked", false).trigger("change");
   });
   TTT.waitForResponse();
@@ -199,21 +199,21 @@ QUnit.test("multiCascade: select Music, select Mathematics, deselect
Classic", f
   var $input = jQueryFrameFn(".tobago-treeSelect input");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableNone().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $selectableMultiCascade().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.notEqual($input().length, 0);
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $music().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse(); // an ajax request is send for every leaf (Music, Classic, Pop,
World)
@@ -221,14 +221,14 @@ QUnit.test("multiCascade: select Music, select Mathematics, deselect
Classic", f
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Music, Classic, Pop, World");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $mathematics().prop("checked", true).trigger("change");
   });
   TTT.waitForResponse();
   TTT.asserts(1, function () {
     assert.equal($output().text(), "Music, Classic, Pop, World, Mathematics");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $classic().prop("checked", false).trigger("change");
   });
   TTT.waitForResponse();
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/08-form/10-required/form-required.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/08-form/10-required/form-required.test.js
index dd9007c..f074810 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/08-form/10-required/form-required.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/08-form/10-required/form-required.test.js
@@ -22,7 +22,7 @@ QUnit.test("submit inner form 1 without violations", function (assert) {
   var $alert = jQueryFrameFn("#page\\:messages .alert-danger label");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form1InputField().val("Alice");
     $form1SubmitButton().click();
   });
@@ -43,13 +43,13 @@ QUnit.test("submit inner form 2, violate required field", function (assert)
{
   var $alert = jQueryFrameFn("#page\\:messages .alert-danger label");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2InputField().val("");
   });
   TTT.asserts(1, function () {
     assert.equal($form2InputField().val(), "");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2SubmitButton().click();
   });
   TTT.waitForResponse();
@@ -68,13 +68,13 @@ QUnit.test("submit inner form 2 without violations", function (assert)
{
   var $alert = jQueryFrameFn("#page\\:messages .alert-danger label");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2InputField().val("Bob");
   });
   TTT.asserts(1, function () {
     assert.equal($form2InputField().val(), "Bob");
   });
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2SubmitButton().click();
   });
   TTT.waitForResponse();
@@ -98,7 +98,7 @@ QUnit.test("submit outer form, violate both required fields", function (assert)
   var outerFormOutputFieldValue = $outerFormOutputField().text();
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2InputField().val("");
     $outerFormInputField().val("");
     $outerFormSubmitButton().click();
@@ -126,7 +126,7 @@ QUnit.test("submit outer form, violate required field in form 2", function
(asse
   var outerFormOutputFieldValue = $outerFormOutputField().text();
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2InputField().val("");
     $outerFormInputField().val("Charlie");
     $outerFormSubmitButton().click();
@@ -154,7 +154,7 @@ QUnit.test("submit outer form, violate required field in outer form",
function (
   var outerFormOutputFieldValue = $outerFormOutputField().text();
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form2InputField().val("Dave");
     $outerFormInputField().val("");
     $outerFormSubmitButton().click();
@@ -181,7 +181,7 @@ QUnit.test("submit outer form without violations", function (assert) {
   var $alert = jQueryFrameFn("#page\\:messages .alert-danger label");
 
   var TTT = new TobagoTestTools(assert);
-  TTT.action(function () {TTT.waitForResponse();
+  TTT.action(function () {
     $form1InputField().val("Eve");
     $form2InputField().val("Frank");
     $outerFormInputField().val("Grace");
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.test.js
index e495d0b..dab79b2 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.test.js
@@ -83,11 +83,11 @@ function testEvent(assert, componentName, eventNames, $eventComponent,
$ajaxComp
   for (i = 0; i < eventNames.length; i++) {
     var eventName = eventNames[i];
 
-    TTT.action(function () {TTT.waitForResponse();
+    TTT.action(function () {
       activateComponent(componentName, eventName);
     });
     TTT.waitForResponse();
-    TTT.action(function () {TTT.waitForResponse();
+    TTT.action(function () {
       oldActionCount = getActionCount();
       oldActionListenerCount = getActionListenerCount();
       oldAjaxListenerCount = getAjaxListenerCount();
@@ -113,7 +113,7 @@ function testEvent(assert, componentName, eventNames, $eventComponent,
$ajaxComp
       }
       assert.ok(getTimestamp() > oldTimestamp, eventName + " - tc:event - timestamp");
     });
-    TTT.action(function () {TTT.waitForResponse();
+    TTT.action(function () {
       oldActionCount = getActionCount();
       oldActionListenerCount = getActionListenerCount();
       oldAjaxListenerCount = getAjaxListenerCount();

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

Mime
View raw message