mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
removed duplicates from options unit tests and added new options and events tests
This commit is contained in:
parent
f381749ed7
commit
716bf407d2
@ -7,7 +7,7 @@
|
||||
});
|
||||
|
||||
test("change", function () {
|
||||
expect(4);
|
||||
expect(5);
|
||||
|
||||
this.element.selectmenu({
|
||||
change: function (event, ui) {
|
||||
@ -22,6 +22,8 @@
|
||||
menu = widget.filter(".ui-selectmenu-menu");
|
||||
|
||||
menu.find(".ui-menu-item").eq(0).simulate("click");
|
||||
|
||||
equals(this.element.selectmenu("option", "value"), "Slower", "should be set to first option");
|
||||
});
|
||||
|
||||
test("close", function () {
|
||||
|
@ -8,9 +8,10 @@
|
||||
});
|
||||
|
||||
test("appendTo another element", function () {
|
||||
expect(1);
|
||||
expect(2);
|
||||
|
||||
ok(this.element.selectmenu("option", "appendTo", "#qunit-fixture"), "appendTo accepts selector");
|
||||
ok($("#qunit-fixture").find(".ui-selectmenu-menu").length, "selectmenu appendedTo other element");
|
||||
});
|
||||
|
||||
test("dropdown false", function () {
|
||||
@ -19,15 +20,12 @@
|
||||
ok(this.element.selectmenu("option", "dropdown", false), "accepts false");
|
||||
});
|
||||
|
||||
test("value in sync with selected item", function () {
|
||||
test("value option", function () {
|
||||
expect(1);
|
||||
|
||||
var widget = this.element.selectmenu("widget"),
|
||||
menu = widget.filter(".ui-selectmenu-menu");
|
||||
this.element.selectmenu("option", "value", "jQuery UI");
|
||||
|
||||
menu.find(".ui-menu-item").eq(0).simulate("click");
|
||||
|
||||
equals(this.element.selectmenu("option", "value"), "Slower", "should be set to first option");
|
||||
equals(this.element.selectmenu("option", "value"), "jQuery UI", "should be set to 'jQuery UI'");
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user