diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-04 16:35:18 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-04 18:11:58 +0200 |
commit | c9173b4042d6d4dc2e4b028e133ea60631f6e87d (patch) | |
tree | 0be3d9b3daf0e504c95cecef9417054062928075 /sc | |
parent | 7d379bd8535b32a8d63a5fa8131cd9e82c7ff94f (diff) |
tdf#136062: sc: Add UItest
Change-Id: Ic154f80a0b4c9bcade64e7c5ba9180db5c199de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102054
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/uitest/calc_tests/data/tdf136062.ods | bin | 0 -> 8288 bytes | |||
-rw-r--r-- | sc/qa/uitest/calc_tests4/trackedChanges.py | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests/data/tdf136062.ods b/sc/qa/uitest/calc_tests/data/tdf136062.ods Binary files differnew file mode 100644 index 000000000000..300e8eff7fdd --- /dev/null +++ b/sc/qa/uitest/calc_tests/data/tdf136062.ods diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py index d379ca293d1d..9ff7c385ab63 100644 --- a/sc/qa/uitest/calc_tests4/trackedChanges.py +++ b/sc/qa/uitest/calc_tests4/trackedChanges.py @@ -295,4 +295,33 @@ class CalcTrackedChanges(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") self.ui_test.close_doc() + def test_tdf136062(self): + + self.ui_test.load_file(get_url_for_data_file("tdf136062.ods")) + + 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())) + + xRejectAllBtn = xTrackDlg.getChild("rejectall") + xRejectBtn = xTrackDlg.getChild("reject") + xAcceptAllBtn = xTrackDlg.getChild("acceptall") + xAcceptBtn = xTrackDlg.getChild("accept") + + # Without the fix in place, it would have failed with + # AssertionError: 'R~eject All' != 'R~eject All/Clear formatting' + self.assertEqual('R~eject All', get_state_as_dict(xRejectAllBtn)['Text']) + self.assertEqual('~Reject', get_state_as_dict(xRejectBtn)['Text']) + self.assertEqual('A~ccept All', get_state_as_dict(xAcceptAllBtn)['Text']) + self.assertEqual('~Accept', get_state_as_dict(xAcceptBtn)['Text']) + + xCancBtn = xTrackDlg.getChild("close") + xCancBtn.executeAction("CLICK", tuple()) + + self.ui_test.close_doc() + # vim: set shiftwidth=4 softtabstop=4 expandtab: |