summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdeněk Crhonek <zcrhonek@gmail.com>2018-03-27 07:55:48 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-04-07 11:51:15 +0200
commit5bd027e17f3656ab65548126ed6d7e309818eae7 (patch)
treed2563cadf490e9596b49df5ad2e90656372e0e97
parenta0bcbf72614344639235a46d1cc81483f93a3d61 (diff)
uitest for bug tdf#79569
Change-Id: Icd6edba8451d5ad9ac7ba5fed522f27ad5d53672 Reviewed-on: https://gerrit.libreoffice.org/51927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sw/qa/uitest/writer_tests/data/tdf79569.docbin0 -> 13824 bytes
-rw-r--r--sw/qa/uitest/writer_tests/tdf79569.py38
2 files changed, 38 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/data/tdf79569.doc
Binary files 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: