Skip to content

Commit 4703fe0

Browse files
author
scottjehl
committed
Merge branch 'master' of https://github.com/wietsevenema/jquery-mobile into wietsevenema-master
2 parents fdde24b + dd2bdcd commit 4703fe0

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

tests/unit/listview/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,17 @@ <h1>Basic List View</h1>
261261
</div>
262262
</div>
263263

264+
<!-- Rounded corners inset list with variable items -->
265+
<div data-nstest-role="page" id='corner-rounded-test'>
266+
<div data-nstest-role="header" data-nstest-position="inline">
267+
<h1>Basic List View</h1>
268+
</div>
269+
<div data-nstest-role="content">
270+
<ul data-nstest-role="listview" data-nstest-inset="true">
271+
</ul>
272+
</div>
273+
</div>
274+
275+
264276
</body>
265277
</html>

tests/unit/listview/listview_core.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,37 @@
453453

454454
ul.find("li").last().remove();
455455
equal(ul.find("li").length, 2, "There should be only 2 list items left");
456-
456+
457457
ul.listview('refresh');
458458
ok(ul.find("li").last().hasClass("ui-corner-bottom"), "Last list item should have class ui-corner-bottom");
459459
start();
460460
}
461461
]);
462462
});
463463

464+
module("Rounded corners");
465+
466+
asyncTest("Top and bottom corners rounded in inset list", 10, function() {
467+
$.testHelper.pageSequence([
468+
function() {
469+
$.testHelper.openPage("#corner-rounded-test");
470+
},
471+
472+
function() {
473+
var ul = $('#corner-rounded-test ul');
474+
475+
for( var t = 0; t<5; t++){
476+
ul.append("<li>Item " + t + "</li>");
477+
ul.listview('refresh');
478+
ok(ul.find("li").first().hasClass("ui-corner-top"), "First list item should have class ui-corner-top in list with " + ul.find("li").length + " item(s)");
479+
ok(ul.find("li").last().hasClass("ui-corner-bottom"), "Last list item should have class ui-corner-bottom in list with " + ul.find("li").length + " item(s)");
480+
}
481+
482+
start();
483+
}
484+
]);
485+
});
486+
487+
488+
464489
})(jQuery);

0 commit comments

Comments
 (0)