diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-07 20:43:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-09 10:06:21 +0100 |
commit | a2d0741eed98db9c8b3509153a77d2e56b423d06 (patch) | |
tree | 0e0d44719564b0e64a80dbc383d5044d3aec00e0 /sw/qa | |
parent | 5d658689dd2994fd1cb7c2fc722b86befd78dcba (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/qa')
-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 | ||||
-rw-r--r-- | sw/qa/uitest/sidebar/stylesSidebar.py | 2 |
5 files changed, 14 insertions, 14 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']) diff --git a/sw/qa/uitest/sidebar/stylesSidebar.py b/sw/qa/uitest/sidebar/stylesSidebar.py index db625be6f006..8096a06c0d20 100644 --- a/sw/qa/uitest/sidebar/stylesSidebar.py +++ b/sw/qa/uitest/sidebar/stylesSidebar.py @@ -62,7 +62,7 @@ class StylesSidebar(UITestCase): xLeft = xWriterEdit.getChild('left') #change to another style type - xLeft.executeAction("CLICK", mkPropertyValues({"POS": str( i + 1 )})) + xLeft.executeAction("CLICK", mkPropertyValues({"POS": str( i )})) xFlatView = xWriterEdit.getChild("flatview") |