Get the style color and number just once
[LibreOffice.git] / sw / qa / uitest / writer_tests6 / tdf118883.py
blob316120b800656e56324c76a5a764f74e4a5f5bc8
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
13 class Tdf118883(UITestCase):
15 def test_tdf118883(self):
16 with self.ui_test.create_doc_in_start_center("writer") as writer_document:
18 # Insert shape with Ctrl key
19 xArgs = mkPropertyValues({"KeyModifier": 8192})
20 self.xUITest.executeCommandWithParameters(".uno:BasicShapes.rectangle", xArgs)
22 self.assertEqual(1, len(writer_document.DrawPage))
24 self.xUITest.executeCommand(".uno:Copy")
26 with self.ui_test.load_empty_file("calc") as calc_document:
28 self.xUITest.executeCommand(".uno:Paste")
30 # Without the fix in place, this test would have failed with
31 # AssertionError: 1 != 0
32 self.assertEqual(1, len(calc_document.DrawPages[0]))
34 # vim: set shiftwidth=4 softtabstop=4 expandtab: