diff --git a/apps/demos/Demos/Autocomplete/Overview/jQuery/index.js b/apps/demos/Demos/Autocomplete/Overview/jQuery/index.js index 61f28c3ef453..74c283507c2c 100644 --- a/apps/demos/Demos/Autocomplete/Overview/jQuery/index.js +++ b/apps/demos/Demos/Autocomplete/Overview/jQuery/index.js @@ -94,7 +94,7 @@ $(() => { }); function updateEmployeeInfo() { - let result = $.trim(`${firstName || ''} ${lastName || ''}`); + let result = `${firstName || ''} ${lastName || ''}`.trim(); result += (result && position) ? (`, ${position}`) : position || ''; result += (result && state) ? (`, ${state}`) : state || ''; diff --git a/apps/demos/Demos/Charts/SignalRService/signalr-hub.js b/apps/demos/Demos/Charts/SignalRService/signalr-hub.js index 98bdc87e542e..a5d207a65bb3 100644 --- a/apps/demos/Demos/Charts/SignalRService/signalr-hub.js +++ b/apps/demos/Demos/Charts/SignalRService/signalr-hub.js @@ -14,6 +14,8 @@ /// "use strict"; + var isFunction = function(val) { return typeof val === 'function'; }; + if (typeof ($.signalR) !== "function") { throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js."); } @@ -52,7 +54,7 @@ if (hub.client.hasOwnProperty(memberKey)) { memberValue = hub.client[memberKey]; - if (!$.isFunction(memberValue)) { + if (!isFunction(memberValue)) { // Not a client hub function continue; } diff --git a/apps/demos/Demos/DataGrid/SignalRService/signalr-hub.js b/apps/demos/Demos/DataGrid/SignalRService/signalr-hub.js index e547fbb26888..0d6e373c93e8 100644 --- a/apps/demos/Demos/DataGrid/SignalRService/signalr-hub.js +++ b/apps/demos/Demos/DataGrid/SignalRService/signalr-hub.js @@ -15,6 +15,8 @@ /// "use strict"; + var isFunction = function(val) { return typeof val === 'function'; }; + if (typeof ($.signalR) !== "function") { throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js."); } @@ -53,7 +55,7 @@ if (hub.client.hasOwnProperty(memberKey)) { memberValue = hub.client[memberKey]; - if (!$.isFunction(memberValue)) { + if (!isFunction(memberValue)) { // Not a client hub function continue; } diff --git a/apps/demos/package.json b/apps/demos/package.json index da1e058ef949..b5a4ae628284 100644 --- a/apps/demos/package.json +++ b/apps/demos/package.json @@ -50,7 +50,7 @@ "html-react-parser": "1.4.14", "inferno": "^7.4.9", "inferno-create-element": "7.4.11", - "jquery": "3.6.3", + "jquery": "4.0.0-beta.2", "jspdf": "2.5.1", "jspdf-autotable": "3.8.3", "jszip": "^3.10.1", diff --git a/e2e/bundlers/package.json b/e2e/bundlers/package.json index ae3e3ed40408..a3b8f8353169 100644 --- a/e2e/bundlers/package.json +++ b/e2e/bundlers/package.json @@ -10,7 +10,7 @@ "devextreme-cldr-data": "1.0.3", "globalize": "1.7.0", "cldrjs": "0.5.5", - "jquery": "3.7.1", + "jquery": "4.0.0-beta.2", "minimist": "1.2.8", "parcel": "2.12.0", "rimraf": "3.0.2", diff --git a/e2e/compilation-cases/package.json b/e2e/compilation-cases/package.json index 4ffa87bc1931..09e6d886e61f 100644 --- a/e2e/compilation-cases/package.json +++ b/e2e/compilation-cases/package.json @@ -8,9 +8,9 @@ }, "devDependencies": { "@angular/common": "11.2.14", - "@types/jquery": "3.5.29", + "@types/jquery": "3.5.31", "devextreme": "workspace:*", - "jquery": "3.7.1", + "jquery": "4.0.0-beta.2", "typescript": "4.9.5" } } diff --git a/e2e/testcafe-devextreme/package.json b/e2e/testcafe-devextreme/package.json index 12de888cbf31..2998cffd93a5 100644 --- a/e2e/testcafe-devextreme/package.json +++ b/e2e/testcafe-devextreme/package.json @@ -9,7 +9,7 @@ "devDependencies": { "@babel/plugin-transform-runtime": "7.19.6", "@testcafe-community/axe": "3.5.0", - "@types/jquery": "3.5.29", + "@types/jquery": "3.5.31", "axe-core": "4.10.0", "devextreme": "workspace:~24.2.0", "devextreme-screenshot-comparer": "2.0.17", diff --git a/packages/devextreme/build/gulp/vendor.js b/packages/devextreme/build/gulp/vendor.js index dc7661c7937a..b18c9f194cf7 100644 --- a/packages/devextreme/build/gulp/vendor.js +++ b/packages/devextreme/build/gulp/vendor.js @@ -19,7 +19,7 @@ const JS_VENDORS = [ path: 'file-saver/dist/FileSaver.js' }, { - path: 'jquery/dist/jquery.js' + path: 'jquery' }, { path: 'jspdf/dist/jspdf.umd.js' diff --git a/packages/devextreme/docker-ci.sh b/packages/devextreme/docker-ci.sh index 95864472d735..a20d83a1bd1f 100755 --- a/packages/devextreme/docker-ci.sh +++ b/packages/devextreme/docker-ci.sh @@ -164,7 +164,7 @@ function run_test_impl { tput setaf 9 fi google-chrome-stable --version - eval "$chrome_command ${chrome_args[@]} '$url'" &>chrome.log & + eval "$chrome_command ${chrome_args[@]} '$url'" & ;; esac diff --git a/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts b/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts index ab80edcd5c5f..edd8430a2848 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/column_fixing/m_column_fixing.ts @@ -637,11 +637,11 @@ const columnHeadersView = (Base: ModuleType) => class ColumnH return this._fixedTableElement && this._getRowElements(this._fixedTableElement).eq(rowIndex).children(); } - const columnElements: any = that.getColumnElements(); + let columnElements: any = that.getColumnElements(); const $transparentColumnElement = that.getTransparentColumnElement(); if (columnElements && $transparentColumnElement && $transparentColumnElement.length) { const transparentColumnIndex = getTransparentColumnIndex(that.getFixedColumns()); - columnElements.splice(transparentColumnIndex, $transparentColumnElement.get(0).colSpan, $transparentColumnElement.get(0)); + columnElements = columnElements.slice(0, transparentColumnIndex).add(columnElements.slice(transparentColumnIndex + $transparentColumnElement.get(0).colSpan)); //$.splice } return columnElements; diff --git a/packages/devextreme/js/__internal/ui/toolbar/strategy/m_toolbar.singleline.ts b/packages/devextreme/js/__internal/ui/toolbar/strategy/m_toolbar.singleline.ts index c45b2d369548..e7d85fdea79e 100644 --- a/packages/devextreme/js/__internal/ui/toolbar/strategy/m_toolbar.singleline.ts +++ b/packages/devextreme/js/__internal/ui/toolbar/strategy/m_toolbar.singleline.ts @@ -201,7 +201,7 @@ export class SingleLineStrategy { _hideOverflowItems(width?: number) { // @ts-expect-error - const overflowItems = this._toolbar.$element().find(`.${TOOLBAR_AUTO_HIDE_ITEM_CLASS}`); + let overflowItems = this._toolbar.$element().find(`.${TOOLBAR_AUTO_HIDE_ITEM_CLASS}`); if (!overflowItems.length) { return; @@ -216,7 +216,7 @@ export class SingleLineStrategy { const $item = overflowItems.eq(-1); $item.addClass(TOOLBAR_HIDDEN_ITEM); itemsWidth = this._getItemsWidth(); - overflowItems.splice(-1, 1); + overflowItems = overflowItems.slice(0, -1); //$.splice } } diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 29feabdbfe4f..35b5f4ee8082 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -54,7 +54,7 @@ "@devextreme-generator/vue": "3.0.12", "@testcafe-community/axe": "3.5.0", "@types/enzyme": "3.10.18", - "@types/jquery": "3.5.29", + "@types/jquery": "3.5.31", "@types/react": "16.14.34", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/experimental-utils": "5.62.0", @@ -135,7 +135,7 @@ "jest-each": "29.7.0", "jest-environment-jsdom": "29.7.0", "jest-environment-node": "26.6.2", - "jquery": "3.7.1", + "jquery": "4.0.0-beta.2", "jquery.tmpl": "0.0.2", "jspdf": "2.5.1", "jspdf-autotable": "3.8.3", diff --git a/packages/devextreme/testing/helpers/gridBaseMocks.js b/packages/devextreme/testing/helpers/gridBaseMocks.js index e2b26c4eb314..bc72a0bcaeaf 100644 --- a/packages/devextreme/testing/helpers/gridBaseMocks.js +++ b/packages/devextreme/testing/helpers/gridBaseMocks.js @@ -1046,7 +1046,7 @@ module.exports = function($, gridCore, columnResizingReordering, domUtils, commo if(options) { if(options.initDefaultOptions) { $.each(modules, function() { - if($.isFunction(this.defaultOptions)) { + if(typeUtils.isFunction(this.defaultOptions)) { that.option(this.defaultOptions()); } }); diff --git a/packages/devextreme/testing/helpers/keyboardMock.js b/packages/devextreme/testing/helpers/keyboardMock.js index 3a4ab18c9d25..537436632692 100644 --- a/packages/devextreme/testing/helpers/keyboardMock.js +++ b/packages/devextreme/testing/helpers/keyboardMock.js @@ -242,7 +242,7 @@ let focused; throw Error('Unable to type text in non-editable element: ' + $element.get(0)); } - let clock = $.now(); + let clock = Date.now(); return { triggerEvent: function(eventName, options) { diff --git a/packages/devextreme/testing/helpers/nativePointerMock.js b/packages/devextreme/testing/helpers/nativePointerMock.js index 721f77a8e2aa..fab9e3227981 100644 --- a/packages/devextreme/testing/helpers/nativePointerMock.js +++ b/packages/devextreme/testing/helpers/nativePointerMock.js @@ -40,6 +40,8 @@ const isString = function(val) { return typeof val === 'string'; }; const isBoolean = function(val) { return typeof val === 'boolean'; }; const isObject = function(val) { return typeof val === 'object'; }; + const isNumeric = function(val) { return typeof val === 'number'; }; + const isFunction = function(val) { return typeof val === 'function'; }; const MOUSE_EVENTS = { 'click': 1, @@ -151,11 +153,11 @@ metaKey = false; } - if(!$.isNumeric(keyCode)) { + if(!isNumeric(keyCode)) { keyCode = 0; } - if(!$.isNumeric(charCode)) { + if(!isNumeric(charCode)) { charCode = 0; } @@ -222,23 +224,23 @@ view = window; } - if(!$.isNumeric(detail)) { + if(!isNumeric(detail)) { detail = 1; } - if(!$.isNumeric(screenX)) { + if(!isNumeric(screenX)) { screenX = 0; } - if(!$.isNumeric(screenY)) { + if(!isNumeric(screenY)) { screenY = 0; } - if(!$.isNumeric(clientX)) { + if(!isNumeric(clientX)) { clientX = 0; } - if(!$.isNumeric(clientY)) { + if(!isNumeric(clientY)) { clientY = 0; } @@ -258,7 +260,7 @@ metaKey = false; } - if(!$.isNumeric(button)) { + if(!isNumeric(button)) { button = 0; } @@ -325,10 +327,10 @@ if(!isObject(view)) { view = window; - if(!$.isNumeric(detail)) { + if(!isNumeric(detail)) { detail = 1; - if($.isFunction(document.createEvent)) { + if(isFunction(document.createEvent)) { customEvent = document.createEvent('UIEvents'); customEvent.initUIEvent(type, bubbles, cancelable, view, detail); @@ -366,18 +368,18 @@ if(!isBoolean(bubbles)) { bubbles = true; } if(!isBoolean(cancelable)) { cancelable = true; } if(!isObject(view)) { view = window; } - if(!$.isNumeric(detail)) { detail = 2; } - if(!$.isNumeric(screenX)) { screenX = 0; } - if(!$.isNumeric(screenY)) { screenY = 0; } - if(!$.isNumeric(clientX)) { clientX = 0; } - if(!$.isNumeric(clientY)) { clientY = 0; } + if(!isNumeric(detail)) { detail = 2; } + if(!isNumeric(screenX)) { screenX = 0; } + if(!isNumeric(screenY)) { screenY = 0; } + if(!isNumeric(clientX)) { clientX = 0; } + if(!isNumeric(clientY)) { clientY = 0; } if(!isBoolean(ctrlKey)) { ctrlKey = false; } if(!isBoolean(altKey)) { altKey = false; } if(!isBoolean(shiftKey)) { shiftKey = false; } if(!isBoolean(metaKey)) { metaKey = false; } - if(!$.isNumeric(scale)) { scale = 1.0; } - if(!$.isNumeric(rotation)) { rotation = 0.0; } + if(!isNumeric(scale)) { scale = 1.0; } + if(!isNumeric(rotation)) { rotation = 0.0; } const customEvent = document.createEvent('GestureEvent'); @@ -421,17 +423,17 @@ cancelable = (type !== 'touchcancel'); } if(!isObject(view)) { view = window; } - if(!$.isNumeric(detail)) { detail = 1; } - if(!$.isNumeric(screenX)) { screenX = 0; } - if(!$.isNumeric(screenY)) { screenY = 0; } - if(!$.isNumeric(clientX)) { clientX = 0; } - if(!$.isNumeric(clientY)) { clientY = 0; } + if(!isNumeric(detail)) { detail = 1; } + if(!isNumeric(screenX)) { screenX = 0; } + if(!isNumeric(screenY)) { screenY = 0; } + if(!isNumeric(clientX)) { clientX = 0; } + if(!isNumeric(clientY)) { clientY = 0; } if(!isBoolean(ctrlKey)) { ctrlKey = false; } if(!isBoolean(altKey)) { altKey = false; } if(!isBoolean(shiftKey)) { shiftKey = false; } if(!isBoolean(metaKey)) { metaKey = false; } - if(!$.isNumeric(scale)) { scale = 1.0; } - if(!$.isNumeric(rotation)) { rotation = 0.0; } + if(!isNumeric(scale)) { scale = 1.0; } + if(!isNumeric(rotation)) { rotation = 0.0; } if(UA.android && !UA.chrome) { customEvent = document.createEvent('MouseEvents'); @@ -450,7 +452,7 @@ const createTouchByOptions = function(options) { return new window.Touch({ target: options.target || document.body, - identifier: options.identifier || $.now(), + identifier: options.identifier || Date.now(), pageX: options.pageX || 0, pageY: options.pageY || 0, screenX: options.screenX || 0, @@ -605,7 +607,7 @@ // on the surface until it is lifted off the surface. // // values: unique ID of the Touch object - identifier: $.now(), // The value for Touch.identifier + identifier: Date.now(), // The value for Touch.identifier // Coordinates of the touch point relative to the viewport, // including any scroll offset. @@ -806,7 +808,7 @@ _y = 0; _scrollTop = 0; _scrollLeft = 0; - _clock = $.now(); + _clock = Date.now(); return this; }, @@ -921,7 +923,7 @@ }, move: function(x, y) { - if($.isArray(x)) { + if(Array.isArray(x)) { this.move.apply(this, x); } else { this.touchMove(x, y); diff --git a/packages/devextreme/testing/helpers/pointerMock.js b/packages/devextreme/testing/helpers/pointerMock.js index f3f751f7de31..2f1e2390460f 100644 --- a/packages/devextreme/testing/helpers/pointerMock.js +++ b/packages/devextreme/testing/helpers/pointerMock.js @@ -58,7 +58,7 @@ _y = params.y; _scrollTop = params.scrollTop || 0; _scrollLeft = params.scrollLeft || 0; - _clock = params.clock || $.now(); + _clock = params.clock || Date.now(); _shiftKey = params.shiftKey || false; _cancelable = params.cancelable; _pointerType = params.pointerType || _pointerType; @@ -67,7 +67,7 @@ _y = 0; _scrollTop = 0; _scrollLeft = 0; - _clock = $.now(); + _clock = Date.now(); _shiftKey = false; _pointerType = params || _pointerType; } @@ -87,7 +87,7 @@ }, move: function(x, y) { - if($.isArray(x)) { + if(Array.isArray(x)) { this.move.apply(this, x); } else { _x += x || 0; diff --git a/packages/devextreme/testing/helpers/vizMocks.js b/packages/devextreme/testing/helpers/vizMocks.js index 1ce9153eb7c8..3b281643553d 100644 --- a/packages/devextreme/testing/helpers/vizMocks.js +++ b/packages/devextreme/testing/helpers/vizMocks.js @@ -15,7 +15,8 @@ require('viz/core/renderers/renderer'), require('viz/core/errors_warnings'), require('__internal/viz/core/m_base_widget'), - require('viz/core/base_widget.utils') + require('viz/core/base_widget.utils'), + require('core/utils/type') ); }); } else { @@ -32,10 +33,11 @@ DevExpress.require('viz/core/renderers/renderer'), DevExpress.require('viz/core/errors_warnings'), DevExpress.require('__internal/viz/core/m_base_widget'), - DevExpress.require('viz/core/base_widget.utils') + DevExpress.require('viz/core/base_widget.utils'), + DevExpress.require('core/utils/type') ); } -}(window, function($, tooltipModule, titleModule, legendModule, axisModule, pointModule, Series, loadingIndicatorModule, exportMenuModule, rendererModule, errors, baseWidgetModule, baseWidgetUtils) { +}(window, function($, tooltipModule, titleModule, legendModule, axisModule, pointModule, Series, loadingIndicatorModule, exportMenuModule, rendererModule, errors, baseWidgetModule, baseWidgetUtils, typeUtils) { /* global currentAssert, currentTest */ const Element = stubClass(rendererModule.SvgElement, { @@ -94,7 +96,7 @@ return this; }, getBBox: function() { - const template = $.isFunction(this.renderer.bBoxTemplate) ? this.renderer.bBoxTemplate.call(this) : this.renderer.bBoxTemplate; + const template = typeUtils.isFunction(this.renderer.bBoxTemplate) ? this.renderer.bBoxTemplate.call(this) : this.renderer.bBoxTemplate; return $.extend({}, template); }, dispose: function() { @@ -219,9 +221,9 @@ this._resetStub = function(stub) { $.each(stub, function(key, value) { - if($.isFunction(value && value.reset)) { + if(typeUtils.isFunction(value && value.reset)) { value.reset(); - $.isFunction(value.resetBehavior) && value.resetBehavior(); + typeUtils.isFunction(value.resetBehavior) && value.resetBehavior(); } else { stub[key] = undefined; } diff --git a/packages/devextreme/testing/helpers/widgetsIterator.js b/packages/devextreme/testing/helpers/widgetsIterator.js index 56c622cd563f..b8f8a922fa88 100644 --- a/packages/devextreme/testing/helpers/widgetsIterator.js +++ b/packages/devextreme/testing/helpers/widgetsIterator.js @@ -1,5 +1,6 @@ define(function(require) { const $ = require('jquery'); + const typeUtils = require('core/utils/type'); return function(namespace, parent, excluded) { excluded = excluded || []; @@ -12,7 +13,7 @@ define(function(require) { return; } - if($.isFunction(excluded) ? !excluded(componentName) : $.inArray(componentName, excluded) > -1) { + if(typeUtils.isFunction(excluded) ? !excluded(componentName) : $.inArray(componentName, excluded) > -1) { return; } diff --git a/packages/devextreme/testing/runner/Views/Main/RunAll.cshtml b/packages/devextreme/testing/runner/Views/Main/RunAll.cshtml index 513b9cce28d4..52751634beb8 100644 --- a/packages/devextreme/testing/runner/Views/Main/RunAll.cshtml +++ b/packages/devextreme/testing/runner/Views/Main/RunAll.cshtml @@ -79,7 +79,7 @@ noRenovation = @Html.Raw(Json.Serialize(Model.NoRenovation)), noCsp = @Html.Raw(Json.Serialize(Model.NoCsp)), farmMode = @Html.Raw(Json.Serialize(Model.IsContinuousIntegration)), - DX_HTTP_CACHE = $.now(), + DX_HTTP_CACHE = Date.now(), lastTestCaseDoneTime = 0, runWorkerInNewWindow = @Html.Raw(Json.Serialize(Model.WorkerInWindow)), @@ -226,7 +226,7 @@ for(var i = 0; i < WORKER_COUNT; i++) { if(runWorkerInNewWindow) { - worker = window.open("about:blank", "popup" + $.now(), "left=0,top=0,width=500,height=500"); + worker = window.open("about:blank", "popup" + Date.now(), "left=0,top=0,width=500,height=500"); } else { var workerWrapper = $("
") .attr("id", "worker" + i) @@ -388,8 +388,8 @@ testCases, testCase; - if($.now() - lastTestCaseDoneTime > 1000) { - lastTestCaseDoneTime = $.now(); + if(Date.now() - lastTestCaseDoneTime > 1000) { + lastTestCaseDoneTime = Date.now(); notifyDeviceTestManager("QUnit.testCaseDone"); notifyIsAlive(); } diff --git a/packages/devextreme/testing/tests/DevExpress.core/template.tests.js b/packages/devextreme/testing/tests/DevExpress.core/template.tests.js index 7cb212b1cb76..e5fa3b281dab 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/template.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/template.tests.js @@ -27,7 +27,7 @@ QUnit.test('template should receive dxshown event when attached to container', f container: $container }); - assert.equal($.trim($container.text()), 'text', 'template result was patched'); + assert.equal($container.text().trim(), 'text', 'template result was patched'); templateRendered.remove(patcher); }); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js index d9f77af4f661..da5a0cc0eac7 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js @@ -1,5 +1,6 @@ const $ = require('jquery'); const animationFrame = require('animation/frame'); +const typeUtils = require('core/utils/type'); QUnit.module('animation frame'); @@ -8,7 +9,7 @@ QUnit.testInActiveWindow('request', function(assert) { const animationFrameID = animationFrame.requestAnimationFrame(function() { done(); }); - assert.ok($.isNumeric(animationFrameID)); + assert.ok(typeUtils.isNumeric(animationFrameID)); }); QUnit.testInActiveWindow('cancel', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js b/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js index 29fec4dfbad4..7df9147c0b8c 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js @@ -2,6 +2,7 @@ const $ = require('jquery'); const converters = require('data/odata/utils').keyConverters; const interpretJsonFormat = require('data/odata/utils').OData__internals.interpretJsonFormat; const Guid = require('core/guid'); +const typeUtils = require('core/utils/type'); QUnit.module('OData 2'); QUnit.test('key converters', function(assert) { @@ -82,10 +83,10 @@ QUnit.test('count', function(assert) { const t4 = interpretJsonFormat(a4, 'success'); assert.equal(t1.count, 3); - assert.equal($.type(t1.count), 'number'); + assert.ok(typeUtils.isNumeric(t1.count)); assert.equal(t2.count, 3); - assert.equal($.type(t2.count), 'number'); + assert.ok(typeUtils.isNumeric(t2.count)); assert.ok(!t3.count); assert.ok(!t4.count); @@ -172,10 +173,10 @@ QUnit.test('count', function(assert) { const t4 = interpretJsonFormat(a4, 'success'); assert.equal(t1.count, 3); - assert.equal($.type(t1.count), 'number'); + assert.ok(typeUtils.isNumeric(t1.count)); assert.equal(t2.count, 3); - assert.equal($.type(t2.count), 'number'); + assert.ok(typeUtils.isNumeric(t2.count)); assert.ok(!t3.count); assert.ok(!t4.count); diff --git a/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js b/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js index 47aeef00fdec..98741a968bcb 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/odataStore.tests.js @@ -3,6 +3,7 @@ import { EdmLiteral } from 'data/odata/utils'; import ODataStore from 'data/odata/store'; import ODataContext from 'data/odata/context'; import Guid from 'core/guid'; +import { isDate } from 'core/utils/type'; import config from 'core/config'; import ErrorHandlingHelper from '../../helpers/data.errorHandlingHelper.js'; import ajaxMock from '../../helpers/ajaxMock.js'; @@ -1798,7 +1799,7 @@ QUnit.test('Dates, disableable, ODataContext', function(assert) { ctx.Y.load() .done(function(r) { - assert.strictEqual($.type(r[0].dateProperty), 'date'); + assert.ok(isDate(r[0].dateProperty)); }) ]; diff --git a/packages/devextreme/testing/tests/DevExpress.jquery/eventRegistrator.tests.js b/packages/devextreme/testing/tests/DevExpress.jquery/eventRegistrator.tests.js index 070d6b6c34f9..030ef1dd3eef 100644 --- a/packages/devextreme/testing/tests/DevExpress.jquery/eventRegistrator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.jquery/eventRegistrator.tests.js @@ -1,5 +1,6 @@ define(function(require) { const $ = require('jquery'); + const typeUtils = require('core/utils/type'); const registerEvent = require('events/core/event_registrator'); const Class = require('core/class'); @@ -87,7 +88,7 @@ define(function(require) { assert.strictEqual(LOG.arguments[0], this.element[0], 'element'); assert.strictEqual(LOG.arguments[1], data, 'data'); assert.deepEqual(LOG.arguments[2], ['test1', 'test2'], 'namespaces'); - assert.ok($.isFunction(LOG.arguments[3]), 'eventHandle'); + assert.ok(typeUtils.isFunction(LOG.arguments[3]), 'eventHandle'); }); QUnit.test('\'teardown\' method', function(assert) { @@ -105,7 +106,7 @@ define(function(require) { assert.equal(LOG.arguments.length, 3, 'arguments count'); assert.strictEqual(LOG.arguments[0], this.element[0], 'element'); assert.deepEqual(LOG.arguments[1], ['test1', 'test2'], 'namespaces'); - assert.ok($.isFunction(LOG.arguments[2]), 'eventHandle'); + assert.ok(typeUtils.isFunction(LOG.arguments[2]), 'eventHandle'); }); QUnit.test('\'add\' method', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js index 730582706ab3..1aa8ec8d966b 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js @@ -74,8 +74,8 @@ QUnit.test('item should be rendered correctly with dxitem syntax', function(asse const $title = $item.find('.' + ACCORDION_ITEM_TITLE_CLASS); const $content = $item.find('.' + ACCORDION_ITEM_BODY_CLASS); - assert.equal($.trim($title.text()), 'title', 'title rendered correctly'); - assert.equal($.trim($content.text()), 'custom', 'content rendered correctly'); + assert.equal($title.text().trim(), 'title', 'title rendered correctly'); + assert.equal($content.text().trim(), 'custom', 'content rendered correctly'); }); QUnit.test('itemTitleTemplate option', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js index 4a38808088e6..75e68a92ef42 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js @@ -35,5 +35,5 @@ QUnit.test('autocomplete should delegate templates to child widgets (T131530)', kb.type('T'); - assert.equal($.trim(popupContent.find('.dx-list-item').text()), 'TemplateTemplate'); + assert.equal(popupContent.find('.dx-list-item').text().trim(), 'TemplateTemplate'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js index db3942babe02..dcf294de0542 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js @@ -27,7 +27,7 @@ QUnit.test('innerBox with nested box item', function(assert) { const $box = $('#nestedBox'); ko.applyBindings({}, $box[0]); - assert.equal($.trim($box.text()), 'Box1', 'inner box rendered'); + assert.equal($box.text().trim(), 'Box1', 'inner box rendered'); }); QUnit.test('box item visibility change should fire onItemStateChanged action', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js index 304a0404e36a..67b304370855 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js @@ -31,6 +31,6 @@ QUnit.test('cellTemplate should have access to a $root model', function(assert) const $calendar = $('#T354951'); ko.applyBindings(viewModel, $calendar.get(0)); - assert.equal($.trim($calendar.find('.root-model-data').first().text()), 'rootModelData', 'cellTemplate get access to $root model'); - assert.notEqual($.trim($calendar.find('.model-data').first().text()), 'rootModelData', 'cellTemplate get access to model'); + assert.equal($calendar.find('.root-model-data').first().text().trim(), 'rootModelData', 'cellTemplate get access to $root model'); + assert.notEqual($calendar.find('.model-data').first().text().trim(), 'rootModelData', 'cellTemplate get access to model'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js index 85ade3730f1e..1c661272e1d4 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js @@ -242,7 +242,7 @@ QUnit.test('render items with multiple templates, ko scenario', function(assert) assert.equal($items.length, testSet.length, 'quantity of a test set items and rendered items are equal'); $items.each(function(index) { - assert.equal($.trim($(this).text()), testSet[index]); + assert.equal($(this).text().trim(), testSet[index]); }); } finally { delete ko.bindingHandlers['dxTestComponent']; @@ -265,8 +265,8 @@ QUnit.test('$index is available in markup (T542335)', function(assert) { const $items = $element.find('.item'); - assert.equal($.trim($items.eq(0).text()), '$index: 0'); - assert.equal($.trim($items.eq(1).text()), '$index: 1'); + assert.equal($items.eq(0).text().trim(), '$index: 0'); + assert.equal($items.eq(1).text().trim(), '$index: 1'); } finally { delete ko.bindingHandlers['dxTestComponent']; @@ -324,7 +324,7 @@ QUnit.test('item uses custom template', function(assert) { const $component = $('#container-with-items-and-custom-template'); ko.applyBindings({}, $component.get(0)); - assert.equal($.trim($component.text()), 'custom'); + assert.equal($component.text().trim(), 'custom'); }); QUnit.test('option items has higher priority than items in markup', function(assert) { @@ -348,7 +348,7 @@ QUnit.test('$parent should be correct for collection item', function(assert) { ko.applyBindings(vm, $markup.get(0)); const $item = $markup.find('.dx-item'); - assert.equal($.trim($item.text()), 'parent'); + assert.equal($item.text().trim(), 'parent'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js index 6ec6f418ae31..656c2ad0d3e9 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js @@ -873,13 +873,13 @@ moduleWithoutCsp( vm.innerText('new innerText'); const outer = markup; - assert.equal($.trim(outer.find('.dx-content:first > span').text()), 'new outerText'); + assert.equal(outer.find('.dx-content:first > span').text().trim(), 'new outerText'); const middle = markup.find('.middle'); - assert.equal($.trim(middle.find('.dx-content:first > span').text()), 'new middleText'); + assert.equal(middle.find('.dx-content:first > span').text().trim(), 'new middleText'); const inner = markup.find('.inner'); - assert.equal($.trim(inner.find('span').text()), 'new innerText'); + assert.equal(inner.find('span').text().trim(), 'new innerText'); }); } ); @@ -1352,7 +1352,7 @@ moduleWithoutCsp('Template w/o ko scenario', function() { $markup.dxTestContainer(); assert.equal($markup.find('.content').length, 1, 'template rendered'); - assert.equal($.trim($markup.text()), 'Test', 'template rendered correctly'); + assert.equal($markup.text().trim(), 'Test', 'template rendered correctly'); } finally { cleanComponentRegistrations('dxTestContainer'); } diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/dataGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/dataGrid.tests.js index 457fb2d01906..938a16bdce97 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/dataGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/dataGrid.tests.js @@ -2,6 +2,7 @@ import $ from 'jquery'; import ko from 'knockout'; import { DataSource } from 'data/data_source/data_source'; import { logger } from 'core/utils/console'; +import { isFunction } from 'core/utils/type'; import fx from 'animation/fx'; import dataSourceAdapter from '__internal/grids/data_grid/m_data_source_adapter'; import dataGridMocks from '../../helpers/dataGridMocks.js'; @@ -51,7 +52,7 @@ const processColumnsForCompare = function(columns, parameterNames) { delete this[propertyName]; } } else { - if($.isFunction(this[propertyName])) { + if(isFunction(this[propertyName])) { delete this[propertyName]; } if(propertyName === 'filterOperations' || diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownBox.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownBox.tests.js index ae4eee5c9bd5..54b54d9fd517 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownBox.tests.js @@ -27,5 +27,5 @@ QUnit.test('contentTemplate', function(assert) { const $dropDownEditor = $('#dropDownBoxWithContentTemplate'); ko.applyBindings(vm, $dropDownEditor.get(0)); - assert.equal($.trim($('.dx-popup-wrapper').text()), 'test', 'content rendered'); + assert.equal($('.dx-popup-wrapper').text().trim(), 'test', 'content rendered'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js index ab2924b47d49..71c25bda8a73 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js @@ -30,7 +30,7 @@ QUnit.test('fieldTemplate', function(assert) { const $dropDownEditor = $('#dropDownEditorWithFieldTemplate'); ko.applyBindings(vm, $dropDownEditor.get(0)); - assert.equal($.trim($dropDownEditor.text()), 'test', 'template rendered'); + assert.equal($dropDownEditor.text().trim(), 'test', 'template rendered'); }); QUnit.test('drop button template', function(assert) { @@ -40,7 +40,7 @@ QUnit.test('drop button template', function(assert) { const $dropDownEditor = $('#dropDownEditorWithButtonTemplate'); ko.applyBindings(vm, $dropDownEditor.get(0)); - assert.equal($.trim($('.dx-button-content').text()), 'V', 'template was rendered'); + assert.equal($('.dx-button-content').text().trim(), 'V', 'template was rendered'); }); QUnit.test('fieldTemplate is rendered after changing value', function(assert) { @@ -49,7 +49,7 @@ QUnit.test('fieldTemplate is rendered after changing value', function(assert) { ko.applyBindings(vm, $dropDownEditor.get(0)); $dropDownEditor.dxDropDownEditor('option', 'value', 'newtest'); - assert.equal($.trim($dropDownEditor.text()), 'newtest', 'template rendered'); + assert.equal($dropDownEditor.text().trim(), 'newtest', 'template rendered'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js index 269dfa25a869..cc607547e251 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js @@ -74,7 +74,7 @@ QUnit.test('default with ko approach', function(assert) { assert.equal(items.length, 2); assert.ok(items.eq(0).hasClass(LIST_ITEM_CLASS)); assert.ok(items.eq(1).hasClass(LIST_ITEM_CLASS)); - assert.equal($.trim(items.text()), '01', 'all items rendered'); + assert.equal(items.text().trim(), '01', 'all items rendered'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js index 23670235094d..67b069733971 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js @@ -54,7 +54,7 @@ QUnit.test('lookup should delegate templates to child widgets (T131530)', functi const $list = $(toSelector(LIST_CLASS)); - assert.equal($.trim($list.find('.dx-list-item').text()), 'TemplateTemplate'); + assert.equal($list.find('.dx-list-item').text().trim(), 'TemplateTemplate'); }); QUnit.test('lookup with item template', function(assert) { @@ -67,5 +67,5 @@ QUnit.test('lookup with item template', function(assert) { const $list = $(toSelector(LIST_CLASS)); - assert.equal($.trim($list.find('.dx-list-item').text()), 'Template'); + assert.equal($list.find('.dx-list-item').text().trim(), 'Template'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js index 5a48c80d0db8..c217d30cfcfd 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js @@ -86,5 +86,5 @@ QUnit.test('$parent should be correct for tag', function(assert) { ko.applyBindings(vm, $markup.get(0)); const $tag = $markup.find('.dx-tag'); - assert.equal($.trim($tag.text()), vm.someValue); + assert.equal($tag.text().trim(), vm.someValue); }); diff --git a/packages/devextreme/testing/tests/DevExpress.localization/sharedParts/localization.shared.js b/packages/devextreme/testing/tests/DevExpress.localization/sharedParts/localization.shared.js index cf45f8dd2395..205c8916681b 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/sharedParts/localization.shared.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/sharedParts/localization.shared.js @@ -5,6 +5,7 @@ import messageLocalization from 'localization/message'; import errors from 'core/errors'; import localization from 'localization'; import config from 'core/config'; +import { isFunction } from 'core/utils/type'; import { logger } from 'core/utils/console'; import { generateDate } from '../../../helpers/dateHelper.js'; @@ -14,7 +15,7 @@ export default function() { const checkModules = function(testName, namespace, methods) { QUnit.test(testName, function(assert) { $.each(methods, function(index, method) { - assert.ok($.isFunction(namespace[method]), method + ' method exists'); + assert.ok(isFunction(namespace[method]), method + ' method exists'); }); }); }; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/eventRegistrator.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/eventRegistrator.tests.js index 8991da54889f..6bb8ed6bbf5c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/eventRegistrator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/eventRegistrator.tests.js @@ -3,6 +3,7 @@ import registerEvent from 'events/core/event_registrator'; import eventsEngine from 'events/core/events_engine'; import registerEventCallbacks from 'events/core/event_registrator_callbacks'; import Class from 'core/class'; +import { isFunction } from 'core/utils/type'; import eventHelper from '../../helpers/eventHelper.js'; @@ -87,7 +88,7 @@ QUnit.test('\'setup\' method', function(assert) { assert.strictEqual(LOG.arguments[0], this.element[0], 'element'); assert.strictEqual(LOG.arguments[1], data, 'data'); assert.deepEqual(LOG.arguments[2], ['test1', 'test2'], 'namespaces'); - assert.ok($.isFunction(LOG.arguments[3]), 'eventHandle'); + assert.ok(isFunction(LOG.arguments[3]), 'eventHandle'); }); QUnit.test('\'teardown\' method', function(assert) { @@ -103,7 +104,7 @@ QUnit.test('\'teardown\' method', function(assert) { assert.equal(LOG.arguments.length, 3, 'arguments count'); assert.strictEqual(LOG.arguments[0], this.element[0], 'element'); assert.deepEqual(LOG.arguments[1], ['test1', 'test2'], 'namespaces'); - assert.ok($.isFunction(LOG.arguments[2]), 'eventHandle'); + assert.ok(isFunction(LOG.arguments[2]), 'eventHandle'); }); QUnit.test('\'add\' method', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js index e17b0d147aca..59cc6031f727 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js @@ -1,5 +1,6 @@ const $ = require('jquery'); const noop = require('core/utils/common').noop; +const typeUtils = require('core/utils/type'); const BaseStrategy = require('events/pointer/base'); const registerEvent = require('events/core/event_registrator'); const special = require('../../../helpers/eventHelper.js').special; @@ -231,7 +232,7 @@ QUnit.test('event is triggered one time after refresh', function(assert) { }); QUnit.test('pointer event base strategy should have \'setup\' implementation, because jQuery adds a browser event via addEventListener/attachEvent otherwise (T208653)', function(assert) { - assert.ok($.isFunction((new BaseStrategy('', '')).setup)); + assert.ok(typeUtils.isFunction((new BaseStrategy('', '')).setup)); }); QUnit.test('pointer events should correctly unsubscribe events with target', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsController.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsController.tests.js index 87bcb225c478..3d23530c201a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsController.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsController.tests.js @@ -62,7 +62,7 @@ const processColumnsForCompare = function(columns, parameterNames, ignoreParamet delete this[propertyName]; } } else { - if($.isFunction(this[propertyName])) { + if(isFunction(this[propertyName])) { delete this[propertyName]; } if([ diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataController.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataController.tests.js index 4c8f74f96489..6f66c2685af5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataController.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataController.tests.js @@ -6877,17 +6877,17 @@ QUnit.module('Filtering', { // assert filter = this.getCombinedFilter(); - assert.ok($.isArray(filter[0]), 'first argument is filter expression'); + assert.ok(Array.isArray(filter[0]), 'first argument is filter expression'); assert.strictEqual(filter[1], 'and', 'second argument is operation \'and\''); - assert.ok($.isArray(filter[2]), 'third argument is filter expression'); - assert.ok($.isFunction(filter[0][0]), 'filter expression selector is function'); + assert.ok(Array.isArray(filter[2]), 'third argument is filter expression'); + assert.ok(typeUtils.isFunction(filter[0][0]), 'filter expression selector is function'); filter = this.getCombinedFilter(true); - assert.ok($.isArray(filter[0]), 'first argument is filter expression'); + assert.ok(Array.isArray(filter[0]), 'first argument is filter expression'); assert.strictEqual(filter[1], 'and', 'second argument is operation \'and\''); - assert.ok($.isArray(filter[2]), 'third argument is filter expression'); + assert.ok(Array.isArray(filter[2]), 'third argument is filter expression'); assert.equal(filter.length, 3, 'filter expression + \'and\' + \'filter expression\''); - assert.ok(!$.isFunction(filter[2][0]), 'filter expression selector isn\'t function'); + assert.ok(!typeUtils.isFunction(filter[2][0]), 'filter expression selector isn\'t function'); assert.strictEqual(filter[0][0], 'name', 'value of the selector'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js index 021b42030641..4156f7d87827 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js @@ -3100,7 +3100,7 @@ QUnit.module('API methods', baseModuleConfig, () => { let reloadResolved = false; const d = dataGrid.refresh(); - assert.ok($.isFunction(d.promise), 'type object is the Deferred'); + assert.ok(typeUtils.isFunction(d.promise), 'type object is the Deferred'); d.done(function() { reloadResolved = true; }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataSource.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataSource.tests.js index 6cf38d965b14..113798e5b723 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataSource.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataSource.tests.js @@ -2646,7 +2646,7 @@ QUnit.module('Grouping with basic remoteOperations. Second level', { }); function createDataSourceWithRemoteGrouping(options, remoteGroupPaging, brokeOptions) { - if($.isArray(options.store) || (options.store && options.store.type === 'array') || options.load) { + if(Array.isArray(options.store) || (options.store && options.store.type === 'array') || options.load) { const arrayStore = new ArrayStore(options.store || []); options.executeAsync = options.executeAsync || function(func) { func(); }; brokeOptions = brokeOptions || {}; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/headerFilter.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/headerFilter.tests.js index 5cfa85c32794..12154ec393b4 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/headerFilter.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/headerFilter.tests.js @@ -6,6 +6,7 @@ import gridCoreUtils from '__internal/grids/grid_core/m_utils'; import $ from 'jquery'; import ArrayStore from 'data/array_store'; import { noop } from 'core/utils/common'; +import { isFunction } from 'core/utils/type'; import ODataStore from 'data/odata/store'; import devices from '__internal/core/m_devices'; import { DataSource } from 'data/data_source/data_source'; @@ -1764,7 +1765,7 @@ QUnit.module('Header Filter', { // assert assert.ok(list.option('searchEnabled'), 'list with search bar'); - assert.ok($.isFunction(list.option('searchExpr')), 'expr is correct'); + assert.ok(isFunction(list.option('searchExpr')), 'expr is correct'); assert.equal(list.option('searchTimeout'), 300, 'search timeout is assigned'); assert.equal(list.option('searchMode'), 'contains', 'search mode is default'); }); @@ -1803,7 +1804,7 @@ QUnit.module('Header Filter', { // assert assert.ok(list.option('searchEnabled'), 'list with search bar'); - assert.ok($.isFunction(list.option('searchExpr')), 'expr is correct'); + assert.ok(isFunction(list.option('searchExpr')), 'expr is correct'); assert.equal(list.option('searchTimeout'), 300, 'search timeout is assigned'); assert.equal(list.option('searchMode'), 'equals', 'search mode is assigned'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.markup.tests.js index cfa747b15631..a6eb69b95713 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.markup.tests.js @@ -135,7 +135,7 @@ QUnit.module('Rendering input', moduleConfig, () => { }); QUnit.test('format should be correct when pickerType is calendar', function(assert) { - const date = new Date($.now()); + const date = new Date(Date.now()); this.createInstance({ type: 'datetime', diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js index 2380ec98ab81..e047738355b1 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js @@ -96,7 +96,7 @@ module('DropDownEditor markup', { }); assert.strictEqual($dropDownEditor.find(`.${DROP_DOWN_EDITOR_FIELD_TEMPLATE_WRAPPER}`).length, 1); - assert.equal($.trim($dropDownEditor.text()), 'testtest', 'field rendered'); + assert.equal($dropDownEditor.text().trim(), 'testtest', 'field rendered'); }); test('field should be rendered after input value rendering', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownList.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownList.tests.js index 4b768c1f9ae6..1eb11e4ea4b7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownList.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownList.tests.js @@ -531,7 +531,7 @@ QUnit.module('items & dataSource', moduleConfig, () => { this.clock.tick(10); - assert.equal($.trim($('.dx-list-item').text()), 'test', 'template rendered'); + assert.equal($('.dx-list-item').text().trim(), 'test', 'template rendered'); }); QUnit.test('dataSource with Guid key', function(assert) { @@ -688,7 +688,7 @@ QUnit.module('items & dataSource', moduleConfig, () => { const instance = $element.dxDropDownList('instance'); instance.option('opened', true); - assert.equal($.trim($('.dx-list-item').text()), '', 'template rendered'); + assert.equal($('.dx-list-item').text().trim(), '', 'template rendered'); }); QUnit.test('searchTimeout should be refreshed after next symbol entered', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/fileUploader.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/fileUploader.tests.js index 13bf69e4a0ce..02a5c3a32a96 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/fileUploader.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/fileUploader.tests.js @@ -46,7 +46,7 @@ const FILEUPLOADER_AFTER_LOAD_DELAY = 500; const simulateFileChoose = function($fileUploader, files) { const $input = $fileUploader.find('.' + FILEUPLOADER_INPUT_CLASS); - files = $.isArray(files) ? files : [files]; + files = Array.isArray(files) ? files : [files]; if($.isPlainObject(files[0])) { $input.val(files[0].name); @@ -62,19 +62,19 @@ const fakeFile = { name: 'fakefile.png', size: 100023, type: 'image/png', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; const fakeFile1 = { name: 'fakefile1.jpeg', size: 1063, type: 'image/jpeg', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; const fakeFile2 = { name: 'document.pdf', size: 4000, type: 'application/pdf', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; const getNewFile = function() { @@ -85,7 +85,7 @@ const getNewFile = function() { name: 'fakefile' + randomId, size: randomSize, type: 'image/jpeg', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; }; @@ -1326,7 +1326,7 @@ QUnit.module('files rendering', moduleConfig, () => { name: 'very_very_very_very_very_very_very_very_very_long_name.png', size: 100023, type: 'image/png', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; simulateFileChoose($fileUploader, file); @@ -3579,7 +3579,7 @@ QUnit.module('Drag and drop', moduleConfig, () => { name: 'fakefile2', size: 2048, type: 'text/plain', - lastModifiedDate: $.now() + lastModifiedDate: Date.now() }; const $fileUploader = $('#fileuploader').dxFileUploader({ diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js index 949c77b71871..8224a40bb87a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js @@ -325,7 +325,7 @@ module('options', { test('fieldTemplate should be rendered', function(assert) { $('#lookupFieldTemplate').dxLookup({ fieldTemplate: 'field' }); - assert.equal($.trim($('#lookupFieldTemplate').text()), 'test', 'test was be rendered'); + assert.equal($('#lookupFieldTemplate').text().trim(), 'test', 'test was be rendered'); }); test('selected item should be passed as first argument if fieldTemplate is a function', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js index ad0079452f0f..70250b02a3a2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js @@ -5,7 +5,7 @@ import dataUtils from 'core/element_data'; import config from 'core/config'; import browser from 'core/utils/browser'; import errors from 'core/errors'; -import { isRenderer } from 'core/utils/type'; +import { isFunction, isRenderer } from 'core/utils/type'; import { normalizeKeyName } from 'events/utils/index'; import ArrayStore from 'data/array_store'; @@ -1279,7 +1279,7 @@ QUnit.module('Lookup', { assert.strictEqual($lookup.hasClass(LOOKUP_EMPTY_CLASS), true, 'lookup empty class was added after clearance'); assert.strictEqual($lookup.hasClass(TEXTEDITOR_EMPTY_CLASS), true, 'lookup empty class was added after clearance'); - assert.equal($.trim($lookupField.find(`.${PLACEHOLDER_CLASS}`).attr('data-dx_placeholder')), 'placeholder', 'placeholder is shown'); + assert.equal($lookupField.find(`.${PLACEHOLDER_CLASS}`).attr('data-dx_placeholder').trim(), 'placeholder', 'placeholder is shown'); assert.strictEqual(lookup.option('value'), null, 'value reset'); }); @@ -1566,7 +1566,7 @@ QUnit.module('options', { const popup = $lookup.find('.' + POPUP_CLASS).dxPopup('instance'); let initialValue = popup.option('width'); - if($.isFunction(initialValue)) { + if(isFunction(initialValue)) { initialValue = initialValue(); } @@ -1574,7 +1574,7 @@ QUnit.module('options', { instance.option('dropDownOptions.width', 'auto'); let autoValue = popup.option('width'); - if($.isFunction(autoValue)) { + if(isFunction(autoValue)) { autoValue = autoValue(); } @@ -1600,7 +1600,7 @@ QUnit.module('options', { const popup = $lookup.find('.' + POPUP_CLASS).dxPopup('instance'); let initialValue = popup.option('height'); - if($.isFunction(initialValue)) { + if(isFunction(initialValue)) { initialValue = initialValue(); } @@ -1608,7 +1608,7 @@ QUnit.module('options', { instance.option('dropDownOptions.height', 'auto'); let autoValue = popup.option('height'); - if($.isFunction(autoValue)) { + if(isFunction(autoValue)) { autoValue = autoValue(); } @@ -2235,7 +2235,7 @@ QUnit.module('popup options', { const $title = $(toSelector(POPUP_TITLE_CLASS)); - assert.equal($.trim($title.text()), 'testTitle', 'title text is correct'); + assert.equal($title.text().trim(), 'testTitle', 'title text is correct'); }); QUnit.test('custom titleTemplate option is set correctly on init', function(assert) { @@ -2638,7 +2638,7 @@ QUnit.module('list options', { let $title = $(toSelector(LIST_GROUP_HEADER_CLASS)); assert.equal($title.length, 2, 'there are 2 group titles'); $title = $title.eq(0); - assert.equal($.trim($title.text()), 'testGroupTemplate', 'title text is correct'); + assert.equal($title.text().trim(), 'testGroupTemplate', 'title text is correct'); instance.option('groupTemplate', function(itemData, itemIndex, itemElement) { assert.equal(isRenderer(itemElement), !!config().useJQuery, 'itemElement is correct'); @@ -2646,7 +2646,7 @@ QUnit.module('list options', { }); $title = $(toSelector(LIST_GROUP_HEADER_CLASS)).eq(0); - assert.equal($.trim($title.text()), 'test', 'title text is correct'); + assert.equal($title.text().trim(), 'test', 'title text is correct'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/rangeSlider.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/rangeSlider.tests.js index 87c4662ccd2c..2e40843acae2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/rangeSlider.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/rangeSlider.tests.js @@ -1404,8 +1404,8 @@ QUnit.module('valueChangeMode option', { this.range = this.$element.find('.' + SLIDER_RANGE_CLASS); - this.getLeftTooltipText = () => $.trim(this.leftHandleTooltip.text()); - this.getRightTooltipText = () => $.trim(this.rightHandleTooltip.text()); + this.getLeftTooltipText = () => this.leftHandleTooltip.text().trim(); + this.getRightTooltipText = () => this.rightHandleTooltip.text().trim(); } }, () => { QUnit.test('value option should not change on left handle swipe with "onHandleRelease" valueChangeMode', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/selectBox.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/selectBox.tests.js index 4ec696a75d2d..b9ae57cee4f0 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/selectBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/selectBox.tests.js @@ -898,7 +898,7 @@ QUnit.module('functionality', moduleSetup, () => { $('.dx-item').trigger('dxclick'); $($input).trigger('dxclick'); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($('.dx-item').first().text()), '0', 'filter was cleared after item selected'); + assert.equal($('.dx-item').first().text().trim(), '0', 'filter was cleared after item selected'); keyboard.press('backspace').type('3'); this.clock.tick(TIME_TO_WAIT); @@ -906,14 +906,14 @@ QUnit.module('functionality', moduleSetup, () => { this.clock.tick(TIME_TO_WAIT); $($input).trigger('dxclick'); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($('.dx-item').first().text()), '3', 'filter was not cleared when no focusout and no item selection happened'); + assert.equal($('.dx-item').first().text().trim(), '3', 'filter was not cleared when no focusout and no item selection happened'); instance.close(); $input.focusout(); this.clock.tick(TIME_TO_WAIT); $($input).trigger('dxclick'); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($('.dx-item').first().text()), '0', 'filter was cleared when focusout even if item was not selected'); + assert.equal($('.dx-item').first().text().trim(), '0', 'filter was cleared when focusout even if item was not selected'); }); QUnit.testInActiveWindow('SelectBox drop down should not blink on open after setting value with the help of search', function(assert) { @@ -1353,7 +1353,7 @@ QUnit.module('widget options', moduleSetup, () => { this.clock.tick(TIME_TO_WAIT); const $container = $selectBox.find('.dx-scrollview-content'); - assert.equal($.trim($container.text()), 'itemTemplate', 'items rendered with item template'); + assert.equal($container.text().trim(), 'itemTemplate', 'items rendered with item template'); }); QUnit.test('selectbox loads first page after first opening when paging is enabled', function(assert) { @@ -1376,7 +1376,7 @@ QUnit.module('widget options', moduleSetup, () => { this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($(toSelector(LIST_ITEM_CLASS)).first().text()), '0', 'first item is loaded'); + assert.equal($(toSelector(LIST_ITEM_CLASS)).first().text().trim(), '0', 'first item is loaded'); }); QUnit.test('change displayCustomValue', function(assert) { @@ -5986,13 +5986,13 @@ QUnit.module('focus policy', { kb.type('a').press('esc'); $($input).trigger($.Event('keydown', { key: KEY_DOWN, altKey: true })); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($(toSelector(LIST_ITEM_CLASS)).text()), 'a', 'filter should not be cleared before focusout'); + assert.equal($(toSelector(LIST_ITEM_CLASS)).text().trim(), 'a', 'filter should not be cleared before focusout'); this.instance.blur(); this.instance.option('opened', false); $($input).trigger($.Event('keydown', { key: KEY_DOWN, altKey: true })); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($(toSelector(LIST_ITEM_CLASS)).text()), 'abc', 'no filtering'); + assert.equal($(toSelector(LIST_ITEM_CLASS)).text().trim(), 'abc', 'no filtering'); }); QUnit.test('input keep focus when popup is opened by click on button', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/slider.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/slider.tests.js index 5b48bb6340bf..1967b7e66625 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/slider.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/slider.tests.js @@ -1185,7 +1185,7 @@ module('tooltip integration', { this.$tooltip = this.$handle.find(`.${TOOLTIP_CLASS}`); this.getTooltip = () => this.$handle.find(`.${TOOLTIP_CLASS}`); this.getTooltipContent = () => this.getTooltip().find(`.${TOOLTIP_CONTENT_CLASS}`); - this.getTooltipText = () => $.trim(this.getTooltip().text()); + this.getTooltipText = () => this.getTooltip().text().trim(); }; this.reinit = (options) => { this.slider.dispose(); @@ -1798,7 +1798,7 @@ module('valueChangeMode option', { this.$tooltip = this.$handle.find(`.${TOOLTIP_CLASS}`); this.getTooltip = () => this.$handle.find(`.${TOOLTIP_CLASS}`); - this.getTooltipText = () => $.trim(this.getTooltip().text()); + this.getTooltipText = () => this.getTooltip().text().trim(); } }, () => { test('slider value should not change on swipe with "onHandleRelease" valueChangeMode', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/switch.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/switch.markup.tests.js index 39d34f7411a9..105e304c4a0c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/switch.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/switch.markup.tests.js @@ -87,10 +87,10 @@ QUnit.module('Switch markup', () => { const inner = element.find(INNER_SELECTOR); const labelOnEl = inner.find(LABEL_ON_SELECTOR); - assert.equal($.trim(labelOnEl.text()), 'ON'); + assert.equal(labelOnEl.text().trim(), 'ON'); const labelOffEl = inner.find(LABEL_OFF_SELECTOR); - assert.equal($.trim(labelOffEl.text()), 'OFF'); + assert.equal(labelOffEl.text().trim(), 'OFF'); }); QUnit.test('switchedOnText/switchedOffText on init', function(assert) { @@ -102,10 +102,10 @@ QUnit.module('Switch markup', () => { const inner = element.find(INNER_SELECTOR); const textOnEl = inner.find(LABEL_ON_SELECTOR); - assert.equal($.trim(textOnEl.text()), 'customOn'); + assert.equal(textOnEl.text().trim(), 'customOn'); const textOffEl = inner.find(LABEL_OFF_SELECTOR); - assert.equal($.trim(textOffEl.text()), 'customOff'); + assert.equal(textOffEl.text().trim(), 'customOff'); }); QUnit.test('default ui state', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.markup.tests.js index 0ccd779e77c2..45156f4d16cb 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.markup.tests.js @@ -430,7 +430,7 @@ QUnit.module('option dependent appearance', moduleSetup, () => { }); const $tagContainer = $element.find('.' + TAGBOX_TAG_CONTAINER_CLASS); - assert.equal($.trim($tagContainer.text()), '!one!two', 'selected values are rendered correctly'); + assert.equal($tagContainer.text().trim(), '!one!two', 'selected values are rendered correctly'); }); QUnit.test('tagbox should have template classes', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.tests.js index 96c105041037..d84292cd494b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.tests.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import { DataSource } from 'data/data_source/data_source'; -import { isRenderer } from 'core/utils/type'; +import { isFunction, isRenderer } from 'core/utils/type'; import { createTextElementHiddenCopy } from '__internal/core/utils/m_dom'; import ajaxMock from '../../helpers/ajaxMock.js'; import config from 'core/config'; @@ -503,7 +503,7 @@ QUnit.module('tags', moduleSetup, () => { $($listItems.eq(0)).trigger('dxclick'); $($listItems.eq(1)).trigger('dxclick'); - assert.equal($.trim($tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS).text()), '01', 'selected first and second items'); + assert.equal($tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS).text().trim(), '01', 'selected first and second items'); }); QUnit.test('tag should have correct value when item value is an empty string', function(assert) { @@ -1793,7 +1793,7 @@ QUnit.module('tag template', moduleSetup, () => { const $tagContainer = $element.find('.' + TAGBOX_TAG_CONTAINER_CLASS); - assert.equal($.trim($tagContainer.text()), 'onetwo', 'selected values are rendered correctly'); + assert.equal($tagContainer.text().trim(), 'onetwo', 'selected values are rendered correctly'); }); QUnit.test('value should be correct if the default tag template is used and the displayExpr is specified', function(assert) { @@ -3454,7 +3454,7 @@ QUnit.module('searchEnabled', moduleSetup, () => { this.clock.tick(TIME_TO_WAIT); const $listItems = $('.dx-list-item'); - assert.equal($.trim($listItems.text()), 'test', 'items filtered'); + assert.equal($listItems.text().trim(), 'test', 'items filtered'); }); QUnit.test('renders all tags after search', function(assert) { @@ -3477,7 +3477,7 @@ QUnit.module('searchEnabled', moduleSetup, () => { const $tagContainer = $tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS); assert.equal($tagContainer.find('.' + TAGBOX_TAG_CONTENT_CLASS).length, 2, 'selected tags rendered'); - assert.equal($.trim($tagContainer.text()), 'MoscowLondon', 'selected values are rendered'); + assert.equal($tagContainer.text().trim(), 'MoscowLondon', 'selected values are rendered'); }); QUnit.test('input is positioned on the right of last tag', function(assert) { @@ -4786,7 +4786,7 @@ QUnit.module('the \'acceptCustomValue\' option', moduleSetup, () => { assert.deepEqual($tagBox.dxTagBox('option', 'value'), ['item1', 'test'], 'value was added to values'); this.clock.tick(TIME_TO_WAIT); - assert.equal($.trim($tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS).text()), 'item1test', 'all tags rendered'); + assert.equal($tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS).text().trim(), 'item1test', 'all tags rendered'); }); QUnit.test('acceptCustomValue should not add empty tag', function(assert) { @@ -6566,7 +6566,7 @@ QUnit.module('dataSource integration', moduleSetup, () => { $('.dx-item').trigger('dxclick'); $($input).trigger('dxclick'); - assert.equal($.trim($('.dx-item').first().text()), '0', 'first item loaded'); + assert.equal($('.dx-item').first().text().trim(), '0', 'first item loaded'); }); QUnit.test('\'byKey\' should not be called on initialization (T533200)', function(assert) { @@ -6819,7 +6819,7 @@ QUnit.module('performance', () => { $item.trigger('dxclick'); const filter = load.lastCall.args[0].filter; - assert.ok($.isFunction(filter), 'filter is function'); + assert.ok(isFunction(filter), 'filter is function'); }); QUnit.test('loadOptions.filter should be correct when user filter is also used', function(assert) { @@ -7345,7 +7345,7 @@ QUnit.module('regression', { const $tagContainer = tagBox.$element().find('.' + TAGBOX_TAG_CONTAINER_CLASS); - assert.equal($.trim($tagContainer.text()), 'Item14Item41', 'selected values are rendered correctly'); + assert.equal($tagContainer.text().trim(), 'Item14Item41', 'selected values are rendered correctly'); }); QUnit.test('T403756 - dxTagBox treats removing a dxTagBox item for the first time as removing the item', function(assert) { @@ -7440,7 +7440,7 @@ QUnit.module('regression', { const $tagContainer = $tagBox.find('.' + TAGBOX_TAG_CONTAINER_CLASS); assert.equal($tagContainer.find('.' + TAGBOX_TAG_CONTENT_CLASS).length, 2, 'selected tags rendered'); - assert.equal($.trim($tagContainer.text()), 'Item1Item3', 'selected values are rendered'); + assert.equal($tagContainer.text().trim(), 'Item1Item3', 'selected values are rendered'); }); QUnit.test('selection should work with pregrouped data without paging and with preloaded datasource', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js index 2c4ec1c9e61c..f530d9963dfc 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/formLayoutManager.markup.tests.js @@ -272,8 +272,8 @@ QUnit.module('Layout manager', () => { const $requiredItem = $items.eq(0); const $optionalItem = $items.eq(1); - assert.equal($.trim($requiredItem.find('.' + FIELD_ITEM_REQUIRED_MARK_CLASS).text()), '+', 'custom required mark'); - assert.equal($.trim($optionalItem.find('.' + FIELD_ITEM_OPTIONAL_MARK_CLASS).text()), '-', 'custom optional mark'); + assert.equal($requiredItem.find('.' + FIELD_ITEM_REQUIRED_MARK_CLASS).text().trim(), '+', 'custom required mark'); + assert.equal($optionalItem.find('.' + FIELD_ITEM_OPTIONAL_MARK_CLASS).text().trim(), '-', 'custom optional mark'); }); test('Change marks', function(assert) { @@ -297,8 +297,8 @@ QUnit.module('Layout manager', () => { const $requiredItem = $items.eq(0); const $optionalItem = $items.eq(1); - assert.equal($.trim($requiredItem.find('.' + FIELD_ITEM_REQUIRED_MARK_CLASS).text()), '+', 'custom required mark'); - assert.equal($.trim($optionalItem.find('.' + FIELD_ITEM_OPTIONAL_MARK_CLASS).text()), '-', 'custom optional mark'); + assert.equal($requiredItem.find('.' + FIELD_ITEM_REQUIRED_MARK_CLASS).text().trim(), '+', 'custom required mark'); + assert.equal($optionalItem.find('.' + FIELD_ITEM_OPTIONAL_MARK_CLASS).text().trim(), '-', 'custom optional mark'); }); test('Change marks visibility', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/chartIntegration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/chartIntegration.tests.js index 6dbd05959981..542370705e90 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/chartIntegration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/chartIntegration.tests.js @@ -2,6 +2,7 @@ import '../../helpers/noIntl.js'; import $ from 'jquery'; +import { isFunction } from 'core/utils/type'; import { PivotGridDataSource } from '__internal/grids/pivot_grid/data_source/m_data_source'; import executeAsyncMock from '../../helpers/executeAsyncMock.js'; @@ -79,7 +80,7 @@ QUnit.module('Chart Binding', { const pivotGrid = createPivotGrid(); assert.ok(pivotGrid); - assert.ok($.isFunction(pivotGrid.bindChart)); + assert.ok(isFunction(pivotGrid.bindChart)); }); QUnit.test('Call bind chart without arguments', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.initialization.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.initialization.tests.js index 3bf12679570b..dadb981d0a8a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.initialization.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.initialization.tests.js @@ -2,6 +2,7 @@ import fx from 'animation/fx'; import { DataSource } from 'data/data_source/data_source'; import { triggerHidingEvent, triggerShownEvent } from 'events/visibility_change'; +import { isFunction } from 'core/utils/type'; import $ from 'jquery'; import { AppointmentDataProvider } from '__internal/scheduler/appointments/data_provider/m_appointment_data_provider'; import errors from 'ui/widget/ui.errors'; @@ -92,8 +93,8 @@ QUnit.module('Initialization', { 'allDay', 'recurrenceRule', 'recurrenceException'], function(_, field) { - assert.ok($.isFunction(dataAccessors.getter[field]), '\'' + field + '\' getter is OK'); - assert.ok($.isFunction(dataAccessors.setter[field]), '\'' + field + '\' setter is OK'); + assert.ok(isFunction(dataAccessors.getter[field]), '\'' + field + '\' getter is OK'); + assert.ok(isFunction(dataAccessors.setter[field]), '\'' + field + '\' setter is OK'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js index f06fc99c4f45..f7efdbce939b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js @@ -119,7 +119,7 @@ QUnit.module('Filtering', () => { const dateFilter = filter[0][0]; const zeroDurationFilter = filter[0][4]; - assert.ok($.isArray(filter), 'Filter is array'); + assert.ok(Array.isArray(filter), 'Filter is array'); assert.equal(filter[0].length, 5, 'Filter size is OK'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/box.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/box.markup.tests.js index 3fae15ebb3bd..6e9cd5f1265c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/box.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/box.markup.tests.js @@ -104,7 +104,7 @@ QUnit.module('template rendering', () => { ] }); - assert.equal($.trim($box.text()), 'test', 'inner box rendered with template'); + assert.equal($box.text().trim(), 'test', 'inner box rendered with template'); }); QUnit.test('innerBox with item renderer', function(assert) { @@ -119,13 +119,13 @@ QUnit.module('template rendering', () => { itemTemplate: (item) => 'test' + item.test() }); - assert.equal($.trim($box.text()), 'test1test2', 'inner box rendered'); + assert.equal($box.text().trim(), 'test1test2', 'inner box rendered'); }); QUnit.test('innerBox with nested box item', function(assert) { const $box = $('#nestedBox').dxBox({}); - assert.equal($.trim($box.text()), 'Box1', 'inner box rendered'); + assert.equal($box.text().trim(), 'Box1', 'inner box rendered'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/button.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/button.markup.tests.js index c5893d6708a6..3323226af118 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/button.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/button.markup.tests.js @@ -48,7 +48,7 @@ QUnit.module('Button markup', function() { }); const buttonContent = element.find('.' + BUTTON_CONTENT_CLASS); - assert.equal($.trim(buttonContent.find('.' + BUTTON_TEXT_CLASS).text()), 'text'); + assert.equal(buttonContent.find('.' + BUTTON_TEXT_CLASS).text().trim(), 'text'); assert.ok(element.hasClass(BUTTON_HAS_ICON_CLASS), 'button with icon has icon class'); assert.ok(element.hasClass(BUTTON_HAS_TEXT_CLASS), 'button with text has text class'); }); @@ -165,7 +165,7 @@ QUnit.module('Button markup', function() { QUnit.test('dxButton with anonymous template', function(assert) { const $button = $('#buttonWithAnonymousTemplate').dxButton(); - assert.equal($.trim($button.text()), 'test', 'anonymous template rendered'); + assert.equal($button.text().trim(), 'test', 'anonymous template rendered'); }); QUnit.test('anonymous content template rendering', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/contextMenu.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/contextMenu.tests.js index 200ca0c4e072..0f42fb848fe5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/contextMenu.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/contextMenu.tests.js @@ -9,7 +9,7 @@ import ContextMenu from 'ui/context_menu'; import { addNamespace } from 'events/utils/index'; import contextMenuEvent from 'events/contextmenu'; import holdEvent from 'events/hold'; -import { isRenderer } from 'core/utils/type'; +import { isFunction, isRenderer } from 'core/utils/type'; import config from 'core/config'; import keyboardMock from '../../helpers/keyboardMock.js'; import ariaAccessibilityTestHelper from '../../helpers/ariaAccessibilityTestHelper.js'; @@ -1013,11 +1013,11 @@ QUnit.module('Showing and hiding context menu', moduleConfig, () => { let d = instance.show(); - assert.ok($.isFunction(d.promise), 'type object is the Deferred'); + assert.ok(isFunction(d.promise), 'type object is the Deferred'); d = instance.hide(); - assert.ok($.isFunction(d.promise), 'type object is the Deferred'); + assert.ok(isFunction(d.promise), 'type object is the Deferred'); }); QUnit.test('overlay wrapper should have the same size as window (T1102095)', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.markup.tests.js index 0ad57a7d3d22..adb289ecd59a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.markup.tests.js @@ -137,6 +137,6 @@ QUnit.module('default template', () => { QUnit.test('template should be rendered correctly with text', function(assert) { const $content = prepareItemTest({ text: 'custom' }); - assert.equal($.trim($content.text()), 'custom'); + assert.equal($content.text().trim(), 'custom'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/list.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/list.markup.tests.js index 7b8dd26c770a..0c4d862401f9 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/list.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/list.markup.tests.js @@ -45,7 +45,7 @@ QUnit.module('List markup', {}, () => { assert.equal(items.length, 2); assert.ok(items.eq(0).hasClass(LIST_ITEM_CLASS)); assert.ok(items.eq(1).hasClass(LIST_ITEM_CLASS)); - assert.equal($.trim(items.text()), '01', 'all items rendered'); + assert.equal(items.text().trim(), '01', 'all items rendered'); }); QUnit.test('itemTemplate default', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js index 1b0b727981e1..3d16e7b015a8 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import { DataSource } from 'data/data_source/data_source'; -import { isRenderer } from 'core/utils/type'; +import { isFunction, isRenderer } from 'core/utils/type'; import { noop } from 'core/utils/common'; import config from 'core/config'; import devices from '__internal/core/m_devices'; @@ -94,7 +94,7 @@ const ScrollViewMock = DOMComponent.inherit({ pullDown() { const pullDownHandler = this.option('onPullDown'); - if($.isFunction(pullDownHandler)) { + if(isFunction(pullDownHandler)) { pullDownHandler(); } }, @@ -102,7 +102,7 @@ const ScrollViewMock = DOMComponent.inherit({ scrollBottom() { const scrollBottomHandler = this.option('onReachBottom'); - if($.isFunction(scrollBottomHandler)) { + if(isFunction(scrollBottomHandler)) { scrollBottomHandler(); } }, @@ -2218,7 +2218,7 @@ QUnit.module('dataSource integration', moduleSetup, () => { this.clock.tick(400); - assert.equal($.trim($list.find('.dx-list-item').text()), '012'); + assert.equal($list.find('.dx-list-item').text().trim(), '012'); }); QUnit.test('shared data source', function(assert) { @@ -2230,7 +2230,7 @@ QUnit.module('dataSource integration', moduleSetup, () => { const widget = this.element.dxList('instance'); const changedHandler = widget._proxiedDataSourceChangedHandler; - assert.ok($.isFunction(changedHandler)); + assert.ok(isFunction(changedHandler)); assert.ok(dataSource._eventsStrategy._events['changed'].has(changedHandler)); widget._dispose(); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/menu.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/menu.tests.js index 4bf3da326b32..872110d500c9 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/menu.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/menu.tests.js @@ -304,7 +304,7 @@ QUnit.module('Menu rendering', { assert.equal($menu.find('.' + DX_MENU_ITEM_CLASS).length, 1); rootMenuItem.trigger('dxclick'); const submenu = getSubMenuInstance(rootMenuItem); - assert.equal($.trim($(submenu._overlay.$content()).find('.' + DX_MENU_ITEM_CLASS).eq(0).text()), 'Menu Test'); + assert.equal($(submenu._overlay.$content()).find('.' + DX_MENU_ITEM_CLASS).eq(0).text().trim(), 'Menu Test'); }); QUnit.test('Render horizontal menu with default submenuDirection', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/menuBase.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/menuBase.tests.js index 2d28153e4393..9b8177505166 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/menuBase.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/menuBase.tests.js @@ -960,8 +960,8 @@ QUnit.module('Selection', () => { onSelectionChanged: function(e) { assert.equal(e.component, this, 'e.component should be an instance of menu'); assert.ok($(e.element).get(0).nodeType, 'e.element should be dom node or jquery object'); - assert.ok($.isArray(e.addedItems), 'e.addedItems should be array'); - assert.ok($.isArray(e.removedItems), 'e.removedItems should be array'); + assert.ok(Array.isArray(e.addedItems), 'e.addedItems should be array'); + assert.ok(Array.isArray(e.removedItems), 'e.removedItems should be array'); } }); const $item = menuBase.element.find('.' + DX_MENU_ITEM_CLASS).eq(1); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js index 0b8dc41d9569..f657fa46977c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js @@ -1929,14 +1929,14 @@ testModule('content', moduleConfig, () => { const $content = $($overlay.dxOverlay('instance').$content()); assert.strictEqual($content.children().length, 1, 'Overlay content has only one child'); - assert.strictEqual($.trim($content.text()), 'TestContent', 'Overlay content text is correct'); + assert.strictEqual($content.text().trim(), 'TestContent', 'Overlay content text is correct'); }); test('wrong content template name is specified', function(assert) { const $overlay = $('#overlayWithWrongTemplateName').dxOverlay({ contentTemplate: 'custom', visible: true }); const $content = $overlay.dxOverlay('instance').$content(); - assert.strictEqual($.trim($content.text()), 'custom', 'content has no text'); + assert.strictEqual($content.text().trim(), 'custom', 'content has no text'); }); test('contentTemplate option accepts template instance', function(assert) { @@ -1949,7 +1949,7 @@ testModule('content', moduleConfig, () => { const $content = $overlay.dxOverlay('instance').$content(); - assert.strictEqual($.trim($content.text()), 'test', 'template rendered'); + assert.strictEqual($content.text().trim(), 'test', 'template rendered'); }); test('contentTemplate option support dynamic change', function(assert) { @@ -1960,7 +1960,7 @@ testModule('content', moduleConfig, () => { $overlay.dxOverlay('option', 'contentTemplate', 'template2'); - assert.strictEqual($.trim($overlay.dxOverlay('$content').text()), 'template2', 'template rerendered'); + assert.strictEqual($overlay.dxOverlay('$content').text().trim(), 'template2', 'template rerendered'); }); test('contentTemplate option support dynamic change in a set of options', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js index 54d1e9f36c06..9382cd10e19f 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js @@ -15,7 +15,7 @@ import { value as viewPort } from 'core/utils/view_port'; import pointerMock from '../../helpers/pointerMock.js'; import keyboardMock from '../../helpers/keyboardMock.js'; import config from 'core/config'; -import { isRenderer } from 'core/utils/type'; +import { isRenderer, isWindow } from 'core/utils/type'; import browser from 'core/utils/browser'; import { compare as compareVersions } from 'core/utils/version'; import resizeCallbacks from 'core/utils/resize_callbacks'; @@ -252,7 +252,7 @@ QUnit.module('basic', () => { assert.equal($content.children().length, 1); assert.ok($content.find('.testContent').length); - assert.equal($.trim($content.text()), 'testContent'); + assert.equal($content.text().trim(), 'testContent'); }); QUnit.test('title and content template', function(assert) { @@ -263,18 +263,18 @@ QUnit.module('basic', () => { assert.equal($title.children().length, 1); assert.ok($title.find('.testTitle').length); - assert.equal($.trim($title.text()), 'testTitle'); + assert.equal($title.text().trim(), 'testTitle'); assert.equal($content.children().length, 1); assert.ok($content.find('.testContent').length); - assert.equal($.trim($content.text()), 'testContent'); + assert.equal($content.text().trim(), 'testContent'); }); QUnit.test('custom titleTemplate option', function(assert) { $('#popupWithTitleTemplate').dxPopup({ titleTemplate: 'customTitle', visible: true }); const $title = $(`.${POPUP_TITLE_CLASS}`, viewport()); - assert.equal($.trim($title.text()), 'testTitle', 'title text is correct'); + assert.equal($title.text().trim(), 'testTitle', 'title text is correct'); }); QUnit.test('done button is located after cancel button in device', function(assert) { @@ -2294,7 +2294,7 @@ QUnit.module('resize', { this.reinit({ width: 2, height: 2 }); const resizable = this.$overlayContent.dxResizable('instance'); - assert.ok($.isWindow(resizable.option('area').get(0)), 'window is the area of the resizable'); + assert.ok(isWindow(resizable.option('area').get(0)), 'window is the area of the resizable'); } finally { viewPort(toSelector(VIEWPORT_CLASS)); } @@ -2492,7 +2492,7 @@ QUnit.module('rendering', { const $content = $popup.dxPopup('$content'); - assert.equal($.trim($content.text()), 'TestContent', 'content rendered'); + assert.equal($content.text().trim(), 'TestContent', 'content rendered'); assert.equal($content.find('.testContent').get(0), $inner[0], 'content should not lost the link'); }); @@ -2504,7 +2504,7 @@ QUnit.module('rendering', { const $content = $popup.dxPopup('$content'); - assert.equal($.trim($content.text()), 'TestContent', 'content is correct'); + assert.equal($content.text().trim(), 'TestContent', 'content is correct'); }); QUnit.test('title toolbar with buttons when \'showTitle\' is false', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/responsiveBox.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/responsiveBox.markup.tests.js index 5697d11d5742..7f45da1ca52e 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/responsiveBox.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/responsiveBox.markup.tests.js @@ -246,7 +246,7 @@ QUnit.module('layouting', moduleConfig, () => { this.setScreenSize(1000); responsiveBox.repaint(); - assert.equal($.trim($responsiveBox.text()), 'md', 'md item apply'); + assert.equal($responsiveBox.text().trim(), 'md', 'md item apply'); }); QUnit.test('singleColumnScreen render items in one column', function(assert) { @@ -275,7 +275,7 @@ QUnit.module('layouting', moduleConfig, () => { const $items = $box.find('.' + BOX_ITEM_CLASS); assert.equal($items.length, expectedText.length, $items.length + ' items rendered'); - assert.equal($.trim($responsiveBox.text()), expectedText, 'rendered only needed items'); + assert.equal($responsiveBox.text().trim(), expectedText, 'rendered only needed items'); }, this); // screen: xs sm md lg @@ -432,7 +432,7 @@ QUnit.module('templates', () => { rows: [{}], cols: [{}] }); - assert.equal($.trim($responsiveBox.text()), 'test', 'item template rendered'); + assert.equal($responsiveBox.text().trim(), 'test', 'item template rendered'); }); QUnit.test('custom item renderer', function(assert) { @@ -448,7 +448,7 @@ QUnit.module('templates', () => { }); assert.equal(templateContext, 'dxResponsiveBox', 'Correct context'); - assert.equal($.trim($responsiveBox.text()), 'test', 'item rendered'); + assert.equal($responsiveBox.text().trim(), 'test', 'item rendered'); }); }); @@ -466,7 +466,7 @@ QUnit.module('template rendering', moduleConfig, () => { return $('
').text('after rendering'); }); - assert.equal($.trim($responsiveBox.text()), 'after rendering', 'item template was rendered'); + assert.equal($responsiveBox.text().trim(), 'after rendering', 'item template was rendered'); }); QUnit.test('widget rendered correctly after rows option was changed', function(assert) { @@ -507,7 +507,7 @@ QUnit.module('collision', moduleConfig, () => { ] }); - assert.equal($.trim($responsiveBox.text()), '02', 'the former item rendered'); + assert.equal($responsiveBox.text().trim(), '02', 'the former item rendered'); }); QUnit.test('item located at spanning cell', function(assert) { @@ -520,7 +520,7 @@ QUnit.module('collision', moduleConfig, () => { ] }); - assert.equal($.trim($responsiveBox.text()), '0', 'the former item rendered'); + assert.equal($responsiveBox.text().trim(), '0', 'the former item rendered'); }); QUnit.test('item spanning located at spanning of another item', function(assert) { @@ -533,7 +533,7 @@ QUnit.module('collision', moduleConfig, () => { ] }); - assert.equal($.trim($responsiveBox.text()), '0', 'the former item rendered'); + assert.equal($responsiveBox.text().trim(), '0', 'the former item rendered'); }); QUnit.test('item spanning out of bounds', function(assert) { @@ -546,6 +546,6 @@ QUnit.module('collision', moduleConfig, () => { ] }); - assert.equal($.trim($responsiveBox.text()), '01', 'the former item rendered'); + assert.equal($responsiveBox.text().trim(), '01', 'the former item rendered'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.markup.tests.js index 8f8f2e023e8c..099ffa468011 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.markup.tests.js @@ -98,7 +98,7 @@ QUnit.module('Render', moduleConfig, () => { ] }); - assert.strictEqual($.trim($splitter.text()), 'Nested_Splitter_Pane_1', 'nested splitter item with template was rendered'); + assert.strictEqual($splitter.text().trim(), 'Nested_Splitter_Pane_1', 'nested splitter item with template was rendered'); }); QUnit.test('with nested splitter that has two panes inside using itemTemplate ', function(assert) { @@ -113,7 +113,7 @@ QUnit.module('Render', moduleConfig, () => { itemTemplate: (item) => { return `Pane_${item.paneIndex()}`; } }); - assert.strictEqual($.trim(this.$element.text()), 'Pane_1Pane_2', 'nested items were rendered correctly'); + assert.strictEqual(this.$element.text().trim(), 'Pane_1Pane_2', 'nested items were rendered correctly'); }); QUnit.test('items in nested splitter with two panes usind parent itemTemplate option', function(assert) { @@ -128,7 +128,7 @@ QUnit.module('Render', moduleConfig, () => { itemTemplate: (item) => { return `Pane_${item.paneIndex()}`; } }); - assert.strictEqual($.trim(this.$element.text()), 'Pane_1Pane_2', 'nested items were rendered correctly'); + assert.strictEqual(this.$element.text().trim(), 'Pane_1Pane_2', 'nested items were rendered correctly'); }); QUnit.test('itemTemplate option in a nested splitter is more prioritized than itemTemplate in parent splitter', function(assert) { @@ -144,7 +144,7 @@ QUnit.module('Render', moduleConfig, () => { itemTemplate: (item) => `Pane_${item.paneIndex()}` }); - assert.strictEqual($.trim(this.$element.text()), 'NestedPane_1NestedPane_2', 'nested items were rendered correctly'); + assert.strictEqual(this.$element.text().trim(), 'NestedPane_1NestedPane_2', 'nested items were rendered correctly'); }); QUnit.test('item.template option in a nested splitter is more prioritized than itemTemplate', function(assert) { @@ -159,7 +159,7 @@ QUnit.module('Render', moduleConfig, () => { ], }); - assert.strictEqual($.trim(this.$element.text()), 'TemplatedPane_1NestedPane_2', 'nested items were rendered correctly'); + assert.strictEqual(this.$element.text().trim(), 'TemplatedPane_1NestedPane_2', 'nested items were rendered correctly'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tabs.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tabs.markup.tests.js index d713eda86c11..d8d346a90f2a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tabs.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tabs.markup.tests.js @@ -67,7 +67,7 @@ QUnit.module('Tabs markup', () => { assert.equal(tabsInstance.option('selectedIndex'), -1); - assert.strictEqual($.trim(tabsElement.text()), '001122'); + assert.strictEqual(tabsElement.text().trim(), '001122'); assert.equal(tabElements.find('.dx-icon-custom').length, 1); @@ -224,19 +224,19 @@ QUnit.module('Default template', moduleConfig, () => { QUnit.test('template should be rendered correctly with boolean', function(assert) { const $content = this.prepareItemTest(true); - assert.strictEqual($.trim($content.text()), 'truetrue'); + assert.strictEqual($content.text().trim(), 'truetrue'); }); QUnit.test('template should be rendered correctly with number', function(assert) { const $content = this.prepareItemTest(1); - assert.strictEqual($.trim($content.text()), '11'); + assert.strictEqual($content.text().trim(), '11'); }); QUnit.test('template should be rendered correctly with object that contains the "text" property', function(assert) { const $content = this.prepareItemTest({ text: 'custom' }); - assert.strictEqual($.trim($content.text()), 'customcustom'); + assert.strictEqual($content.text().trim(), 'customcustom'); }); QUnit.test('template should be rendered correctly with html', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/toolbar.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/toolbar.markup.tests.js index 4c4d85ee4cd4..dd975c626d94 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/toolbar.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/toolbar.markup.tests.js @@ -269,13 +269,13 @@ QUnit.module('regressions', { }, () => { test('B231277', function(assert) { this.instance.option('items', [{ location: 'center' }]); - assert.equal($.trim(this.element.text()), ''); + assert.equal(this.element.text().trim(), ''); this.instance.option('items', [{ location: 'center', text: undefined }]); - assert.equal($.trim(this.element.text()), ''); + assert.equal(this.element.text().trim(), ''); this.instance.option('items', [{ location: 'center', text: null }]); - assert.equal($.trim(this.element.text()), ''); + assert.equal(this.element.text().trim(), ''); }); }); @@ -352,19 +352,19 @@ QUnit.module('default template', () => { test('template should be rendered correctly with boolean', function(assert) { const $content = prepareItemTest(true); - assert.equal($.trim($content.text()), 'true'); + assert.equal($content.text().trim(), 'true'); }); test('template should be rendered correctly with number', function(assert) { const $content = prepareItemTest(1); - assert.equal($.trim($content.text()), '1'); + assert.equal($content.text().trim(), '1'); }); test('template should be rendered correctly with object that contains the "text" property', function(assert) { const $content = prepareItemTest({ text: 'custom' }); - assert.equal($.trim($content.text()), 'custom'); + assert.equal($content.text().trim(), 'custom'); }); test('template should be rendered correctly with html', function(assert) { @@ -409,7 +409,7 @@ QUnit.module('default template', () => { const button = $content.filter('.dx-button'); assert.equal(button.length, 1); - assert.equal($.trim(button.text()), 'test'); + assert.equal(button.text().trim(), 'test'); }); test('template should be rendered correctly with dxtabs', function(assert) { @@ -419,7 +419,7 @@ QUnit.module('default template', () => { assert.strictEqual(tabs.length, 1); assert.strictEqual(tabs.find('.dx-tab').length, 1); - assert.strictEqual($.trim(tabs.text()), 'testtest'); + assert.strictEqual(tabs.text().trim(), 'testtest'); }); test('template should be rendered correctly with tabs', function(assert) { @@ -429,6 +429,6 @@ QUnit.module('default template', () => { assert.strictEqual(tabs.length, 1); assert.strictEqual(tabs.find('.dx-tab').length, 1); - assert.strictEqual($.trim(tabs.text()), 'testtest'); + assert.strictEqual(tabs.text().trim(), 'testtest'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeView.tests.js index a5a470ad0342..fd1733a9b437 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeView.tests.js @@ -3,6 +3,7 @@ import $ from 'jquery'; import CustomStore from 'data/custom_store'; import ArrayStore from 'data/array_store'; +import { isFunction } from 'core/utils/type'; import 'ui/tree_view'; @@ -158,7 +159,7 @@ window.initTree = function(options) { window.stripFunctions = function(obj) { const result = $.extend(true, {}, obj); $.each(result, function(field, value) { - if($.isFunction(value)) { + if(isFunction(value)) { delete result[field]; } diff --git a/packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js index 14a0f679139f..7cdea0726a2f 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/collectionWidget.tests.js @@ -135,7 +135,7 @@ module('render', { }); assert.equal(element.find('.item').length, 3); - assert.equal($.trim(element.text()), 'Text is: 0;Text is: 1;Text is: 2;'); + assert.equal(element.text().trim(), 'Text is: 0;Text is: 1;Text is: 2;'); }); test('custom render func, returns jquery. Items: [{ prop: 3 }, { prop: 4 }, { prop: 5 }]', function(assert) { @@ -157,7 +157,7 @@ module('render', { }); assert.equal(element.find('.item').length, 3); - assert.equal($.trim(element.text()), 'Text is: 3;Text is: 4;Text is: 5;'); + assert.equal(element.text().trim(), 'Text is: 3;Text is: 4;Text is: 5;'); }); test('custom render func, returns dom node', function(assert) { @@ -188,7 +188,7 @@ module('render', { }); assert.equal(element.find('.item').length, 3); - assert.equal($.trim(element.text()), 'Text is: 3;Text is: 4;Text is: 5;'); + assert.equal(element.text().trim(), 'Text is: 3;Text is: 4;Text is: 5;'); }); test('custom render func, returns string', function(assert) { @@ -209,7 +209,7 @@ module('render', { }); assert.equal(element.find('.item').length, 3); - assert.equal($.trim(element.text()), 'Text is: 0;Text is: 1;Text is: ;'); + assert.equal(element.text().trim(), 'Text is: 0;Text is: 1;Text is: ;'); }); test('custom render func, returns numbers', function(assert) { @@ -224,7 +224,7 @@ module('render', { }); assert.equal(element.find('.item').length, 2); - assert.equal($.trim(element.text()), '01'); + assert.equal(element.text().trim(), '01'); }); test('itemTemplateProperty option', function(assert) { @@ -237,7 +237,7 @@ module('render', { }); const $item = instance.itemElements().eq(0); - assert.equal($.trim($item.text()), 'First Template', 'item has correct template'); + assert.equal($item.text().trim(), 'First Template', 'item has correct template'); }); test('useItemTextAsTitle as primitive', function(assert) { @@ -295,8 +295,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'Test'); - assert.equal($.trim($element.children().eq(1).text()), 'Test'); + assert.equal($element.children().eq(0).text().trim(), 'Test'); + assert.equal($element.children().eq(1).text().trim(), 'Test'); }); test('\'itemTemplate\' as jQuery element', function(assert) { @@ -308,8 +308,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'Test'); - assert.equal($.trim($element.children().eq(1).text()), 'Test'); + assert.equal($element.children().eq(0).text().trim(), 'Test'); + assert.equal($element.children().eq(1).text().trim(), 'Test'); }); test('\'itemTemplate\' as jQuery element with custom template engine', function(assert) { @@ -329,8 +329,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'custom engine'); - assert.equal($.trim($element.children().eq(1).text()), 'custom engine'); + assert.equal($element.children().eq(0).text().trim(), 'custom engine'); + assert.equal($element.children().eq(1).text().trim(), 'custom engine'); } finally { setTemplateEngine('default'); } @@ -347,8 +347,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'First Template'); - assert.equal($.trim($element.children().eq(1).text()), 'First Template'); + assert.equal($element.children().eq(0).text().trim(), 'First Template'); + assert.equal($element.children().eq(1).text().trim(), 'First Template'); }); test('\'itemTemplate\' as function returning template name that is not string', function(assert) { @@ -361,7 +361,7 @@ module('render', { } }); - assert.equal($.trim($element.find('.' + ITEM_CONTENT_CLASS).eq(0).text()), 'zero'); + assert.equal($element.find('.' + ITEM_CONTENT_CLASS).eq(0).text().trim(), 'zero'); }); test('\'itemTemplate\' as function returning string', function(assert) { @@ -374,7 +374,7 @@ module('render', { } }); - assert.equal($.trim($element.find('.' + ITEM_CONTENT_CLASS).eq(0).text()), '0'); + assert.equal($element.find('.' + ITEM_CONTENT_CLASS).eq(0).text().trim(), '0'); }); test('\'itemTemplate\' as function returning template DOM node', function(assert) { @@ -388,8 +388,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'Test'); - assert.equal($.trim($element.children().eq(1).text()), 'Test'); + assert.equal($element.children().eq(0).text().trim(), 'Test'); + assert.equal($element.children().eq(1).text().trim(), 'Test'); }); test('\'itemTemplate\' as function returning template jQuery element', function(assert) { @@ -402,7 +402,7 @@ module('render', { } }); - assert.equal($.trim($element.find('.' + ITEM_CONTENT_CLASS).children().text()), 'Test'); + assert.equal($element.find('.' + ITEM_CONTENT_CLASS).children().text().trim(), 'Test'); }); test('\'itemTemplate\' as script element', function(assert) { @@ -413,7 +413,7 @@ module('render', { itemTemplate: $('#externalTemplate') }); - assert.equal($.trim($element.find('.' + ITEM_CONTENT_CLASS).html()), 'Test'); + assert.equal($element.find('.' + ITEM_CONTENT_CLASS).html().trim(), 'Test'); }); test('\'itemTemplate\' as script element (no root element)', function(assert) { @@ -425,8 +425,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'Outer text Test'); - assert.equal($.trim($element.children().eq(1).text()), 'Outer text Test'); + assert.equal($element.children().eq(0).text().trim(), 'Outer text Test'); + assert.equal($element.children().eq(1).text().trim(), 'Outer text Test'); }); test('\'itemTemplate\' as script element (no root element) with string renderer in template engine (T161432)', function(assert) { @@ -448,8 +448,8 @@ module('render', { }); assert.equal($element.children().length, 2); - assert.equal($.trim($element.children().eq(0).text()), 'Outer text Test'); - assert.equal($.trim($element.children().eq(1).text()), 'Outer text Test'); + assert.equal($element.children().eq(0).text().trim(), 'Outer text Test'); + assert.equal($element.children().eq(1).text().trim(), 'Outer text Test'); } finally { setTemplateEngine('default'); } @@ -686,7 +686,7 @@ module('render', { assert.equal($items.length, testSet.length, 'quantity of a test set items and rendered items are equal'); $items.each(function(index) { - assert.equal($.trim($(this).text()), testSet[index]); + assert.equal($(this).text().trim(), testSet[index]); }); }); @@ -2217,25 +2217,25 @@ module('default template', { test('template should be rendered correctly with boolean', function(assert) { const $content = this.prepareItemTest(true); - assert.equal($.trim($content.text()), 'true'); + assert.equal($content.text().trim(), 'true'); }); test('template should be rendered correctly with number', function(assert) { const $content = this.prepareItemTest(1); - assert.equal($.trim($content.text()), '1'); + assert.equal($content.text().trim(), '1'); }); test('template should be rendered correctly with object that has the text property', function(assert) { const $content = this.prepareItemTest({ text: 'custom' }); - assert.equal($.trim($content.text()), 'custom'); + assert.equal($content.text().trim(), 'custom'); }); test('template should be rendered correctly with text equals to zero', function(assert) { const $content = this.prepareItemTest({ text: 0 }); - assert.strictEqual($.trim($content.text()), '0'); + assert.strictEqual($content.text().trim(), '0'); }); test('template should be rendered correctly with html', function(assert) { @@ -2249,7 +2249,7 @@ module('default template', { test('template should be rendered correctly with html equals to an empty string', function(assert) { const $content = this.prepareItemTest({ text: 'test', html: '' }); - assert.strictEqual($.trim($content.text()), ''); + assert.strictEqual($content.text().trim(), ''); }); test('template should be rendered correctly with htmlstring', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js index 24c381596845..3a2ba81d084d 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js @@ -7,6 +7,7 @@ import devices from '__internal/core/m_devices'; import themes from 'ui/themes'; import support from '__internal/core/utils/m_support'; import publicComponentUtils from '__internal/core/utils/m_public_component'; +import { isFunction } from 'core/utils/type'; import { getNestedOptionValue } from 'core/options/utils'; import ActionSheet from 'ui/action_sheet'; @@ -80,7 +81,7 @@ QUnit.module('widgets defaults'); const testComponentDefaults = function(componentClass, forcedDevices, options, before, after) { const componentName = publicComponentUtils.name(componentClass); - forcedDevices = $.isArray(forcedDevices) ? forcedDevices : [forcedDevices]; + forcedDevices = Array.isArray(forcedDevices) ? forcedDevices : [forcedDevices]; before = before || noop; after = after || noop; @@ -95,7 +96,7 @@ const testComponentDefaults = function(componentClass, forcedDevices, options, b } const $container = $('#cmp'); const component = new componentClass($container); - options = $.isFunction(options) ? options.call(component) : options; + options = isFunction(options) ? options.call(component) : options; const defaults = component.option(); checkOptions.apply(component, [options, defaults, JSON.stringify(device), assert]); @@ -112,7 +113,7 @@ const checkOptions = function(expectedOptions, resultOptions, deviceString, asse $.each(expectedOptions, function(optionName, expectedValue) { let resultValue = getNestedOptionValue(resultOptions, optionName); - resultValue = $.isFunction(resultValue) ? resultValue.call(that) : resultValue; + resultValue = isFunction(resultValue) ? resultValue.call(that) : resultValue; if($.isPlainObject(expectedValue)) { checkOptions(expectedValue, resultValue, null, assert); diff --git a/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalCollectionWidget.js b/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalCollectionWidget.js index afa01c4ea2c1..950f1c96def3 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalCollectionWidget.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalCollectionWidget.js @@ -43,9 +43,9 @@ module('render', { }); assert.equal(this.element.children().length, 2); - assert.equal($.trim(this.element.children().eq(0).text()), 'item 1'); - assert.ok($.trim(this.element.children().eq(0).hasClass(DISABLED_STATE_CLASS))); - assert.equal($.trim(this.element.children().eq(1).text()), 'item 2'); + assert.equal(this.element.children().eq(0).text().trim(), 'item 1'); + assert.ok(this.element.children().eq(0).hasClass(DISABLED_STATE_CLASS)); + assert.equal(this.element.children().eq(1).text().trim(), 'item 2'); }); test('Default displayExpr: ', function(assert) { @@ -53,7 +53,7 @@ module('render', { items: [{ text: 'item 1' }] }); - assert.equal($.trim(this.element.children().eq(0).text()), 'item 1'); + assert.equal(this.element.children().eq(0).text().trim(), 'item 1'); }); test('create item by custom model using expressions set as functions', function(assert) { @@ -64,12 +64,12 @@ module('render', { items: [{ text: 'first item' }] }); - assert.equal($.trim(this.element.children().eq(0).text()), 'text'); + assert.equal(this.element.children().eq(0).text().trim(), 'text'); condition = true; widget.option('items', newItems); - assert.equal($.trim(this.element.children().eq(0).text()), 'name'); + assert.equal(this.element.children().eq(0).text().trim(), 'name'); }); test('DisplayExpr as function with parameter', function(assert) { @@ -78,7 +78,7 @@ module('render', { items: [{ name: 'Item 1' }] }); - assert.equal($.trim(this.element.children().eq(0).text()), 'Item 1!'); + assert.equal(this.element.children().eq(0).text().trim(), 'Item 1!'); }); test('DisplayExpr as non existing property', function(assert) { @@ -87,7 +87,7 @@ module('render', { items: [{ name: 'Item 1' }] }); - assert.equal($.trim(this.element.children().eq(0).text()), ''); + assert.equal(this.element.children().eq(0).text().trim(), ''); }); [null, undefined, '', {}].forEach((dataExprValue) => { diff --git a/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalDataAdapter.js b/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalDataAdapter.js index 27347eabf7a1..a817b411e18d 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalDataAdapter.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/hierarchicalCollectionWidgetParts/hierarchicalDataAdapter.js @@ -897,7 +897,7 @@ module('Search operation', moduleConfig, () => { const result = dataAdapter.search('bla-bla-bla'); - assert.ok($.isArray(result), 'The result is array'); + assert.ok(Array.isArray(result), 'The result is array'); assert.equal(result.length, 0, 'The result is empty'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js index 7abc3add7313..0b71b6f3d0b0 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js @@ -65,7 +65,7 @@ QUnit.module('Selector check', () => { selectorText = selectorText.replace(/[+~>]/g, ''); // normalize whitespace - selectorText = $.trim(selectorText).replace(/\s+/g, ' '); + selectorText = selectorText.trim().replace(/\s+/g, ' '); return selectorText; } @@ -80,7 +80,7 @@ QUnit.module('Selector check', () => { } for(i = 0; i < parts.length; i++) { - part = $.trim(parts[i]); + part = parts[i].trim(); if(part === '') { continue; diff --git a/packages/devextreme/testing/tests/DevExpress.ui/widget.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/widget.tests.js index 616099e6a8aa..02497daf73bb 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/widget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/widget.tests.js @@ -12,6 +12,7 @@ import pointerMock from '../../helpers/pointerMock.js'; import config from 'core/config'; import dataUtils from 'core/element_data'; import { deferUpdate } from 'core/utils/common'; +import { isFunction } from 'core/utils/type'; import registerKeyHandlerTestHelper from '../../helpers/registerKeyHandlerTestHelper.js'; import 'generic_light.css!'; @@ -441,7 +442,7 @@ QUnit.module('API', { const element = $('#widget'); const instance = new NewWidget(element); - assert.ok($.isFunction(instance.repaint)); + assert.ok(isFunction(instance.repaint)); const children = element.children(); @@ -455,7 +456,7 @@ QUnit.module('API', { const $anotherElement = $('#another').dxWidget({ focusStateEnabled: true }); const anotherInstance = $anotherElement.dxWidget('instance'); - assert.ok($.isFunction(instance.focus), 'focus method exist'); + assert.ok(isFunction(instance.focus), 'focus method exist'); anotherInstance.focus(); assert.ok($anotherElement.hasClass(FOCUSED_STATE_CLASS), '\'focus\' method focus the widget'); @@ -1043,7 +1044,7 @@ QUnit.module('templates support', {}, () => { let disposed = false; Template.prototype.dispose = function() { - if($.trim(this.render({ model: {}, container: $('
') }).text()) === text) { + if(this.render({ model: {}, container: $('
') }).text().trim() === text) { disposed = true; } }; @@ -1072,7 +1073,7 @@ QUnit.module('templates support', {}, () => { const $container = $('#container'); Template.prototype.dispose = () => { - if($.trim(this.render({ model: {}, container: $('
') }).text()) === text) { + if(this.render({ model: {}, container: $('
') }).text().trim() === text) { disposed = true; } }; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js index 53a73ac4c48d..9bb848c33668 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js @@ -1,5 +1,6 @@ const $ = require('jquery'); const noop = require('core/utils/common').noop; +const typeUtils = require('core/utils/type'); const vizMocks = require('../../helpers/vizMocks.js'); const commons = require('./chartParts/commons.js'); const DataSource = require('data/data_source/data_source').DataSource; @@ -21,8 +22,8 @@ QUnit.module('dxChart', commons.environment); QUnit.test('dxChart creation', function(assert) { const chart = this.createChart({}); - assert.ok($.isFunction(chart.showLoadingIndicator)); - assert.ok($.isFunction(chart.hideLoadingIndicator)); + assert.ok(typeUtils.isFunction(chart.showLoadingIndicator)); + assert.ok(typeUtils.isFunction(chart.hideLoadingIndicator)); assert.strictEqual(rendererModule.Renderer.firstCall.args[0]['cssClass'], 'dxc dxc-chart', 'root class'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part3.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part3.tests.js index 7cd68867ec11..40d77ef58eff 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part3.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part3.tests.js @@ -1,4 +1,5 @@ const $ = require('jquery'); +const typeUtils = require('core/utils/type'); const commons = require('./chartParts/commons.js'); const rendererModule = require('viz/core/renderers/renderer'); const legendModule = require('viz/components/legend'); @@ -1078,7 +1079,7 @@ QUnit.test('Create Horizontal Legend with single named series, position = outsid assert.strictEqual(legendCtorArgs.backgroundClass, 'dxc-border', 'background class'); assert.strictEqual(legendCtorArgs.itemGroupClass, 'dxc-item', 'item group class'); assert.strictEqual(legendCtorArgs.textField, 'seriesName', 'text field'); - assert.ok($.isFunction(legendCtorArgs.getFormatObject), 'getFormatObject is function'); + assert.ok(typeUtils.isFunction(legendCtorArgs.getFormatObject), 'getFormatObject is function'); assert.deepEqual(legendCtorArgs.getFormatObject({ id: 'id', text: 'text', diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js index a070e3347a7d..fc4e19562046 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import { noop } from 'core/utils/common'; +import { isFunction } from 'core/utils/type'; import vizMocks from '../../helpers/vizMocks.js'; import executeAsyncMock from '../../helpers/executeAsyncMock.js'; import commons from './chartParts/commons.js'; @@ -1503,7 +1504,7 @@ const overlappingEnvironment = $.extend({}, environment, { }); // assert - assert.ok($.isFunction(this.stubSeries.legendCallback), 'legend callback passed'); + assert.ok(isFunction(this.stubSeries.legendCallback), 'legend callback passed'); }); QUnit.test('Legend callback', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/translator2D.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/translator2D.tests.js index 1b60882b87e1..0734886978fd 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/translator2D.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/translator2D.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import translator2DModule from 'viz/translators/translator2d'; import { adjust } from 'core/utils/math'; +import { isFunction } from '../../../js/core/utils/type'; function prepareScaleBreaks(array, breakSize) { const breaks = []; @@ -110,9 +111,9 @@ QUnit.test('Create vertical translator', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 0, minVisible: 10, max: 100, maxVisible: 90, interval: 20, axisType: 'continuous', dataType: 'numeric', invert: true }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.equal(translator._canvasOptions.rangeMin, 0); assert.equal(translator._canvasOptions.rangeMax, 100); @@ -149,9 +150,9 @@ QUnit.test('Create horizontal translator', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 0, minVisible: 10, max: 100, maxVisible: 90, interval: 20, axisType: 'continuous', dataType: 'numeric', invert: true }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.equal(translator._canvasOptions.rangeMin, 0); assert.equal(translator._canvasOptions.rangeMax, 100); @@ -188,9 +189,9 @@ QUnit.test('Create numeric translator', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 0, minVisible: 0, max: 100, maxVisible: 100, interval: 20, axisType: 'continuous', dataType: 'numeric' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); }); QUnit.test('Create numeric translator when business range delta = 0, Min = max = minVisible = maxVisible != 0', function(assert) { @@ -326,9 +327,9 @@ QUnit.test('Create datetime translator', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: new Date(2012, 9, 1), max: new Date(2012, 9, 2), minVisible: new Date(2012, 9, 1), maxVisible: new Date(2012, 9, 2), interval: new Date(2012, 9, 2) - new Date(2012, 9, 1), axisType: 'continuous', dataType: 'datetime' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); }); QUnit.test('Create datetime translator when business range delta = 0. min = minVisible = maxVisible = max', function(assert) { @@ -420,9 +421,9 @@ QUnit.test('Create discrete translator (Stick = false, invert = false)', functio assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { categories: ['First', 'Second', 'Third', 'Fourth'], axisType: 'discrete', dataType: 'string' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.deepEqual(translator._categories, ['First', 'Second', 'Third', 'Fourth']); assert.equal(translator._canvasOptions.interval, 127.5); @@ -470,9 +471,9 @@ QUnit.test('Create logarithmic translator', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 10, minVisible: 100, max: 10000, maxVisible: 1000, interval: 1, base: 10, axisType: 'logarithmic', dataType: 'numeric' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.roughEqual(translator._canvasOptions.rangeMaxVisible, 3, 0.00001); assert.roughEqual(translator._canvasOptions.rangeMinVisible, 2, 0.00001); @@ -493,9 +494,9 @@ QUnit.test('Create logarithmic translator. Min = max = minVisible = maxVisible = assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 10, minVisible: 10, max: 10, maxVisible: 10, interval: 1, base: 10, axisType: 'logarithmic', dataType: 'numeric' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.equal(translator._canvasOptions.rangeMaxVisible, 1); assert.equal(translator._canvasOptions.rangeMinVisible, 1); @@ -516,9 +517,9 @@ QUnit.test('Create logarithmic translator. Base = 2', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: 2, minVisible: 4, max: 32, maxVisible: 16, interval: 1, base: 2, axisType: 'logarithmic', dataType: 'numeric' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.roughEqual(translator._canvasOptions.rangeMaxVisible, 4, 0.00001); assert.roughEqual(translator._canvasOptions.rangeMinVisible, 2, 0.00001); @@ -564,9 +565,9 @@ QUnit.test('Update business range', function(assert) { assert.deepEqual(translator._canvas, { width: 610, height: 400, left: 70, top: 10, right: 30, bottom: 60 }); assert.deepEqual(getObjectData(translator._businessRange), { min: -1000, minVisible: -600, maxVisible: -90, max: -10, invert: false, axisType: 'continuous', dataType: 'numeric' }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.equal(translator._canvasOptions.rangeMin, -1000); assert.equal(translator._canvasOptions.rangeMax, -10); @@ -592,9 +593,9 @@ QUnit.test('Update canvas', function(assert) { assert.deepEqual(translator._canvas, { width: 333, height: 444, left: 13, top: 15, right: 14, bottom: 16 }); - assert.ok($.isFunction(translator.translate)); - assert.ok($.isFunction(translator.from)); - assert.ok($.isFunction(translator.getInterval)); + assert.ok(isFunction(translator.translate)); + assert.ok(isFunction(translator.from)); + assert.ok(isFunction(translator.getInterval)); assert.equal(translator._canvasOptions.rangeMin, 0); assert.equal(translator._canvasOptions.rangeMax, 100); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js index 45ccd3a191d7..f3f4cd71da2e 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js @@ -1,4 +1,5 @@ import { setHeight, getHeight } from 'core/utils/size'; +import { isNumeric } from 'core/utils/type'; import $ from 'jquery'; import { DEBUG_stub_createIncidentOccurred, DEBUG_restore_createIncidentOccurred } from 'viz/core/base_widget.utils'; import commons from './rangeSelectorParts/commons.js'; @@ -98,8 +99,8 @@ QUnit.test('check default value valueType when start value is numeric', function }); const options = this.axis.updateOptions.lastCall.args[0]; - assert.ok($.isNumeric(options.startValue)); - assert.ok($.isNumeric(options.endValue)); + assert.ok(isNumeric(options.startValue)); + assert.ok(isNumeric(options.endValue)); assert.strictEqual(options.valueType, 'numeric'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js index 1313bbbbde8e..509b6d83a279 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js @@ -833,11 +833,11 @@ QUnit.module('SvgAnimationStep', { QUnit.test('animateSvgStep object', function(assert) { const step = this.animationStep; assert.ok(step); - assert.ok($.isFunction(step.segments), 'can animate segments'); - assert.ok($.isFunction(step.transform), 'can animate transform'); - assert.ok($.isFunction(step.complete), 'complete action for all animate'); - assert.ok($.isFunction(step.base), 'can translate same attribute'); - assert.ok($.isFunction(step._), 'no action step'); + assert.ok(typeUtils.isFunction(step.segments), 'can animate segments'); + assert.ok(typeUtils.isFunction(step.transform), 'can animate transform'); + assert.ok(typeUtils.isFunction(step.complete), 'complete action for all animate'); + assert.ok(typeUtils.isFunction(step.base), 'can translate same attribute'); + assert.ok(typeUtils.isFunction(step._), 'no action step'); }); QUnit.test('Base step', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js index 691cd7511c7e..a0040f05fcea 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js @@ -1,6 +1,7 @@ /* global currentTest, createTestContainer */ const $ = require('jquery'); +const typeUtils = require('core/utils/type'); const vizMocks = require('../../helpers/vizMocks.js'); const tooltipModule = require('viz/core/tooltip'); const BaseWidget = require('__internal/viz/core/m_base_widget').default; @@ -2076,7 +2077,7 @@ QUnit.begin(function() { QUnit.test('sparkline contains export methods', function(assert) { const sparkline = this.createSparkline({}); - assert.ok($.isFunction(sparkline.exportTo)); + assert.ok(typeUtils.isFunction(sparkline.exportTo)); }); QUnit.module('drawn', { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0da8a8d558b..4658b6bf81b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -292,8 +292,8 @@ importers: specifier: 7.4.11 version: 7.4.11 jquery: - specifier: 3.6.3 - version: 3.6.3 + specifier: 4.0.0-beta.2 + version: 4.0.0-beta.2 jspdf: specifier: 2.5.1 version: 2.5.1 @@ -701,8 +701,8 @@ importers: specifier: 1.7.0 version: 1.7.0 jquery: - specifier: 3.7.1 - version: 3.7.1 + specifier: 4.0.0-beta.2 + version: 4.0.0-beta.2 minimist: specifier: 1.2.8 version: 1.2.8 @@ -731,14 +731,14 @@ importers: specifier: 11.2.14 version: 11.2.14(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1) '@types/jquery': - specifier: 3.5.29 - version: 3.5.29 + specifier: 3.5.31 + version: 3.5.31 devextreme: specifier: workspace:* version: link:../../packages/devextreme/artifacts/npm/devextreme jquery: - specifier: 3.7.1 - version: 3.7.1 + specifier: 4.0.0-beta.2 + version: 4.0.0-beta.2 typescript: specifier: 4.9.5 version: 4.9.5 @@ -752,8 +752,8 @@ importers: specifier: 3.5.0 version: 3.5.0(axe-core@4.10.0)(testcafe@2.5.0(encoding@0.1.13)) '@types/jquery': - specifier: 3.5.29 - version: 3.5.29 + specifier: 3.5.31 + version: 3.5.31 axe-core: specifier: 4.10.0 version: 4.10.0 @@ -855,8 +855,8 @@ importers: specifier: 3.10.18 version: 3.10.18 '@types/jquery': - specifier: 3.5.29 - version: 3.5.29 + specifier: 3.5.31 + version: 3.5.31 '@types/react': specifier: 16.14.34 version: 16.14.34 @@ -1098,8 +1098,8 @@ importers: specifier: 26.6.2 version: 26.6.2 jquery: - specifier: 3.7.1 - version: 3.7.1 + specifier: 4.0.0-beta.2 + version: 4.0.0-beta.2 jquery.tmpl: specifier: 0.0.2 version: 0.0.2 @@ -3834,28 +3834,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@nx/nx-linux-arm64-musl@19.4.2': resolution: {integrity: sha512-JKc3Bw84jWbOhlqXGBIH9/qz3kzTwpKfsIqtar8K8Gd5/UFJS8GLEdy0mXsnoeFrA1DuYJJ0PWxoHkAa1MYLxg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@nx/nx-linux-x64-gnu@19.4.2': resolution: {integrity: sha512-hyf0cDZ3rAM8WERZ/M82v1rnf6oO1X+xwYq363Qx04SufU+Knto7xHGndLNkx2i18+UtCoEr4ZhDYrIb8ZWHww==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@nx/nx-linux-x64-musl@19.4.2': resolution: {integrity: sha512-XbKut3RTb04FNA0diDhO/OM8DgqaWaaXhyybRocfhITxH+mPQBZPUs/NM3xeQCrzlGjwrBYxt+Y9Ep8Ftgd/MA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@nx/nx-win32-arm64-msvc@19.4.2': resolution: {integrity: sha512-VMOQ44KlndtAKE6JaXSQqrAdHBEqbJSJP4EKrBREn8HyVyr6LAfAG3Pj93ZPMvQC47uheisBcDwitxEY/Mhs1Q==} @@ -4120,35 +4116,30 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm64-glibc@2.4.1': resolution: {integrity: sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.4.1': resolution: {integrity: sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] - libc: [musl] '@parcel/watcher-linux-x64-glibc@2.4.1': resolution: {integrity: sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [glibc] '@parcel/watcher-linux-x64-musl@2.4.1': resolution: {integrity: sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] - libc: [musl] '@parcel/watcher-win32-arm64@2.4.1': resolution: {integrity: sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==} @@ -4626,55 +4617,46 @@ packages: resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.22.4': resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.22.4': resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.22.4': resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.22.4': resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.22.4': resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.22.4': resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.22.4': resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.22.4': resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} @@ -4990,28 +4972,24 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [glibc] '@swc/core-linux-arm64-musl@1.4.17': resolution: {integrity: sha512-qhH4gr9gAlVk8MBtzXbzTP3BJyqbAfUOATGkyUtohh85fPXQYuzVlbExix3FZXTwFHNidGHY8C+ocscI7uDaYw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [musl] '@swc/core-linux-x64-gnu@1.4.17': resolution: {integrity: sha512-vRDFATL1oN5oZMImkwbgSHEkp8xG1ofEASBypze01W1Tqto8t+yo6gsp69wzCZBlxldsvPpvFZW55Jq0Rn+UnA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [glibc] '@swc/core-linux-x64-musl@1.4.17': resolution: {integrity: sha512-zQNPXAXn3nmPqv54JVEN8k2JMEcMTQ6veVuU0p5O+A7KscJq+AGle/7ZQXzpXSfUCXlLMX4wvd+rwfGhh3J4cw==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@swc/core-win32-arm64-msvc@1.4.17': resolution: {integrity: sha512-z86n7EhOwyzxwm+DLE5NoLkxCTme2lq7QZlDjbQyfCxOt6isWz8rkW5QowTX8w9Rdmk34ncrjSLvnHOeLY17+w==} @@ -5282,8 +5260,8 @@ packages: '@types/jest@29.5.12': resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} - '@types/jquery@3.5.29': - resolution: {integrity: sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==} + '@types/jquery@3.5.31': + resolution: {integrity: sha512-rf/iB+cPJ/YZfMwr+FVuQbm7IaWC4y3FVYfVDxRGqmUCFjjPII0HWaP0vTPJGp6m4o13AXySCcMbWfrWtBFAKw==} '@types/jsdom@20.0.1': resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -10999,12 +10977,12 @@ packages: jquery.tmpl@0.0.2: resolution: {integrity: sha512-ONpdW9JcxJxi5Eu9s640SdN0y/nSjnXAP24s3X/LeWlG4xA+hyuIcxEdTWZPy9scWC7owkEeSU6ReQvpbWhs7A==} - jquery@3.6.3: - resolution: {integrity: sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==} - jquery@3.7.1: resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==} + jquery@4.0.0-beta.2: + resolution: {integrity: sha512-2/cB7q2vtwltOGph8cNaNBRfVRdewrgdmYipXJ9ZYLQOPYjBKHH8+l5ZLVTFV7emKVIPXwDP3excXS0zUcx9kw==} + jqueryify@0.0.3: resolution: {integrity: sha512-9WKxzVa00eYc3RWHV4qlmts71OjdPbGOBoeLepfQSFbs6/NBwY4HDEG02EP2X2aH1MSmtG1tRcXx7VQzoz9Azg==} @@ -11361,28 +11339,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.25.1: resolution: {integrity: sha512-IhxVFJoTW8wq6yLvxdPvyHv4NjzcpN1B7gjxrY3uaykQNXPHNIpChLB52+wfH+yS58zm1PL4LemUp8u9Cfp6Bw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.25.1: resolution: {integrity: sha512-RXIaru79KrREPEd6WLXfKfIp4QzoppZvD3x7vuTKkDA64PwTzKJ2jaC43RZHRt8BmyIkRRlmywNhTRMbmkPYpA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.25.1: resolution: {integrity: sha512-TdcNqFsAENEEFr8fJWg0Y4fZ/nwuqTRsIr7W7t2wmDUlA8eSXVepeeONYcb+gtTj1RaXn/WgNLB45SFkz+XBZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-x64-msvc@1.25.1: resolution: {integrity: sha512-9KZZkmmy9oGDSrnyHuxP6iMhbsgChUiu/NSgOx+U1I/wTngBStDf2i2aGRCHvFqj19HqqBEI4WuGVQBa2V6e0A==} @@ -20383,15 +20357,13 @@ snapshots: transitivePeerDependencies: - '@parcel/core' - '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': + '@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/logger': 2.12.0 '@parcel/utils': 2.12.0 lmdb: 2.8.5 - transitivePeerDependencies: - - '@swc/helpers' '@parcel/codeframe@2.12.0': dependencies: @@ -20451,7 +20423,7 @@ snapshots: '@parcel/core@2.12.0(@swc/helpers@0.5.11)': dependencies: '@mischnic/json-sourcemap': 0.1.1 - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/diagnostic': 2.12.0 '@parcel/events': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) @@ -20464,7 +20436,7 @@ snapshots: '@parcel/source-map': 2.1.1 '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) abortcontroller-polyfill: 1.7.5 base-x: 3.0.9 browserslist: 4.23.0 @@ -20492,7 +20464,7 @@ snapshots: '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 '@parcel/watcher': 2.4.1 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) transitivePeerDependencies: - '@swc/helpers' @@ -20566,7 +20538,7 @@ snapshots: '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/rust': 2.12.0 '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/optimizer-svgo@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: @@ -20598,7 +20570,7 @@ snapshots: '@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@swc/core': 1.4.17(@swc/helpers@0.5.11) semver: 7.6.2 transitivePeerDependencies: @@ -20787,7 +20759,7 @@ snapshots: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) nullthrows: 1.1.1 '@parcel/transformer-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': @@ -20798,7 +20770,7 @@ snapshots: '@parcel/rust': 2.12.0 '@parcel/source-map': 2.1.1 '@parcel/utils': 2.12.0 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@swc/helpers': 0.5.11 browserslist: 4.23.0 nullthrows: 1.1.1 @@ -20866,12 +20838,12 @@ snapshots: '@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': dependencies: - '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/cache': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) '@parcel/diagnostic': 2.12.0 '@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/source-map': 2.1.1 - '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) + '@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11)) utility-types: 3.11.0 transitivePeerDependencies: - '@parcel/core' @@ -20944,7 +20916,7 @@ snapshots: '@parcel/watcher-win32-ia32': 2.4.1 '@parcel/watcher-win32-x64': 2.4.1 - '@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)': + '@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))': dependencies: '@parcel/core': 2.12.0(@swc/helpers@0.5.11) '@parcel/diagnostic': 2.12.0 @@ -20953,8 +20925,6 @@ snapshots: '@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.11))(@swc/helpers@0.5.11) '@parcel/utils': 2.12.0 nullthrows: 1.1.1 - transitivePeerDependencies: - - '@swc/helpers' '@phenomnomnominal/tsquery@5.0.1(typescript@5.4.5)': dependencies: @@ -22513,7 +22483,7 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 - '@types/jquery@3.5.29': + '@types/jquery@3.5.31': dependencies: '@types/sizzle': 2.3.8 @@ -30524,10 +30494,10 @@ snapshots: dependencies: jqueryify: 0.0.3 - jquery@3.6.3: {} - jquery@3.7.1: {} + jquery@4.0.0-beta.2: {} + jqueryify@0.0.3: {} js-beautify@1.15.1: