@@ -42,7 +42,7 @@ Rectangle {
43 PreviewTextSummary {
43 PreviewTextSummary {
44 id: previewTextSummary
44 id: previewTextSummary
45− anchors.fill: parent
45+ anchors { left: parent.left; right: parent.right }
46 widgetData: widgetDataComplete
46 widgetData: widgetDataComplete
@@ -51,6 +51,7 @@ Rectangle {
51 when: windowShown
51 when: windowShown
53 property var textLabel: findChild(previewTextSummary, "textLabel")
53 property var textLabel: findChild(previewTextSummary, "textLabel")
54+ property var titleLabel: findChild(previewTextSummary, "titleLabel")
55 function init() {
56 function init() {
56 verify(typeof textLabel === "object", "TextLabel object could not be found.")
57 verify(typeof textLabel === "object", "TextLabel object could not be found.")
@@ -61,8 +62,6 @@ Rectangle {
63 function test_optional_title() {
64 function test_optional_title() {
64− var titleLabel = findChild(previewTextSummary, "titleLabel")
66 // verify titleLabel is visible and textLabel is anchored below it
65 // verify titleLabel is visible and textLabel is anchored below it
67 compare(titleLabel.visible, true)
66 compare(titleLabel.visible, true)
68 tryCompare(textLabel, "y", titleLabel.height)
67 tryCompare(textLabel, "y", titleLabel.height)
@@ -96,6 +95,7 @@ Rectangle {
96 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
95 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
97 compare(seeMore.visible, false)
96 compare(seeMore.visible, false)
98 tryCompare(textLabel, "height", textLabel.contentHeight)
97 tryCompare(textLabel, "height", textLabel.contentHeight)
98+ tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height)