summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/chart/tdf123013.py
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart/tdf123013.py')
-rw-r--r--sc/qa/uitest/chart/tdf123013.py75
1 files changed, 37 insertions, 38 deletions
diff --git a/sc/qa/uitest/chart/tdf123013.py b/sc/qa/uitest/chart/tdf123013.py
index 72fca5bce520..23a667f86317 100644
--- a/sc/qa/uitest/chart/tdf123013.py
+++ b/sc/qa/uitest/chart/tdf123013.py
@@ -15,45 +15,44 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, typ
class tdf123013(UITestCase):
def test_tdf96432_chart_trendline_name(self):
- calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf123013.ods"))
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
- document = self.ui_test.get_component()
- gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
- gridwin.executeAction("ACTIVATE", tuple())
- xChartMainTop = self.xUITest.getTopFocusWindow()
- xChartMain = xChartMainTop.getChild("chart_window")
- xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
- self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatTrendline"}))
- xDialog = self.xUITest.getTopFocusWindow()
- #Click on tab "Type".
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- #add name
- xentryname = xDialog.getChild("entry_name")
- xentryname.executeAction("TYPE", mkPropertyValues({"TEXT":"Tline"}))
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ with self.ui_test.load_file(get_url_for_data_file("tdf123013.ods")) as calc_doc:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ document = self.ui_test.get_component()
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+ xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
+ self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatTrendline"}))
+ xDialog = self.xUITest.getTopFocusWindow()
+ #Click on tab "Type".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ #add name
+ xentryname = xDialog.getChild("entry_name")
+ xentryname.executeAction("TYPE", mkPropertyValues({"TEXT":"Tline"}))
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- #reopen and try again
- gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
- gridwin.executeAction("ACTIVATE", tuple())
- xChartMainTop = self.xUITest.getTopFocusWindow()
- xChartMain = xChartMainTop.getChild("chart_window")
+ #reopen and try again
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
- #Right-click on the chart; from the pop-up menu select "Format Y bars
- # The program presents dialog "Format Y bars", tab "Line".
- xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
- self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatTrendline"}))
- xDialog = self.xUITest.getTopFocusWindow()
- #Click on tab "Type".
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- #add name
- xentryname = xDialog.getChild("entry_name")
- self.assertEqual(get_state_as_dict(xentryname)["Text"], "Tline")
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ #Right-click on the chart; from the pop-up menu select "Format Y bars
+ # The program presents dialog "Format Y bars", tab "Line".
+ xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
+ self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatTrendline"}))
+ xDialog = self.xUITest.getTopFocusWindow()
+ #Click on tab "Type".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ #add name
+ xentryname = xDialog.getChild("entry_name")
+ self.assertEqual(get_state_as_dict(xentryname)["Text"], "Tline")
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: