@@ -85,8 +85,8 @@ Rectangle {
8585 "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "subtitle": "subtitle" } }
8686 },
8787 {
88− "name": "Title, price - horizontal",
89− "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "price": "price" } }
88+ "name": "Title, attributes - horizontal",
89+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "attributes": "attributes" } }
9090 },
9191 ]
9292
@@ -100,6 +100,7 @@ Rectangle {
100100 }
101101
102102 Column {
103+ id: column
103104 width: units.gu(38)
104105 anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
105106
@@ -111,7 +112,7 @@ Rectangle {
111112 ]
112113
113114 delegate: Row {
114− anchors { left: parent.left; right: parent.right; margins: units.gu(3) }
115+ anchors { left: column.left; right: column.right; margins: units.gu(3) }
115116
116117 Label {
117118 height: units.gu(5)
@@ -315,28 +316,35 @@ Rectangle {
315316 }
316317 }
317318
318− function test_card_header_component_alignment_data() {
319+ function test_card_title_alignment_data() {
319320 return [
320− { tag: "Title - vertical", component: "titleLabel", property: "headerAlignment",
321− value: Text.AlignHCenter, index: 11, layout_index: 0 },
322− { tag: "Title - horizontal", component: "titleLabel", property: "headerAlignment",
323− value: Text.AlignLeft, index: 12, layout_index: 0},
324− { tag: "Title, subtitle - vertical", component: "titleLabel", property: "headerAlignment",
325− value: Text.AlignLeft, index: 13, layout_index: 0},
326− { tag: "Title, price - horizontal", component: "titleLabel", property: "headerAlignment",
327− value: Text.AlignLeft, index: 14, layout_index: 0},
328− ]
321+ { tag: "Art, header, summary", value: Text.AlignLeft, index: 0 },
322+ { tag: "Header, summary", value: Text.AlignLeft, index: 1 },
323+ { tag: "Art, header", value: Text.AlignLeft, index: 2 },
324+ { tag: "Header only", value: Text.AlignLeft, index: 3 },
325+ { tag: "Header title only", value: Text.AlignHCenter, index: 4 },
326+ { tag: "Header title and subtitle", value: Text.AlignLeft, index: 5 },
327+ { tag: "Header title and mascot", value: Text.AlignLeft, index: 6 },
328+ { tag: "Art, header, summary - small", value: Text.AlignLeft, index: 7 },
329+ { tag: "Art, header, summary - large", value: Text.AlignLeft, index: 8 },
330+ { tag: "Art, header, summary - horizontal", value: Text.AlignLeft, index: 9 },
331+ { tag: "Art, header - portrait", value: Text.AlignLeft, index: 10 },
332+ { tag: "Title - vertical", value: Text.AlignHCenter, index: 11 },
333+ { tag: "Title - horizontal", value: Text.AlignLeft, index: 12 },
334+ { tag: "Title, subtitle - vertical", value: Text.AlignLeft, index: 13 },
335+ { tag: "Title, attributes - horizontal", value: Text.AlignLeft, index: 14 },
336+ ];
329337 }
330338
331− function test_card_header_component_alignment(data) {
339+ function test_card_title_alignment(data) {
332340 selector.selectedIndex = data.index;
333− if (data.hasOwnProperty("layout_index")) {
334− layoutSelector.selectedIndex = data.layout_index;
335− }
336341
337− if (data.hasOwnProperty("property")) {
338− tryCompare(cardTool, data.property, data.value);
339− }
342+ tryCompare(cardTool, "titleAlignment", Text.AlignLeft);
343+
344+ cardTool.components['title'] = { "field": "title", "align": "center" };
345+ cardTool.componentsChanged();
346+
347+ tryCompare(cardTool, "titleAlignment", data.value);
340348 }
341349
342350 function test_categoryLayout_data() {