Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / qa / uitest / calc_tests8 / tdf124815.py
bloba4e581006b42c94a903e458c724a2f620a7ad2d2
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from uitest.framework import UITestCase
8 from uitest.uihelper.common import get_state_as_dict
9 from uitest.uihelper.common import select_pos
10 from uitest.uihelper.calc import enter_text_to_cell
11 from libreoffice.calc.document import get_sheet_from_doc
12 from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
13 from uitest.debug import sleep
14 from libreoffice.calc.document import get_cell_by_position
15 from libreoffice.uno.propertyvalue import mkPropertyValues
16 import org.libreoffice.unotest
17 import pathlib
19 def get_url_for_data_file(file_name):
20 return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
22 #Bug 124815 - CRASH: inserting a column
24 class tdf124815(UITestCase):
25 def test_tdf124815_crash_inserting_column(self):
26 #numberingformatpage.ui
27 calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124815.ods"))
28 xCalcDoc = self.xUITest.getTopFocusWindow()
29 gridwin = xCalcDoc.getChild("grid_window")
30 document = self.ui_test.get_component()
32 #Go to Sheet - Insert Column - Insert Column before .uno:InsertColumnsBefore
33 self.xUITest.executeCommand(".uno:InsertColumnsBefore")
34 #verify
35 self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "Rakennukset")
36 self.xUITest.executeCommand(".uno:Undo")
37 self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "Rakennukset")
39 self.ui_test.close_doc()
40 # vim: set shiftwidth=4 softtabstop=4 expandtab: