diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js index ec4ca29d5..18d2d6bfb 100644 --- a/tests/unit/accordion/accordion_core.js +++ b/tests/unit/accordion/accordion_core.js @@ -3,8 +3,8 @@ module( "accordion: core", accordionSetupTeardown() ); $.each( { div: "#list1", ul: "#navigation", dl: "#accordion-dl" }, function( type, selector ) { - expect( 4 ); test( "markup structure: " + type, function() { + expect( 4 ); var element = $( selector ).accordion(); ok( element.hasClass( "ui-accordion" ), "main element is .ui-accordion" ); equal( element.find( ".ui-accordion-header" ).length, 3, diff --git a/tests/unit/all.html b/tests/unit/all.html new file mode 100644 index 000000000..a36c9e004 --- /dev/null +++ b/tests/unit/all.html @@ -0,0 +1,51 @@ + + + + + jQuery UI Test Suite + + + + + + + + + + + +

jQuery UI Test Suite

+

+
+

+
    +
    + +
    + + diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index b949c827d..19ac11c68 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -30,7 +30,6 @@ test( "handle blur: click", function() { }, blur: function( event, ui ) { - console.log( event, ui ); equal( event.originalEvent.type, "click", "blur triggered 'click'" ); equal( event.type, "menublur", "blur event.type is 'menublur'" ); } diff --git a/tests/unit/testsuites.js b/tests/unit/testsuites.js new file mode 100644 index 000000000..ffe2d3cc0 --- /dev/null +++ b/tests/unit/testsuites.js @@ -0,0 +1,76 @@ +(function( $, QUnit ) { + +$.extend( QUnit, { + testSuites: function( suites ) { + $.each( suites, function( i, suite ) { + asyncTest( suite, function() { + runSuite( suite ); + }); + }); + }, + + testStart: function( data ) { + // update the test status to show which test suite is running + $( "#qunit-testresult" ).html( "Running " + data.name + "...
     " ); + }, + + testDone: function() { + // undo the auto-expansion of failed tests + $( "#qunit-tests > li.fail" ).each(function() { + var test = $( this ); + // avoid collapsing test results that the user manually opened + if ( test.data( "auto-collapsed" ) ) { + return; + } + test.data( "auto-collapsed", true ) + .children( "ol" ).hide(); + }); + } +}); + +// generate an iframe to run the test suite and proxy the iframe's QUnit +// to pass all test info to the main page +function runSuite( suite ) { + var body = $( "body" ), + iframe = $( "