2011-11-25 10:32:44 +00:00
|
|
|
(function ($) {
|
2011-10-19 17:47:02 +00:00
|
|
|
|
2011-11-25 10:32:44 +00:00
|
|
|
module("selectmenu: options", {
|
|
|
|
setup: function () {
|
|
|
|
this.element = $("#speed");
|
|
|
|
this.element.selectmenu();
|
|
|
|
}
|
|
|
|
});
|
2011-10-19 17:47:02 +00:00
|
|
|
|
2011-11-25 10:32:44 +00:00
|
|
|
test("appendTo another element", function () {
|
2011-12-01 15:36:49 +00:00
|
|
|
expect(2);
|
2011-11-25 10:32:44 +00:00
|
|
|
|
|
|
|
ok(this.element.selectmenu("option", "appendTo", "#qunit-fixture"), "appendTo accepts selector");
|
2011-12-01 15:36:49 +00:00
|
|
|
ok($("#qunit-fixture").find(".ui-selectmenu-menu").length, "selectmenu appendedTo other element");
|
2011-11-25 10:32:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
test("dropdown false", function () {
|
|
|
|
expect(1);
|
|
|
|
|
|
|
|
ok(this.element.selectmenu("option", "dropdown", false), "accepts false");
|
|
|
|
});
|
|
|
|
|
2011-12-01 15:36:49 +00:00
|
|
|
test("value option", function () {
|
2011-11-25 10:32:44 +00:00
|
|
|
expect(1);
|
|
|
|
|
2011-12-01 15:36:49 +00:00
|
|
|
this.element.selectmenu("option", "value", "jQuery UI");
|
2011-11-25 10:32:44 +00:00
|
|
|
|
2011-12-01 15:36:49 +00:00
|
|
|
equals(this.element.selectmenu("option", "value"), "jQuery UI", "should be set to 'jQuery UI'");
|
2011-11-25 10:32:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery);
|