aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/menu')
-rw-r--r--tests/unit/menu/menu_core.js4
-rw-r--r--tests/unit/menu/menu_events.js10
-rw-r--r--tests/unit/menu/menu_methods.js10
-rw-r--r--tests/unit/menu/menu_options.js10
-rw-r--r--tests/unit/menu/menu_test_helpers.js9
5 files changed, 23 insertions, 20 deletions
diff --git a/tests/unit/menu/menu_core.js b/tests/unit/menu/menu_core.js
index 3dd2c78e1..7ff127009 100644
--- a/tests/unit/menu/menu_core.js
+++ b/tests/unit/menu/menu_core.js
@@ -2,7 +2,7 @@ define( [
"jquery",
"./menu_test_helpers",
"ui/menu"
-], function( $, menuTestHelpers ) {
+], function( $, testHelper ) {
module( "menu: core" );
@@ -51,7 +51,7 @@ asyncTest( "#9044: Autofocus issue with dialog opened from menu widget", functio
$( "#test9044" ).focus();
});
- menuTestHelpers.click( element, "3" );
+ testHelper.click( element, "3" );
setTimeout( function() {
equal( document.activeElement.id, "test9044", "Focus was swallowed by menu" );
$( "#test9044" ).remove();
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js
index 9aed1839c..9e0e0a2b7 100644
--- a/tests/unit/menu/menu_events.js
+++ b/tests/unit/menu/menu_events.js
@@ -2,15 +2,15 @@ define( [
"jquery",
"./menu_test_helpers",
"ui/menu"
-], function( $, menuTestHelpers ) {
+], function( $, testHelper ) {
-var log = menuTestHelpers.log,
- logOutput = menuTestHelpers.logOutput,
- click = menuTestHelpers.click;
+var log = testHelper.log,
+ logOutput = testHelper.logOutput,
+ click = testHelper.click;
module( "menu: events", {
setup: function() {
- menuTestHelpers.clearLog();
+ testHelper.clearLog();
}
});
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js
index ad30e5f13..61be3229f 100644
--- a/tests/unit/menu/menu_methods.js
+++ b/tests/unit/menu/menu_methods.js
@@ -2,15 +2,15 @@ define( [
"jquery",
"./menu_test_helpers",
"ui/menu"
-], function( $, menuTestHelpers ) {
+], function( $, testHelper ) {
-var log = menuTestHelpers.log,
- logOutput = menuTestHelpers.logOutput,
- click = menuTestHelpers.click;
+var log = testHelper.log,
+ logOutput = testHelper.logOutput,
+ click = testHelper.click;
module( "menu: methods", {
setup: function() {
- menuTestHelpers.clearLog();
+ testHelper.clearLog();
}
});
diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js
index 91630e14b..762b057fb 100644
--- a/tests/unit/menu/menu_options.js
+++ b/tests/unit/menu/menu_options.js
@@ -2,15 +2,15 @@ define( [
"jquery",
"./menu_test_helpers",
"ui/menu"
-], function( $, menuTestHelpers ) {
+], function( $, testHelper ) {
-var log = menuTestHelpers.log,
- logOutput = menuTestHelpers.logOutput,
- click = menuTestHelpers.click;
+var log = testHelper.log,
+ logOutput = testHelper.logOutput,
+ click = testHelper.click;
module( "menu: options", {
setup: function() {
- menuTestHelpers.clearLog();
+ testHelper.clearLog();
}
});
diff --git a/tests/unit/menu/menu_test_helpers.js b/tests/unit/menu/menu_test_helpers.js
index bfed14d74..445663985 100644
--- a/tests/unit/menu/menu_test_helpers.js
+++ b/tests/unit/menu/menu_test_helpers.js
@@ -1,9 +1,12 @@
-define( function() {
+define( [
+ "jquery",
+ "lib/helper"
+], function( $, helper ) {
var lastItem,
log = [];
-return {
+return $.extend( helper, {
log: function( message, clear ) {
if ( clear ) {
log.length = 0;
@@ -28,6 +31,6 @@ return {
.children( ".ui-menu-item-wrapper" )
.trigger( "click" );
}
-};
+} );
} );