tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / sw / qa / uitest / writer_tests7 / tdf115853.py
bloba1e9d2a7dd3490f4191e42457fc7f8fb4b856cf4
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
12 from uitest.uihelper.common import get_state_as_dict
13 from uitest.uihelper.common import select_pos
15 class tdf115853(UITestCase):
17 def test_tdf115853(self):
18 with self.ui_test.create_doc_in_start_center("writer"):
19 with self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties") as xDialog:
21 xTabs = xDialog.getChild("tabcontrol")
23 select_pos(xTabs, "2")
25 xAddBtn = xDialog.getChild("add")
26 xAddBtn.executeAction("CLICK", tuple())
28 xNameBox1 = xDialog.getChild("namebox1")
29 xNameBox1.executeAction("TYPE", mkPropertyValues({"TEXT":"Text"}))
31 xAddBtn = xDialog.getChild("add")
32 xAddBtn.executeAction("CLICK", tuple())
34 # Without the fix in place, this test would have failed with
35 # AssertionError: 'Text' != ''
36 self.assertEqual("Text", get_state_as_dict(xNameBox1)['Text'])
40 # vim: set shiftwidth=4 softtabstop=4 expandtab: