summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-10-29 17:09:43 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-10-30 18:24:21 +0100
commit930e67f488b4d4abdf9ffe494f4b1530179881cb (patch)
treea309ce45d0096fb3bb9a50d1b942e8017d7b7d0b
parentcrashtesting: assert on undo creation on export of tdf105134-1.docx to pdf (diff)
downloadcore-930e67f488b4d4abdf9ffe494f4b1530179881cb.tar.gz
core-930e67f488b4d4abdf9ffe494f4b1530179881cb.zip
tdf#137855: sw: Add UItest
Change-Id: Iea71fdff2b900d36ad9475b20ef93f81138f3e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105016 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/uitest/data/tdf137855.odtbin0 -> 46821 bytes
-rw-r--r--sw/qa/uitest/data/tdf137855_2.odtbin0 -> 57130 bytes
-rw-r--r--sw/qa/uitest/writer_tests/compareDocuments.py39
3 files changed, 39 insertions, 0 deletions
diff --git a/sw/qa/uitest/data/tdf137855.odt b/sw/qa/uitest/data/tdf137855.odt
new file mode 100644
index 000000000000..9657ebdb2de4
--- /dev/null
+++ b/sw/qa/uitest/data/tdf137855.odt
Binary files differ
diff --git a/sw/qa/uitest/data/tdf137855_2.odt b/sw/qa/uitest/data/tdf137855_2.odt
new file mode 100644
index 000000000000..0b0f9cbe6a1c
--- /dev/null
+++ b/sw/qa/uitest/data/tdf137855_2.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests/compareDocuments.py b/sw/qa/uitest/writer_tests/compareDocuments.py
index 2013fac42bb8..f18accf456c3 100644
--- a/sw/qa/uitest/writer_tests/compareDocuments.py
+++ b/sw/qa/uitest/writer_tests/compareDocuments.py
@@ -54,4 +54,43 @@ class compareDocuments(UITestCase):
self.ui_test.close_doc()
+ def test_tdf137855(self):
+
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf137855.odt"))
+
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+
+ self.ui_test.execute_dialog_through_command(".uno:CompareDocuments")
+
+ xOpenDialog = self.xUITest.getTopFocusWindow()
+ xFileName = xOpenDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("tdf137855_2.odt")}))
+
+ xOpenBtn = xOpenDialog.getChild("open")
+ xOpenBtn.executeAction("CLICK", tuple())
+
+ # Close the dialog and open it again so the list of changes is updated
+ xTrackDlg = self.xUITest.getTopFocusWindow()
+ xcloseBtn = xTrackDlg.getChild("close")
+ xcloseBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges")
+ xTrackDlg = self.xUITest.getTopFocusWindow()
+ changesList = xTrackDlg.getChild("writerchanges")
+
+ # Check the number of changes
+ self.assertEqual(263, len(changesList.getChildren()))
+
+ # Without the fix in place, this test would have crashed here
+ xAccBtn = xTrackDlg.getChild("acceptall")
+ xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(0, len(changesList.getChildren()))
+
+ xcloseBtn = xTrackDlg.getChild("close")
+ xcloseBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: