From 3570cc5a2b2ec59fa1ccb4c78a58f526ca69918e Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Sat, 17 Oct 2015 15:31:02 -0400 Subject: Tests: Fix button space assertions on IE8 IE8 still doesn't keep the space in the text (or HTML) representation. We don't really care, so adding more trims in these tests as well. --- tests/unit/dialog/options.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/unit/dialog/options.js') diff --git a/tests/unit/dialog/options.js b/tests/unit/dialog/options.js index b12db5d33..6d3a619bd 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().trim(), "a button", "correct label" ); + equal( $.trim( buttons.text() ), "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 = $( "
" ).dialog(); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "Close", + equal( $.trim( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text() ), "Close", "default close text" ); element.remove(); element = $( "
" ).dialog( { closeText: "foo" } ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "foo", + equal( $.trim( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text() ), "foo", "closeText on init" ); element.remove(); element = $( "
" ).dialog().dialog( "option", "closeText", "bar" ); - equal( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text().trim(), "bar", + equal( $.trim( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text() ), "bar", "closeText via option method" ); element.remove(); } ); -- cgit v1.2.3