aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-09-05 09:12:27 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-09-05 13:36:24 +0000
commitc40e19e8012788522806f25589d7c41d93d423b4 (patch)
tree0f172f1152b3d7286cc9811a176a79844ad7d638
parentd781f8a6b867980e03ef42b792404285ea9a799e (diff)
Attempt to stabilise inputpanel auto test
The last patch showed that there was no focus window when InputContext::sendKeyClick() was called, so try to raise and activate the window at the start of each test to see if it helps. Task-number: QTBUG-62518 Change-Id: I48a66109d18e941e16e177d0c6ec76517846bc9d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 97cd51b3..91371fef 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -29,6 +29,7 @@
import QtTest 1.0
import QtQuick 2.0
+import QtQuick.Window 2.3
Rectangle {
id: container
@@ -83,6 +84,13 @@ Rectangle {
inputPanel.setWclAutoCommitWord(data !== undefined && data.hasOwnProperty("wclAutoCommitWord") && data.wclAutoCommitWord)
inputPanel.setFullScreenMode(data !== undefined && data.hasOwnProperty("fullScreenMode") && data.fullScreenMode)
inputPanel.setExternalLanguageSwitchEnabled(data !== undefined && data.hasOwnProperty("externalLanguageSwitchEnabled") && data.externalLanguageSwitchEnabled)
+
+ var window = container.Window.window
+ verify(window)
+ window.raise()
+ window.requestActivate()
+ tryCompare(window, "active", true)
+
container.forceActiveFocus()
if (data !== undefined && data.hasOwnProperty("initText")) {
textInput.text = data.initText