[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 3 20:05:40 UTC 2020
sc/qa/uitest/range_name/create_range_name.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
New commits:
commit b7a862bbd438eeeb006b08d3fde709b383d1eeb7
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Nov 3 16:07:56 2020 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Nov 3 21:05:01 2020 +0100
tdf#87474: sc: Add UItest
Change-Id: I2c915372076228164e6322fad84643971ea4e105
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105257
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/range_name/create_range_name.py b/sc/qa/uitest/range_name/create_range_name.py
index 1c59d879272b..f1cbe4a04d1d 100644
--- a/sc/qa/uitest/range_name/create_range_name.py
+++ b/sc/qa/uitest/range_name/create_range_name.py
@@ -66,6 +66,29 @@ class CreateRangeNameTest(UITestCase):
enter_text_to_cell(gridwin, "A2", "=SUM(RANGE1)")
self.assertEqual(3.0, get_cell_by_position(document, 0, 0, 1).getValue())
+ # Change the name
+ self.ui_test.execute_dialog_through_command(".uno:DefineName")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xNamesList = xDialog.getChild('names')
+ self.assertEqual(1, len(xNamesList.getChildren()))
+
+ xName = xDialog.getChild('name')
+ self.assertEqual( 'RANGE1', get_state_as_dict(xName)["Text"])
+
+ xName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xName.executeAction("TYPE", mkPropertyValues({"TEXT":"RANGE2"}))
+
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ # tdf#87474 check the formula is updated after changing the name
+ self.assertEqual("=SUM(RANGE2)", get_cell_by_position(document, 0, 0, 1).getFormula())
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ self.assertEqual("=SUM(RANGE1)", get_cell_by_position(document, 0, 0, 1).getFormula())
+
self.ui_test.close_doc()
def test_create_local_range_name(self):
More information about the Libreoffice-commits
mailing list