mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Accordion: Added tests for custom header option.
This commit is contained in:
parent
2e17770e54
commit
a4da197a91
@ -107,7 +107,6 @@ test( "{ collapsible: true }", function() {
|
||||
|
||||
// TODO: add event tests
|
||||
|
||||
// TODO: add more header tests
|
||||
test( "{ header: default }", function() {
|
||||
// default: > li > :first-child,> :not(li):even
|
||||
// > :not(li):even
|
||||
@ -116,6 +115,19 @@ test( "{ header: default }", function() {
|
||||
state( $( "#navigation" ).accordion(), 1, 0, 0);
|
||||
});
|
||||
|
||||
test( "{ header: custom }", function() {
|
||||
var ac = $( "#navigationWrapper" ).accordion({
|
||||
header: "h2"
|
||||
});
|
||||
ac.find( "h2" ).each(function() {
|
||||
ok( $( this ).hasClass( "ui-accordion-header" ) );
|
||||
});
|
||||
equal( ac.find( ".ui-accordion-header" ).length, 3 );
|
||||
state( ac, 1, 0, 0 );
|
||||
ac.accordion( "option", "active", 2 );
|
||||
state( ac, 0, 0, 1 );
|
||||
});
|
||||
|
||||
test( "{ heightStyle: 'auto' }", function() {
|
||||
var ac = $( "#navigation" ).accordion({ heightStyle: "auto" });
|
||||
equalHeights( ac, 95, 130 );
|
||||
|
Loading…
Reference in New Issue
Block a user