aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-05-10 13:47:20 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-05-10 17:34:14 +0200
commit613b522e9a39e952823f205d347993b8fc8b350a (patch)
tree51f01b7c47c27d1c4fa0ee3df1c4361a97ad84e0 /tests/unit/resizable
parentb715135d11706443df27c4a18f3f9a5dd190c236 (diff)
downloadjquery-ui-613b522e9a39e952823f205d347993b8fc8b350a.tar.gz
jquery-ui-613b522e9a39e952823f205d347993b8fc8b350a.zip
Tests: Make resizable tests a bit more forgiving
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r--tests/unit/resizable/options.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/unit/resizable/options.js b/tests/unit/resizable/options.js
index 6149fbfef..3adef0da5 100644
--- a/tests/unit/resizable/options.js
+++ b/tests/unit/resizable/options.js
@@ -524,12 +524,22 @@ QUnit.test( "alsoResize + multiple selection", function( assert ) {
} );
testHelper.drag( ".ui-resizable-se", 400, 400 );
- assert.equal( element.width(), 300, "resizable constrained width at containment edge" );
- assert.equal( element.height(), 200, "resizable constrained height at containment edge" );
- assert.equal( other1.width(), 250, "alsoResize o1 constrained width at containment edge" );
- assert.equal( other1.height(), 150, "alsoResize o1 constrained height at containment edge" );
- assert.equal( other2.width(), 250, "alsoResize o2 constrained width at containment edge" );
- assert.equal( other2.height(), 150, "alsoResize o2 constrained height at containment edge" );
+
+ // Support: IE <=11+, jQuery 3.0 - 3.1 only
+ // IE sizing under jQuery 3.0 & 3.1 has a small delta compared to expected values.
+ // This delta is small so accept it.
+ assert.close( element.width(), 300, 0.01,
+ "resizable constrained width at containment edge" );
+ assert.close( element.height(), 200, 0.01,
+ "resizable constrained height at containment edge" );
+ assert.close( other1.width(), 250, 0.01,
+ "alsoResize o1 constrained width at containment edge" );
+ assert.close( other1.height(), 150, 0.01,
+ "alsoResize o1 constrained height at containment edge" );
+ assert.close( other2.width(), 250, 0.01,
+ "alsoResize o2 constrained width at containment edge" );
+ assert.close( other2.height(), 150, 0.01,
+ "alsoResize o2 constrained height at containment edge" );
} );
QUnit.test( "alsoResize with box-sizing: border-box", function( assert ) {