diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-03-02 12:20:44 +0100 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-05-23 09:02:45 +0200 |
commit | 7c2bcac3e6aac31811adede6f466d2125184da4c (patch) | |
tree | c95264db72181041dc8dcd9bbf259517ee32b26b /sc/qa/uitest | |
parent | aeb8a0076cd5ec2836b3dfc1adffcced432f995f (diff) |
Resolves tdf#131155 - Keep frequently used options on sort criteria tab
* Row/Column header moved
* Sort by row/column moved
* Extra variables removed
* UI tests adjusted to read/set sort direction and header from first tab
Change-Id: I9fc0406806256f289d52e45b096e392067768eaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130843
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc/qa/uitest')
-rw-r--r-- | sc/qa/uitest/conditional_format/tdf81696.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/sort/naturalSort.py | 5 | ||||
-rw-r--r-- | sc/qa/uitest/sort/sorting.py | 4 | ||||
-rw-r--r-- | sc/qa/uitest/sort/tdf49531.py | 6 | ||||
-rw-r--r-- | sc/qa/uitest/sort/tdf53482.py | 7 | ||||
-rw-r--r-- | sc/qa/uitest/sort/tdf57465.py | 8 | ||||
-rw-r--r-- | sc/qa/uitest/sort/tdf91305.py | 9 | ||||
-rw-r--r-- | sc/qa/uitest/sort/tdf99208.py | 11 |
8 files changed, 25 insertions, 27 deletions
diff --git a/sc/qa/uitest/conditional_format/tdf81696.py b/sc/qa/uitest/conditional_format/tdf81696.py index 6b9bb7903154..0fca31e2bd98 100644 --- a/sc/qa/uitest/conditional_format/tdf81696.py +++ b/sc/qa/uitest/conditional_format/tdf81696.py @@ -28,7 +28,7 @@ class tdf81696(UITestCase): #Open sort dialog by DATA - SORT,Just sort it by Column A, ascending. (it's default) with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - xleftright = xDialog.getChild("leftright") + xleftright = xDialog.getChild("rbLeftRight") select_pos(xTabs, "0") #verify diff --git a/sc/qa/uitest/sort/naturalSort.py b/sc/qa/uitest/sort/naturalSort.py index ca8384d5f2bf..6d9dd3edd7ca 100644 --- a/sc/qa/uitest/sort/naturalSort.py +++ b/sc/qa/uitest/sort/naturalSort.py @@ -85,12 +85,13 @@ class CalcNaturalSorting(UITestCase): #Open sort dialog by DATA - SORT with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - xleftright = xDialog.getChild("leftright") select_pos(xTabs, "1") xNatural = xDialog.getChild("naturalsort") - xleftright.executeAction("CLICK", tuple()) if (get_state_as_dict(xNatural)["Selected"]) == "false": xNatural.executeAction("CLICK", tuple()) + select_pos(xTabs, "0") + xleftright = xDialog.getChild("rbLeftRight") + xleftright.executeAction("CLICK", tuple()) #Verify self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "MW-1") diff --git a/sc/qa/uitest/sort/sorting.py b/sc/qa/uitest/sort/sorting.py index 10645827435c..a3c901574109 100644 --- a/sc/qa/uitest/sort/sorting.py +++ b/sc/qa/uitest/sort/sorting.py @@ -58,7 +58,7 @@ class CalcSorting(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") #Verify that option "Range contains column labels" is set - xHeader = xDialog.getChild("header") + xHeader = xDialog.getChild("cbHeader") self.assertEqual(get_state_as_dict(xHeader)["Selected"], "true") #Cancel dialog #Select Range A1:B5 @@ -100,7 +100,7 @@ class CalcSorting(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") #Verify that option "Range contains column labels" is not set - xHeader = xDialog.getChild("header") + xHeader = xDialog.getChild("cbHeader") self.assertEqual(get_state_as_dict(xHeader)["Selected"], "false") #Cancel dialog diff --git a/sc/qa/uitest/sort/tdf49531.py b/sc/qa/uitest/sort/tdf49531.py index 08f94cd1a275..98d705bf8dd3 100644 --- a/sc/qa/uitest/sort/tdf49531.py +++ b/sc/qa/uitest/sort/tdf49531.py @@ -31,14 +31,14 @@ class tdf49531(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") xNatural = xDialog.getChild("naturalsort") - xtopdown = xDialog.getChild("topdown") - xHeader = xDialog.getChild("header") if (get_state_as_dict(xNatural)["Selected"]) == "true": xNatural.executeAction("CLICK", tuple()) + select_pos(xTabs, "0") + xtopdown = xDialog.getChild("rbTopDown") + xHeader = xDialog.getChild("cbHeader") if (get_state_as_dict(xHeader)["Selected"]) == "true": xHeader.executeAction("CLICK", tuple()) xtopdown.executeAction("CLICK", tuple()) - select_pos(xTabs, "0") xSortKey1 = xDialog.getChild("sortlb") xAsc = xDialog.getChild("up") select_by_text(xSortKey1, "B") diff --git a/sc/qa/uitest/sort/tdf53482.py b/sc/qa/uitest/sort/tdf53482.py index f96c780f92d9..fbcbac0a8549 100644 --- a/sc/qa/uitest/sort/tdf53482.py +++ b/sc/qa/uitest/sort/tdf53482.py @@ -29,7 +29,7 @@ class tdf53482(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") #3. On Options tab, tick 'Range contains column labels' - xHeader = xDialog.getChild("header") + xHeader = xDialog.getChild("cbHeader") xHeader.executeAction("CLICK", tuple()) if (get_state_as_dict(xHeader)["Selected"]) == "false": xHeader.executeAction("CLICK", tuple()) @@ -60,14 +60,13 @@ class tdf53482(UITestCase): #2. Click Data menu, Sort with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - select_pos(xTabs, "1") + select_pos(xTabs, "0") #3. On Options tab, tick 'Range contains column labels' - xHeader = xDialog.getChild("header") + xHeader = xDialog.getChild("cbHeader") xHeader.executeAction("CLICK", tuple()) if (get_state_as_dict(xHeader)["Selected"]) == "false": xHeader.executeAction("CLICK", tuple()) #4. On Sort Criteria tab, set appropriate criteria - select_pos(xTabs, "0") xDown = xDialog.getChild("down") xDown.executeAction("CLICK", tuple()) #5. Click Ok diff --git a/sc/qa/uitest/sort/tdf57465.py b/sc/qa/uitest/sort/tdf57465.py index eefb3fdd4be8..bd7efaabc50a 100644 --- a/sc/qa/uitest/sort/tdf57465.py +++ b/sc/qa/uitest/sort/tdf57465.py @@ -23,17 +23,15 @@ class tdf57465(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - select_pos(xTabs, "1") + select_pos(xTabs, "0") - xHeader = xDialog.getChild("header") + xHeader = xDialog.getChild("cbHeader") if (get_state_as_dict(xHeader)["Selected"]) == 'true': xHeader.executeAction("CLICK", tuple()) - xLeftRight = xDialog.getChild("leftright") + xLeftRight = xDialog.getChild("rbLeftRight") xLeftRight.executeAction("CLICK", tuple()) - select_pos(xTabs, "0") - self.assertEqual("1", get_state_as_dict(xDialog.getChild("sortlb"))['DisplayText']) diff --git a/sc/qa/uitest/sort/tdf91305.py b/sc/qa/uitest/sort/tdf91305.py index 6292cd9fafde..ebc452daf56f 100644 --- a/sc/qa/uitest/sort/tdf91305.py +++ b/sc/qa/uitest/sort/tdf91305.py @@ -31,8 +31,8 @@ class tdf91305(UITestCase): #Open sort dialog by DATA - SORT with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - xleftright = xDialog.getChild("leftright") - select_pos(xTabs, "1") + xleftright = xDialog.getChild("rbLeftRight") + select_pos(xTabs, "0") xleftright.executeAction("CLICK", tuple()) #verify self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "aa") @@ -41,11 +41,10 @@ class tdf91305(UITestCase): #Open sort dialog by DATA - SORT with self.ui_test.execute_dialog_through_command(".uno:DataSort") as xDialog: xTabs = xDialog.getChild("tabcontrol") - xleftright = xDialog.getChild("leftright") + xleftright = xDialog.getChild("rbLeftRight") xdown = xDialog.getChild("down") - select_pos(xTabs, "1") - xleftright.executeAction("CLICK", tuple()) select_pos(xTabs, "0") + xleftright.executeAction("CLICK", tuple()) xdown.executeAction("CLICK", tuple()) self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "ff") self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "cc") diff --git a/sc/qa/uitest/sort/tdf99208.py b/sc/qa/uitest/sort/tdf99208.py index e272484cbc32..9e3115d51b71 100644 --- a/sc/qa/uitest/sort/tdf99208.py +++ b/sc/qa/uitest/sort/tdf99208.py @@ -30,17 +30,18 @@ class tdf99208(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") xNatural = xDialog.getChild("naturalsort") - xtopdown = xDialog.getChild("topdown") - xHeader = xDialog.getChild("header") xFormats = xDialog.getChild("formats") if (get_state_as_dict(xNatural)["Selected"]) == "false": xNatural.executeAction("CLICK", tuple()) - if (get_state_as_dict(xHeader)["Selected"]) == "false": - xHeader.executeAction("CLICK", tuple()) if (get_state_as_dict(xFormats)["Selected"]) == "false": xFormats.executeAction("CLICK", tuple()) - xtopdown.executeAction("CLICK", tuple()) select_pos(xTabs, "0") + xtopdown = xDialog.getChild("rbTopDown") + xHeader = xDialog.getChild("cbHeader") + if (get_state_as_dict(xHeader)["Selected"]) == "false": + xHeader.executeAction("CLICK", tuple()) + xtopdown.executeAction("CLICK", tuple()) + xSortKey1 = xDialog.getChild("sortlb") xAsc = xDialog.getChild("up") select_by_text(xSortKey1, "FODMAP") |