@@ -84,6 +84,10 @@ Rectangle {
8484 "name": "Art, header, summary - large",
8585 "layout": { "template": { "card-size": "large" }, "components": JSON.parse(fullMapping) }
8686 },
87+ {
88+ "name": "Art, header, summary - horizontal",
89+ "layout": { "template": { "card-layout": "horizontal" }, "components": JSON.parse(fullMapping) }
90+ },
8791 {
8892 "name": "Header title only",
8993 "layout": { "components": { "title": "title" } }
@@ -126,6 +130,7 @@ Rectangle {
126130 }
127131
128132 Card {
133+ id: card
129134 template: cardTool.template;
130135 components: cardTool.components;
131136 cardData: Helpers.mapData(dataArea.text, components, dataError)
@@ -244,12 +249,14 @@ Rectangle {
244249
245250 function test_card_size_data() {
246251 return [
247− { tag: "Medium", width: units.gu(18.5), height: undefined, index: 0 },
248− { tag: "Small", width: units.gu(12), height: undefined, index: 1 },
249− { tag: "Large", width: units.gu(38), height: undefined, index: 2 },
250− { tag: "Horizontal", width: units.gu(38), height: undefined, index: 3 },
252+ { tag: "Medium", width: units.gu(18.5), height: function() { return card.height }, index: 0 },
253+ { tag: "Small", width: units.gu(12), height: function() { return card.height }, index: 1 },
254+ { tag: "Large", width: units.gu(38), height: function() { return card.height }, index: 2 },
255+ { tag: "Horizontal", width: units.gu(38), height: function() { return card.height }, index: 3 },
256+ { tag: "OrganicGrid", width: undefined, height: undefined, index: 0, layout_index: 1},
251257 { tag: "Journal", width: undefined, height: units.gu(20), size: 20, index: 0, layout_index: 2 },
252258 { tag: "OversizedJournal", width: undefined, height: units.gu(18.5), size: 40, index: 0, layout_index: 2 },
259+ { tag: "VerticalJournal", width: units.gu(18.5), height: undefined, index: 0, layout_index: 3 },
253260 ]
254261 }
255262
@@ -265,11 +272,15 @@ Rectangle {
265272 }
266273
267274 if (data.hasOwnProperty("width")) {
268− tryCompare(cardTool, "cardWidth", data.width);
275+ if (typeof data.width === "function") {
276+ tryCompareFunction(function() { return cardTool.cardWidth === data.width() }, true);
277+ } else tryCompare(cardTool, "cardWidth", data.width);
269278 }
270279
271280 if (data.hasOwnProperty("height")) {
272− tryCompare(cardTool, "cardHeight", data.height);
281+ if (typeof data.height === "function") {
282+ tryCompareFunction(function() { return cardTool.cardHeight === data.height() }, true);
283+ } else tryCompare(cardTool, "cardHeight", data.height);
273284 }
274285 }
275286 }