Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / qa / uitest / impress_tests2 / tdf125449.py
blob242a79e65787be874591dd24a192c4299e715a4c
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())
36 self.assertEqual(
37 document.DrawPages.getByIndex(0).Background.FillGradient.Style, LINEAR)
38 self.assertEqual(
39 hex(document.DrawPages.getByIndex(0).Background.FillGradient.StartColor), '0xdde8cb')
40 self.assertEqual(
41 document.DrawPages.getByIndex(0).Background.FillGradient.Angle, 450)
42 self.assertEqual(
43 document.DrawPages.getByIndex(0).Background.FillGradient.Border, 0)
44 self.assertEqual(
45 document.DrawPages.getByIndex(0).Background.FillGradient.XOffset, 0)
46 self.assertEqual(
47 document.DrawPages.getByIndex(0).Background.FillGradient.YOffset, 0)
48 self.assertEqual(
49 document.DrawPages.getByIndex(0).Background.FillGradient.StartIntensity, 100)
50 self.assertEqual(
51 document.DrawPages.getByIndex(0).Background.FillGradient.EndIntensity, 100)
53 # Without the patch in place, this test would have failed with
54 # AssertionError: '' != 'gradient'
55 self.assertEqual(
56 document.DrawPages.getByIndex(0).Background.FillGradientName, 'gradient')
59 # vim: set shiftwidth=4 softtabstop=4 expandtab: