diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-15 11:13:49 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-15 21:40:50 +0200 |
commit | a4dab1759a7303da8b460ad9d8e6c6cbda812be2 (patch) | |
tree | deca509a46205e5f0756768d1f852cf29b81147e | |
parent | 98e9759a2513651683b7f372497d5007c7961727 (diff) |
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@libreoffice.org>
-rw-r--r-- | sw/qa/uitest/writer_tests/data/tdf124675.docx | bin | 121754 -> 25801 bytes | |||
-rw-r--r-- | sw/qa/uitest/writer_tests6/tdf124675.py | 14 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sw/qa/uitest/writer_tests/data/tdf124675.docx b/sw/qa/uitest/writer_tests/data/tdf124675.docx Binary files differindex 13ee05c5e6e5..a012a496aa36 100644 --- a/sw/qa/uitest/writer_tests/data/tdf124675.docx +++ b/sw/qa/uitest/writer_tests/data/tdf124675.docx 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: |