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

Zdeněk Crhonek zcrhonek at gmail.com
Sat Apr 7 09:51:35 UTC 2018


 sw/qa/uitest/writer_tests/data/tdf79569.doc |binary
 sw/qa/uitest/writer_tests/tdf79569.py       |   38 ++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

New commits:
commit 5bd027e17f3656ab65548126ed6d7e309818eae7
Author: Zdeněk Crhonek <zcrhonek at gmail.com>
Date:   Tue Mar 27 07:55:48 2018 +0200

    uitest for bug tdf#79569
    
    Change-Id: Icd6edba8451d5ad9ac7ba5fed522f27ad5d53672
    Reviewed-on: https://gerrit.libreoffice.org/51927
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sw/qa/uitest/writer_tests/data/tdf79569.doc b/sw/qa/uitest/writer_tests/data/tdf79569.doc
new file mode 100644
index 000000000000..2d94868da586
Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf79569.doc differ
diff --git a/sw/qa/uitest/writer_tests/tdf79569.py b/sw/qa/uitest/writer_tests/tdf79569.py
new file mode 100644
index 000000000000..ebf752edeb64
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf79569.py
@@ -0,0 +1,38 @@
+# -*- 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
+from uitest.debug import sleep
+from uitest.path import get_srcdir_url
+
+def get_url_for_data_file(file_name):
+   return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
+
+class tdf79569(UITestCase):
+
+   def test_tdf81457_table_merge_undo(self):
+        writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf79569.doc"))
+        xWriterDoc = self.xUITest.getTopFocusWindow()
+        xWriterEdit = xWriterDoc.getChild("writer_edit")
+        document = self.ui_test.get_component()
+        self.xUITest.executeCommand(".uno:GoDown")
+        self.xUITest.executeCommand(".uno:GoDown")
+        xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+END"}))
+        self.xUITest.executeCommand(".uno:GoRight")
+        xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+END"}))
+        xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "SHIFT+RIGHT"}))
+        self.xUITest.executeCommand(".uno:MergeCells")
+        self.xUITest.executeCommand(".uno:Undo")
+        self.xUITest.executeCommand(".uno:Redo")
+        self.xUITest.executeCommand(".uno:Undo")
+
+        self.assertEqual(document.TextTables.getCount(), 1)
+
+        self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list