| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
from uitest.framework import UITestCase |
| 11 |
from uitest.uihelper.common import type_text |
| 12 |
|
| 13 |
|
| 14 |
class tdf123446(UITestCase): |
| 15 |
|
| 16 |
def test_tdf123446_undo_redo_ToC_crash(self): |
| 17 |
with self.ui_test.create_doc_in_start_center("writer") as document: |
| 18 |
xWriterDoc = self.xUITest.getTopFocusWindow() |
| 19 |
xWriterEdit = xWriterDoc.getChild("writer_edit") |
| 20 |
|
| 21 |
type_text(xWriterEdit, "LibreOffice") |
| 22 |
|
| 23 |
self.xUITest.executeCommand(".uno:StyleApply?Style:string=Heading%202&FamilyName:string=ParagraphStyles") |
| 24 |
|
| 25 |
|
| 26 |
self.xUITest.executeCommand(".uno:GoLeft") |
| 27 |
self.xUITest.executeCommand(".uno:GoLeft") |
| 28 |
self.xUITest.executeCommand(".uno:GoLeft") |
| 29 |
self.xUITest.executeCommand(".uno:GoLeft") |
| 30 |
|
| 31 |
with self.ui_test.execute_dialog_through_command(".uno:InsertMultiIndex"): |
| 32 |
pass |
| 33 |
|
| 34 |
self.xUITest.executeCommand(".uno:Undo") |
| 35 |
|
| 36 |
self.xUITest.executeCommand(".uno:Redo") |
| 37 |
|
| 38 |
|
| 39 |
self.xUITest.executeCommand(".uno:Undo") |
| 40 |
self.assertEqual(document.Text.String[0:7], "LibreOf") |
| 41 |
|
| 42 |
|