]> source.dussan.org Git - jquery-ui.git/commitdiff
Tests: Fix tests with the Git Core build
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 26 Mar 2024 15:17:00 +0000 (16:17 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 15:17:00 +0000 (16:17 +0100)
jQuery PR jquery/jquery#5452 removed special handling of boolean attributes.
Thankfully, this only broke a single jQuery UI test.

Closes gh-2220

tests/unit/selectmenu/methods.js

index 31c2a2a2b3545be76ba72aa1e7b5f934d176a6c9..f2506f2d3006a46ef8abaa32e2abafff23198844 100644 (file)
@@ -41,7 +41,8 @@ QUnit.test( "enable / disable", function( assert ) {
 
        element.selectmenu( "disable" );
        assert.ok( element.selectmenu( "option", "disabled" ), "disable: widget option" );
-       assert.equal( element.attr( "disabled" ), "disabled", "disable: native select disabled" );
+       assert.ok( [ "disabled", "" ].indexOf( element.attr( "disabled" ) ) !== -1,
+               "disable: native select disabled" );
        assert.equal( button.attr( "aria-disabled" ), "true", "disable: button ARIA" );
        assert.equal( button.attr( "tabindex" ), -1, "disable: button tabindex" );
        assert.equal( menu.attr( "aria-disabled" ), "true", "disable: menu ARIA" );