@@ -72,6 +72,22 @@ Rectangle {
7272 "name": "Art, header - portrait",
7373 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
7474 },
75+ {
76+ "name": "Title - vertical",
77+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title" } }
78+ },
79+ {
80+ "name": "Title - horizontal",
81+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title" } }
82+ },
83+ {
84+ "name": "Title, subtitle - vertical",
85+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "subtitle": "subtitle" } }
86+ },
87+ {
88+ "name": "Title, price - horizontal",
89+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "price": "price" } }
90+ },
7591 ]
7692
7793 CardTool {
@@ -121,6 +137,7 @@ Rectangle {
121137 height: cardTool.cardHeight || implicitHeight
122138
123139 clip: true
140+ headerAlignment: cardTool.headerAlignment
124141
125142 Rectangle {
126143 anchors.fill: parent
@@ -302,5 +319,29 @@ Rectangle {
302319 } else tryCompare(cardTool, "cardHeight", data.height);
303320 }
304321 }
322+
323+ function test_card_header_component_alignment_data() {
324+ return [
325+ { tag: "Title - vertical", component: "titleLabel", property: "headerAlignment",
326+ value: Text.AlignLeft, index: 11, layout_index: 0 },
327+ { tag: "Title - horizontal", component: "titleLabel", property: "headerAlignment",
328+ value: Text.AlignHCenter, index: 12, layout_index: 0},
329+ { tag: "Title, subtitle - vertical", component: "titleLabel", property: "headerAlignment",
330+ value: Text.AlignLeft, index: 13, layout_index: 0},
331+ { tag: "Title, price - horizontal", component: "titleLabel", property: "headerAlignment",
332+ value: Text.AlignLeft, index: 14, layout_index: 0},
333+ ]
334+ }
335+
336+ function test_card_header_component_alignment(data) {
337+ selector.selectedIndex = data.index;
338+ if (data.hasOwnProperty("layout_index")) {
339+ layoutSelector.selectedIndex = data.layout_index;
340+ }
341+
342+ if (data.hasOwnProperty("property")) {
343+ tryCompare(cardTool, data.property, data.value);
344+ }
345+ }
305346 }
306347}