summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-02-11 09:58:24 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2020-02-11 15:16:42 +0100
commit2c86f1981c9a6f24d5c33c5eede2cd15ce6f29e3 (patch)
tree0deebee775497019604f48402eede290a5862cfb /sd
parentb97af2719c739649d86a8ec1cc1d0c2d38b26697 (diff)
tdf#129346: Add UItest
Change-Id: I491659d3bc5657c4eda2d88849acb0c4972b0c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88429 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/uitest/impress_tests/tdf129346.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf129346.py b/sd/qa/uitest/impress_tests/tdf129346.py
new file mode 100644
index 000000000000..7c22256955f3
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf129346.py
@@ -0,0 +1,31 @@
+# -*- 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 tdf129346(UITestCase):
+
+ def test_run(self):
+ self.ui_test.create_doc_in_start_center("impress")
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ self.xUITest.executeCommand(".uno:DiaMode")
+ xDoc = self.xUITest.getTopFocusWindow()
+ document = self.ui_test.get_component()
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+ self.xUITest.executeCommand(".uno:InsertPage")
+
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+ self.xUITest.executeCommand(".uno:Undo")
+
+ #Without the accompanying fix in place, getCurrentPage() is None
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: