added failing test for inset listview issue with top-corner

This commit is contained in:
Wietse Venema 2011-06-30 11:11:52 +02:00
parent 2b51355656
commit dd2bdcd606
2 changed files with 38 additions and 1 deletions

View file

@ -261,5 +261,17 @@
</div>
</div>
<!-- Rounded corners inset list with variable items -->
<div data-nstest-role="page" id='corner-rounded-test'>
<div data-nstest-role="header" data-nstest-position="inline">
<h1>Basic List View</h1>
</div>
<div data-nstest-role="content">
<ul data-nstest-role="listview" data-nstest-inset="true">
</ul>
</div>
</div>
</body>
</html>

View file

@ -453,7 +453,7 @@
ul.find("li").last().remove();
equal(ul.find("li").length, 2, "There should be only 2 list items left");
ul.listview('refresh');
ok(ul.find("li").last().hasClass("ui-corner-bottom"), "Last list item should have class ui-corner-bottom");
start();
@ -461,4 +461,29 @@
]);
});
module("Rounded corners");
asyncTest("Top and bottom corners rounded in inset list", 10, function() {
$.testHelper.pageSequence([
function() {
$.testHelper.openPage("#corner-rounded-test");
},
function() {
var ul = $('#corner-rounded-test ul');
for( var t = 0; t<5; t++){
ul.append("<li>Item " + t + "</li>");
ul.listview('refresh');
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)");
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)");
}
start();
}
]);
});
})(jQuery);