summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/calc_tests6
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-02-10 17:51:55 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-02-11 11:21:27 +0100
commit5505b0d7c3e5924c2614b03789307e4c26cb6f24 (patch)
treeca0e2c6d9d9a0fb2c722e9f54e184d514ea7ae11 /sc/qa/uitest/calc_tests6
parent9576b5e411562bcbe6c6be9a78560874e66a1b1e (diff)
uitest: sc: add a buidable name to the tabs in DataSubTotals dialog
Change-Id: I045f301083767fa32fd516a4a46823b3af4a6a2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129794 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests6')
-rw-r--r--sc/qa/uitest/calc_tests6/tdf107267.py46
-rw-r--r--sc/qa/uitest/calc_tests6/tdf118638.py4
2 files changed, 18 insertions, 32 deletions
diff --git a/sc/qa/uitest/calc_tests6/tdf107267.py b/sc/qa/uitest/calc_tests6/tdf107267.py
index 2ee73577aa25..8ff9a19baa38 100644
--- a/sc/qa/uitest/calc_tests6/tdf107267.py
+++ b/sc/qa/uitest/calc_tests6/tdf107267.py
@@ -11,8 +11,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
from libreoffice.calc.document import get_cell_by_position
from uitest.uihelper.common import select_pos
-from uitest.uihelper.common import select_by_text
-from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict
#Bug 107267 - During a sub-total calculation or sum, the data set is not computed well.
class Subtotals(UITestCase):
@@ -27,40 +26,27 @@ class Subtotals(UITestCase):
# 2. Data->Subtotals
with self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
xTabs = xDialog.getChild("tabcontrol")
+
select_pos(xTabs, "0")
- # = 1st group = 3. Group by "Person Number", select "shipping time" and use the Max function.
- xGroupBy = xDialog.getChild("group_by")
- select_by_text(xGroupBy, "Person Number")
- # 4. Tick 'Calculate subtotals for' -> "shipping time" - already selected
- # xCheckListMenu = xDialog.getChild("grid1")
- # xTreeList = xCheckListMenu.getChild("columns")
- # x6Entry = xTreeList.getChild("5")
- # xFirstEntry.executeAction("CLICK", tuple())
- #use the Max function
+ xGroupBy1 = xDialog.getChild("group_by1")
+ self.assertEqual("Person Number", get_state_as_dict(xGroupBy1)["SelectEntryText"])
+
+ xColumns1 = xDialog.getChild("columns1")
+ self.assertEqual("shipping time", get_state_as_dict(xColumns1)["SelectEntryText"])
- #= 2nd group =5. Group by "Person Number", select "shipping time" and use the Min function.
select_pos(xTabs, "1")
- xGroupBy = xDialog.getChild("group_by")
- select_by_text(xGroupBy, "Person Number")
- # 4. Tick 'Calculate subtotals for' -> "shipping time" - already selected
- # xCheckListMenu = xDialog.getChild("grid1")
- # xTreeList = xCheckListMenu.getChild("columns")
- # x6Entry = xTreeList.getChild("5")
- # xFirstEntry.executeAction("CLICK", tuple())
- #use the Min function
+ xGroupBy2 = xDialog.getChild("group_by2")
+ self.assertEqual("Person Number", get_state_as_dict(xGroupBy2)["SelectEntryText"])
+
+ xColumns2 = xDialog.getChild("columns2")
+ self.assertEqual("shipping time", get_state_as_dict(xColumns2)["SelectEntryText"])
- #= 3rd group = Group by "Person Number", select "shipping time" and use the Average function.
select_pos(xTabs, "2")
- xGroupBy = xDialog.getChild("group_by")
- select_by_text(xGroupBy, "Person Number")
- # 4. Tick 'Calculate subtotals for' -> "shipping time" - already selected
- # xCheckListMenu = xDialog.getChild("grid1")
- # xTreeList = xCheckListMenu.getChild("columns")
- # x6Entry = xTreeList.getChild("5")
- # xFirstEntry.executeAction("CLICK", tuple())
- #use the Average function
+ xGroupBy3 = xDialog.getChild("group_by3")
+ self.assertEqual("Person Number", get_state_as_dict(xGroupBy3)["SelectEntryText"])
- # 5. Click OK
+ xColumns3 = xDialog.getChild("columns3")
+ self.assertEqual("shipping time", get_state_as_dict(xColumns3)["SelectEntryText"])
#verify
self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 141).getString(), "Grand Average")
diff --git a/sc/qa/uitest/calc_tests6/tdf118638.py b/sc/qa/uitest/calc_tests6/tdf118638.py
index 6ab1771ea60e..c928aa38843e 100644
--- a/sc/qa/uitest/calc_tests6/tdf118638.py
+++ b/sc/qa/uitest/calc_tests6/tdf118638.py
@@ -27,10 +27,10 @@ class Subtotals(UITestCase):
with self.ui_test.execute_dialog_through_command(".uno:DataSubTotals") as xDialog:
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "0")
- xGroupBy = xDialog.getChild("group_by")
+ xGroupBy = xDialog.getChild("group_by1")
select_by_text(xGroupBy, "Store Name")
xCheckListMenu = xDialog.getChild("grid1")
- xTreeList = xCheckListMenu.getChild("columns")
+ xTreeList = xCheckListMenu.getChild("columns1")
xEntry = xTreeList.getChild("1")
xEntry.executeAction("CLICK", tuple())