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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 30 19:01:14 UTC 2020


 sc/qa/uitest/calc_tests8/navigator.py |   36 ++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

New commits:
commit d73c266552c2bd814a273312d724b9097580d41a
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Jun 30 14:41:23 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Jun 30 21:00:29 2020 +0200

    tdf#134390: sc: Add UItest
    
    Change-Id: I12ab42afbe902a25f93deaa4884280392c705f38
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97516
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/uitest/calc_tests8/navigator.py b/sc/qa/uitest/calc_tests8/navigator.py
index 4026ca66520b..56bb2b789744 100644
--- a/sc/qa/uitest/calc_tests8/navigator.py
+++ b/sc/qa/uitest/calc_tests8/navigator.py
@@ -115,3 +115,39 @@ class navigator(UITestCase):
 
         self.xUITest.executeCommand(".uno:Sidebar")
         self.ui_test.close_doc()
+
+
+    def test_tdf134390(self):
+        calc_doc = self.ui_test.create_doc_in_start_center("calc")
+        xCalcDoc = self.xUITest.getTopFocusWindow()
+        xGridWin = xCalcDoc.getChild("grid_window")
+
+        self.xUITest.executeCommand(".uno:Sidebar")
+        xGridWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "ScNavigatorPanel"}))
+
+        xCalcDoc = self.xUITest.getTopFocusWindow()
+        xNavigatorPanel = xCalcDoc.getChild("NavigatorPanelParent")
+        xNavigatorPanel.executeAction("ROOT", tuple())
+
+        xRow = xNavigatorPanel.getChild('row')
+        xColumn = xNavigatorPanel.getChild('column')
+        self.assertEqual(get_state_as_dict(xColumn)['Value'], '1')
+        self.assertEqual(get_state_as_dict(xRow)['Value'], '1')
+        self.assertEqual(get_state_as_dict(xGridWin)["CurrentRow"], "0")
+        self.assertEqual(get_state_as_dict(xGridWin)["CurrentColumn"], "0")
+
+        xRow.executeAction("UP", tuple())
+        xColumn.executeAction("UP", tuple())
+
+        # Use return to update the current cell
+        xColumn.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
+
+        self.assertEqual(get_state_as_dict(xColumn)['Value'], '2')
+        self.assertEqual(get_state_as_dict(xRow)['Value'], '2')
+
+        self.assertEqual(get_state_as_dict(xGridWin)["CurrentRow"], "1")
+        self.assertEqual(get_state_as_dict(xGridWin)["CurrentColumn"], "1")
+
+        self.xUITest.executeCommand(".uno:Sidebar")
+
+        self.ui_test.close_doc()


More information about the Libreoffice-commits mailing list