Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion: correct height calculated when closed #1536

Closed
wants to merge 5 commits into from
Prev Previous commit
Accordion: unit test for collapsed height
Ref  #11938
  • Loading branch information
apushak committed Apr 24, 2015
commit 46e065ea6453c1b88b84a377f590341fa1d57dbc
12 changes: 0 additions & 12 deletions tests/unit/accordion/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ var equalHeight = testHelper.equalHeight,

module( "accordion: methods", setupTeardown() );

test( "collapsedHeight", function() {
expect( 1 );
var element = $( "#collapsible" ).accordion(),
content = element.find( ".ui-accordion-content" ),
height = content.height();
element.accordion( "destroy" ).accordion({
active: false,
collapsible: true
});
equal( content.height(), height );
});

test( "destroy", function( assert ) {
expect( 1 );
assert.domEqual( "#list1", function() {
Expand Down
13 changes: 13 additions & 0 deletions tests/unit/accordion/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ test( "{ active: false }", function() {
strictEqual( element.accordion( "option", "active" ), 0 );
});

// http://bugs.jqueryui.com/ticket/11938
test( "{ active: false, collapsible: true }", function() {
expect( 1 );
var element = $( "#collapsible" ).accordion(),
content = element.find( ".ui-accordion-content" ),
height = content.height();
element.accordion( "destroy" ).accordion({
active: false,
collapsible: true
});
equal( content.height(), height );
});

test( "{ active: Number }", function() {
expect( 8 );
var element = $( "#list1" ).accordion({
Expand Down