[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 22 10:29:19 UTC 2021
sc/qa/uitest/calc_tests3/tdf77509.py | 43 ++++++++++++++++++++++++++---------
1 file changed, 32 insertions(+), 11 deletions(-)
New commits:
commit b1af864e84166a062d3c41da458a429914eeda89
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Mar 22 10:03:34 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Mar 22 11:28:37 2021 +0100
uitest: sc: improve test a bit
Change-Id: Ifdb1436ceef08efe4cdd56feccce338168fb16d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112864
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
Tested-by: Jenkins
diff --git a/sc/qa/uitest/calc_tests3/tdf77509.py b/sc/qa/uitest/calc_tests3/tdf77509.py
index bd9854b866e9..569d704ceafd 100644
--- a/sc/qa/uitest/calc_tests3/tdf77509.py
+++ b/sc/qa/uitest/calc_tests3/tdf77509.py
@@ -24,6 +24,7 @@ class tdf77509(UITestCase):
#3. Tab: Data > Consolidate
self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate")
xDialog = self.xUITest.getTopFocusWindow()
+
xfunc = xDialog.getChild("func")
xeddataarea = xDialog.getChild("eddataarea")
xadd = xDialog.getChild("add")
@@ -36,22 +37,42 @@ class tdf77509(UITestCase):
#5. Click 'Add' so that ranges appear in "Consolidation ranges"
xeddataarea.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$B$7"}))
xadd.executeAction("CLICK", tuple())
+
+ xConsAreas = xDialog.getChild("consareas")
+ self.assertEqual(1, len(xConsAreas.getChildren()))
+ self.assertEqual("$Sheet1.$A$1:$B$7", get_state_as_dict(xConsAreas.getChild("0"))['Text'])
+
#6. Click 'Options' > check 'Row labels' > click OK
xbyrow.executeAction("CLICK", tuple())
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#verify
- self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "A 1")
- self.assertEqual(get_cell_by_position(document, 0, 3, 1).getString(), "AB 1")
- self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "AB 12")
- self.assertEqual(get_cell_by_position(document, 0, 3, 3).getString(), "AB 123")
- self.assertEqual(get_cell_by_position(document, 0, 3, 4).getString(), "ABC 1")
-
- self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 1)
- self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 2)
- self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 2)
- self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 1)
- self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 1)
+ self.assertEqual("A 1", get_cell_by_position(document, 0, 3, 0).getString())
+ self.assertEqual("AB 1", get_cell_by_position(document, 0, 3, 1).getString())
+ self.assertEqual("AB 12", get_cell_by_position(document, 0, 3, 2).getString())
+ self.assertEqual("AB 123", get_cell_by_position(document, 0, 3, 3).getString())
+ self.assertEqual("ABC 1", get_cell_by_position(document, 0, 3, 4).getString())
+
+ self.assertEqual(1, get_cell_by_position(document, 0, 4, 0).getValue())
+ self.assertEqual(2, get_cell_by_position(document, 0, 4, 1).getValue())
+ self.assertEqual(2, get_cell_by_position(document, 0, 4, 2).getValue())
+ self.assertEqual(1, get_cell_by_position(document, 0, 4, 3).getValue())
+ self.assertEqual(1, get_cell_by_position(document, 0, 4, 4).getValue())
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ self.assertEqual("", get_cell_by_position(document, 0, 3, 0).getString())
+ self.assertEqual("", get_cell_by_position(document, 0, 3, 1).getString())
+ self.assertEqual("", get_cell_by_position(document, 0, 3, 2).getString())
+ self.assertEqual("", get_cell_by_position(document, 0, 3, 3).getString())
+ self.assertEqual("", get_cell_by_position(document, 0, 3, 4).getString())
+
+ self.assertEqual(0, get_cell_by_position(document, 0, 4, 0).getValue())
+ self.assertEqual(0, get_cell_by_position(document, 0, 4, 1).getValue())
+ self.assertEqual(0, get_cell_by_position(document, 0, 4, 2).getValue())
+ self.assertEqual(0, get_cell_by_position(document, 0, 4, 3).getValue())
+ self.assertEqual(0, get_cell_by_position(document, 0, 4, 4).getValue())
+
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list