@@ -44,7 +44,6 @@ Rectangle {
44 when: windowShown
44 when: windowShown
46 property Item mascot: findChild(cardHeader, "mascotShape")
46 property Item mascot: findChild(cardHeader, "mascotShape")
47− property Item mascotImage: findChild(cardHeader, "mascotImage")
48 property Item titleLabel: findChild(cardHeader, "titleLabel")
47 property Item titleLabel: findChild(cardHeader, "titleLabel")
49 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
48 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
50 property Item prices: findChild(cardHeader, "prices")
49 property Item prices: findChild(cardHeader, "prices")
@@ -82,25 +81,6 @@ Rectangle {
82 tryCompare(testCase.mascot, "visible", data.visible);
81 tryCompare(testCase.mascot, "visible", data.visible);
85− function test_mascot_image_source_data() {
87− { tag: "Mascot source width", width: Math.max(mascot.width, mascot.height) },
88− { tag: "Mascot source height", height: Math.max(mascot.width, mascot.height) },
92− function test_mascot_image_source(data) {
93− cardHeader.mascot = Qt.resolvedUrl("artwork/avatar.png")
95− if (data.hasOwnProperty("width")) {
96− tryCompare(testCase.mascotImage.sourceSize, "width", data.width)
99− if (data.hasOwnProperty("height")) {
100− tryCompare(testCase.mascotImage.sourceSize, "height", data.height)
104 function test_labels_data() {
84 function test_labels_data() {
106 { tag: "Empty", visible: false },
86 { tag: "Empty", visible: false },
@@ -143,11 +123,6 @@ Rectangle {
143 { tag: "Column width", object: column, width: cardHeader.width - testCase.outerRow.spacing * 2 },
123 { tag: "Column width", object: column, width: cardHeader.width - testCase.outerRow.spacing * 2 },
144 { tag: "Column width", object: column, width: cardHeader.width - mascot.width - testCase.outerRow.spacing * 3, mascot: "artwork/avatar.png" },
124 { tag: "Column width", object: column, width: cardHeader.width - mascot.width - testCase.outerRow.spacing * 3, mascot: "artwork/avatar.png" },
145 { tag: "Header height", object: cardHeader, height: function() { return subtitleLabel.y + subtitleLabel.height + outerRow.spacing * 2 } },
125 { tag: "Header height", object: cardHeader, height: function() { return subtitleLabel.y + subtitleLabel.height + outerRow.spacing * 2 } },
146− { tag: "Mascot width", object: mascot,
147− "mascot": Qt.resolvedUrl("artwork/avatar.png"), width: units.gu(6), },
148− { tag: "Mascot height", object: mascot,
149− // mascot (icon) aspect-ratio is 8:7.5
150− "mascot": Qt.resolvedUrl("artwork/avatar.png"), height: units.gu(6)*7.5/8.0 },
@@ -161,11 +136,7 @@ Rectangle {
163 if (data.hasOwnProperty("height")) {
138 if (data.hasOwnProperty("height")) {
164− if (typeof data.height === "function") {
165− tryCompareFunction(function() { return data.object.height === data.height() }, true)
139+ tryCompareFunction(function() { return data.object.height === data.height() }, true);
167− tryCompare(data.object, "height", data.height)