mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Calendar tests: Fix and update button advances unit tests
Related to 3570cc5a2b
This commit is contained in:
parent
5d3bdde5f1
commit
e63835cb5c
@ -92,20 +92,18 @@ test( "buttons - advanced", function() {
|
|||||||
click: function() {
|
click: function() {
|
||||||
equal( this, element[ 0 ], "correct context" );
|
equal( this, element[ 0 ], "correct context" );
|
||||||
},
|
},
|
||||||
icons: {
|
icon: "ui-icon-cancel",
|
||||||
primary: "ui-icon-cancel"
|
showLabel: false
|
||||||
},
|
|
||||||
showText: false
|
|
||||||
} ]
|
} ]
|
||||||
} );
|
} );
|
||||||
|
|
||||||
buttons = element.calendar( "widget" ).find( ".ui-calendar-buttonpane button" );
|
buttons = element.calendar( "widget" ).find( ".ui-calendar-buttonpane button" );
|
||||||
equal( buttons.length, 1, "correct number of buttons" );
|
equal( buttons.length, 1, "correct number of buttons" );
|
||||||
equal( buttons.attr( "id" ), "my-button-id", "correct id" );
|
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" );
|
ok( buttons.hasClass( "additional-class" ), "additional classes added" );
|
||||||
deepEqual( buttons.button( "option", "icons" ), { primary: "ui-icon-cancel", secondary: null } );
|
equal( buttons.button( "option", "icon" ), "ui-icon-cancel" );
|
||||||
equal( buttons.button( "option", "text" ), false );
|
equal( buttons.button( "option", "showLabel" ), false );
|
||||||
buttons.click();
|
buttons.click();
|
||||||
|
|
||||||
element.remove();
|
element.remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user