[Libreoffice-commits] core.git: sd/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 11 14:17:20 UTC 2020


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

New commits:
commit 2c86f1981c9a6f24d5c33c5eede2cd15ce6f29e3
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Feb 11 09:58:24 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Feb 11 15:16:42 2020 +0100

    tdf#129346: Add UItest
    
    Change-Id: I491659d3bc5657c4eda2d88849acb0c4972b0c60
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88429
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>

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:


More information about the Libreoffice-commits mailing list