aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-09-19 23:06:22 +0300
committerMitch Curtis <mitch.curtis@qt.io>2018-09-24 08:20:36 +0000
commit6d429be4d77841218d89f5e563593fb39812395d (patch)
tree00cef9c1379f20bba36dc3855fe1ef710da25cfc
parent631b2089bc1cc73aa78a4ede1a731c8bdfbe8503 (diff)
tests: Backport test_wclAutoCommitWordSetting from 5.12
Fixes flaky test. Task-number: QTBUG-62518 Task-number: QTBUG-61279 Task-number: QTQAINFRA-2226 Change-Id: I55208710ed4b9699fde6643438b23148cb7c7240 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml7
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml11
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index ded8aee3..517caadb 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -88,6 +88,7 @@ InputPanel {
property alias soundEffectSpy: soundEffectSpy
property alias inputMethodResultSpy: inputMethodResultSpy
property alias wordCandidateListChangedSpy: wordCandidateListChangedSpy
+ property alias inputMethodSelectionListChangedSpy: inputMethodSelectionListChangedSpy
property alias wordCandidateListVisibleSpy: wordCandidateListVisibleSpy
property alias shiftStateSpy: shiftStateSpy
property alias shadowInputControlVisibleSpy: shadowInputControlVisibleSpy
@@ -172,6 +173,12 @@ InputPanel {
}
SignalSpy {
+ id: inputMethodSelectionListChangedSpy
+ target: InputContext.inputEngine.inputMethod
+ signalName: "selectionListChanged"
+ }
+
+ SignalSpy {
id: wordCandidateListVisibleSpy
target: wordCandidateView
signalName: "onVisibleConditionChanged"
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 91371fef..10a9b906 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -1685,19 +1685,14 @@ Rectangle {
skip("Prediction/spell correction not enabled")
for (var len = 1; len <= 5; ++len) {
- inputPanel.wordCandidateListChangedSpy.clear()
inputPanel.virtualKeyClick("z")
- waitForRendering(inputPanel)
- if (len >= 3) {
- if (data.wclAutoCommitWord)
- tryVerify(function() { return inputPanel.wordCandidateView.model.count === 0 }, 500)
- else
- wait(500)
+ if (len >= 2) {
+ inputPanel.inputMethodSelectionListChangedSpy.clear()
+ inputPanel.inputMethodSelectionListChangedSpy.wait()
if (inputPanel.wordCandidateView.model.count <= 1)
break
}
}
- waitForRendering(inputPanel)
if (data.wclAutoCommitWord)
compare(inputPanel.wordCandidateView.model.count, 0)