diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-07 20:43:13 +0000 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-05-25 12:12:27 +0200 |
commit | 2b8d4d6fab8e2afc47858ae6c97724c8d4c8dcb3 (patch) | |
tree | 02bbf877b64fb9d36a4c9712607dc5c70a20d138 /sw | |
parent | 966cdf29848471ac775fc93328c10eba67b36c12 (diff) |
SetCurItemId takes an ItemId not a Position
Change-Id: Id0b34364cf45b9305f865d46cf8c3c0f838ce630
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112147
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/findBar/findbar.py | 10 | ||||
-rw-r--r-- | sw/qa/uitest/findBar/tdf136941.py | 8 | ||||
-rw-r--r-- | sw/qa/uitest/findBar/tdf138232.py | 4 | ||||
-rw-r--r-- | sw/qa/uitest/findBar/tdf88608.py | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/sw/qa/uitest/findBar/findbar.py b/sw/qa/uitest/findBar/findbar.py index df973dc8e162..2620d39a0a98 100644 --- a/sw/qa/uitest/findBar/findbar.py +++ b/sw/qa/uitest/findBar/findbar.py @@ -43,28 +43,28 @@ class FindBar(UITestCase): self.assertEqual(get_state_as_dict(xfind_bar)["ItemCount"], "14") # Press on FindAll in the Find Bar - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"})) # 5 is FindAll id - self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "5") + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) + self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "5") # 5 is FindAll id for Pos 4 self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find All") self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:FindAll") self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "LibreLibreLibre") # Press on Find Next in the Find Bar - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) # 4 is Find Next id + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # 3 is Find Next pos self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "4") self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Next") self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:DownSearch") self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "Libre") # Press on Find Previous in the Find Bar - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # 3 is Find Previous id + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "2"})) # 2 is Find Previous pos self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "3") self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Previous") self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:UpSearch") self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "Libre") # Close the Find Bar - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"})) # 1 is for close + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # 0 is pos for close self.ui_test.close_doc() diff --git a/sw/qa/uitest/findBar/tdf136941.py b/sw/qa/uitest/findBar/tdf136941.py index a96964a2fb79..ab94449aefed 100644 --- a/sw/qa/uitest/findBar/tdf136941.py +++ b/sw/qa/uitest/findBar/tdf136941.py @@ -28,10 +28,10 @@ class tdf136941(UITestCase): xfind_bar = xWriterDoc.getChild("FindBar") # Search Next - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # Close button - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # Check the toolbar is closed self.assertTrue("find" not in xWriterDoc.getChildren()) @@ -49,10 +49,10 @@ class tdf136941(UITestCase): xfind_bar = xWriterDoc.getChild("FindBar") # Search Next - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # Close button - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # Check the toolbar is closed self.assertTrue("find" not in xWriterDoc.getChildren()) diff --git a/sw/qa/uitest/findBar/tdf138232.py b/sw/qa/uitest/findBar/tdf138232.py index 037296c8d0d6..93f859bc7521 100644 --- a/sw/qa/uitest/findBar/tdf138232.py +++ b/sw/qa/uitest/findBar/tdf138232.py @@ -29,7 +29,7 @@ class tdf138232(UITestCase): xfind_bar = xWriterDoc.getChild("FindBar") # Click on Find All - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) self.assertEqual("HelloHello", get_state_as_dict(xWriterEdit)['SelectedText']) @@ -39,7 +39,7 @@ class tdf138232(UITestCase): # AssertionError: 'HelloWorld' != 'World' self.assertEqual("HelloWorld", get_state_as_dict(xfind)['Text']) - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) self.assertEqual("", get_state_as_dict(xWriterEdit)['SelectedText']) diff --git a/sw/qa/uitest/findBar/tdf88608.py b/sw/qa/uitest/findBar/tdf88608.py index 463968dc4daa..b3576ec7587e 100644 --- a/sw/qa/uitest/findBar/tdf88608.py +++ b/sw/qa/uitest/findBar/tdf88608.py @@ -29,7 +29,7 @@ class tdf88608(UITestCase): self.assertEqual('', get_state_as_dict(xfind_bar.getChild('label'))['Text']) # Search Next - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) self.assertEqual('Search key not found', get_state_as_dict(xfind_bar.getChild('label'))['Text']) @@ -44,7 +44,7 @@ class tdf88608(UITestCase): self.assertEqual('', get_state_as_dict(xfind_bar.getChild('label'))['Text']) # Search Next - xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) + xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) self.assertEqual('Reached the end of the document', get_state_as_dict(xfind_bar.getChild('label'))['Text']) |