2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
8 from uitest
.framework
import UITestCase
9 from uitest
.uihelper
.common
import select_pos
11 class TestTdf149787(UITestCase
):
13 def testTdf149787(self
):
14 with self
.ui_test
.create_doc_in_start_center("impress") as document
:
16 xTemplateDlg
= self
.xUITest
.getTopFocusWindow()
17 xCancelBtn
= xTemplateDlg
.getChild("close")
18 self
.ui_test
.close_dialog_through_button(xCancelBtn
)
20 xImpressDoc
= self
.xUITest
.getTopFocusWindow()
22 self
.assertIsNone(document
.CurrentSelection
)
24 xEditWin
= xImpressDoc
.getChild("impress_win")
25 xEditWin
.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
26 self
.assertEqual("com.sun.star.drawing.SvxShapeCollection", document
.CurrentSelection
.getImplementationName())
28 with self
.ui_test
.execute_dialog_through_command(".uno:FormatArea", close_button
="cancel") as xDialog
:
29 tabControl
= xDialog
.getChild("tabcontrol")
30 select_pos(tabControl
, "0")
31 btnColor
= xDialog
.getChild("btncolor")
32 btnColor
.executeAction("CLICK", tuple())
33 btnMoreColors
= xDialog
.getChild("btnMoreColors")
35 with self
.ui_test
.execute_blocking_action(btnMoreColors
.executeAction
, args
=('CLICK', ()), close_button
="buttonClose") as dialog
:
36 xCloseBtn
= dialog
.getChild("buttonClose")
37 self
.ui_test
.wait_until_property_is_updated(xCloseBtn
, "Enabled", "true")
40 # vim: set shiftwidth=4 softtabstop=4 expandtab: