From e63835cb5cab55f745b6662d05805a7d41fcdac9 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Wed, 2 Dec 2015 18:46:34 +0100 Subject: [PATCH] Calendar tests: Fix and update button advances unit tests Related to 3570cc5a2b2ec59fa1ccb4c78a58f526ca69918e --- tests/unit/calendar/options.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/unit/calendar/options.js b/tests/unit/calendar/options.js index 4c9c1f15d..c407f096a 100644 --- a/tests/unit/calendar/options.js +++ b/tests/unit/calendar/options.js @@ -92,20 +92,18 @@ test( "buttons - advanced", function() { click: function() { equal( this, element[ 0 ], "correct context" ); }, - icons: { - primary: "ui-icon-cancel" - }, - showText: false + icon: "ui-icon-cancel", + showLabel: false } ] } ); buttons = element.calendar( "widget" ).find( ".ui-calendar-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 ( $.trim( buttons.text() ), "a button", "correct label" ); ok( buttons.hasClass( "additional-class" ), "additional classes added" ); - deepEqual( buttons.button( "option", "icons" ), { primary: "ui-icon-cancel", secondary: null } ); - equal( buttons.button( "option", "text" ), false ); + equal( buttons.button( "option", "icon" ), "ui-icon-cancel" ); + equal( buttons.button( "option", "showLabel" ), false ); buttons.click(); element.remove(); -- 2.39.5