diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-05-29 15:02:40 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-08-22 12:52:23 +0000 |
commit | caa38d217ecbcaaa5617255290598012477c4492 (patch) | |
tree | 0a343f27df7c35d5b7bb01586473278a42737351 /tests/auto/controls/data | |
parent | 008716e94a4eacbc904ffac2bc9ee19d3af56e79 (diff) | |
download | qtquickcontrols-caa38d217ecbcaaa5617255290598012477c4492.tar.gz |
Fix tests for boot2qtv5.10.0-alpha1
The tests for boot2qt were disabled with commit
555750221ee3850ba70169a2b6854041b434c592. The tests can
be enabled since qtdeclarative now fallbacks to software
renderer if OpenGL is not supported.
Changes needed:
- Using grabImage does not work correctly on offscreen platform, so
tests relying on it are skipped
- Extra 1ms delay is needed between two mouse clicks to get rid of
test_activeFocusOnPress() flakiness on software quick renderer
Change-Id: Ie985110c171bc395bac0d63cd2fbb94207c63516
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/controls/data')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 9 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index 632a1d15..ce8b6c42 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -512,10 +512,13 @@ TestCase { mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) verify(!comboBox.activeFocus) comboBox.activeFocusOnPress = true - if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return + if (Qt.platform.os === "osx") { // on macOS when the menu open, the __popup function does not return timer.start() - else // two mouse clicks to open and close the popup menu - mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) + } else { + // two mouse clicks to open and close the popup menu. The 1ms delay between mouse presses is + // needed with software quick renderer. Without the delay, this test is flaky. + mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1, Qt.LeftButton, Qt.NoModifier, 1) + } mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) verify(comboBox.activeFocus) comboBox.destroy() diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index fe50f241..0b54634e 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -971,6 +971,8 @@ TestCase { table.getColumn(0).width = 20 compare(table.getColumn(0).width, 20) table.resizeColumnsToContents() + if (Qt.platform.pluginName === "offscreen") + expectFail("", "QTBUG-62496") compare(table.getColumn(0).width, 50) table.destroy() } |