Selectmenu tests: remove option dropdown

This commit is contained in:
Felix Nagel 2012-12-20 00:12:35 +01:00
parent a787d52d4a
commit 84621940bf
3 changed files with 11 additions and 27 deletions

View File

@ -2,18 +2,20 @@ TestHelpers.commonWidgetTests( "selectmenu", {
defaults: {
appendTo: null,
disabled: false,
dropdown: true,
icons: {
button: "ui-icon-triangle-1-s"
},
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
// callbacks,
// callbacks
create: null,
open: null,
focus: null,
select: null,
change: null,
close: null,
change: null
focus: null,
open: null,
select: null
}
});

View File

@ -45,7 +45,7 @@ test("appendTo another element", function () {
});
test("dropdown: CSS styles", function () {
test("CSS styles", function () {
expect(2);
var element = $("#speed").selectmenu(),
@ -57,18 +57,4 @@ test("dropdown: CSS styles", function () {
ok( menu.hasClass("ui-corner-bottom") && !menu.hasClass("ui-corner-all"), "menu styles dropdown");
});
test("pop-up: CSS styles", function () {
expect(2);
var element = $("#speed").selectmenu({
dropdown: false
}),
button = element.selectmenu("widget"),
menu = element.selectmenu("menuWidget");
element.selectmenu("close");
ok( !button.hasClass("ui-corner-top") && button.hasClass("ui-corner-all") && button.find("span.ui-icon").hasClass("ui-icon-triangle-2-n-s"), "button styles pop-up");
ok( !menu.hasClass("ui-corner-bottom") && menu.hasClass("ui-corner-all"), "menu styles pop-up");
});
})(jQuery);

View File

@ -14,12 +14,8 @@
<script>
$(function() {
/* disabled */
$('select#disabled1').selectmenu({
dropdown: false
});
var withOverflow = $('select#disabled2').selectmenu({
dropdown: false
});
$('select#disabled1').selectmenu();
var withOverflow = $('select#disabled2').selectmenu();
withOverflow.selectmenu("menuWidget").addClass("overflow");
$('select#disabled3').selectmenu();
var disabled4 = $('select#disabled4').selectmenu();