@@ -165,7 +165,7 @@ test( "buttons - advanced", function( assert ) {
165165 buttons = element . dialog ( "widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
166166 equal ( buttons . length , 1 , "correct number of buttons" ) ;
167167 equal ( buttons . attr ( "id" ) , "my-button-id" , "correct id" ) ;
168- equal ( buttons . text ( ) , " a button" , "correct label" ) ;
168+ equal ( buttons . text ( ) . trim ( ) , "a button" , "correct label" ) ;
169169 assert . hasClasses ( buttons , "additional-class" ) ;
170170 deepEqual ( buttons . button ( "option" , "icon" ) , "ui-icon-cancel" ) ;
171171 equal ( buttons . button ( "option" , "showLabel" ) , false ) ;
@@ -209,17 +209,17 @@ test( "closeText", function() {
209209 expect ( 3 ) ;
210210
211211 var element = $ ( "<div></div>" ) . dialog ( ) ;
212- equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) , " Close" ,
212+ equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) . trim ( ) , "Close" ,
213213 "default close text" ) ;
214214 element . remove ( ) ;
215215
216216 element = $ ( "<div></div>" ) . dialog ( { closeText : "foo" } ) ;
217- equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) , " foo" ,
217+ equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) . trim ( ) , "foo" ,
218218 "closeText on init" ) ;
219219 element . remove ( ) ;
220220
221221 element = $ ( "<div></div>" ) . dialog ( ) . dialog ( "option" , "closeText" , "bar" ) ;
222- equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) , " bar" ,
222+ equal ( element . dialog ( "widget" ) . find ( ".ui-dialog-titlebar-close" ) . text ( ) . trim ( ) , "bar" ,
223223 "closeText via option method" ) ;
224224 element . remove ( ) ;
225225} ) ;
0 commit comments