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

New commits:
commit 041379f6420f6d67bfd2bb952968e8c183f13a9d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Aug 18 11:18:42 2021 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Nov 17 17:12:54 2021 +0100

    tdf#137637: sd: Add UItest
    
    Change-Id: I5c0b3e85977b0e795a57e23dea0f7c8252777ce4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120652
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sd/qa/uitest/impress_tests/tdf137637.py 
b/sd/qa/uitest/impress_tests/tdf137637.py
new file mode 100644
index 000000000000..a76c0c970b29
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf137637.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class Tdf137637(UITestCase):
+
+   def test_tdf137637(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)
+
+            # Insert shape with Ctrl key
+            xArgs = mkPropertyValues({"KeyModifier": 8192})
+            
self.xUITest.executeCommandWithParameters(".uno:BasicShapes.rectangle", xArgs)
+
+            self.assertEqual("com.sun.star.drawing.SvxShapeCollection", 
document.CurrentSelection.getImplementationName())
+
+            xImpressDoc = self.xUITest.getTopFocusWindow()
+
+            xEditWin = xImpressDoc.getChild("impress_win")
+
+            xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": 
"SdCustomAnimationPanel"}))
+
+            # Without the fix in place, this test would have failed with
+            # AttributeError: 'NoneType' object has no attribute 
'getImplementationName'
+            self.assertEqual("com.sun.star.drawing.SvxShapeCollection", 
document.CurrentSelection.getImplementationName())
+

Reply via email to