Fix typo
[LibreOffice.git] / uitest / impress_tests / start.py
blobcbf38b88b72a15a86ca7785851ac2b52ad152762
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.uihelper.common import get_state_as_dict
11 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.framework import UITestCase
14 class SimpleImpressTest(UITestCase):
15 def test_start_impress(self):
17 with self.ui_test.create_doc_in_start_center("impress"):
19 xTemplateDlg = self.xUITest.getTopFocusWindow()
20 xCancelBtn = xTemplateDlg.getChild("close")
21 self.ui_test.close_dialog_through_button(xCancelBtn)
23 xImpressDoc = self.xUITest.getTopFocusWindow()
25 xEditWin = xImpressDoc.getChild("impress_win")
26 xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
28 self.assertEqual(get_state_as_dict(xEditWin)["Zoom"], "200")
31 def test_select_page(self):
33 with self.ui_test.create_doc_in_start_center("impress"):
35 xTemplateDlg = self.xUITest.getTopFocusWindow()
36 xCancelBtn = xTemplateDlg.getChild("close")
37 self.ui_test.close_dialog_through_button(xCancelBtn)
39 xImpressDoc = self.xUITest.getTopFocusWindow()
41 xEditWin = xImpressDoc.getChild("impress_win")
43 self.assertEqual(get_state_as_dict(xEditWin)["CurrentSlide"], "1")
45 self.xUITest.executeCommand(".uno:InsertPage")
47 self.assertEqual(get_state_as_dict(xEditWin)["CurrentSlide"], "2")
49 xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "1"}))
51 self.assertEqual(get_state_as_dict(xEditWin)["CurrentSlide"], "1")
54 # vim: set shiftwidth=4 softtabstop=4 expandtab: