@@ -72,6 +72,22 @@ Rectangle {
72 "name": "Art, header - portrait",
72 "name": "Art, header - portrait",
73 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
73 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
76+ "name": "Title - vertical",
77+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title" } }
80+ "name": "Title - horizontal",
81+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title" } }
84+ "name": "Title, subtitle - vertical",
85+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "subtitle": "subtitle" } }
88+ "name": "Title, price - horizontal",
89+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "price": "price" } }
77 CardTool {
93 CardTool {
@@ -121,6 +137,7 @@ Rectangle {
121 height: cardTool.cardHeight || implicitHeight
137 height: cardTool.cardHeight || implicitHeight
123 clip: true
139 clip: true
140+ headerAlignment: cardTool.headerAlignment
125 Rectangle {
142 Rectangle {
126 anchors.fill: parent
143 anchors.fill: parent
@@ -302,5 +319,29 @@ Rectangle {
302 } else tryCompare(cardTool, "cardHeight", data.height);
319 } else tryCompare(cardTool, "cardHeight", data.height);
323+ function test_card_header_component_alignment_data() {
325+ { tag: "Title - vertical", component: "titleLabel", property: "headerAlignment",
326+ value: Text.AlignHCenter, index: 11, layout_index: 0 },
327+ { tag: "Title - horizontal", component: "titleLabel", property: "headerAlignment",
328+ value: Text.AlignLeft, 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},
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;
342+ if (data.hasOwnProperty("property")) {
343+ tryCompare(cardTool, data.property, data.value);