mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-22 21:25:48 +00:00
completed doc relative tests
This commit is contained in:
parent
84c1cfbcd8
commit
9b88587426
6 changed files with 74 additions and 12 deletions
|
|
@ -183,12 +183,14 @@
|
|||
<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);
|
||||
11
tests/unit/navigation/path-tests/parent-ref.html
Normal file
11
tests/unit/navigation/path-tests/parent-ref.html
Normal file
|
|
@ -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>
|
||||
11
tests/unit/navigation/path-tests/parent/index.html
Normal file
11
tests/unit/navigation/path-tests/parent/index.html
Normal file
|
|
@ -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>
|
||||
11
tests/unit/navigation/path-tests/sub-dir/file.html
Normal file
11
tests/unit/navigation/path-tests/sub-dir/file.html
Normal file
|
|
@ -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>
|
||||
11
tests/unit/navigation/path-tests/sub-dir/index.html
Normal file
11
tests/unit/navigation/path-tests/sub-dir/index.html
Normal file
|
|
@ -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>
|
||||
Loading…
Reference in a new issue