diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-02-14 12:43:47 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-02-14 14:26:50 +0000 |
commit | c83516b378a1587fd099b550d046c89841e8add9 (patch) | |
tree | 205c4915f050a4d2532b5a1acd2e91b50e541e1a /sc/qa/uitest/calc_tests2 | |
parent | 93059e2b164bd5eea4898519e45f1001f299c4ae (diff) |
tdf#153604: sc: Add UItest
Change-Id: I3edcb60c793354b4471052e428ef6ac1b93cbdd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147005
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests2')
-rw-r--r-- | sc/qa/uitest/calc_tests2/xmlSource.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests2/xmlSource.py b/sc/qa/uitest/calc_tests2/xmlSource.py index b2038d23359a..59a3abd2b51d 100644 --- a/sc/qa/uitest/calc_tests2/xmlSource.py +++ b/sc/qa/uitest/calc_tests2/xmlSource.py @@ -59,4 +59,34 @@ class xmlSource(UITestCase): self.assertEqual("service", get_cell_by_position(calc_doc, 1, 6, 0).getString()) self.assertEqual("disabled", get_cell_by_position(calc_doc, 1, 7, 0).getString()) + def test_tdf153604(self): + + with self.ui_test.create_doc_in_start_center("calc") as calc_doc: + + with self.ui_test.execute_modeless_dialog_through_command(".uno:ManageXMLSource") as xDialog: + + xSource = xDialog.getChild("selectsource") + + with self.ui_test.execute_blocking_action(xSource.executeAction, args=('CLICK', ()), close_button="open") as xOpenDialog: + xFileName = xOpenDialog.getChild("file_name") + xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("tdf153604.xml")})) + + xTree = xDialog.getChild("tree") + self.assertEqual('2', get_state_as_dict(xTree)["Children"]) + + xTree.getChild('0').executeAction("SELECT", tuple()) + xTree.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) + + self.assertEqual("data", get_state_as_dict(xTree)["SelectEntryText"]) + + xEdit = xDialog.getChild("edit") + xEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "$A$1"})) + + # Without the fix in place, this test would have failed with + # AssertionError: 'data' != '' + self.assertEqual("data", get_cell_by_position(calc_doc, 0, 0, 0).getString()) + self.assertEqual("v1", get_cell_by_position(calc_doc, 0, 0, 1).getString()) + self.assertEqual("v2", get_cell_by_position(calc_doc, 0, 0, 2).getString()) + self.assertEqual("v3", get_cell_by_position(calc_doc, 0, 0, 3).getString()) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |