@@ -73,8 +73,8 @@ Rectangle {
7373 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
7474 },
7575 {
76− "name": "Title - vertical",
77− "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title" } }
76+ "name": "Title - centered",
77+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": { "field": "title", "align": "center" } } }
7878 },
7979 {
8080 "name": "Title - horizontal",
@@ -85,8 +85,12 @@ 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" } }
90+ },
91+ {
92+ "name": "Title, attributes - centered",
93+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "attributes": "attributes" } }
9094 },
9195 ]
9296
@@ -100,6 +104,7 @@ Rectangle {
100104 }
101105
102106 Column {
107+ id: column
103108 width: units.gu(38)
104109 anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
105110
@@ -111,7 +116,7 @@ Rectangle {
111116 ]
112117
113118 delegate: Row {
114− anchors { left: parent.left; right: parent.right; margins: units.gu(3) }
119+ anchors { left: column.left; right: column.right; margins: units.gu(3) }
115120
116121 Label {
117122 height: units.gu(5)
@@ -315,27 +320,24 @@ Rectangle {
315320 }
316321 }
317322
318− function test_card_header_component_alignment_data() {
323+ function test_card_title_alignment_data() {
319324 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− ]
325+ { tag: "Title - centered", value: Text.AlignHCenter, index: 11, layout_index: 0 },
326+ { tag: "Title - horizontal", value: Text.AlignLeft, index: 12, layout_index: 0},
327+ { tag: "Title, subtitle - vertical", value: Text.AlignLeft, index: 13, layout_index: 0},
328+ { tag: "Title, attribute - horizontal", value: Text.AlignLeft, index: 14, layout_index: 0},
329+ { tag: "Title, attribute - centered", value: Text.AlignLeft, index: 15, layout_index: 0},
330+ ];
329331 }
330332
331− function test_card_header_component_alignment(data) {
333+ function test_card_title_alignment(data) {
332334 selector.selectedIndex = data.index;
333335 if (data.hasOwnProperty("layout_index")) {
334336 layoutSelector.selectedIndex = data.layout_index;
335337 }
336338
337339 if (data.hasOwnProperty("property")) {
338− tryCompare(cardTool, data.property, data.value);
340+ tryCompare(cardTool, "titleAlignment", data.value);
339341 }
340342 }
341343