Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
ensure the nested list pages are generated and use same for triple eq…
Browse files Browse the repository at this point in the history
…uals
  • Loading branch information
johnbender committed May 1, 2012
1 parent d1f0e6d commit ca1bab2
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tests/unit/listview/listview_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,23 @@
]);
});

module('Nested List Test');
module('Nested List Test', {
setup: function() {
// ensure that the nested pages are generated
stop();
$.testHelper.pageSequence([
function(){
$.mobile.changePage("#nested-list-test");
},

function() {
window.history.back();
},

start
]);
}
});

asyncTest( "Changes page to nested list test and enhances", function() {
$.testHelper.pageSequence([
Expand Down Expand Up @@ -150,8 +166,7 @@
});

test( "nested list title should use first text node, regardless of line breaks", function(){
// NOTE this is a super fragile reference to the nested page, any change to the list will break it
ok($(":jqmData(url='nested-list-test&ui-page=0-0') .ui-title").text() === "More animals", 'Text should be "More animals"');
same($(":jqmData(url='nested-list-test&ui-page=0-0') .ui-title").text(), "More animals", 'Text should be "More animals"');
});

asyncTest( "Multiple nested lists on a page with same labels", function() {
Expand Down

0 comments on commit ca1bab2

Please sign in to comment.