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 #Bug 78133 - LibO crashes when in options dialog
14 #when i was going through the options dialog, if i click on the 'Colors' entry, LibO will crash.
15 class tdf78133(UITestCase
):
17 def test_tdf78133_options_app_colors(self
):
19 with self
.ui_test
.create_doc_in_start_center("writer"):
21 #open option, go to App colors
22 with self
.ui_test
.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog
:
24 xPages
= xDialog
.getChild("pages")
25 xLOEntry
= xPages
.getChild('0') # Lo Dev
26 xLOEntry
.executeAction("EXPAND", tuple())
27 xLoAppColorsEntry
= xLOEntry
.getChild('8')
28 xLoAppColorsEntry
.executeAction("SELECT", tuple()) #Applications Colors
29 #change text boundaries checkbox, save
30 shadows
= xDialog
.getChild("shadows")
31 shadows
.executeAction("CLICK", tuple())
32 #verify - reopen dialog and check if "text boundaries" is still unchecked
33 with self
.ui_test
.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog
:
35 xPages
= xDialog
.getChild("pages")
36 xLOEntry
= xPages
.getChild('0') # Lo Dev
37 xLOEntry
.executeAction("EXPAND", tuple())
38 xLoAppColorsEntry
= xLOEntry
.getChild('8')
39 xLoAppColorsEntry
.executeAction("SELECT", tuple()) #Applications Colors
40 #change text boundaries checkbox, save
41 shadows
= xDialog
.getChild("shadows")
42 self
.assertEqual(get_state_as_dict(shadows
)["Selected"], "false")
44 # vim: set shiftwidth=4 softtabstop=4 expandtab: