summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-06-04 21:59:21 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-06-04 23:04:34 +0200
commit5bb06ea6931c0c72df6b0f164bac1c8d00c51bb6 (patch)
treed840c333abbbf32b50b9aa3abc81fccd4388cd03 /sw
parentfe66c4e2ac43ca0bef04ede7250848dd37c35a45 (diff)
Fix UITest
The test had previously raced between the effect of vnd.sun.star.findbar:FocusToFindbar, typing, and pressing the "Find All" button. If typing happened before focusing, then focusing selected the already typed text. If button was clicked before focusing, it found the edit unfocused, and grabbed the focus, selecting its content. This adds "HasFocus" property to WindowUIObject::get_state. Change-Id: Ib277bd70508a3c1e86e1668afb7592d7a1523947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116697 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/uitest/findBar/tdf138232.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/uitest/findBar/tdf138232.py b/sw/qa/uitest/findBar/tdf138232.py
index 93f859bc7521..62a79824ea4d 100644
--- a/sw/qa/uitest/findBar/tdf138232.py
+++ b/sw/qa/uitest/findBar/tdf138232.py
@@ -23,6 +23,9 @@ class tdf138232(UITestCase):
self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar")
xfind = xWriterDoc.getChild("find")
+ self.ui_test.wait_until_property_is_updated(xfind, 'HasFocus', "true")
+ self.assertEqual("true", get_state_as_dict(xfind)['HasFocus'])
+
xfind.executeAction("TYPE", mkPropertyValues({"TEXT": "Hello"}))
self.assertEqual("Hello", get_state_as_dict(xfind)['Text'])