Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sw / qa / uitest / writer_tests / tdf106746.py
bloba95b9a931c08c62479d5a319c44789e8abf74cfd
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 from uitest.framework import UITestCase
7 from libreoffice.uno.propertyvalue import mkPropertyValues
8 import org.libreoffice.unotest
9 import pathlib
10 from uitest.uihelper.common import get_state_as_dict
11 import time
12 from uitest.debug import sleep
13 from uitest.uihelper.common import select_pos
15 def get_url_for_data_file(file_name):
16 return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
18 class tdf106746(UITestCase):
20 def test_tdf106746_copy_pasting_revisions_copy_deleted_words(self):
21 writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf106746.docx"))
22 document = self.ui_test.get_component()
23 xWriterDoc = self.xUITest.getTopFocusWindow()
24 xWriterEdit = xWriterDoc.getChild("writer_edit")
25 self.xUITest.executeCommand(".uno:SelectAll")
26 self.xUITest.executeCommand(".uno:Copy")
27 self.xUITest.executeCommand(".uno:Delete")
28 self.xUITest.executeCommand(".uno:Paste")
30 self.assertEqual(document.Text.String[39:48], "are routi")
31 self.ui_test.close_doc()
33 # vim: set shiftwidth=4 softtabstop=4 expandtab: