[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/qa

Balazs Santha (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 12 15:54:08 UTC 2021


 sw/qa/uitest/writer_tests7/tdf131771.py |   46 ++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

New commits:
commit e688361af320a3edb4fb3665ee6c1af68ef8b1bd
Author:     Balazs Santha <santha.balazs at simonyi.bme.hu>
AuthorDate: Mon Jul 5 12:57:47 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Aug 12 17:53:27 2021 +0200

    sw: test fix of tdf#131771
    
    Change-Id: I9879f13e842dd7288c996c1097130e7e7b28589c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118432
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120375

diff --git a/sw/qa/uitest/writer_tests7/tdf131771.py b/sw/qa/uitest/writer_tests7/tdf131771.py
new file mode 100644
index 000000000000..f6ed46eb1ad8
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf131771.py
@@ -0,0 +1,46 @@
+# -*- 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 uitest.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
+
+# Bug 131771 - Copying+Pasting a table: caused the loss of table style setting.
+
+
+class tdf131771(UITestCase):
+    def test_tdf131771(self):
+        self.ui_test.create_doc_in_start_center("writer")
+        xWriterDoc = self.xUITest.getTopFocusWindow()
+        xWriterEdit = xWriterDoc.getChild("writer_edit")
+        # generate a 2x2 tables with the same autoformat table style (Default Table Style)
+        # Note that this style is different than applying nothing!
+        self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+        xDialog = self.xUITest.getTopFocusWindow()
+        formatlbinstable = xDialog.getChild("formatlbinstable")
+        entry = formatlbinstable.getChild("1")
+        entry.executeAction("SELECT", tuple())
+
+        xOkBtn = xDialog.getChild("ok")
+        xOkBtn.executeAction("CLICK", tuple())
+
+        # select the table
+        self.xUITest.executeCommand(".uno:SelectAll")
+
+        # copying and pasting the table below
+        self.xUITest.executeCommand(".uno:Copy")
+        self.xUITest.executeCommand(".uno:GoDown")
+        self.xUITest.executeCommand(".uno:Paste")
+
+        document = self.ui_test.get_component()
+        tables = document.getTextTables()
+        self.assertEqual(tables[0].TableTemplateName, 'Default Style')
+        self.assertEqual(tables[1].TableTemplateName, 'Default Style')
+
+        self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list