diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-04-06 14:40:47 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-04-09 09:26:26 -0400 |
commit | 3522fd9618d196beb235f3bd52f85c31f20c57b8 (patch) | |
tree | 3c6c651c194e76ed8303547f5d91a616c456e0f3 /tests/unit/selectmenu | |
parent | b8625346f6de6d7533493fc27b24d8acd45aa84c (diff) | |
download | jquery-ui-3522fd9618d196beb235f3bd52f85c31f20c57b8.tar.gz jquery-ui-3522fd9618d196beb235f3bd52f85c31f20c57b8.zip |
Selectmenu: Convert tests to new infrastructure
Ref #10119
Ref gh-1528
Diffstat (limited to 'tests/unit/selectmenu')
-rw-r--r-- | tests/unit/selectmenu/selectmenu.html | 28 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_common.js | 9 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_core.js | 7 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_events.js | 7 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_methods.js | 11 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_options.js | 7 |
6 files changed, 32 insertions, 37 deletions
diff --git a/tests/unit/selectmenu/selectmenu.html b/tests/unit/selectmenu/selectmenu.html index c9a399ad5..0583733a0 100644 --- a/tests/unit/selectmenu/selectmenu.html +++ b/tests/unit/selectmenu/selectmenu.html @@ -4,32 +4,8 @@ <meta charset="utf-8"> <title>jQuery UI Selectmenu Test Suite</title> - <script src="../../jquery.js"></script> - <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/jquery-simulate/jquery.simulate.js"></script> - <script src="../testsuite.js"></script> - <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script> - <script> - TestHelpers.loadResources({ - css: [ "core", "menu" , "selectmenu" ], - js: [ - "ui/core.js", - "ui/widget.js", - "ui/position.js", - "ui/menu.js", - "ui/selectmenu.js" - ] - }); - </script> - - <script src="selectmenu_common.js"></script> - <script src="selectmenu_core.js"></script> - <script src="selectmenu_events.js"></script> - <script src="selectmenu_methods.js"></script> - <script src="selectmenu_options.js"></script> - - <script src="../swarminject.js"></script> + <script src="../../lib/css.js" data-modules="core menu selectmenu"></script> + <script src="../../lib/bootstrap.js" data-widget="selectmenu"></script> </head> <body> diff --git a/tests/unit/selectmenu/selectmenu_common.js b/tests/unit/selectmenu/selectmenu_common.js index f741eaf27..b24b8dace 100644 --- a/tests/unit/selectmenu/selectmenu_common.js +++ b/tests/unit/selectmenu/selectmenu_common.js @@ -1,4 +1,9 @@ -TestHelpers.commonWidgetTests( "selectmenu", { +define( [ + "lib/common", + "ui/selectmenu" +], function( common ) { + +common.testWidget( "selectmenu", { defaults: { appendTo: null, classes: { @@ -25,3 +30,5 @@ TestHelpers.commonWidgetTests( "selectmenu", { select: null } }); + +} ); diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js index c4e987751..e5807817e 100644 --- a/tests/unit/selectmenu/selectmenu_core.js +++ b/tests/unit/selectmenu/selectmenu_core.js @@ -1,4 +1,7 @@ -(function( $ ) { +define( [ + "jquery", + "ui/selectmenu" +], function( $ ) { module( "selectmenu: core" ); @@ -326,4 +329,4 @@ $.each([ }); }); -})( jQuery ); +} ); diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js index 3ab6e93bc..d5c463fa9 100644 --- a/tests/unit/selectmenu/selectmenu_events.js +++ b/tests/unit/selectmenu/selectmenu_events.js @@ -1,4 +1,7 @@ -(function ( $ ) { +define( [ + "jquery", + "ui/selectmenu" +], function( $ ) { module( "selectmenu: events", { setup: function() { @@ -130,4 +133,4 @@ asyncTest( "select", function() { }); }); -})( jQuery ); +} ); diff --git a/tests/unit/selectmenu/selectmenu_methods.js b/tests/unit/selectmenu/selectmenu_methods.js index 8f5454b15..8481e804e 100644 --- a/tests/unit/selectmenu/selectmenu_methods.js +++ b/tests/unit/selectmenu/selectmenu_methods.js @@ -1,10 +1,13 @@ -(function( $ ) { +define( [ + "jquery", + "ui/selectmenu" +], function( $ ) { module( "selectmenu: methods" ); -test( "destroy", function() { +test( "destroy", function( assert ) { expect( 1 ); - domEqual( "#speed", function() { + assert.domEqual( "#speed", function() { $( "#speed" ).selectmenu().selectmenu( "destroy" ); }); }); @@ -183,4 +186,4 @@ test( "widget and menuWidget", function( assert ) { ok( menu.is( "ul.ui-menu" ), "Menu Widget: element and class" ); }); -})( jQuery ); +} ); diff --git a/tests/unit/selectmenu/selectmenu_options.js b/tests/unit/selectmenu/selectmenu_options.js index 7ed841a90..deb7a6d3a 100644 --- a/tests/unit/selectmenu/selectmenu_options.js +++ b/tests/unit/selectmenu/selectmenu_options.js @@ -1,4 +1,7 @@ -(function ( $ ) { +define( [ + "jquery", + "ui/selectmenu" +], function( $ ) { module( "selectmenu: options" ); @@ -122,4 +125,4 @@ test( "width", function() { equal( button.outerWidth(), 300, "button width fills container" ); }); -})( jQuery ); +} ); |