summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/uitest/calc_tests/data/tdf130960.odtbin0 -> 7956 bytes
-rw-r--r--sc/qa/uitest/calc_tests4/trackedChanges.py30
2 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests/data/tdf130960.odt b/sc/qa/uitest/calc_tests/data/tdf130960.odt
new file mode 100644
index 000000000000..2a08fa54b7a1
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/data/tdf130960.odt
Binary files differ
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()