@@ -186,30 +186,14 @@ Rectangle {
187 when: windowShown
187 when: windowShown
189− property Item header: findChild(card, "cardHeader")
189+ property var headerRow: findChild(card, "outerRow")
190− property Item headerLoader: findChild(card, "cardHeaderLoader")
191− property Item title: findChild(header, "titleLabel")
192− property Item art: findChild(card, "artShape")
190+ property var art: findChild(card, "artShape")
193 property Item artImage: findChild(card, "artImage")
191 property Item artImage: findChild(card, "artImage")
194− property Item summary: findChild(card, "summaryLabel")
195− property Item background: findChild(card, "background")
196− property Item backgroundLoader: findChild(card, "backgroundLoader")
197− property Item backgroundImage: findChild(card, "backgroundImage")
199− function initTestCase() {
200− verify(typeof testCase.header === "object", "Couldn't find header object.");
201− verify(typeof testCase.art === "object", "Couldn't find art object.");
202− verify(typeof testCase.artImage === "object", "Couldn't find artImage object.");
203− verify(typeof testCase.summary === "object", "Couldn't find summary object.");
204− verify(typeof testCase.artImage === "object", "Couldn't find background object.");
205− verify(typeof testCase.summary === "object", "Couldn't find backgroundImage object.");
208 function cleanup() {
193 function cleanup() {
209 selector.selectedIndex = -1;
194 selector.selectedIndex = -1;
213 function test_header_binding_data() {
197 function test_header_binding_data() {
215 { tag: "Mascot", property: "mascot", value: Qt.resolvedUrl("artwork/avatar.png"), index: 0 },
199 { tag: "Mascot", property: "mascot", value: Qt.resolvedUrl("artwork/avatar.png"), index: 0 },
@@ -291,16 +275,17 @@ Rectangle {
291 { tag: "Medium", width: units.gu(18.5), fill: Image.PreserveAspectCrop, index: 0 },
275 { tag: "Medium", width: units.gu(18.5), fill: Image.PreserveAspectCrop, index: 0 },
292 { tag: "Small", width: units.gu(12), index: 1 },
276 { tag: "Small", width: units.gu(12), index: 1 },
293 { tag: "Large", width: units.gu(38), index: 2 },
277 { tag: "Large", width: units.gu(38), index: 2 },
294− { tag: "Wide", height: units.gu(19), size: "large", index: 3 },
278+ { tag: "Wide", height: units.gu(18.5) / 2, size: "large", index: 3 },
295− { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 },
279+ { tag: "Fit", height: units.gu(18.5), size: "large", width: units.gu(18.5) / 2, index: 4 },
296− { tag: "VerticalWidth", width: function() { return header.width }, index: 0 },
280+ { tag: "VerticalWidth", width: function() { return headerRow.width + units.gu(1) * 2 }, index: 0 },
297− { tag: "HorizontalHeight", height: function() { return header.height }, index: 5 },
281+ { tag: "HorizontalHeight", height: function() { return headerRow.height + units.gu(1) * 2 }, index: 5 },
298− { tag: "HorizontalWidth", width: function() { return headerLoader.x }, index: 5 },
282+ { tag: "HorizontalWidth", width: function() { return headerRow.x - units.gu(1) }, index: 5 },
302 function test_art_size(data) {
286 function test_art_size(data) {
303 selector.selectedIndex = data.index;
287 selector.selectedIndex = data.index;
288+ tryCompareFunction(function() { return art !== null }, true);
305 if (data.hasOwnProperty("size")) {
290 if (data.hasOwnProperty("size")) {
306 card.template['card-size'] = data.size;
291 card.template['card-size'] = data.size;
@@ -331,15 +316,16 @@ Rectangle {
332 function test_art_layout_data() {
317 function test_art_layout_data() {
334− { tag: "Vertical", left: function() { return 0 }, index: 0},
319+ { tag: "Vertical", left: function() { return units.gu(1); }, index: 0},
335− { tag: "Horizontal", left: function() { return art.width }, index: 5 },
320+ { tag: "Horizontal", left: function() { return art.width + units.gu(1); }, index: 5 },
339 function test_art_layout(data) {
324 function test_art_layout(data) {
340 selector.selectedIndex = data.index;
325 selector.selectedIndex = data.index;
326+ tryCompareFunction(function() { return art !== null }, true);
342− tryCompare(testCase.headerLoader, "x", data.left());
328+ tryCompare(headerRow, "x", data.left());
345 function test_header_layout_data() {
331 function test_header_layout_data() {