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/.
9 from uitest
.framework
import UITestCase
10 from uitest
.uihelper
.common
import select_pos
11 from uitest
.uihelper
.common
import select_by_text
12 from uitest
.uihelper
.common
import get_state_as_dict
14 #Bug 106099 - Find and replace by format, font color added by force
16 class tdf106099(UITestCase
):
17 def test_tdf106099_find_format_underline(self
):
18 with self
.ui_test
.create_doc_in_start_center("writer"):
20 with self
.ui_test
.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button
="close") as xDialog
:
22 format
= xDialog
.getChild("format")
23 with self
.ui_test
.execute_blocking_action(format
.executeAction
, args
=('CLICK', ())) as dialog
:
24 #Font effects - Underline Single. OK.
25 xTabs
= dialog
.getChild("tabcontrol")
26 select_pos(xTabs
, "1") #tab font effects
27 underlinelb
= dialog
.getChild("underlinelb")
28 select_by_text(underlinelb
, "Single")
30 #verify label searchdesc
31 searchdesc
= xDialog
.getChild("searchdesc")
32 self
.assertEqual(get_state_as_dict(searchdesc
)["Text"], "Single underline")
33 noformat
= xDialog
.getChild("noformat")
34 noformat
.executeAction("CLICK", tuple()) #click No format button
35 self
.assertEqual(get_state_as_dict(searchdesc
)["Text"], "")
37 # vim: set shiftwidth=4 softtabstop=4 expandtab: