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: remove deprecated 'selector' method
Date Fri, 01 Jun 2018 07:34:50 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 a28d3e8  remove deprecated 'selector' method
a28d3e8 is described below

commit a28d3e85b01361378a96bcc8421688f7809778a6
Author: Henning Noeth <hnoeth@apache.org>
AuthorDate: Fri Jun 1 09:34:35 2018 +0200

    remove deprecated 'selector' method
    
    * method 'selector' on jQuery objects is deprecated
---
 .../20-component/050-container/10-box/box.test.js        |  4 ++--
 .../content/40-test/4000-button+link/button+link.test.js | 16 ++++++----------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.test.js
index f4322dc..bc0fdd1 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.test.js
@@ -19,7 +19,7 @@ QUnit.test("Accordion: Box 1: 'hide' to 'show' to 'hide'", function (assert)
{
   var $box = jQueryFrameFn("#page\\:mainForm\\:accordionBox1");
   var $showBox = jQueryFrameFn("#page\\:mainForm\\:showBox1");
   var $hideBox = jQueryFrameFn("#page\\:mainForm\\:hideBox1");
-  var $boxBody = jQueryFrameFn($box().find(".card-body").selector);
+  var $boxBody = jQueryFrameFn("#page\\:mainForm\\:accordionBox1 .card-body");
 
   var TTT = new TobagoTestTools(assert);
   TTT.asserts(3, function () {
@@ -52,7 +52,7 @@ QUnit.test("Accordion: Box 2: 'hide' to 'show' to 'hide'", function (assert)
{
   var $box = jQueryFrameFn("#page\\:mainForm\\:accordionBox2");
   var $showBox = jQueryFrameFn("#page\\:mainForm\\:showBox2");
   var $hideBox = jQueryFrameFn("#page\\:mainForm\\:hideBox2");
-  var $boxBody = jQueryFrameFn($box().find(".card-body").selector);
+  var $boxBody = jQueryFrameFn("#page\\:mainForm\\:accordionBox2 .card-body");
 
   var TTT = new TobagoTestTools(assert);
   TTT.asserts(3, function () {
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
index 924f0ff..901ff7b 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
@@ -62,26 +62,22 @@ function testStandardCommands($command, $destinationSection, assert) {
 
 QUnit.test("Target Action Button", function (assert) {
   var $command = jQueryFrameFn("#page\\:mainForm\\:targetButtonAction");
-  var $targetTextInput = jQueryTargetFrame("#textInput");
-  testTargetCommands($command, $targetTextInput, "accessed by action", assert);
+  testTargetCommands($command, "#textInput", "accessed by action", assert);
 });
 
 QUnit.test("Target Link Button", function (assert) {
   var $command = jQueryFrameFn("#page\\:mainForm\\:targetButtonLink");
-  var $targetTextInput = jQueryTargetFrame("#textInput");
-  testTargetCommands($command, $targetTextInput, "accessed by link", assert);
+  testTargetCommands($command, "#textInput", "accessed by link", assert);
 });
 
 QUnit.test("Target Action Link", function (assert) {
   var $command = jQueryFrameFn("#page\\:mainForm\\:targetLinkAction");
-  var $targetTextInput = jQueryTargetFrame("#textInput");
-  testTargetCommands($command, $targetTextInput, "accessed by action", assert);
+  testTargetCommands($command, "#textInput", "accessed by action", assert);
 });
 
 QUnit.test("Target Link Link", function (assert) {
   var $command = jQueryFrameFn("#page\\:mainForm\\:targetLinkLink");
-  var $targetTextInput = jQueryTargetFrame("#textInput");
-  testTargetCommands($command, $targetTextInput, "accessed by link", assert);
+  testTargetCommands($command, "#textInput", "accessed by link", assert);
 });
 
 QUnit.test("Style must not be a dropdown item", function (assert) {
@@ -96,14 +92,14 @@ QUnit.test("Style must not be a dropdown item", function (assert) {
   assert.equal($button().css("width"), "200px");
 });
 
-function testTargetCommands($command, $targetTextInput, expectedText, assert) {
+function testTargetCommands($command, targetTextInputSelector, expectedText, assert) {
   var TTT = new TobagoTestTools(assert);
   TTT.action(function () {
     $command()[0].click();
   });
   TTT.waitMs(2000); //TobagoTestTools.waitForResponse() didn't recognize responses on a target
frame, so we just wait
   TTT.asserts(1, function () {
-    $targetTextInput = jQueryTargetFrame($targetTextInput.selector);
+    var $targetTextInput = jQueryTargetFrame(targetTextInputSelector);
     assert.equal($targetTextInput.val(), expectedText);
   });
   TTT.startTest();

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

Mime
View raw message