mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
bde431bb44
Ref gh-1528
36 lines
856 B
JavaScript
36 lines
856 B
JavaScript
define( [
|
|
"jquery",
|
|
"lib/helper",
|
|
"ui/accordion"
|
|
], function( $, helper ) {
|
|
|
|
return $.extend( helper, {
|
|
equalHeight: function( accordion, height ) {
|
|
accordion.find( ".ui-accordion-content" ).each(function() {
|
|
equal( $( this ).outerHeight(), height );
|
|
});
|
|
},
|
|
|
|
setupTeardown: function() {
|
|
var animate = $.ui.accordion.prototype.options.animate;
|
|
return {
|
|
setup: function() {
|
|
$.ui.accordion.prototype.options.animate = false;
|
|
},
|
|
teardown: function() {
|
|
$.ui.accordion.prototype.options.animate = animate;
|
|
}
|
|
};
|
|
},
|
|
|
|
state: function( accordion ) {
|
|
var expected = $.makeArray( arguments ).slice( 1 ),
|
|
actual = accordion.find( ".ui-accordion-content" ).map(function() {
|
|
return $( this ).css( "display" ) === "none" ? 0 : 1;
|
|
}).get();
|
|
QUnit.push( QUnit.equiv(actual, expected), actual, expected );
|
|
}
|
|
} );
|
|
|
|
} );
|