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 select_by_text
14 class asianPhoneticGuide(UITestCase
):
16 def test_asian_phonetic_guide(self
):
17 with self
.ui_test
.create_doc_in_start_center("writer") as document
:
19 with self
.ui_test
.execute_modeless_dialog_through_command(".uno:RubyDialog", close_button
="close") as xDialog
:
21 xLeft1ED
= xDialog
.getChild("Left1ED")
22 xRight1ED
= xDialog
.getChild("Right1ED")
23 xadjustlb
= xDialog
.getChild("adjustlb")
24 xpositionlb
= xDialog
.getChild("positionlb")
25 xstylelb
= xDialog
.getChild("stylelb")
27 xLeft1ED
.executeAction("TYPE", mkPropertyValues({"TEXT":"a"}))
28 xRight1ED
.executeAction("TYPE", mkPropertyValues({"TEXT":"w"}))
29 select_by_text(xadjustlb
, "Right")
30 select_by_text(xpositionlb
, "Right")
31 select_by_text(xstylelb
, "Quotation")
33 xApplyBtn
= xDialog
.getChild("ok")
34 xApplyBtn
.executeAction("CLICK", tuple())
36 self
.assertEqual(document
.Text
.String
[0:1], "a")
37 # vim: set shiftwidth=4 softtabstop=4 expandtab: