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_state_as_dict
, get_url_for_data_file
11 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
12 from uitest
.uihelper
.common
import change_measurement_unit
14 class tdf99711(UITestCase
):
15 def test_tdf99711(self
):
17 with self
.ui_test
.load_file(get_url_for_data_file("shape.odt")):
19 with
change_measurement_unit(self
, "Millimeter"):
21 xWriterDoc
= self
.xUITest
.getTopFocusWindow()
22 xWriterEdit
= xWriterDoc
.getChild("writer_edit")
24 self
.xUITest
.executeCommand(".uno:JumpToNextFrame")
26 self
.xUITest
.executeCommand(".uno:Sidebar")
27 xWriterEdit
.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "TextPropertyPanel"}))
29 #wait until the sidebar is available
30 xChild
= self
.ui_test
.wait_until_child_is_available('selectwidth')
31 self
.assertEqual(get_state_as_dict(xChild
)['Text'], '10.00 mm')
33 xChild
= self
.ui_test
.wait_until_child_is_available('selectheight')
34 self
.assertEqual(get_state_as_dict(xChild
)['Text'], '10.00 mm')
36 self
.xUITest
.executeCommand(".uno:Sidebar")
38 # vim: set shiftwidth=4 softtabstop=4 expandtab: