diff --git a/tests/unit/navigation/index.html b/tests/unit/navigation/index.html index 5e274e8f..7d979e3d 100644 --- a/tests/unit/navigation/index.html +++ b/tests/unit/navigation/index.html @@ -183,12 +183,14 @@ go -
- go +
+ go + go + go + go + go + go
-
- go -
diff --git a/tests/unit/navigation/navigation_paths.js b/tests/unit/navigation/navigation_paths.js index cdb437bf..2d4bfd18 100644 --- a/tests/unit/navigation/navigation_paths.js +++ b/tests/unit/navigation/navigation_paths.js @@ -2,20 +2,18 @@ * mobile navigation path unit tests */ (function($){ - module("jquery.mobile.navigation.js"); - - var testPageLoad = function(testPageSelector, expectedTextValue){ + var testPageLoad = function(testPageAnchorSelector, expectedTextValue){ expect( 1 ); $.testHelper.sequence([ // open our test page function(){ - $.testHelper.openPage(testPageSelector); + $.testHelper.openPage("#pathing-tests"); }, // navigate to the linked page function(){ - $(".ui-page-active a").click(); + $( ".ui-page-active a" + testPageAnchorSelector ).click(); }, // verify that the page has changed and the expected text value is present @@ -26,11 +24,29 @@ ], 800); }; - asyncTest( "document relative file reference no nesting", function(){ + module("document relative paths"); + + asyncTest( "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(){ + asyncTest( "file reference with nesting", function(){ testPageLoad("#doc-rel-file-ref-nested", "doc rel file ref nested"); }); + + asyncTest( "file reference with double nesting", function(){ + testPageLoad("#doc-rel-file-ref-double-nested", "doc rel file ref double nested"); + }); + + asyncTest( "dir refrence with nesting", function(){ + testPageLoad("#doc-rel-dir-ref-nested-dir", "doc rel dir ref nested dir"); + }); + + asyncTest( "file refrence with parent dir", function(){ + testPageLoad("#doc-rel-file-ref-parent", "doc rel dir ref parent"); + }); + + asyncTest( "dir refrence with parent dir", function(){ + testPageLoad("#doc-rel-dir-ref-parent", "doc rel dir ref parent"); + }); })(jQuery); \ No newline at end of file diff --git a/tests/unit/navigation/path-tests/parent-ref.html b/tests/unit/navigation/path-tests/parent-ref.html new file mode 100644 index 00000000..3625d638 --- /dev/null +++ b/tests/unit/navigation/path-tests/parent-ref.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel dir ref parent
+
+ + diff --git a/tests/unit/navigation/path-tests/parent/index.html b/tests/unit/navigation/path-tests/parent/index.html new file mode 100644 index 00000000..3625d638 --- /dev/null +++ b/tests/unit/navigation/path-tests/parent/index.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel dir ref parent
+
+ + diff --git a/tests/unit/navigation/path-tests/sub-dir/file.html b/tests/unit/navigation/path-tests/sub-dir/file.html new file mode 100644 index 00000000..daddd2c8 --- /dev/null +++ b/tests/unit/navigation/path-tests/sub-dir/file.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel file ref double nested
+
+ + diff --git a/tests/unit/navigation/path-tests/sub-dir/index.html b/tests/unit/navigation/path-tests/sub-dir/index.html new file mode 100644 index 00000000..95e07724 --- /dev/null +++ b/tests/unit/navigation/path-tests/sub-dir/index.html @@ -0,0 +1,11 @@ + + + + + + +
+
doc rel dir ref nested dir
+
+ +