Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/unit/listview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,17 @@ <h1>Basic List View</h1>
</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>
27 changes: 26 additions & 1 deletion tests/unit/listview/listview_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,37 @@

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();
}
]);
});

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);