diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-09-16 01:50:53 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-10-08 14:02:57 -0400 |
commit | 1beeb941964ac135c1f1889f8d64ab1d50e1e950 (patch) | |
tree | 16e06e271eff313939597ac4bb72e3ba490f50a7 /tests/unit/dialog | |
parent | 6b050342835bd8cee6433d7b947f47d2dc4577f9 (diff) | |
download | jquery-ui-1beeb941964ac135c1f1889f8d64ab1d50e1e950.tar.gz jquery-ui-1beeb941964ac135c1f1889f8d64ab1d50e1e950.zip |
Dialog: address review comments
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/options.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/dialog/options.js b/tests/unit/dialog/options.js index 5aa958756..b12db5d33 100644 --- a/tests/unit/dialog/options.js +++ b/tests/unit/dialog/options.js @@ -165,7 +165,7 @@ 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().trim(), "a button", "correct label" ); assert.hasClasses( buttons, "additional-class" ); deepEqual( buttons.button( "option", "icon" ), "ui-icon-cancel" ); equal( buttons.button( "option", "showLabel" ), false ); @@ -209,17 +209,17 @@ test( "closeText", function() { expect( 3 ); var element = $( "<div></div>" ).dialog(); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " Close", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "Close", "default close text" ); element.remove(); element = $( "<div></div>" ).dialog( { closeText: "foo" } ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " foo", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "foo", "closeText on init" ); element.remove(); element = $( "<div></div>" ).dialog().dialog( "option", "closeText", "bar" ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text(), " bar", + equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "bar", "closeText via option method" ); element.remove(); } ); |