[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 15 19:41:27 UTC 2020


 sw/qa/uitest/writer_tests/data/tdf124675.docx |binary
 sw/qa/uitest/writer_tests6/tdf124675.py       |   14 ++++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit a4dab1759a7303da8b460ad9d8e6c6cbda812be2
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Oct 15 11:13:49 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Oct 15 21:40:50 2020 +0200

    uitest: this test should crash without the fix in place
    
    using undo just once doesn't make it to crash
    Besides, minimize and anonymize the document and add some more
    asserts
    
    Change-Id: If83de05ee751fc54d422937c365e408b5c25df78
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104353
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/uitest/writer_tests/data/tdf124675.docx b/sw/qa/uitest/writer_tests/data/tdf124675.docx
index 13ee05c5e6e5..a012a496aa36 100644
Binary files a/sw/qa/uitest/writer_tests/data/tdf124675.docx and b/sw/qa/uitest/writer_tests/data/tdf124675.docx differ
diff --git a/sw/qa/uitest/writer_tests6/tdf124675.py b/sw/qa/uitest/writer_tests6/tdf124675.py
index 2a02e36bcf12..6b4c4988f58a 100644
--- a/sw/qa/uitest/writer_tests6/tdf124675.py
+++ b/sw/qa/uitest/writer_tests6/tdf124675.py
@@ -27,11 +27,21 @@ class tdf124675(UITestCase):
         xWriterDoc = self.xUITest.getTopFocusWindow()
         xWriterEdit = xWriterDoc.getChild("writer_edit")
 
+        self.assertEqual(document.CurrentController.PageCount, 2)
+        self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
         for i in range(52):
             xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
 
-        self.xUITest.executeCommand(".uno:Undo")
+        self.assertEqual(document.CurrentController.PageCount, 4)
+        self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+        for i in range(52):
+            self.xUITest.executeCommand(".uno:Undo")
+
+        self.assertEqual(document.CurrentController.PageCount, 2)
+        self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
 
-        self.assertEqual(document.CurrentController.PageCount, 15)
         self.ui_test.close_doc()
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list