Skip to content

Commit 2de817d

Browse files
author
scottjehl
committed
fixed some logical errors in these tests. they now pass consistently in Firefox. Still inconsistent in Chrome, though they did pass once in Chrome during testing. Getting closer...
1 parent 7b1966c commit 2de817d

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

tests/unit/select/select_core.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515

1616
asyncTest( "a large select menu should use the default dialog transition", function(){
1717
var select = $("#select-choice-many-container-1 a"),
18-
prevDefault = $.mobile.defaultDialogTransition,
19-
menu;
20-
21-
18+
prevDefault = $.mobile.defaultDialogTransition;
2219

2320
//set to something else
2421
$.mobile.defaultDialogTransition = "fooz";
@@ -27,8 +24,8 @@
2724
function(){
2825
// bring up the dialog
2926
select.trigger("click");
30-
ok( $("#select-choice-many-1").closest(".ui-page").hasClass( $.mobile.defaultDialogTransition ) );
31-
window.history.back();
27+
ok( $("#select-choice-many-1-menu").closest(".ui-page").hasClass( $.mobile.defaultDialogTransition ) );
28+
$("#select-choice-many-1").selectmenu("close");
3229
},
3330

3431
function(){
@@ -53,7 +50,7 @@
5350

5451
function(){
5552
// select and close the dialog
56-
menu.closest('.ui-dialog').dialog("close");
53+
$("#select-choice-many-menu").selectmenu("close");
5754
},
5855

5956
function(){
@@ -62,14 +59,13 @@
6259
},
6360

6461
function(){
65-
same(menu.parents('.ui-dialog').length, 1);
66-
console.log(menu)
67-
menu.closest('.ui-dialog').dialog("close");
62+
same(menu.closest('.ui-dialog').length, 1);
63+
$("#select-choice-many-menu").selectmenu("close");
6864
},
6965
function(){
7066
start();
7167
}
72-
], 1000);
68+
], 500);
7369
});
7470

7571
asyncTest( "custom select menu always renders screen from the left", function(){

0 commit comments

Comments
 (0)