diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-15 22:29:24 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-26 10:28:21 +0100 |
commit | 83a9f219bf40ff834d660020bbfa7de550e48a0c (patch) | |
tree | a89cfc16f3fbe82f82b429acb71cb4edf85706d8 /tests/unit/dialog | |
parent | 0848040d3ee041e443e2492c18a5a69c78ab9c12 (diff) | |
download | jquery-ui-83a9f219bf40ff834d660020bbfa7de550e48a0c.tar.gz jquery-ui-83a9f219bf40ff834d660020bbfa7de550e48a0c.zip |
Dialog: Use button widget for close button (was already listed as dependency)
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/dialog.html | 1 | ||||
-rw-r--r-- | tests/unit/dialog/dialog_options.js | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/dialog/dialog.html b/tests/unit/dialog/dialog.html index cb74bb654..0022b42cf 100644 --- a/tests/unit/dialog/dialog.html +++ b/tests/unit/dialog/dialog.html @@ -19,6 +19,7 @@ "ui/jquery.ui.mouse.js", "ui/jquery.ui.draggable.js", "ui/jquery.ui.resizable.js", + "ui/jquery.ui.button.js", "ui/jquery.ui.dialog.js" ] }); diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 899dc1df6..2df7196dc 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -35,7 +35,7 @@ test("buttons", function() { }, el = $('<div></div>').dialog({ buttons: buttons }); - btn = $("button", el.dialog('widget')); + btn = el.dialog( "widget" ).find( ".ui-dialog-buttonpane button" ); equal(btn.length, 2, "number of buttons"); i = 0; @@ -61,7 +61,7 @@ test("buttons", function() { el.dialog("option", "buttons", newButtons); deepEqual(el.dialog("option", "buttons"), newButtons, '.dialog("option", "buttons", ...) setter'); - btn = $("button", el.dialog('widget')); + btn = el.dialog( "widget" ).find( ".ui-dialog-buttonpane button" ); equal(btn.length, 1, "number of buttons after setter"); btn.trigger('click'); @@ -72,7 +72,7 @@ test("buttons", function() { }); el.dialog("option", "buttons", null); - btn = $("button", el.dialog('widget')); + btn = el.dialog( "widget" ).find( ".ui-dialog-buttonpane button" ); equal(btn.length, 0, "all buttons have been removed"); equal(el.find(".ui-dialog-buttonset").length, 0, "buttonset has been removed"); equal(el.parent().hasClass('ui-dialog-buttons'), false, "dialog wrapper removes class about having buttons"); @@ -97,7 +97,7 @@ test("buttons - advanced", function() { ] }); - buttons = el.dialog('widget').find("button"); + buttons = el.dialog( "widget" ).find( ".ui-dialog-buttonpane button" ); equal(buttons.length, 1, "correct number of buttons"); equal(buttons.attr("id"), "my-button-id", "correct id"); equal(buttons.text(), "a button", "correct label"); |