sc/qa/uitest/calc_tests/data/tdf91217.ods |binary sc/qa/uitest/calc_tests9/tdf91217.py | 43 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
New commits: commit 1347dc450b13cac8643db3ccb2670838dc82d138 Author: Zdeněk Crhonek <zcrho...@gmail.com> AuthorDate: Sat Nov 23 09:31:10 2019 +0100 Commit: Zdenek Crhonek <zcrho...@gmail.com> CommitDate: Sat Nov 23 13:44:38 2019 +0100 uitest for bug tdf#91217 Change-Id: I0322a3bc821850d5f15aeb690ba80ff7b8129140 Reviewed-on: https://gerrit.libreoffice.org/83546 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf91217.ods b/sc/qa/uitest/calc_tests/data/tdf91217.ods new file mode 100644 index 000000000000..c1bb9da85c94 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf91217.ods differ diff --git a/sc/qa/uitest/calc_tests9/tdf91217.py b/sc/qa/uitest/calc_tests9/tdf91217.py new file mode 100644 index 000000000000..103c970e6740 --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf91217.py @@ -0,0 +1,43 @@ +# -*- 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 uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 91217 - Crash when deleting rows + +class tdf91217(UITestCase): + def test_tdf91217_crash_deleting_rows(self): + calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf91217.ods")) + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") + document = self.ui_test.get_component() + #Select rows 76-1125 in sheet 3 (Daily), right click, Delete Rows. Instant crash. + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A76:A1125"})) + self.xUITest.executeCommand(".uno:SelectRow") + #delete rows + self.xUITest.executeCommand(".uno:DeleteRows") + #A1 should be "Dist" + self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + #- Undo-redo + self.xUITest.executeCommand(".uno:Undo") + self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + + self.xUITest.executeCommand(".uno:Redo") + self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + + self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits