[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 4 16:12:37 UTC 2020
sc/qa/uitest/calc_tests/data/tdf136062.ods |binary
sc/qa/uitest/calc_tests4/trackedChanges.py | 29 +++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
New commits:
commit c9173b4042d6d4dc2e4b028e133ea60631f6e87d
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Sep 4 16:35:18 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Sep 4 18:11:58 2020 +0200
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 at libreoffice.org>
diff --git a/sc/qa/uitest/calc_tests/data/tdf136062.ods b/sc/qa/uitest/calc_tests/data/tdf136062.ods
new file mode 100644
index 000000000000..300e8eff7fdd
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf136062.ods differ
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:
More information about the Libreoffice-commits
mailing list