Skip to content

Commit

Permalink
Accordion: unit test for collapsed height
Browse files Browse the repository at this point in the history
Ref  #11938
  • Loading branch information
apushak committed Apr 24, 2015
1 parent 9b720f8 commit 46e065e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
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

0 comments on commit 46e065e

Please sign in to comment.