on xenial help sign in
fix flaky tests
f29d912Andrea Cimitan
qml/Dash/Previews/PreviewTextSummary.qml+1
@@ -71,6 +71,7 @@ PreviewWidget {
71 wrapMode: Text.Wrap
71 wrapMode: Text.Wrap
72
72
73 Behavior on height {
73 Behavior on height {
74+ enabled: textLabel.lineCount > textLabel.maximumCollapsedLineCount
74 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
75 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
75 }
76 }
76 }
77 }
tests/qmltests/Dash/Previews/tst_Preview.qml+3−3
@@ -87,7 +87,7 @@ Rectangle {
87
87
88 tryCompareFunction(function () {
88 tryCompareFunction(function () {
89 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
89 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
90− return bottomLeft.y <= preview.height
90+ return bottomLeft.y <= preview.height + 1 // FIXME the +1 is to workaround https://bugreports.qt.io/browse/QTBUG-56961
91 }, true);
91 }, true);
92 }
92 }
93
93
@@ -102,7 +102,7 @@ Rectangle {
102
102
103 tryCompareFunction(function () {
103 tryCompareFunction(function () {
104 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
104 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
105− return bottomLeft.y <= preview.height
105+ return bottomLeft.y <= preview.height + 1 // FIXME the +1 is to workaround https://bugreports.qt.io/browse/QTBUG-56961
106 }, true);
106 }, true);
107 }
107 }
108
108
@@ -125,7 +125,7 @@ Rectangle {
125 // Make sure the combo bottom is on the viewport
125 // Make sure the combo bottom is on the viewport
126 tryCompareFunction(function () {
126 tryCompareFunction(function () {
127 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
127 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
128− return bottomLeft.y <= preview.height
128+ return bottomLeft.y <= preview.height + 1 // FIXME the +1 is to workaround https://bugreports.qt.io/browse/QTBUG-56961
129 }, true);
129 }, true);
130 }
130 }
131 }
131 }