diff --git a/tests/unit/navigation/file.html b/tests/unit/navigation/file.html new file mode 100644 index 00000000..110f01f6 --- /dev/null +++ b/tests/unit/navigation/file.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel file ref no nest
+
+ + diff --git a/tests/unit/navigation/index.html b/tests/unit/navigation/index.html index 9fdba3f5..5e274e8f 100644 --- a/tests/unit/navigation/index.html +++ b/tests/unit/navigation/index.html @@ -16,8 +16,9 @@ - - + + + @@ -181,5 +182,13 @@ + +
+ go +
+ +
+ go +
diff --git a/tests/unit/navigation/navigation_paths.js b/tests/unit/navigation/navigation_paths.js new file mode 100644 index 00000000..cdb437bf --- /dev/null +++ b/tests/unit/navigation/navigation_paths.js @@ -0,0 +1,36 @@ +/* + * mobile navigation path unit tests + */ +(function($){ + module("jquery.mobile.navigation.js"); + + var testPageLoad = function(testPageSelector, expectedTextValue){ + expect( 1 ); + + $.testHelper.sequence([ + // open our test page + function(){ + $.testHelper.openPage(testPageSelector); + }, + + // navigate to the linked page + function(){ + $(".ui-page-active a").click(); + }, + + // verify that the page has changed and the expected text value is present + function(){ + same($(".ui-page-active .test-value").text(), expectedTextValue); + start(); + } + ], 800); + }; + + asyncTest( "document relative file reference no nesting", function(){ + testPageLoad("#doc-rel-file-ref-no-nest", "doc rel file ref no nest"); + }); + + asyncTest( "document relative file reference with nesting", function(){ + testPageLoad("#doc-rel-file-ref-nested", "doc rel file ref nested"); + }); +})(jQuery); \ No newline at end of file diff --git a/tests/unit/navigation/path-tests/file.html b/tests/unit/navigation/path-tests/file.html new file mode 100644 index 00000000..498cb199 --- /dev/null +++ b/tests/unit/navigation/path-tests/file.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel file ref nested
+
+ +