From ef27211d2da36667608d854ff578f30da1e5132e Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Fri, 12 Dec 2008 13:20:34 +0000 Subject: Accordion: Fixed #3646 - Update markup to new UI CSS Framework specs; Added visual test and updated tests to markup changes --- tests/accordion.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/accordion.js') diff --git a/tests/accordion.js b/tests/accordion.js index 5ac24fd9d..99a368c37 100644 --- a/tests/accordion.js +++ b/tests/accordion.js @@ -10,7 +10,7 @@ jQuery.ui.accordion.defaults.animated = false; function state(accordion) { var args = $.makeArray(arguments).slice(1); $.each(args, function(i, n) { - equals(accordion.find("div").eq(i).is(":visible"), n); + equals(accordion.find(".ui-accordion-content").eq(i).is(":visible"), n); }); } @@ -23,11 +23,11 @@ test("basics", function() { }); test("autoheight", function() { - $('#navigation').accordion({ header: '.head', autoHeight: false }); + $('#navigation').accordion({ autoHeight: false }); equals( 90, $('#navigation ul:first').height() ); equals( 126, $('#navigation ul:eq(1)').height() ); equals( 54, $('#navigation ul:last').height() ); - $('#navigation').accordion("destroy").accordion({ header: '.head', autoHeight: true }); + $('#navigation').accordion("destroy").accordion({ autoHeight: true }); equals( 126, $('#navigation ul:first').height() ); equals( 126, $('#navigation ul:eq(1)').height() ); equals( 126, $('#navigation ul:last').height() ); @@ -67,7 +67,7 @@ test("activate, boolean, alwaysOpen:true", function() { }); test("activate, string expression", function() { - var ac = $('#list1').accordion({ active: ":last" }); + var ac = $('#list1').accordion({ active: "a:last" }); state(ac, 0, 0, 1); ac.accordion("activate", ":first"); state(ac, 1, 0, 0); @@ -94,7 +94,7 @@ function state2(accordion) { } test("handle click on header-descendant", function() { - var ac = $('#navigation').accordion({ header: '.head', autoHeight: false }) + var ac = $('#navigation').accordion({ autoHeight: false }) ac.triggerEvent("click", $('#navigation span:contains(Bass)')[0]); state2(ac, 0, 1, 0); }); -- cgit v1.2.3