diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-14 19:57:17 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-14 22:20:13 +0200 |
commit | 4a581f12e0d0fa105f053904300b729acb18194a (patch) | |
tree | 66b3bbc80c13ec1f31938036777d02d2dd1edef3 /sc/qa/uitest/calc_tests4 | |
parent | 39f45e8a0f04fb5f8641d57fbc09c531987967e8 (diff) |
tdf#130960: Add UItest
Change-Id: I41f5bd8c8b9183138b673a5f40d8a29abe9874df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92218
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests4')
-rw-r--r-- | sc/qa/uitest/calc_tests4/trackedChanges.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py index 13cdb1319088..ca446e66d0a2 100644 --- a/sc/qa/uitest/calc_tests4/trackedChanges.py +++ b/sc/qa/uitest/calc_tests4/trackedChanges.py @@ -11,10 +11,40 @@ from libreoffice.calc.document import get_cell_by_position from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.calc import enter_text_to_cell from uitest.uihelper.common import get_state_as_dict +from uitest.path import get_srcdir_url import datetime + +def get_url_for_data_file(file_name): + return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name + class CalcTrackedChanges(UITestCase): + def test_tdf131907(self): + calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf130960.odt")) + xCalcDoc = self.xUITest.getTopFocusWindow() + self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges") + xTrackDlg = self.xUITest.getTopFocusWindow() + + xChangesList = xTrackDlg.getChild("calcchanges") + self.assertEqual(1, len(xChangesList.getChildren())) + + text = "Row inserted \tSheet1.1:1\t \t04/05/2020 17:01:10\t (Row 1:1 inserted)" + self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], text) + + #it would crash here + xRejBtn = xTrackDlg.getChild("reject") + xRejBtn.executeAction("CLICK", tuple()) + + self.assertEqual(2, len(xChangesList.getChildren())) + self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted") + self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Rejected") + + xCancBtn = xTrackDlg.getChild("close") + xCancBtn.executeAction("CLICK", tuple()) + + self.ui_test.close_doc() + def test_tdf66263_Protect_Records(self): calc_doc = self.ui_test.create_doc_in_start_center("calc") xCalcDoc = self.xUITest.getTopFocusWindow() |