sc/qa/uitest/calc_tests9/tdf95554.py | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
New commits: commit 44a783185e09dc7da374a556fad44bddf1c8a1ce Author: shubham656 <shubham656j...@gmail.com> AuthorDate: Mon Jun 28 02:13:03 2021 +0530 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Jul 13 12:18:03 2021 +0200 tdf#95554 Add UITest Change-Id: I38a9768fc94f26a593f51ce566da4111f5f3b78b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117961 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/uitest/calc_tests9/tdf95554.py b/sc/qa/uitest/calc_tests9/tdf95554.py new file mode 100644 index 000000000000..67c55e9435f4 --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf95554.py @@ -0,0 +1,40 @@ +# -*- 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.uihelper.calc import enter_text_to_cell + +class Tdf95554(UITestCase): + + def test_tdf95554(self): + with self.ui_test.create_doc_in_start_center("calc"): + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") + + enter_text_to_cell(gridwin, "A1", "A") + enter_text_to_cell(gridwin, "A2", "B") + enter_text_to_cell(gridwin, "A3", "C") + enter_text_to_cell(gridwin, "A4", "D") + enter_text_to_cell(gridwin, "A5", "E") + enter_text_to_cell(gridwin, "A6", "F") + + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A1"})) + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A3:A3", "EXTEND":"1"})) + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A5:A5", "EXTEND":"1"})) + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A6:A6", "EXTEND":"1"})) + self.xUITest.executeCommand(".uno:Copy") + + with self.ui_test.load_empty_file("writer") as writer_document: + + self.xUITest.getTopFocusWindow() + self.xUITest.executeCommand(".uno:PasteUnformatted") + + # Without the fix, the test breaks here with: + #AssertionError: 'A\n\nC\n\nE\nF' != 'A' + + self.assertEqual('A\n\nC\n\nE\nF', + writer_document.Text.String) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits