diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2014-03-28 10:48:18 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-10-07 10:57:59 -0400 |
commit | 897ec38e6327393e8bac197a66e5c54bf883600f (patch) | |
tree | 574d575016ba2cc78d9226e4f4d8fbf5dc9e0058 /tests/unit/dialog | |
parent | 40a9d1dfdb6a341904ae7bcd4600b0ef201d14df (diff) | |
download | jquery-ui-897ec38e6327393e8bac197a66e5c54bf883600f.tar.gz jquery-ui-897ec38e6327393e8bac197a66e5c54bf883600f.zip |
Dialog: Updating dialog and tests for new button API
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/options.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/unit/dialog/options.js b/tests/unit/dialog/options.js index 7565799c4..5aa958756 100644 --- a/tests/unit/dialog/options.js +++ b/tests/unit/dialog/options.js @@ -156,10 +156,8 @@ test( "buttons - advanced", function( assert ) { click: function() { equal( this, element[ 0 ], "correct context" ); }, - icons: { - primary: "ui-icon-cancel" - }, - showText: false + icon: "ui-icon-cancel", + showLabel: false } ] } ); @@ -167,10 +165,10 @@ test( "buttons - advanced", function( assert ) { buttons = element.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" ); + equal( buttons.text(), " a button", "correct label" ); assert.hasClasses( buttons, "additional-class" ); - deepEqual( buttons.button( "option", "icons" ), { primary: "ui-icon-cancel", secondary: null } ); - equal( buttons.button( "option", "text" ), false ); + deepEqual( buttons.button( "option", "icon" ), "ui-icon-cancel" ); + equal( buttons.button( "option", "showLabel" ), false ); buttons.trigger( "click" ); element.remove(); @@ -211,17 +209,17 @@ test( "closeText", function() { expect( 3 ); var element = $( "<div></div>" ).dialog(); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close span" ).text(), "Close", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " Close", "default close text" ); element.remove(); element = $( "<div></div>" ).dialog( { closeText: "foo" } ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close span" ).text(), "foo", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " foo", "closeText on init" ); element.remove(); element = $( "<div></div>" ).dialog().dialog( "option", "closeText", "bar" ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close span" ).text(), "bar", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " bar", "closeText via option method" ); element.remove(); } ); |