@@ -31,6 +31,8 @@ Rectangle {
3131 property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
3232 property Item prices: findChild(cardHeader, "prices")
3333 property Item oldPriceLabel: findChild(cardHeader, "oldPriceLabel")
34+ property Item outerRow: findChild(cardHeader, "outerRow")
35+ property Item column: findChild(cardHeader, "column")
3436
3537 function initTestCase() {
3638 verify(testCase.mascot !== undefined, "Couldn't find mascot object.");
@@ -101,5 +103,22 @@ Rectangle {
101103 compare(testCase.oldPriceLabel.horizontalAlignment, data.oldAlign, "Old price label is aligned wrong.")
102104 }
103105 }
106+
107+ function test_dimensions_data() {
108+ return [
109+ { tag: "Column width", object: column, width: cardHeader.width - testCase.outerRow.spacing * 2 },
110+ { tag: "Column width", object: column, width: cardHeader.width - mascot.width - testCase.outerRow.spacing * 3, mascot: "artwork/avatar.png" }
111+ ]
112+ }
113+
114+ function test_dimensions(data) {
115+ if (data.hasOwnProperty("mascot")) {
116+ cardHeader.mascot = data.mascot;
117+ }
118+
119+ if (data.hasOwnProperty("width")) {
120+ tryCompare(data.object, "width", data.width);
121+ }
122+ }
104123 }
105124}