sd/qa/uitest/impress_tests/tdf149787.py |   40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

New commits:
commit c62587987f2046b3b4b22af3d9897dd17077d5a8
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Jul 1 11:33:21 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Jul 1 16:47:54 2022 +0200

    tdf#149787: sd: Add unittest
    
    Change-Id: I27ec82fb8942f8cf6d663ae358ef29a2f6fa940f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136726
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

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:

Reply via email to