Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / qa / uitest / calc_tests4 / tdf99386.py
blobff9286b61288773359becc638670967c655c819b
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/.
8 from uitest.framework import UITestCase
9 from uitest.uihelper.common import get_state_as_dict
10 from libreoffice.uno.propertyvalue import mkPropertyValues
11 from uitest.debug import sleep
12 from uitest.uihelper.calc import enter_text_to_cell
13 from libreoffice.calc.document import get_cell_by_position
14 import org.libreoffice.unotest
15 import pathlib
16 import time
18 def get_url_for_data_file(file_name):
19 return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
21 class tdf99386(UITestCase):
23 def test_td99386_undo_merged_cell_needs_hard_recalculate(self):
25 calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf99386.ods"))
27 xCalcDoc = self.xUITest.getTopFocusWindow()
28 xGridWindow = xCalcDoc.getChild("grid_window")
29 document = self.ui_test.get_component()
31 xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B1"})) #select cells
32 self.xUITest.executeCommand(".uno:ToggleMergeCells") # merge cells
33 self.xUITest.executeCommand(".uno:Undo")
35 self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "This")
37 self.ui_test.close_doc()
39 # vim: set shiftwidth=4 softtabstop=4 expandtab: