aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/button/deprecated.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2017-04-19 11:32:13 -0400
committerScott González <scott.gonzalez@gmail.com>2017-05-02 15:11:24 -0400
commitabc9e7ce2f3b60a18bf1f461c7cbfccb3fa02b53 (patch)
treeca02e5f358c31b742d706724eaa291c52e175c8d /tests/unit/button/deprecated.js
parentc866e455373028a62a0956455a229fef63e91fac (diff)
downloadjquery-ui-abc9e7ce2f3b60a18bf1f461c7cbfccb3fa02b53.tar.gz
jquery-ui-abc9e7ce2f3b60a18bf1f461c7cbfccb3fa02b53.zip
Button: Fix backcompat when called on collection of mixed elements
Fixes #15109 Closes gh-1808
Diffstat (limited to 'tests/unit/button/deprecated.js')
-rw-r--r--tests/unit/button/deprecated.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/button/deprecated.js b/tests/unit/button/deprecated.js
index 81a0281b7..86fca797e 100644
--- a/tests/unit/button/deprecated.js
+++ b/tests/unit/button/deprecated.js
@@ -194,4 +194,22 @@ QUnit.test( "icon / icons options properly proxied", function( assert ) {
"Icons secondary option sets iconPosition option to end on init" );
} );
+QUnit.test( "Calling button on a collection of mixed types works correctly", function( assert ) {
+ assert.expect( 5 );
+
+ var group = $( ".mixed" ).children();
+
+ group.button();
+
+ $.each( {
+ anchor: "button",
+ button: "button",
+ check: "checkboxradio",
+ input: "button",
+ radio: "checkboxradio"
+ }, function( type, widget ) {
+ assert.ok( $( "#mixed-" + type )[ widget ]( "instance" ), type + " is a " + widget );
+ } );
+} );
+
} );