@@ -165,7 +165,7 @@ test( "buttons - advanced", function( assert ) {
165
165
buttons = element . dialog ( "widget" ) . find ( ".ui-dialog-buttonpane button" ) ;
166
166
equal ( buttons . length , 1 , "correct number of buttons" ) ;
167
167
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" ) ;
169
169
assert . hasClasses ( buttons , "additional-class" ) ;
170
170
deepEqual ( buttons . button ( "option" , "icon" ) , "ui-icon-cancel" ) ;
171
171
equal ( buttons . button ( "option" , "showLabel" ) , false ) ;
@@ -209,17 +209,17 @@ test( "closeText", function() {
209
209
expect ( 3 ) ;
210
210
211
211
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" ,
213
213
"default close text" ) ;
214
214
element . remove ( ) ;
215
215
216
216
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" ,
218
218
"closeText on init" ) ;
219
219
element . remove ( ) ;
220
220
221
221
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" ,
223
223
"closeText via option method" ) ;
224
224
element . remove ( ) ;
225
225
} ) ;
0 commit comments