@@ -96,6 +96,11 @@ Rectangle {
96 "layout": { "template": { "card-background": Qt.resolvedUrl("artwork/checkers.png") },
96 "layout": { "template": { "card-background": Qt.resolvedUrl("artwork/checkers.png") },
97 "components": JSON.parse(Helpers.fullMapping) }
97 "components": JSON.parse(Helpers.fullMapping) }
100+ "name": "Art, title - overlaid",
101+ "layout": { "template": { "overlay": true },
102+ "components": { "art": "art", "summary": "summary" } }
101 CardTool {
106 CardTool {
@@ -505,5 +510,44 @@ Rectangle {
505 mouseRelease(card, card.width/2, card.height/2);
510 mouseRelease(card, card.width/2, card.height/2);
506 compare(touchdown.visible, false);
511 compare(touchdown.visible, false);
514+ function test_apaddings_data() {
516+ { tag: "Art and summary", index: 0 },
517+ { tag: "No Summary", index: 6 },
518+ { tag: "No header", index: 7 },
519+ { tag: "Header only", index: 8 },
520+ { tag: "Art, header, summary - overlaid", index: 9 },
521+ { tag: "Art, title - overlaid", index: 13 },
525+ function test_apaddings(data) {
526+ selector.selectedIndex = data.index;
527+ waitForRendering(card);
529+ if (title) var titleToCard = title.mapToItem(card, 0, 0, title.width, title.height);
533+ var mascotToCard = mascotImage.mapToItem(card, 0, 0, mascotImage.width, mascotImage.height);
534+ verify(mascotToCard.x === units.gu(1));
536+ verify((titleToCard.x - mascotToCard.x - mascotToCard.width) === units.gu(1));
539+ verify(titleToCard.x === units.gu(1));
543+ var emblemIcon = findChild(card, "emblemIcon");
545+ var emblemToCard = emblemIcon.mapToItem(card, 0, 0, emblemIcon.width, emblemIcon.height);
546+ verify((card.width - emblemToCard.x - emblemToCard.width) === units.gu(1));
548+ verify((card.width - titleToCard.x - titleToCard.width) === units.gu(1));