Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / qa / uitest / impress_tests / tdf137729.py
blob4362b056e15683d8fecfe21e5c9f9cdf7606b28b
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.drawing.HatchStyle import SINGLE
14 class tdf137729(UITestCase):
16 def test_tdf137729(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('btnhatch')
30 xBtn.executeAction("CLICK", tuple())
32 xDistance = xPageSetupDlg.getChild('distancemtr')
33 xDistance.executeAction("UP", tuple())
36 self.assertEqual(
37 document.DrawPages.getByIndex(0).Background.FillHatch.Style, SINGLE )
38 self.assertEqual(
39 document.DrawPages.getByIndex(0).Background.FillHatch.Color, 0)
40 self.assertEqual(
41 document.DrawPages.getByIndex(0).Background.FillHatch.Distance, 152)
42 self.assertEqual(
43 document.DrawPages.getByIndex(0).Background.FillHatch.Angle, 0)
45 # Without the patch in place, this test would have failed with
46 # AssertionError: '' != 'hatch'
47 self.assertEqual(
48 document.DrawPages.getByIndex(0).Background.FillHatchName, 'hatch')
51 # vim: set shiftwidth=4 softtabstop=4 expandtab: