Make test TextInput::test_txtentry() more stable
The test function is rather flaky in CI at the moment. The problem appears to be related to the TextInput not receiving keyboard focus correctly. Calling forceActiveFocus() should be more reliable than setFocus(true), and will hopefully be enough to stabilize the test. Pick-to: 6.5 6.5.0 Change-Id: I4aeda581fc36e8b796c315b147a7e12acb032eba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
parent
492dc98a28
commit
8ec8133aa2
|
@ -97,7 +97,8 @@ Item {
|
|||
}
|
||||
|
||||
function test_textentry() {
|
||||
txtentry.focus = true;
|
||||
txtentry.forceActiveFocus()
|
||||
verify(txtentry.activeFocus)
|
||||
compare(txtentry.text, "")
|
||||
keyClick(Qt.Key_H)
|
||||
keyClick(Qt.Key_E)
|
||||
|
|
Loading…
Reference in New Issue