summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/writer_tests3/insertEndnote.py
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest/writer_tests3/insertEndnote.py')
-rw-r--r--sw/qa/uitest/writer_tests3/insertEndnote.py35
1 files changed, 18 insertions, 17 deletions
diff --git a/sw/qa/uitest/writer_tests3/insertEndnote.py b/sw/qa/uitest/writer_tests3/insertEndnote.py
index 940844a5d563..54dd15e346b5 100644
--- a/sw/qa/uitest/writer_tests3/insertEndnote.py
+++ b/sw/qa/uitest/writer_tests3/insertEndnote.py
@@ -10,25 +10,26 @@ from uitest.uihelper.common import type_text
class insertEndnote(UITestCase):
def test_insert_endnote(self):
- with self.ui_test.create_doc_in_start_center("writer"):
- document = self.ui_test.get_component()
- xWriterDoc = self.xUITest.getTopFocusWindow()
- xWriterEdit = xWriterDoc.getChild("writer_edit")
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
- self.xUITest.executeCommand(".uno:InsertEndnote")
+ self.xUITest.executeCommand(".uno:InsertEndnote")
- type_text(xWriterEdit, "LibreOffice")
+ type_text(xWriterEdit, "LibreOffice")
- self.assertEqual(document.Endnotes[0].String, "LibreOffice")
- self.assertEqual(document.Endnotes.getCount(), 1)
- self.xUITest.executeCommand(".uno:Undo")
- self.assertEqual(document.Endnotes[0].String, "")
- self.xUITest.executeCommand(".uno:Undo")
- self.assertEqual(document.Endnotes.getCount(), 0)
- self.xUITest.executeCommand(".uno:Redo")
- self.assertEqual(document.Endnotes[0].String, "")
- self.assertEqual(document.Endnotes.getCount(), 1)
- self.xUITest.executeCommand(".uno:Redo")
- self.assertEqual(document.Endnotes[0].String, "LibreOffice")
+ self.assertEqual(document.Endnotes[0].String, "LibreOffice")
+ self.assertEqual(document.Endnotes.getCount(), 1)
+ self.xUITest.executeCommand(".uno:Undo")
+ self.assertEqual(document.Endnotes[0].String, "")
+ self.xUITest.executeCommand(".uno:Undo")
+ self.assertEqual(document.Endnotes.getCount(), 0)
+ self.xUITest.executeCommand(".uno:Redo")
+ self.assertEqual(document.Endnotes[0].String, "")
+ self.assertEqual(document.Endnotes.getCount(), 1)
+ self.xUITest.executeCommand(".uno:Redo")
+ self.assertEqual(document.Endnotes[0].String, "LibreOffice")
+ self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: