Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / qa / uitest / impress_tests2 / tdf133713.py
bloba4195fd2b2683e9a1f0a757b56b4d368549418e6
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.uihelper.common import get_state_as_dict
11 from libreoffice.uno.propertyvalue import mkPropertyValues
12 from uitest.framework import UITestCase
14 class Tdf133713(UITestCase):
16 def test_Tdf133713(self):
17 with self.ui_test.create_doc_in_start_center("impress") as document:
19 xTemplateDlg = self.xUITest.getTopFocusWindow()
20 xCancelBtn = xTemplateDlg.getChild("close")
21 self.ui_test.close_dialog_through_button(xCancelBtn)
23 xDoc = self.xUITest.getTopFocusWindow()
24 xEditWin = xDoc.getChild("impress_win")
26 xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
27 self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
29 xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"one"}))
30 xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
31 xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"two"}))
32 xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
33 xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"three"}))
35 self.xUITest.executeCommand(".uno:SelectAll")
37 with self.ui_test.execute_dialog_through_command(".uno:OutlineBullet") as xDialog:
38 xNumFormat = xDialog.getChild("numfmtlb")
39 xSelection = xDialog.getChild("selectionrb")
40 xIndent = xDialog.getChild("indentmf")
41 xRelSize = xDialog.getChild("relsize")
43 # Check some default values
44 self.assertEqual("Bullet", get_state_as_dict(xNumFormat)["DisplayText"])
45 self.assertEqual("true", get_state_as_dict(xSelection)["Checked"])
46 self.assertEqual("0", get_state_as_dict(xIndent)["Value"])
47 self.assertEqual("45%", get_state_as_dict(xRelSize)["Text"])
49 drawPage = document.getDrawPages().getByIndex(0)
50 shape = drawPage.getByIndex(1)
51 xEnumeration = shape.Text.createEnumeration()
53 # Without the fix in place, this test would have failed with
54 # AssertionError: 0 != None
55 for i in range(3):
56 self.assertEqual(0, xEnumeration.nextElement().NumberingLevel)
58 # vim: set shiftwidth=4 softtabstop=4 expandtab: