sc/qa/uitest/calc_tests4/trackedChanges.py | 22 ++++++++++++++++++++++ sc/qa/uitest/data/tdf85353.ods |binary 2 files changed, 22 insertions(+)
New commits: commit ecdb3826e852a6270e3106d30dac44793ad56e1a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Mar 30 19:34:42 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Mar 30 21:19:51 2022 +0200 tdf#85353: sc: Add UItest Change-Id: Idc2fc8157a84b010be4855d8aa7c111d4594b4f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132326 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py index 58700b99ed7c..f0bab2aa2678 100644 --- a/sc/qa/uitest/calc_tests4/trackedChanges.py +++ b/sc/qa/uitest/calc_tests4/trackedChanges.py @@ -288,5 +288,27 @@ class CalcTrackedChanges(UITestCase): self.assertEqual('A~ccept All', get_state_as_dict(xAcceptAllBtn)['Text']) self.assertEqual('~Accept', get_state_as_dict(xAcceptBtn)['Text']) + def test_tdf85353(self): + with self.ui_test.create_doc_in_start_center("calc"): + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") + + enter_text_to_cell(gridwin, "A1", "15") + enter_text_to_cell(gridwin, "D1", "0") + enter_text_to_cell(gridwin, "E1", "0") + + with self.ui_test.execute_dialog_through_command(".uno:CompareDocuments", close_button="") as xOpenDialog: + xFileName = xOpenDialog.getChild("file_name") + xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("tdf85353.ods")})) + xOpenBtn = xOpenDialog.getChild("open") + + with self.ui_test.execute_dialog_through_action(xOpenBtn, 'CLICK', close_button="close") as xTrackDlg: + changesList = xTrackDlg.getChild("calcchanges") + + # Without the fix in place, this test would have failed with + # AssertionError: 1 != 0 + self.assertEqual(1, len(changesList.getChildren())) + self.assertTrue(get_state_as_dict(changesList.getChild('0'))['Text'].startswith("Changed contents\tSheet1.E1")) + self.assertTrue(get_state_as_dict(changesList.getChild('0'))['Text'].endswith("(Cell E1 changed from '5' to '0')")) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/tdf85353.ods b/sc/qa/uitest/data/tdf85353.ods new file mode 100644 index 000000000000..001523e36f96 Binary files /dev/null and b/sc/qa/uitest/data/tdf85353.ods differ