Skip to content
Permalink
Browse files

Selectmenu Tests: add toLowerCase() to node type checks

  • Loading branch information...
fnagel committed Apr 29, 2013
1 parent f2bd236 commit 1cca8292e8678645a3e5af54bd3f761fd72ff02e
Showing with 4 additions and 6 deletions.
  1. +4 −6 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, "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" );
}
});
@@ -44,15 +44,13 @@ test( "close", function () {
test( "focus", function () {
expect( 3 );

var button,
menu,
links;
var button, menu, links;

this.element.selectmenu({
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, "OPTION", "ui points to original option element" );
equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
}
});

@@ -91,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, "OPTION", "ui points to original option element" );
equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
}
});

0 comments on commit 1cca829

Please sign in to comment.
You can’t perform that action at this time.