tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / sw / qa / uitest / writer_tests7 / tdf137803.py
blobf987cdee54776816735253494b6d9cdc505d2eb6
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 uitest.uihelper.common import get_url_for_data_file
13 class tdf137803(UITestCase):
14 def test_tdf137803(self):
15 # load the sample file
16 with self.ui_test.load_file(get_url_for_data_file("tdf137803.odt")) as document:
18 # select the shape
19 self.xUITest.executeCommand(".uno:JumpToNextFrame")
20 self.ui_test.wait_until_child_is_available('metricfield')
22 # open textattrs dialog
23 with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as TextDialog:
25 # check autosize on
26 TSB_AUTOGROW_SIZE = TextDialog.getChild('TSB_AUTOGROW_SIZE')
27 TSB_AUTOGROW_SIZE.executeAction("CLICK",tuple())
29 # get the shape
30 shape = document.getDrawPages()[0][0]
32 # and the textbox
33 frame = shape.getText()
35 # get the positions
36 shapeYPos = shape.getPropertyValue("VertOrientPosition")
37 frameYPos = frame.getPropertyValue("VertOrientPosition")
38 shpsize = shape.getSize().Height
40 xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
41 xToolkit.processEventsToIdle()
43 # without the fix, at this point the textbox falls apart so this won't be passed
44 self.assertLess(frameYPos, shapeYPos + shpsize)
46 # close the doc
48 # vim: set shiftwidth=4 softtabstop=4 expandtab: