From: Michał Gołębiowski-Owczarek Date: Wed, 10 May 2023 08:56:02 +0000 (+0200) Subject: Tests: Fix selectmenu width tests in Firefox with jQuery 3.0 & 3.1 X-Git-Tag: 1.13.3~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23655f0dbdd0fff8498440ada710a32ad3ffc974;p=jquery-ui.git Tests: Fix selectmenu width tests in Firefox with jQuery 3.0 & 3.1 jQuery 3.0 & 3.1 used `getBoundingClientRect()` in its `width`/`height` calculations and that causes minor differences in fractional width computations. Allow a tiny delta in tests to fix those tests breaking in Firefox. Ref jquery/jquery#3561 Closes gh-2159 --- diff --git a/tests/unit/selectmenu/options.js b/tests/unit/selectmenu/options.js index 4a070f4eb..7e716394c 100644 --- a/tests/unit/selectmenu/options.js +++ b/tests/unit/selectmenu/options.js @@ -101,7 +101,7 @@ QUnit.test( "width", function( assert ) { assert.equal( button[ 0 ].style.width, "", "no inline style" ); element.selectmenu( "option", "width", null ); - assert.equal( button.outerWidth(), element.outerWidth(), "button width auto" ); + assert.close( button.outerWidth(), element.outerWidth(), 0.01, "button width auto" ); element.outerWidth( 100 ); element.selectmenu( "refresh" ); @@ -117,7 +117,8 @@ QUnit.test( "width", function( assert ) { .append( $( "