android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / qa / uitest / macro_tests / tdf124413.py
blob671fc9163bea71fc2a3bd449f1ff32aefae431b1
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
11 from uitest.uihelper.common import get_state_as_dict
13 class tdf124413(UITestCase):
15 def test_copy_paste_overwriting_undo_redo_in_macro_editor_tdf124413(self):
17 with self.ui_test.create_doc_in_start_center("writer"):
18 #Start LibreOffice. Go to Tools > Macros > Organize Macros > Basic
19 with self.ui_test.execute_dialog_through_command(".uno:MacroDialog", close_button="") as xDialog:
20 #Open Editor
21 xEditBtn = xDialog.getChild("edit")
22 xEditBtn.executeAction("CLICK", tuple())
24 resultText = "REM ***** BASIC *****\n\nSub Main\n\nEnd Sub\n"
26 xMacroWin = self.xUITest.getTopFocusWindow()
27 xEditWin = xMacroWin.getChild('EditorWindow')
29 self.assertEqual(get_state_as_dict(xEditWin)['Text'], resultText)
31 self.xUITest.executeCommand(".uno:SelectAll")
32 self.xUITest.executeCommand(".uno:Copy")
33 self.xUITest.executeCommand(".uno:SelectAll")
34 self.xUITest.executeCommand(".uno:Paste")
35 self.xUITest.executeCommand(".uno:Undo")
36 self.xUITest.executeCommand(".uno:Redo")
37 self.xUITest.executeCommand(".uno:Undo")
38 self.xUITest.executeCommand(".uno:Redo")
39 self.xUITest.executeCommand(".uno:Undo")
40 self.xUITest.executeCommand(".uno:Redo")
42 self.assertEqual(get_state_as_dict(xEditWin)['Text'], resultText)
45 # vim: set shiftwidth=4 softtabstop=4 expandtab: