aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-04-29 23:15:56 +0200
committerFelix Nagel <info@felixnagel.com>2013-04-29 23:15:56 +0200
commit4c930fd59b9d2985074a3ad2d665f111d9d7d64c (patch)
treec353ed14818ad1bf27b1f1bcab510cb627b9b66f
parentb8339ebc469cae1dfa5386247d61a997106c64e6 (diff)
downloadjquery-ui-4c930fd59b9d2985074a3ad2d665f111d9d7d64c.tar.gz
jquery-ui-4c930fd59b9d2985074a3ad2d665f111d9d7d64c.zip
Selectmenu Tests: add spaces to [0]
-rw-r--r--tests/unit/selectmenu/selectmenu_core.js2
-rw-r--r--tests/unit/selectmenu/selectmenu_events.js6
-rw-r--r--tests/unit/selectmenu/selectmenu_options.js14
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js
index 69414f1b2..6c9ce5221 100644
--- a/tests/unit/selectmenu/selectmenu_core.js
+++ b/tests/unit/selectmenu/selectmenu_core.js
@@ -20,7 +20,7 @@ test("accessibility", function () {
equal( button.attr( "aria-owns" ), menu.attr("id"), "button link aria-owns" );
equal(
button.attr( "aria-labelledby" ),
- links.eq( element[0].selectedIndex ).attr( "id" ),
+ links.eq( element[ 0 ].selectedIndex ).attr( "id" ),
"button link aria-labelledby"
);
equal( button.attr( "tabindex" ), 0, "button link tabindex" );
diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js
index aefd78b94..8fd85a851 100644
--- a/tests/unit/selectmenu/selectmenu_events.js
+++ b/tests/unit/selectmenu/selectmenu_events.js
@@ -13,7 +13,7 @@ test( "change", function () {
change: function ( event, ui ) {
ok( event, "change event fired on change" );
equal( event.type, "selectmenuchange", "event type set to selectmenuchange" );
- equal( ui.item.element[ 0 ].nodeName.toLowerCase(), "option", "ui.item.element[0] points to original option element" );
+ equal( ui.item.element[ 0 ].nodeName.toLowerCase(), "option", "ui.item.element[ 0 ] points to original option element" );
equal( ui.item.value, value, "ui.item.value property updated correctly" );
}
});
@@ -50,7 +50,7 @@ test( "focus", function () {
focus: function ( event, ui ) {
ok( event, "focus event fired on mouseover" );
equal( event.type, "selectmenufocus", "event type set to selectmenufocus" );
- equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
+ equal( ui.item.element[ 0 ].nodeName.toLowerCase(), "option", "ui points to original option element" );
}
});
@@ -89,7 +89,7 @@ test( "select", function () {
select: function ( event, ui ) {
ok( event, "select event fired on item select" );
equal( event.type, "selectmenuselect", "event type set to selectmenuselect" );
- equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
+ equal( ui.item.element[ 0 ].nodeName.toLowerCase(), "option", "ui points to original option element" );
}
});
diff --git a/tests/unit/selectmenu/selectmenu_options.js b/tests/unit/selectmenu/selectmenu_options.js
index 720142759..82ea6a8b4 100644
--- a/tests/unit/selectmenu/selectmenu_options.js
+++ b/tests/unit/selectmenu/selectmenu_options.js
@@ -7,40 +7,40 @@ test( "appendTo another element", function () {
var detached = $( "<div>" ),
element = $( "#speed" ).selectmenu();
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], document.body, "defaults to body" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], document.body, "defaults to body" );
element.selectmenu( "destroy" );
element.selectmenu({
appendTo: ".selectmenu-wrap"
});
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap1" )[0], "first found element" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], $( "#selectmenu-wrap1" )[ 0 ], "first found element" );
equal( $( "#selectmenu-wrap2 .ui-selectmenu" ).length, 0, "only appends to one element" );
element.selectmenu( "destroy" );
$( "#selectmenu-wrap2" ).addClass( "ui-front" );
element.selectmenu();
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap2" )[0], "null, inside .ui-front" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], $( "#selectmenu-wrap2" )[ 0 ], "null, inside .ui-front" );
element.selectmenu( "destroy" );
$( "#selectmenu-wrap2" ).removeClass( "ui-front" );
element.selectmenu().selectmenu( "option", "appendTo", "#selectmenu-wrap1" );
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], $( "#selectmenu-wrap1" )[0], "modified after init" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], $( "#selectmenu-wrap1" )[ 0 ], "modified after init" );
element.selectmenu( "destroy" );
element.selectmenu({
appendTo: detached
});
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], detached[0], "detached jQuery object" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], detached[ 0 ], "detached jQuery object" );
element.selectmenu( "destroy" );
element.selectmenu({
appendTo: detached[ 0 ]
});
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], detached[0], "detached DOM element" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], detached[ 0 ], "detached DOM element" );
element.selectmenu( "destroy" );
element.selectmenu().selectmenu( "option", "appendTo", detached );
- equal( element.selectmenu( "menuWidget" ).parent().parent()[0], detached[0], "detached DOM element via option()" );
+ equal( element.selectmenu( "menuWidget" ).parent().parent()[ 0 ], detached[ 0 ], "detached DOM element via option()" );
element.selectmenu( "destroy" );
});