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