Permalink
Browse files

Controlgroup: Make sure items in a controlgroup all have the same height

  • Loading branch information...
1 parent 58c39a1 commit 1070ac73b6b306edb74914b11b6fbaaf6eb72117 @gabrielschulhof gabrielschulhof committed with jaspermdegroot May 1, 2014
Showing with 58 additions and 0 deletions.
  1. +6 −0 tests/css/controlgroup/controlgroup_core.js
  2. +52 −0 tests/css/controlgroup/index.html
@@ -0,0 +1,6 @@
+test( "Controlgroup buttons have the same height", function() {
+ deepEqual( $( "#content-notext" ).height(), $( "#content-text" ).height(),
+ "Content: Icon-only button has the same height as text-only button" );
+ deepEqual( $( "#footer-notext" ).height(), $( "#footer-text" ).height(),
+ "Footer: Icon-only button has the same height as text-only button" );
+});
@@ -0,0 +1,52 @@
+<!doctype html>
+
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>jQuery Mobile Controlgroup Test Suite</title>
+
+ <script src="../../../external/requirejs/require.js"></script>
+ <script src="../../../js/requirejs.config.js"></script>
+ <script src="../../../js/jquery.tag.inserter.js"></script>
+ <script src="../../jquery.setNameSpace.js"></script>
+ <script src="../../../tests/jquery.testHelper.js"></script>
+ <script src="../../../external/qunit/qunit.js"></script>
+ <script>
+ $.testHelper.asyncLoad([
+ ['widgets/page'],
+ [
+ "widgets/toolbar",
+ "widgets/controlgroup"
+ ],
+ [ "init" ],
+ [ "controlgroup_core.js" ]
+ ]);
+ </script>
+
+ <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
+ <link rel="stylesheet" href="../../../external/qunit/qunit.css"/>
+ <link rel="stylesheet" href="../../jqm-tests.css"/>
+
+ <script src="../../swarminject.js"></script>
+</head>
+<body>
+
+ <div id="qunit"></div>
+
+ <div data-nstest-role="page">
+ <div class="ui-content">
+ <div data-nstest-type="horizontal" data-nstest-role="controlgroup">
+ <a href="#" id="content-notext" class="ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-inline ui-shadow ui-corner-all">Delete</a>
+ <a href="#" id="content-text" class="ui-btn ui-btn-inline ui-corner-all ui-shadow">Text</a>
+ </div>
+ </div>
+ <div data-nstest-role="footer">
+ <div data-nstest-type="horizontal" data-nstest-role="controlgroup">
+ <a href="#" id="footer-notext" class="ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-inline ui-shadow ui-corner-all">Delete</a>
+ <a href="#" id="footer-text" class="ui-btn ui-btn-inline ui-corner-all ui-shadow">Text</a>
+ </div>
+ </div>
+ </div>
+
+</body>
+</html>

0 comments on commit 1070ac7

Please sign in to comment.