diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-04-17 17:17:21 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-04-18 14:20:44 +0200 |
commit | 11a25339abfb957ea51614b67bbff26cb606f3a2 (patch) | |
tree | 734c89a45bd3a25cebb1067b4f42c5d0d80092f1 | |
parent | 2c01d4448a8059b5f335d07347b9e85a0d0031d8 (diff) |
tdf#154269 - Respect FindReplaceRememberedSearches: add unit test
Change-Id: I72db7964b512a40c4b81b218b2cae60ab34d47c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150522
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
-rwxr-xr-x | sw/qa/uitest/findBar/tdf154269.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/qa/uitest/findBar/tdf154269.py b/sw/qa/uitest/findBar/tdf154269.py index d5752093b2b6..aebab770ca35 100755 --- a/sw/qa/uitest/findBar/tdf154269.py +++ b/sw/qa/uitest/findBar/tdf154269.py @@ -15,21 +15,21 @@ class tdf154269(UITestCase): def test_tdf154269(self): with self.ui_test.create_doc_in_start_center("writer"): - # Open quick search - self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar") xWriterDoc = self.xUITest.getTopFocusWindow() - xFind = xWriterDoc.getChild("find") + xWriterEdit = xWriterDoc.getChild("writer_edit") # Generate a search history with more than 10 entries (A to Z) for searchTerm in map(chr, range(65, 91)): - # Search twice to generate a search history - xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"})) - xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) - xFind.executeAction("TYPE", mkPropertyValues({"TEXT": searchTerm})) - xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) - xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE": "ESC"})) - self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar") + xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+f"})) + xFind = xWriterDoc.getChild("find") + xFindBar = xWriterDoc.getChild("FindBar") + xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) + xFind.executeAction("TYPE", mkPropertyValues({"TEXT":searchTerm})) + xFind.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) + xFindBar.executeAction("CLICK", mkPropertyValues({"POS":"0"})) + xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+f"})) + xFind = xWriterDoc.getChild("find") # The default value of FindReplaceRememberedSearches has been respected self.assertEqual("10", get_state_as_dict(xFind)["EntryCount"]) |