diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-02 17:21:46 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-02 19:24:23 +0100 |
commit | dda3592f6a1028bd9d433eb2f88e561959212cf6 (patch) | |
tree | 6d98f26aac0716ef6552ddf9e92070d95987da51 /sc | |
parent | 8c4847fb88059259f17d002c4fd84ef82937c2f3 (diff) |
tdf#67007: sc: Add UItest
Change-Id: Id8e52f10943f5c28b3c28f757bd38b55f18f3384
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105189
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/uitest/range_name/create_range_name.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/qa/uitest/range_name/create_range_name.py b/sc/qa/uitest/range_name/create_range_name.py index 1babca7c0a58..92f70088ada7 100644 --- a/sc/qa/uitest/range_name/create_range_name.py +++ b/sc/qa/uitest/range_name/create_range_name.py @@ -9,6 +9,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.framework import UITestCase from uitest.uihelper.common import type_text, select_pos +from uitest.uihelper.common import get_state_as_dict class CreateRangeNameTest(UITestCase): @@ -16,28 +17,38 @@ class CreateRangeNameTest(UITestCase): self.ui_test.create_doc_in_start_center("calc") + calcDoc = self.xUITest.getTopFocusWindow() + xPosWindow = calcDoc.getChild('pos_window') + self.assertEqual('A1', get_state_as_dict(xPosWindow)['Text']) + self.ui_test.execute_modeless_dialog_through_command(".uno:AddName") xAddNameDlg = self.xUITest.getTopFocusWindow() xEdit = xAddNameDlg.getChild("edit") - type_text(xEdit, "simpleRangeName") + type_text(xEdit, "globalRangeName") xAddBtn = xAddNameDlg.getChild("add") self.ui_test.close_dialog_through_button(xAddBtn) + self.assertEqual('globalRangeName', get_state_as_dict(xPosWindow)['Text']) + self.ui_test.close_doc() def test_create_local_range_name(self): self.ui_test.create_doc_in_start_center("calc") + calcDoc = self.xUITest.getTopFocusWindow() + xPosWindow = calcDoc.getChild('pos_window') + self.assertEqual('A1', get_state_as_dict(xPosWindow)['Text']) + self.ui_test.execute_modeless_dialog_through_command(".uno:AddName") xAddNameDlg = self.xUITest.getTopFocusWindow() xEdit = xAddNameDlg.getChild("edit") - type_text(xEdit, "simpleRangeName") + type_text(xEdit, "localRangeName") xScope = xAddNameDlg.getChild("scope") select_pos(xScope, "1") @@ -45,6 +56,10 @@ class CreateRangeNameTest(UITestCase): xAddBtn = xAddNameDlg.getChild("add") self.ui_test.close_dialog_through_button(xAddBtn) + # tdf#67007: Without the fix in place, this test would have failed with + # AssertionError: 'localRangeName' != 'A1' + self.assertEqual('localRangeName', get_state_as_dict(xPosWindow)['Text']) + self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: |