on xenial help sign in
Fix PreviewTextSummary tests
c386158Andrea Cimitan
tests/qmltests/Dash/Previews/tst_PreviewTextSummary.qml+2−2
@@ -64,7 +64,7 @@ Rectangle {
64 function test_optional_title() {
64 function test_optional_title() {
65 // verify titleLabel is visible and textLabel is anchored below it
65 // verify titleLabel is visible and textLabel is anchored below it
66 compare(titleLabel.visible, true)
66 compare(titleLabel.visible, true)
67− tryCompare(textLabel, "y", titleLabel.height)
67+ tryCompare(textLabel, "y", titleLabel.height + textLabel.anchors.topMargin)
68
68
69 // verify titleLabel disappears and textLabel moves up
69 // verify titleLabel disappears and textLabel moves up
70 previewTextSummary.widgetData = widgetDataNoTitle
70 previewTextSummary.widgetData = widgetDataNoTitle
@@ -81,7 +81,7 @@ Rectangle {
81 previewTextSummary.widgetData = widgetDataShortText
81 previewTextSummary.widgetData = widgetDataShortText
82 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
82 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
83 tryCompare(textLabel, "height", textLabel.contentHeight)
83 tryCompare(textLabel, "height", textLabel.contentHeight)
84− tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height)
84+ tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height + textLabel.anchors.topMargin)
85 }
85 }
86 }
86 }
87}
87}