diff --git a/tests/unit/listview/index.html b/tests/unit/listview/index.html index b6e900da..8e409cc3 100644 --- a/tests/unit/listview/index.html +++ b/tests/unit/listview/index.html @@ -261,5 +261,17 @@ + +
+
+

Basic List View

+
+
+ +
+
+ + diff --git a/tests/unit/listview/listview_core.js b/tests/unit/listview/listview_core.js index bb1612a3..5b34a2e5 100644 --- a/tests/unit/listview/listview_core.js +++ b/tests/unit/listview/listview_core.js @@ -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("
  • Item " + t + "
  • "); + 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);