@@ -70,6 +70,15 @@ Rectangle {
71 when: windowShown
71 when: windowShown
73+ function findScale(item) {
76+ scale = scale * item.scale;
73 function test_non_overlaid_header_layout() {
82 function test_non_overlaid_header_layout() {
74 // When the header is non overlaid
83 // When the header is non overlaid
75 // we grow down to accomodate the header but the y of the list is the same
84 // we grow down to accomodate the header but the y of the list is the same
@@ -83,5 +92,20 @@ Rectangle {
83 compare(listView.y, yPos);
92 compare(listView.y, yPos);
84 compare(cardCarousel.height, height + cTool.headerHeight);
93 compare(cardCarousel.height, height + cTool.headerHeight);
96+ function test_item_fits_view_data() {
98+ {tag: "overlaid", template: overlaidTemplate},
99+ {tag: "nonOverlaid", template: nonOverlaidTemplate},
103+ function test_item_fits_view(data) {
104+ cTool.template = data.template;
105+ var delegate0 = findChild(cardCarousel, "carouselDelegate0");
106+ tryCompareFunction(function() { return delegate0.item != null; }, true);
107+ var scale = findScale(delegate0.item);
108+ verify(delegate0.item.implicitHeight * scale < cardCarousel.height);