aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2021-04-09 23:36:00 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2024-05-15 00:38:30 +0200
commitdaa6fb55b35065c49c0ffc879c94627bbf85404c (patch)
treec1c90efc224aa82614758262b4e308cc8354ac65 /tests/unit/draggable
parentac8b1e4eee8682e6825730c4823036a90031edad (diff)
downloadjquery-ui-daa6fb55b35065c49c0ffc879c94627bbf85404c.tar.gz
jquery-ui-daa6fb55b35065c49c0ffc879c94627bbf85404c.zip
All: Drop support for jQueries different than the latest for each major
Also, remove the ability to run the test suite in jQuery <1.12.4 & <2.2.4. Closes gh-2249
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r--tests/unit/draggable/core.js16
-rw-r--r--tests/unit/draggable/helper.js7
-rw-r--r--tests/unit/draggable/options.js25
3 files changed, 11 insertions, 37 deletions
diff --git a/tests/unit/draggable/core.js b/tests/unit/draggable/core.js
index debbcfba7..46c856d4e 100644
--- a/tests/unit/draggable/core.js
+++ b/tests/unit/draggable/core.js
@@ -96,17 +96,11 @@ QUnit.test( "#8269: Removing draggable element on drop", function( assert ) {
}
} );
- // Support: Opera 12.10, Safari 5.1, jQuery <1.8
- if ( testHelper.unreliableContains ) {
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- } else {
- element.simulate( "drag", {
- handle: "corner",
- x: dropOffset.left,
- y: dropOffset.top
- } );
- }
+ element.simulate( "drag", {
+ handle: "corner",
+ x: dropOffset.left,
+ y: dropOffset.top
+ } );
} );
// https://bugs.jqueryui.com/ticket/7778
diff --git a/tests/unit/draggable/helper.js b/tests/unit/draggable/helper.js
index c1920f23b..292b75bf0 100644
--- a/tests/unit/draggable/helper.js
+++ b/tests/unit/draggable/helper.js
@@ -11,13 +11,6 @@ return $.extend( helper, {
// TODO: remove the unreliable offset hacks
unreliableOffset: $.ui.ie && ( !document.documentMode || document.documentMode < 8 ) ? 2 : 0,
- // Support: Opera 12.10, Safari 5.1, jQuery <1.8
-
- unreliableContains: ( function() {
- var element = $( "<div>" );
- return $.contains( element[ 0 ].ownerDocument, element[ 0 ] );
- } )(),
-
testDragPosition: function( assert, el, dx, dy, expectedDX, expectedDY, msg ) {
msg = msg ? msg + "." : "";
diff --git a/tests/unit/draggable/options.js b/tests/unit/draggable/options.js
index c98c9f9d8..79aac27c2 100644
--- a/tests/unit/draggable/options.js
+++ b/tests/unit/draggable/options.js
@@ -695,15 +695,10 @@ QUnit.test( "#6889: Cursor doesn't revert to pre-dragging state after revert act
} ),
expected = getCursor();
- if ( testHelper.unreliableContains ) {
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- } else {
- element.simulate( "drag", {
- dx: -1,
- dy: -1
- } );
- }
+ element.simulate( "drag", {
+ dx: -1,
+ dy: -1
+ } );
} );
QUnit.test( "cursor, default, switching after initialization", function( assert ) {
@@ -1357,16 +1352,8 @@ QUnit.test( "#8459: element can snap to an element that was removed during drag"
moves: 1
} );
- // Support: Opera 12.10, Safari 5.1, jQuery <1.8
- if ( testHelper.unreliableContains ) {
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- assert.ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
- } else {
-
- // TODO: fix IE8 testswarm IFRAME positioning bug so assert.close can be turned back to equal
- assert.close( element.offset().left, newX, 1, "doesn't snap to a removed element" );
- assert.close( element.offset().top, newY, 1, "doesn't snap to a removed element" );
- }
+ assert.strictEqual( element.offset().left, newX, "doesn't snap to a removed element" );
+ assert.strictEqual( element.offset().top, newY, "doesn't snap to a removed element" );
} );
QUnit.test( "#8165: Snapping large rectangles to small rectangles doesn't snap properly", function( assert ) {