diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-07-01 11:33:21 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-07-01 16:47:54 +0200 |
commit | c62587987f2046b3b4b22af3d9897dd17077d5a8 (patch) | |
tree | c0442ecdc06c4f4a987e27e618df6ddd6e13febe /sd | |
parent | e6fcee376f45c6701ef74c9e62aa1d6aa932cef3 (diff) |
tdf#149787: sd: Add unittest
Change-Id: I27ec82fb8942f8cf6d663ae358ef29a2f6fa940f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136726
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf149787.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf149787.py b/sd/qa/uitest/impress_tests/tdf149787.py new file mode 100644 index 000000000000..3d65f1c0bb87 --- /dev/null +++ b/sd/qa/uitest/impress_tests/tdf149787.py @@ -0,0 +1,40 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.framework import UITestCase +from uitest.uihelper.common import select_pos + +class TestTdf149787(UITestCase): + + def testTdf149787(self): + with self.ui_test.create_doc_in_start_center("impress") as document: + + xTemplateDlg = self.xUITest.getTopFocusWindow() + xCancelBtn = xTemplateDlg.getChild("close") + self.ui_test.close_dialog_through_button(xCancelBtn) + + xImpressDoc = self.xUITest.getTopFocusWindow() + + self.assertIsNone(document.CurrentSelection) + + xEditWin = xImpressDoc.getChild("impress_win") + xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"})) + self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName()) + + with self.ui_test.execute_dialog_through_command(".uno:FormatArea", close_button="cancel") as xDialog: + tabControl = xDialog.getChild("tabcontrol") + select_pos(tabControl, "0") + btnColor = xDialog.getChild("btncolor") + btnColor.executeAction("CLICK", tuple()) + btnMoreColors = xDialog.getChild("btnMoreColors") + + with self.ui_test.execute_blocking_action(btnMoreColors.executeAction, args=('CLICK', ()), close_button="buttonClose") as dialog: + xCloseBtn = dialog.getChild("buttonClose") + self.ui_test.wait_until_property_is_updated(xCloseBtn, "Enabled", "true") + + +# vim: set shiftwidth=4 softtabstop=4 expandtab: |