aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-16 19:26:22 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-26 10:28:23 +0100
commit999617343f7b813dc1c8d9c9048489e4d99d0470 (patch)
tree94df0cfa0fc51c411d259b71c10b06bcf6b00fb8 /tests/unit/dialog
parentd8b98ec3bb077224aff381101e6d845ea6ffe7a3 (diff)
downloadjquery-ui-999617343f7b813dc1c8d9c9048489e4d99d0470.tar.gz
jquery-ui-999617343f7b813dc1c8d9c9048489e4d99d0470.zip
Dialog: Pass through icons and showText (as 'text') options to button. Fixes #6830 - Allow Icons to be specified for Dialog buttons.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r--tests/unit/dialog/dialog_options.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index 0be8c2b7f..beb60a642 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -81,7 +81,7 @@ test("buttons", function() {
});
test("buttons - advanced", function() {
- expect(5);
+ expect( 7 );
var buttons,
el = $("<div></div>").dialog({
@@ -92,7 +92,11 @@ test("buttons - advanced", function() {
id: "my-button-id",
click: function() {
equal(this, el[0], "correct context");
- }
+ },
+ icons: {
+ primary: "ui-icon-cancel"
+ },
+ showText: false
}
]
});
@@ -102,6 +106,8 @@ test("buttons - advanced", function() {
equal(buttons.attr("id"), "my-button-id", "correct id");
equal(buttons.text(), "a button", "correct label");
ok(buttons.hasClass("additional-class"), "additional classes added");
+ deepEqual( buttons.button("option", "icons"), { primary: "ui-icon-cancel", secondary: null } );
+ equal( buttons.button( "option", "text" ), false );
buttons.click();
el.remove();