diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-22 10:03:34 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-22 11:28:37 +0100 |
commit | b1af864e84166a062d3c41da458a429914eeda89 (patch) | |
tree | 7d2e8710500e6184b4b82f14859549d30c16e916 /sc | |
parent | 564db953a2940ef7fc48790a7b14de650c1d024f (diff) |
uitest: sc: improve test a bit
Change-Id: Ifdb1436ceef08efe4cdd56feccce338168fb16d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112864
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/uitest/calc_tests3/tdf77509.py | 43 |
1 files changed, 32 insertions, 11 deletions
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: |