aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectmenu/selectmenu_events.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-01-22 13:47:22 +0100
committerFelix Nagel <info@felixnagel.com>2012-01-22 13:47:22 +0100
commitd83e169424adf341afea4351cbe5b056f42ac996 (patch)
tree94023cd92f1babfd8026f55459e49fca9a4d9408 /tests/unit/selectmenu/selectmenu_events.js
parentc5d9dbca5c32915255398d249f995681ee671bf4 (diff)
downloadjquery-ui-d83e169424adf341afea4351cbe5b056f42ac996.tar.gz
jquery-ui-d83e169424adf341afea4351cbe5b056f42ac996.zip
Selectmenu: fixed unit tests due to initial refresh method changes
Diffstat (limited to 'tests/unit/selectmenu/selectmenu_events.js')
-rw-r--r--tests/unit/selectmenu/selectmenu_events.js24
1 files changed, 20 insertions, 4 deletions
diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js
index 4aad80c42..8031b6fc6 100644
--- a/tests/unit/selectmenu/selectmenu_events.js
+++ b/tests/unit/selectmenu/selectmenu_events.js
@@ -22,9 +22,11 @@ test("change", function () {
var widget = this.element.selectmenu("widget"),
menu = widget.filter(".ui-selectmenu-menu"),
button = widget.filter(".ui-selectmenu-button"),
+ link = button.find("a"),
value = this.element.find("option").first().text();
-
- button.find("a").simulate( "click" );
+
+ link.simulate( "focus" );
+ link.simulate( "click" );
menu.find("a").first().simulate( "mouseover" ).simulate( "click" );
});
@@ -40,6 +42,11 @@ test("close", function () {
}
});
+ var widget = this.element.selectmenu("widget"),
+ button = widget.filter(".ui-selectmenu-button"),
+ link = button.find("a");
+
+ link.simulate( "focus" );
this.element.selectmenu("open").selectmenu("close");
});
@@ -63,9 +70,11 @@ test("focus", function () {
var widget = this.element.selectmenu("widget"),
button = widget.filter(".ui-selectmenu-button"),
+ link = button.find("a"),
menu = widget.filter(".ui-selectmenu-menu");
- button.find("a").simulate( "click" );
+ link.simulate( "focus" );
+ link.simulate( "click" );
menu.find(".ui-menu-item").simulate("mouseover");
});
@@ -81,6 +90,11 @@ test("open", function () {
}
});
+ var widget = this.element.selectmenu("widget"),
+ button = widget.filter(".ui-selectmenu-button"),
+ link = button.find("a");
+
+ link.simulate( "focus" );
this.element.selectmenu("open");
});
@@ -99,9 +113,11 @@ test("select", function () {
var widget = this.element.selectmenu("widget"),
button = widget.filter(".ui-selectmenu-button"),
+ link = button.find("a"),
menu = widget.filter(".ui-selectmenu-menu");
- button.find("a").simulate( "click" );
+ link.simulate( "focus" );
+ link.simulate( "click" );
menu.find("a").first().simulate( "mouseover" ).simulate("click");
});