Skip to content

Commit 96897b0

Browse files
author
scottjehl
committed
listview tests now passing.
1 parent 9826bf7 commit 96897b0

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

tests/unit/listview/listview_core.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
});
6969

7070
asyncTest( "should go back to top level when the back button is clicked", function() {
71-
72-
$('.ui-page-active a:jqmData(rel="back")').click();
71+
$.testHelper.openPage("nested-list-test&ui-page=More-animals-0");
72+
window.history.back();
7373

7474
setTimeout(function() {
7575
ok($('#nested-list-test').hasClass('ui-page-active'), 'Transitions back to the parent nested page');
@@ -94,15 +94,17 @@
9494
});
9595

9696
asyncTest( "changes to number 1 page when the li a is clicked", function() {
97-
$('.ui-page-active li a').first().click();
97+
$('#numbered-list-test li a').first().click();
9898
setTimeout(function() {
9999
ok($('#numbered-list-results').hasClass('ui-page-active'), "The new numbered page was transitioned correctly.");
100100
start();
101101
}, 1000);
102102
});
103103

104104
asyncTest( "takes us back to the numbered list when the back button is clicked", function() {
105-
$('.ui-page-active a:jqmData(rel="back")').click();
105+
$.testHelper.openPage('#numbered-list-test')
106+
$.testHelper.openPage('#numbered-list-results')
107+
window.history.back();
106108
setTimeout(function() {
107109
ok($('#numbered-list-test').hasClass('ui-page-active'));
108110
start();
@@ -121,14 +123,6 @@
121123
}, 1000);
122124
});
123125

124-
asyncTest( "Does not go to new page when an item is clicked", function() {
125-
$('li', $('#read-only-list-test').first().click());
126-
setTimeout(function() {
127-
ok($('.ui-page-active').attr('id') == "read-only-list-test", "Page does not change for read only lists");
128-
start();
129-
}, 1000);
130-
});
131-
132126
module('Split view list');
133127

134128
asyncTest( "changes the page to the split view list and enhances it correctly.", function() {
@@ -146,7 +140,7 @@
146140
$.testHelper.openPage("#split-list-test");
147141

148142
setTimeout(function(){
149-
$('.ui-page-active .ui-li>a:eq(0) a:eq(0)').click();
143+
$('.ui-page-active .ui-li a:eq(0)').click();
150144
}, 500);
151145

152146
setTimeout(function() {

0 commit comments

Comments
 (0)