1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 from uitest
.framework
import UITestCase
4 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
6 from uitest
.debug
import sleep
7 from uitest
.uihelper
.common
import get_state_as_dict
, type_text
9 class slideShowSettings(UITestCase
):
10 def test_slideShowSettings(self
):
11 MainDoc
= self
.ui_test
.create_doc_in_start_center("impress")
12 MainWindow
= self
.xUITest
.getTopFocusWindow()
13 TemplateDialog
= self
.xUITest
.getTopFocusWindow()
14 cancel
= TemplateDialog
.getChild("cancel")
15 self
.ui_test
.close_dialog_through_button(cancel
)
16 self
.xUITest
.executeCommand(".uno:InsertPage")
17 self
.ui_test
.execute_dialog_through_command(".uno:PresentationDialog")
18 PresentationDialog
= self
.xUITest
.getTopFocusWindow()
20 xfrom
= PresentationDialog
.getChild("from")
21 xfrom
.executeAction("CLICK",tuple())
22 from_cb
= PresentationDialog
.getChild("from_cb")
23 from_cb
.executeAction("SELECT", mkPropertyValues({"POS": "0"}))
24 window
= PresentationDialog
.getChild("window")
25 window
.executeAction("CLICK",tuple())
26 manualslides
= PresentationDialog
.getChild("manualslides")
27 manualslides
.executeAction("CLICK",tuple())
28 pointervisible
= PresentationDialog
.getChild("pointervisible")
29 pointervisible
.executeAction("CLICK",tuple())
30 pointeraspen
= PresentationDialog
.getChild("pointeraspen")
31 pointeraspen
.executeAction("CLICK",tuple())
32 animationsallowed
= PresentationDialog
.getChild("animationsallowed")
33 animationsallowed
.executeAction("CLICK",tuple())
34 changeslidesbyclick
= PresentationDialog
.getChild("changeslidesbyclick")
35 changeslidesbyclick
.executeAction("CLICK",tuple())
37 ok
= PresentationDialog
.getChild("ok")
38 self
.ui_test
.close_dialog_through_button(ok
)
40 self
.ui_test
.execute_dialog_through_command(".uno:PresentationDialog")
41 PresentationDialog
= self
.xUITest
.getTopFocusWindow()
42 xfrom
= PresentationDialog
.getChild("from")
43 self
.assertEqual(get_state_as_dict(xfrom
)["Checked"], "true")
44 from_cb
= PresentationDialog
.getChild("from_cb")
45 self
.assertEqual(get_state_as_dict(from_cb
)["SelectEntryText"], "Slide 1")
46 manualslides
= PresentationDialog
.getChild("manualslides")
47 self
.assertEqual(get_state_as_dict(manualslides
)["Selected"], "true")
48 pointervisible
= PresentationDialog
.getChild("pointervisible")
49 self
.assertEqual(get_state_as_dict(pointervisible
)["Selected"], "true")
50 pointeraspen
= PresentationDialog
.getChild("pointeraspen")
51 self
.assertEqual(get_state_as_dict(pointeraspen
)["Selected"], "true")
52 animationsallowed
= PresentationDialog
.getChild("animationsallowed")
53 self
.assertEqual(get_state_as_dict(animationsallowed
)["Selected"], "false")
54 changeslidesbyclick
= PresentationDialog
.getChild("changeslidesbyclick")
55 self
.assertEqual(get_state_as_dict(changeslidesbyclick
)["Selected"], "false")
57 cancel
= PresentationDialog
.getChild("cancel")
58 self
.ui_test
.close_dialog_through_button(cancel
)
60 self
.ui_test
.close_doc()
62 # vim: set shiftwidth=4 softtabstop=4 expandtab: