Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added a failing unit test for issue #3276 - support for data-role="di…

…alog"
  • Loading branch information...
commit 522543ef5db1c250bfc48349987a3e9e80129fd4 1 parent ec3e602
scottjehl authored
View
13 tests/unit/dialog/dialog_count.js
@@ -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 );
View
63 tests/unit/dialog/index-count.html
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.