mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: improved dropdown CSS style unit test
This commit is contained in:
parent
33bd0cd9fb
commit
ba73886d3f
@ -96,6 +96,7 @@ test("refresh - disabled select", function () {
|
||||
equals( menu.children("ul").attr("aria-disabled"), "true", "mene ARIA" );
|
||||
});
|
||||
|
||||
|
||||
test("refresh - disabled option", function () {
|
||||
expect(2);
|
||||
|
||||
@ -113,6 +114,7 @@ test("refresh - disabled option", function () {
|
||||
ok( disabledItem.children("a").length <= 0, "has no link" );
|
||||
});
|
||||
|
||||
|
||||
test("refresh - disabled optgroup", function () {
|
||||
|
||||
var element = $('#files').selectmenu(),
|
||||
|
@ -13,8 +13,9 @@ test("appendTo another element", function () {
|
||||
ok($("#qunit-fixture").find(".ui-selectmenu-menu").length, "selectmenu appendedTo other element");
|
||||
});
|
||||
|
||||
|
||||
test("dropdown: CSS styles", function () {
|
||||
expect(2);
|
||||
expect(4);
|
||||
|
||||
var widget = this.element.selectmenu("widget"),
|
||||
button = widget.filter(".ui-selectmenu-button"),
|
||||
@ -22,10 +23,15 @@ test("dropdown: CSS styles", function () {
|
||||
menu = widget.filter(".ui-selectmenu-menu"),
|
||||
ul = widget.find("ul");
|
||||
|
||||
this.element.selectmenu("open");
|
||||
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");
|
||||
|
||||
ok( link.hasClass("ui-corner-top") && !link.hasClass("ui-corner-all"), "button styles");
|
||||
ok( ul.hasClass("ui-corner-bottom") && !ul.hasClass("ui-corner-all"), "menu styles");
|
||||
this.element.selectmenu("close");
|
||||
this.element.selectmenu("option", "dropdown", false);
|
||||
this.element.selectmenu("open");
|
||||
ok( !link.hasClass("ui-corner-top") && link.hasClass("ui-corner-all"), "button styles pop-up");
|
||||
ok( !ul.hasClass("ui-corner-bottom") && ul.hasClass("ui-corner-all"), "menu styles pop-up");
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user