aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/selectmenu/selectmenu_core.js1
-rw-r--r--tests/unit/selectmenu/selectmenu_events.js24
-rw-r--r--tests/unit/selectmenu/selectmenu_options.js1
3 files changed, 22 insertions, 4 deletions
diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js
index f06f65c99..85fd4b38c 100644
--- a/tests/unit/selectmenu/selectmenu_core.js
+++ b/tests/unit/selectmenu/selectmenu_core.js
@@ -53,6 +53,7 @@ $.each([
equals( button.text(), selected.text(), "inital button text" );
+ link.simulate( "focus" );
link.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
equals( element.find("option:selected").val(), selected.next("option").val() , "after keydown original select state" );
equals( button.text(), selected.next("option").text(), "after keydown button text" );
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");
});
diff --git a/tests/unit/selectmenu/selectmenu_options.js b/tests/unit/selectmenu/selectmenu_options.js
index 993086b27..32f490ce0 100644
--- a/tests/unit/selectmenu/selectmenu_options.js
+++ b/tests/unit/selectmenu/selectmenu_options.js
@@ -23,6 +23,7 @@ test("dropdown: CSS styles", function () {
menu = widget.filter(".ui-selectmenu-menu"),
ul = widget.find("ul");
+ link.simulate( "focus" );
this.element.selectmenu("open");
ok( link.hasClass("ui-corner-top") && !link.hasClass("ui-corner-all"), "button styles dropdown");
ok( ul.hasClass("ui-corner-bottom") && !ul.hasClass("ui-corner-all"), "menu styles dropdown");