merge duplicate part of branches
[LibreOffice.git] / sw / qa / uitest / writer_tests5 / tdf150151.py
blob9e51fa3546b88ea6d28f810ec62173ed820ce935
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from uitest.framework import UITestCase
11 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.uihelper.common import type_text
14 class Tdf150151(UITestCase):
16 def test_tdf150151(self):
18 sText = "Šđčćž ŠĐČĆŽ !”#$%&/()=?*,.-;:_ ° ~ˇ^˘°˛`˙’˝”¸"
20 with self.ui_test.create_doc_in_start_center("writer") as document:
21 xWriterDoc = self.xUITest.getTopFocusWindow()
22 xWriterEdit = xWriterDoc.getChild("writer_edit")
24 type_text(xWriterEdit, sText)
26 self.xUITest.executeCommand(".uno:SelectAll")
28 self.xUITest.executeCommand(".uno:Copy")
30 with self.ui_test.load_empty_file("impress") as document:
32 xDoc = self.xUITest.getTopFocusWindow()
33 xEditWin = xDoc.getChild("impress_win")
35 xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
36 self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
38 self.xUITest.executeCommand(".uno:Text")
39 self.xUITest.executeCommand(".uno:Paste")
41 # Without the fix in place, this test would have failed with
42 # AssertionError: 'Šđčćž ŠĐČĆŽ !”#$%&/()=?*,.-;:_ ° ~ˇ^˘°˛`˙’˝”¸' != 'Š !#$%&/()=?*,.-;:_ ~^`'
43 self.assertEqual(sText, document.DrawPages[0][1].String)
45 # vim: set shiftwidth=4 softtabstop=4 expandtab: