Debian Codegraph @

sd/qa/uitest/impress_tests2/tdf146019.py

raw
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 from uitest.framework import UITestCase
10 from libreoffice.uno.propertyvalue import mkPropertyValues
11 from uitest.uihelper.common import get_url_for_data_file
12
13 class tdf146019(UITestCase):
14
15 def test_tdf146019(self):
16
17 with self.ui_test.create_doc_in_start_center("impress") as document:
18
19 xTemplateDlg = self.xUITest.getTopFocusWindow()
20 xCancelBtn = xTemplateDlg.getChild("close")
21 self.ui_test.close_dialog_through_button(xCancelBtn)
22
23 with self.ui_test.execute_dialog_through_command(".uno:InsertGraphic", close_button="open") as xOpenDialog:
24
25 xFileName = xOpenDialog.getChild("file_name")
26 xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("tdf146019.jpg")}))
27
28 # Before the fix, a dialog was displayed at this point
29
30 # Check the shape is rotated, height > width
31 shape = document.getDrawPages()[0][2]
32 self.assertEqual(8996, shape.getSize().Width)
33 self.assertEqual(11745, shape.getSize().Height)
34
35 # vim: set shiftwidth=4 softtabstop=4 expandtab: