This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a failing unit test for issue #3276 - support for data-role="di…
…alog"
- Loading branch information
scottjehl
committed
Feb 23, 2012
1 parent
ec3e602
commit 522543e
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* mobile dialog unit tests | ||
*/ | ||
(function($) { | ||
|
||
test( "When the page loads, any dialogs in the page should be initialized", function() { | ||
expect( 1 ); | ||
|
||
ok( $( "#foo-dialog" ).is( ".ui-dialog-page" ), "When a dialog is the first element in a page, it is created as a dialog widget." ); | ||
}); | ||
|
||
|
||
})( jQuery ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>jQuery Mobile Dialog Test Suite</title> | ||
<script src="../../../external/requirejs/require.js"></script> | ||
<script src="../../../js/jquery.tag.inserter.js"></script> | ||
<script> | ||
$(document).bind('mobileinit',function(){ | ||
// Expect content to inherit this theme when not explicitly set | ||
$.mobile.page.prototype.options.contentTheme = "d"; | ||
}); | ||
</script> | ||
<script src="../jquery.setNameSpace.js"></script> | ||
<script src="../../jquery.testHelper.js"></script> | ||
<script src="../../../external/qunit.js"></script> | ||
<script> | ||
$.testHelper.asyncLoad([ | ||
[ | ||
"jquery.mobile.dialog", | ||
"jquery.mobile.page", | ||
"jquery.mobile.page.sections" | ||
], | ||
[ "jquery.mobile.init" ], | ||
[ | ||
"dialog_count.js" | ||
] | ||
]); | ||
</script> | ||
|
||
|
||
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/> | ||
<link rel="stylesheet" href="../../../external/qunit.css"/> | ||
|
||
<script src="../swarminject.js"></script> | ||
</head> | ||
<body> | ||
|
||
<h1 id="qunit-header">jQuery Mobile Dialog Test Suite</h1> | ||
<h2 id="qunit-banner"></h2> | ||
<h2 id="qunit-userAgent"></h2> | ||
<ol id="qunit-tests"> | ||
</ol> | ||
|
||
<div id="qunit-fixture"> | ||
|
||
<div id="foo-dialog" data-nstest-role="dialog" data-nstest-theme="b"> | ||
<div data-nstest-role="header"> | ||
<h1>Dialog</h1> | ||
</div> | ||
<div data-nstest-role="content" > | ||
|
||
</div> | ||
<div data-nstest-role="footer"> | ||
footer | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> |