Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / qa / uitest / table / tdf93068.py
blob4dae8ae74358a9bc1ee3cbe74433d21eb3fcb1ec
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from uitest.framework import UITestCase
12 class tdf93068(UITestCase):
14 def test_tdf93068(self):
16 with self.ui_test.create_doc_in_start_center("writer") as document:
19 self.xUITest.getTopFocusWindow()
21 # tdf#135950: Character dialog crashes if multiple cells in a
22 # table are selected
23 with self.ui_test.execute_dialog_through_command(".uno:InsertTable"):
24 pass
26 self.xUITest.executeCommand(".uno:SelectAll")
28 # Check the table is selected
29 self.assertEqual("SwXTextTableCursor", document.CurrentSelection.getImplementationName())
31 with self.ui_test.execute_dialog_through_command(".uno:FontDialog"):
32 pass
34 with self.ui_test.execute_dialog_through_command(".uno:FontDialog", close_button="cancel"):
35 pass
37 with self.ui_test.execute_dialog_through_command(".uno:FontDialog") as xFontDlg:
38 xDiscardBtn = xFontDlg.getChild("reset")
39 xDiscardBtn.executeAction("CLICK", tuple())
41 self.xUITest.getTopFocusWindow()
43 # Check the table is still selected after closing the dialog
44 self.assertEqual("SwXTextTableCursor", document.CurrentSelection.getImplementationName())
46 self.xUITest.executeCommand(".uno:GoDown")
48 # Check the table is no longer selected
49 self.assertNotEqual("SwXTextTableCursor", document.CurrentSelection.getImplementationName())
51 # vim: set shiftwidth=4 softtabstop=4 expandtab: