Permalink
Browse files

completed doc relative tests

  • Loading branch information...
johnbender committed Apr 28, 2011
1 parent 84c1cfb commit 9b885874266f45910564f3f713e2d80b28ff990a
@@ -183,12 +183,14 @@ <h1>Dialog</h1>
<a href="dialog-param-test/dialog-param.html">go</a>
</div>
<div data-nstest-role="page" id="doc-rel-file-ref-no-nest">
<a href="file.html">go</a>
<div data-nstest-role="page" id="pathing-tests">
<a href="file.html" id="doc-rel-file-ref-no-nest">go</a>
<a href="path-tests/file.html" id="doc-rel-file-ref-nested">go</a>
<a href="path-tests/sub-dir/file.html" id="doc-rel-file-ref-double-nested">go</a>
<a href="path-tests/sub-dir/" id="doc-rel-dir-ref-nested-dir">go</a>
<a href="../../unit/navigation/path-tests/parent-ref.html" id="doc-rel-file-ref-parent">go</a>
<a href="../../unit/navigation/path-tests/parent/" id="doc-rel-dir-ref-parent">go</a>
</div>
<div data-nstest-role="page" id="doc-rel-file-ref-nested">
<a href="path-tests/file.html">go</a>
</div>
</body>
</html>
@@ -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);
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div data-nstest-role="page">
<div class="test-value">doc rel dir ref parent</div>
</div>
</body>
</html>
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div data-nstest-role="page">
<div class="test-value">doc rel dir ref parent</div>
</div>
</body>
</html>
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div data-nstest-role="page">
<div class="test-value">doc rel file ref double nested</div>
</div>
</body>
</html>
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div data-nstest-role="page">
<div class="test-value">doc rel dir ref nested dir</div>
</div>
</body>
</html>

0 comments on commit 9b88587

Please sign in to comment.