| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
from uitest.framework import UITestCase |
| 11 |
from libreoffice.uno.propertyvalue import mkPropertyValues |
| 12 |
from uitest.uihelper.common import get_state_as_dict |
| 13 |
|
| 14 |
class Tdf148395(UITestCase): |
| 15 |
|
| 16 |
def test_tdf148395(self): |
| 17 |
|
| 18 |
with self.ui_test.create_doc_in_start_center("writer") as document: |
| 19 |
|
| 20 |
with self.ui_test.execute_dialog_through_command(".uno:InsertObject") as xDialog: |
| 21 |
xTypes = xDialog.getChild("types") |
| 22 |
xCreateNew = xDialog.getChild("createnew") |
| 23 |
|
| 24 |
self.assertEqual('true', get_state_as_dict(xCreateNew)['Checked']) |
| 25 |
|
| 26 |
xSelectedEntry = get_state_as_dict(xTypes)['SelectEntryText'] |
| 27 |
self.assertTrue('Spreadsheet' in xSelectedEntry ) |
| 28 |
|
| 29 |
for i in range(10): |
| 30 |
xTypes.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) |
| 31 |
xSelectedEntry = get_state_as_dict(xTypes)['SelectEntryText'] |
| 32 |
if 'Chart' in xSelectedEntry: |
| 33 |
break |
| 34 |
|
| 35 |
self.assertEqual(1, document.EmbeddedObjects.Count) |
| 36 |
self.assertEqual("SwXTextEmbeddedObject", document.CurrentSelection.getImplementationName()) |
| 37 |
|
| 38 |
xChartMainTop = self.xUITest.getTopFocusWindow() |
| 39 |
xChartMain = xChartMainTop.getChild("chart_window") |
| 40 |
xSeriesObj = xChartMain.getChild("CID/Page=") |
| 41 |
|
| 42 |
|
| 43 |
with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramArea"})) as xDialog: |
| 44 |
pass |
| 45 |
|
| 46 |
|