[Libreoffice-commits] core.git: sc/qa

Zdeněk Crhonek zcrhonek at gmail.com
Mon Jun 4 14:47:39 UTC 2018


 sc/qa/uitest/calc_tests2/consolidate.py |   41 ++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

New commits:
commit ea8efce49dc2b45be014b0709e913c322358deb5
Author: Zdeněk Crhonek <zcrhonek at gmail.com>
Date:   Sun Jun 3 23:07:08 2018 +0200

    uitest / Calc consolidate;one more test
    
    Change-Id: I6b04b943bb5a62e35a7dd0dc8749652312488435
    Reviewed-on: https://gerrit.libreoffice.org/55253
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Zdenek Crhonek <zcrhonek at gmail.com>

diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py
index e0bfc83fa312..4d47d03be898 100644
--- a/sc/qa/uitest/calc_tests2/consolidate.py
+++ b/sc/qa/uitest/calc_tests2/consolidate.py
@@ -76,6 +76,47 @@ class consolidate(UITestCase):
         self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 312)
         self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 315)
         self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 318)
+        #verify dialog
+        self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate")
+        xDialog = self.xUITest.getTopFocusWindow()
+        xfunc = xDialog.getChild("func")
+        xlbdataarea = xDialog.getChild("lbdataarea")
+        xdelete = xDialog.getChild("delete")
+        xbyrow = xDialog.getChild("byrow")
+        xbycol = xDialog.getChild("bycol")
+        xeddestarea = xDialog.getChild("eddestarea")
+        xconsareas = xDialog.getChild("consareas")
+        self.assertEqual(get_state_as_dict(xfunc)["SelectEntryText"], "Sum")
+        self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "3")
+        self.assertEqual(get_state_as_dict(xeddestarea)["Text"], "$Total.$A$2")
+        self.assertEqual(get_state_as_dict(xbyrow)["Selected"], "true")
+        self.assertEqual(get_state_as_dict(xbycol)["Selected"], "true")
+        #delete first range
+        select_pos(xconsareas, "0")
+        xdelete.executeAction("CLICK", tuple())
+        self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "2")
+        xOKBtn = xDialog.getChild("ok")
+        self.ui_test.close_dialog_through_button(xOKBtn)
+
+        self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 200)
+        self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 202)
+        self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 204)
+        self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 206)
+
+        self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 202)
+        self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 204)
+        self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 206)
+        self.assertEqual(get_cell_by_position(document, 0, 2, 5).getValue(), 208)
+
+        self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 204)
+        self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 206)
+        self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 208)
+        self.assertEqual(get_cell_by_position(document, 0, 3, 5).getValue(), 210)
+
+        self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 206)
+        self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 208)
+        self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 210)
+        self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 212)
 
         self.ui_test.close_doc()
 


More information about the Libreoffice-commits mailing list