Permalink
Browse files

Selectmenu tests: lint fixes

  • Loading branch information...
1 parent daec559 commit 2bb459f1b645fa252a41e4e96651c103fd39d3ad @fnagel fnagel committed Nov 13, 2012
Showing with 6 additions and 10 deletions.
  1. +2 −4 tests/unit/selectmenu/selectmenu_core.js
  2. +4 −6 tests/unit/selectmenu/selectmenu_methods.js
@@ -6,8 +6,7 @@ test("accessibility", function () {
var links,
element = $('#speed').selectmenu(),
button = element.selectmenu("widget"),
- menu = element.selectmenu("menuWidget"),
- selected = element.find("option:selected");
+ menu = element.selectmenu("menuWidget");
button.simulate( "focus" );
links = menu.find("li.ui-menu-item a");
@@ -71,8 +70,7 @@ $.each([
var links,
element = $(settings.selector).selectmenu(),
button = element.selectmenu("widget"),
- menu = element.selectmenu("menuWidget"),
- selected = element.find("option:selected");
+ menu = element.selectmenu("menuWidget");
button.simulate( "focus" );
links = menu.find("li.ui-menu-item a");
@@ -91,7 +91,6 @@ test("refresh - disabled option", function () {
var disabledItem,
element = $('#speed').selectmenu(),
- button = element.selectmenu("widget").parent(),
menu = element.selectmenu("menuWidget").parent();
element.attr("disabled", "disabled");
@@ -108,7 +107,6 @@ test("refresh - disabled optgroup", function () {
var i,
item,
element = $('#files').selectmenu(),
- button = element.selectmenu("widget").parent(),
menu = element.selectmenu("menuWidget").parent(),
originalDisabledOptgroup = element.find("optgroup").first(),
originalDisabledOptions = originalDisabledOptgroup.find("option");
@@ -132,13 +130,13 @@ test( "widget", function() {
expect( 4 );
var element = $('#speed').selectmenu(),
widgetElement = element.selectmenu( "widget" ),
- menuWidgetElement = element.selectmenu( "menuWidget" );
-
+ menuWidgetElement = element.selectmenu( "menuWidget" );
+
element.selectmenu("refresh");
-
+
equal( widgetElement.length, 1, "widget: one element" );
ok( widgetElement.is("a.ui-button"), "widget: button element" );
-
+
equal( menuWidgetElement.length, 1, "menuWidget: one element" );
ok( menuWidgetElement.is("ul.ui-menu"), "menuWidget: menu element" );
});

0 comments on commit 2bb459f

Please sign in to comment.