on xenial help sign in
fix flaky tests
commitf29d912ffe6092062180acfa415545ba8f811968 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateTue 8 Nov 2016, 10:09 (10 years ago) parentc386158
2 files changed+4−3
qml/Dash/Previews/PreviewTextSummary.qml+1 tests/qmltests/Dash/Previews/tst_Preview.qml+3−3
qml/Dash/Previews/PreviewTextSummary.qml+1
@@ -71,6 +71,7 @@ PreviewWidget {
7171 wrapMode: Text.Wrap
7272
7373 Behavior on height {
74+ enabled: textLabel.lineCount > textLabel.maximumCollapsedLineCount
7475 UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
7576 }
7677 }
tests/qmltests/Dash/Previews/tst_Preview.qml+3−3
@@ -87,7 +87,7 @@ Rectangle {
8787
8888 tryCompareFunction(function () {
8989 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
9191 }, true);
9292 }
9393
@@ -102,7 +102,7 @@ Rectangle {
102102
103103 tryCompareFunction(function () {
104104 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
106106 }, true);
107107 }
108108
@@ -125,7 +125,7 @@ Rectangle {
125125 // Make sure the combo bottom is on the viewport
126126 tryCompareFunction(function () {
127127 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
129129 }, true);
130130 }
131131 }