Debian Codegraph @

sw/qa/uitest/writer_tests5/tdf167023.py

raw symbols SCIP
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
2 #
3 # This file is part of the LibreOffice project.
4 #
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/.
8 #
9
10 from uitest.framework import UITestCase
11 from libreoffice.uno.propertyvalue import mkPropertyValues
12
13 class tdf167023(UITestCase):
14
15 def test_tdf167023(self):
16
17 with self.ui_test.create_doc_in_start_center("writer") as document:
18
19 # Insert shape with Ctrl key
20 xArgs = mkPropertyValues({"KeyModifier": 8192})
21 self.xUITest.executeCommandWithParameters(".uno:BasicShapes.rectangle", xArgs)
22
23 self.assertEqual(1, len(document.DrawPage))
24
25 self.xUITest.executeCommand(".uno:Copy")
26
27 with self.ui_test.load_empty_file("impress") as document:
28
29 xDoc = self.xUITest.getTopFocusWindow()
30 xEditWin = xDoc.getChild("impress_win")
31
32 # tdf#167018: Without the fix in place, this test would have crashed here
33 self.xUITest.executeCommand(".uno:Paste")
34
35 self.assertEqual(3, len(document.DrawPages[0]))
36
37 # vim: set shiftwidth=4 softtabstop=4 expandtab: