mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
added test for prefetched dialog pages
This commit is contained in:
parent
61f68189d5
commit
475069becd
3 changed files with 38 additions and 0 deletions
|
|
@ -277,5 +277,14 @@
|
|||
<div id="inject-links-page" data-nstest-role="page">
|
||||
<a href="#injected-test-page" id="static-injected-test-page-link">static link</a>
|
||||
</div>
|
||||
|
||||
<div id="prefetched-dialog-page" data-nstest-role="page">
|
||||
<a href="prefetched-dialog.html"
|
||||
id="prefetched-dialog-link"
|
||||
data-nstest-role="prefetch"
|
||||
data-nstest-rel="dialog">
|
||||
static link
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -930,6 +930,25 @@
|
|||
]);
|
||||
});
|
||||
|
||||
asyncTest( "prefetched links with data rel dialog result in a dialog", function() {
|
||||
$.testHelper.pageSequence([
|
||||
// open our test page
|
||||
function(){
|
||||
// Navigate to any page except the first page of the application.
|
||||
$.testHelper.openPage("#prefetched-dialog-page");
|
||||
},
|
||||
|
||||
function() {
|
||||
$("#prefetched-dialog-link").click();
|
||||
},
|
||||
|
||||
function() {
|
||||
ok( $.mobile.activePage.is(".ui-dialog"), "prefetched page is rendered as a dialog" );
|
||||
start();
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
asyncTest( "application url with dialogHashKey loads application's first page", function(){
|
||||
$.testHelper.pageSequence([
|
||||
|
|
|
|||
10
tests/unit/navigation/prefetched-dialog.html
Normal file
10
tests/unit/navigation/prefetched-dialog.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Title Tag</title>
|
||||
</head>
|
||||
<body>
|
||||
<div data-nstest-role="page" id="prefetched-dialog"></div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue