Skip to content

Commit fdde24b

Browse files
author
scottjehl
committed
fixed unit test - menu var wasn't defined.
1 parent 033ce4a commit fdde24b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/unit/select/select_core.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
function(){
2828
// bring up the dialog
2929
select.trigger("click");
30-
ok( menu.hasClass( $.mobile.defaultDialogTransition ) );
30+
ok( $("#select-choice-many-1").closest(".ui-page").hasClass( $.mobile.defaultDialogTransition ) );
3131
window.history.back();
3232
},
3333

@@ -48,12 +48,12 @@
4848

4949
function(){
5050
menu = $("#select-choice-many-menu");
51-
same(menu.parents('.ui-dialog').length, 1);
51+
same(menu.closest('.ui-dialog').length, 1);
5252
},
5353

5454
function(){
5555
// select and close the dialog
56-
menu.parents('.ui-dialog').find("span.ui-icon-delete").click();
56+
menu.closest('.ui-dialog').dialog("close");
5757
},
5858

5959
function(){
@@ -63,6 +63,10 @@
6363

6464
function(){
6565
same(menu.parents('.ui-dialog').length, 1);
66+
console.log(menu)
67+
menu.closest('.ui-dialog').dialog("close");
68+
},
69+
function(){
6670
start();
6771
}
6872
], 1000);

0 commit comments

Comments
 (0)