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 select_pos
12 from com
.sun
.star
.awt
.GradientStyle
import LINEAR
14 class tdf125449(UITestCase
):
16 def test_tdf125449(self
):
18 with self
.ui_test
.create_doc_in_start_center("impress") as document
:
20 xTemplateDlg
= self
.xUITest
.getTopFocusWindow()
21 xCancelBtn
= xTemplateDlg
.getChild("close")
22 self
.ui_test
.close_dialog_through_button(xCancelBtn
)
24 with self
.ui_test
.execute_dialog_through_command(".uno:PageSetup") as xPageSetupDlg
:
26 tabcontrol
= xPageSetupDlg
.getChild("tabcontrol")
27 select_pos(tabcontrol
, "1")
29 xBtn
= xPageSetupDlg
.getChild('btngradient')
30 xBtn
.executeAction("CLICK", tuple())
32 xAngle
= xPageSetupDlg
.getChild('anglemtr')
33 xAngle
.executeAction("UP", tuple())
37 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.Style
, LINEAR
)
39 hex(document
.DrawPages
.getByIndex(0).Background
.FillGradient
.StartColor
), '0xdde8cb')
41 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.Angle
, 450)
43 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.Border
, 0)
45 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.XOffset
, 0)
47 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.YOffset
, 0)
49 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.StartIntensity
, 100)
51 document
.DrawPages
.getByIndex(0).Background
.FillGradient
.EndIntensity
, 100)
53 # Without the patch in place, this test would have failed with
54 # AssertionError: '' != 'gradient'
56 document
.DrawPages
.getByIndex(0).Background
.FillGradientName
, 'gradient')
59 # vim: set shiftwidth=4 softtabstop=4 expandtab: