on xenial help sign in
Fixing tests
43285a8Diego Sarmentero
Dash/DashPreview.qml+1
@@ -129,6 +129,7 @@ Rectangle {
129
129
130 Flickable {
130 Flickable {
131 id: leftFlickable
131 id: leftFlickable
132+ objectName: "leftFlickable"
132 anchors.top: parent.top
133 anchors.top: parent.top
133 anchors.bottom: parent.bottom
134 anchors.bottom: parent.bottom
134 width: root.narrowMode ? contentRow.width : contentRow.width * root.previewWidthRatio
135 width: root.narrowMode ? contentRow.width : contentRow.width * root.previewWidthRatio
tests/qmltests/Dash/tst_DashPreview.qml+11
@@ -151,5 +151,16 @@ Item {
151 // reset to false in case any other test wants to use it
151 // reset to false in case any other test wants to use it
152 root.helper = false
152 root.helper = false
153 }
153 }
154+
155+ function test_keyboard_present() {
156+ var flick = findChild(preview, "leftFlickable");
157+ var column = findChild(preview, "leftColumn");
158+
159+ compare(flick.contentHeight, column.height, "Column and Flickable area don't match");
160+ var defaultValue = flick.contentHeight;
161+ // Simulate that the keyboard is visible
162+ preview.keyboardSize = 500;
163+ compare(flick.contentHeight, defaultValue + 500, "Flickable wasn't expanded on keyboard shown");
164+ }
154 }
165 }
155}
166}