Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 1070ac7

Browse files
Gabriel Schulhofjaspermdegroot
authored andcommitted
Controlgroup: Make sure items in a controlgroup all have the same height
1 parent 58c39a1 commit 1070ac7

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
test( "Controlgroup buttons have the same height", function() {
2+
deepEqual( $( "#content-notext" ).height(), $( "#content-text" ).height(),
3+
"Content: Icon-only button has the same height as text-only button" );
4+
deepEqual( $( "#footer-notext" ).height(), $( "#footer-text" ).height(),
5+
"Footer: Icon-only button has the same height as text-only button" );
6+
});

tests/css/controlgroup/index.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!doctype html>
2+
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8" />
6+
<title>jQuery Mobile Controlgroup Test Suite</title>
7+
8+
<script src="../../../external/requirejs/require.js"></script>
9+
<script src="../../../js/requirejs.config.js"></script>
10+
<script src="../../../js/jquery.tag.inserter.js"></script>
11+
<script src="../../jquery.setNameSpace.js"></script>
12+
<script src="../../../tests/jquery.testHelper.js"></script>
13+
<script src="../../../external/qunit/qunit.js"></script>
14+
<script>
15+
$.testHelper.asyncLoad([
16+
['widgets/page'],
17+
[
18+
"widgets/toolbar",
19+
"widgets/controlgroup"
20+
],
21+
[ "init" ],
22+
[ "controlgroup_core.js" ]
23+
]);
24+
</script>
25+
26+
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
27+
<link rel="stylesheet" href="../../../external/qunit/qunit.css"/>
28+
<link rel="stylesheet" href="../../jqm-tests.css"/>
29+
30+
<script src="../../swarminject.js"></script>
31+
</head>
32+
<body>
33+
34+
<div id="qunit"></div>
35+
36+
<div data-nstest-role="page">
37+
<div class="ui-content">
38+
<div data-nstest-type="horizontal" data-nstest-role="controlgroup">
39+
<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>
40+
<a href="#" id="content-text" class="ui-btn ui-btn-inline ui-corner-all ui-shadow">Text</a>
41+
</div>
42+
</div>
43+
<div data-nstest-role="footer">
44+
<div data-nstest-type="horizontal" data-nstest-role="controlgroup">
45+
<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>
46+
<a href="#" id="footer-text" class="ui-btn ui-btn-inline ui-corner-all ui-shadow">Text</a>
47+
</div>
48+
</div>
49+
</div>
50+
51+
</body>
52+
</html>

0 commit comments

Comments
 (0)