aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-07-12 17:23:33 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-07-12 17:50:34 +0200
commit7759fb4dba5d4135297994a8292dad093d704e19 (patch)
tree44c6f718c1e2b6a5650d73449d58148a6e9be42a /tests
parent1510f7e28a7cdb259409faa4b94ba2c1a52467ce (diff)
downloadjquery-ui-7759fb4dba5d4135297994a8292dad093d704e19.tar.gz
jquery-ui-7759fb4dba5d4135297994a8292dad093d704e19.zip
Menu: Rename icon option to icons.submenu
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/menu/menu.html6
-rw-r--r--tests/unit/menu/menu_common.js4
-rw-r--r--tests/unit/menu/menu_options.js16
3 files changed, 19 insertions, 7 deletions
diff --git a/tests/unit/menu/menu.html b/tests/unit/menu/menu.html
index c58b9fc65..ed376232e 100644
--- a/tests/unit/menu/menu.html
+++ b/tests/unit/menu/menu.html
@@ -44,11 +44,7 @@
</head>
<body>
-<h1 id="qunit-header">jQuery UI Menu Test Suite</h1>
-<h2 id="qunit-banner"></h2>
-<div id="qunit-testrunner-toolbar"></div>
-<h2 id="qunit-userAgent"></h2>
-<ol id="qunit-tests"></ol>
+<div id="qunit">jQuery UI Menu Test Suite</div>
<div id="qunit-fixture">
<ul class="foo" id="menu1">
diff --git a/tests/unit/menu/menu_common.js b/tests/unit/menu/menu_common.js
index 2ab32ac05..4a89a947a 100644
--- a/tests/unit/menu/menu_common.js
+++ b/tests/unit/menu/menu_common.js
@@ -1,7 +1,9 @@
TestHelpers.commonWidgetTests( "menu", {
defaults: {
disabled: false,
- icon: "ui-icon-carat-1-e",
+ icons: {
+ submenu: "ui-icon-carat-1-e"
+ },
menus: "ul",
position: {
my: "left top",
diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js
index 1ccbb20ab..a8b029201 100644
--- a/tests/unit/menu/menu_options.js
+++ b/tests/unit/menu/menu_options.js
@@ -40,7 +40,21 @@ test( "{ disabled: false }", function() {
equal( logOutput(), "click,1,afterclick", "Click order not valid." );
});
-// TODO: test icon option
+test( "{ icons: default }", function() {
+ expect( 1 );
+ var element = $( "#menu2" ).menu();
+ equal( element.find( ".ui-menu-icon" ).attr( "class" ), "ui-menu-icon ui-icon ui-icon-carat-1-e" );
+});
+
+test( "{ icons: { submenu: 'custom' } }", function() {
+ expect( 1 );
+ var element = $( "#menu2" ).menu({
+ icons: {
+ submenu: "custom-class"
+ }
+ });
+ equal( element.find( ".ui-menu-icon" ).attr( "class" ), "ui-menu-icon ui-icon custom-class" );
+});
// TODO: test menus option