Skip to content

Commit af3877b

Browse files
committed
tests updated to accomodate relative hash references
1 parent d827be3 commit af3877b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

tests/unit/navigation/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ <h2 id="qunit-userAgent"></h2>
2828
<ol id="qunit-tests">
2929
</ol>
3030

31+
<div id="harmless-default-page" data-nstest-role="page">
32+
</div>
33+
3134
<div id="foo" data-nstest-role="page" class="foo-class">
3235
<a href="#bar" data-nstest-transition="flip"></a>
3336
</div>

tests/unit/navigation/navigation_paths.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
expect( 2 );
77

88
$.testHelper.pageSequence([
9+
function(){
10+
// reset before each test, all tests expect original page
11+
// for relative urls
12+
$.testHelper.openPage("#/tests/unit/navigation/");
13+
},
14+
915
// open our test page
1016
function(){
1117
$.testHelper.openPage("#pathing-tests");
@@ -25,10 +31,6 @@
2531
// verify that the page has changed and the expected text value is present
2632
function(){
2733
same($.mobile.activePage.find(".test-value").text(), expectedTextValue);
28-
$.testHelper.openPage("#pathing-tests-reset");
29-
},
30-
31-
function(){
3234
start();
3335
}
3436
]);
@@ -61,7 +63,7 @@
6163
//Doc relative tests
6264
module("document relative paths");
6365

64-
asyncTest( "file reference no nesting", function(){
66+
asyncTest( "file reference no nesting", function(){
6567
testPageLoad("#doc-rel-test-one", "doc rel test one");
6668
});
6769

0 commit comments

Comments
 (0)