Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / qa / uitest / impress_tests / slideShowSettings.py
blob16fbdc8405c9190cd1c29950ecb78f211119ce75
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 libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.uihelper.common import get_state_as_dict, type_text, select_pos
14 class slideShowSettings(UITestCase):
15 def test_slideShowSettings(self):
16 with self.ui_test.create_doc_in_start_center("impress"):
17 MainWindow = self.xUITest.getTopFocusWindow()
18 TemplateDialog = self.xUITest.getTopFocusWindow()
19 cancel = TemplateDialog.getChild("close")
20 self.ui_test.close_dialog_through_button(cancel)
21 self.xUITest.executeCommand(".uno:InsertPage")
22 with self.ui_test.execute_dialog_through_command(".uno:PresentationDialog") as PresentationDialog:
24 xfrom = PresentationDialog.getChild("from")
25 xfrom.executeAction("CLICK",tuple())
26 from_cb = PresentationDialog.getChild("from_cb")
27 select_pos(from_cb, "0")
28 window = PresentationDialog.getChild("window")
29 window.executeAction("CLICK",tuple())
30 manualslides = PresentationDialog.getChild("manualslides")
31 manualslides.executeAction("CLICK",tuple())
32 pointervisible = PresentationDialog.getChild("pointervisible")
33 pointervisible.executeAction("CLICK",tuple())
34 pointeraspen = PresentationDialog.getChild("pointeraspen")
35 pointeraspen.executeAction("CLICK",tuple())
36 animationsallowed = PresentationDialog.getChild("animationsallowed")
37 animationsallowed.executeAction("CLICK",tuple())
38 changeslidesbyclick = PresentationDialog.getChild("changeslidesbyclick")
39 changeslidesbyclick.executeAction("CLICK",tuple())
41 #verify
42 with self.ui_test.execute_dialog_through_command(".uno:PresentationDialog", close_button="cancel") as PresentationDialog:
43 xfrom = PresentationDialog.getChild("from")
44 self.assertEqual(get_state_as_dict(xfrom)["Checked"], "true")
45 from_cb = PresentationDialog.getChild("from_cb")
46 self.assertEqual(get_state_as_dict(from_cb)["SelectEntryText"], "Slide 1")
47 manualslides = PresentationDialog.getChild("manualslides")
48 self.assertEqual(get_state_as_dict(manualslides)["Selected"], "true")
49 pointervisible = PresentationDialog.getChild("pointervisible")
50 self.assertEqual(get_state_as_dict(pointervisible)["Selected"], "true")
51 pointeraspen = PresentationDialog.getChild("pointeraspen")
52 self.assertEqual(get_state_as_dict(pointeraspen)["Selected"], "true")
53 animationsallowed = PresentationDialog.getChild("animationsallowed")
54 self.assertEqual(get_state_as_dict(animationsallowed)["Selected"], "false")
55 changeslidesbyclick = PresentationDialog.getChild("changeslidesbyclick")
56 self.assertEqual(get_state_as_dict(changeslidesbyclick)["Selected"], "false")
60 # vim: set shiftwidth=4 softtabstop=4 expandtab: