summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/chart/tdf122398.py
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart/tdf122398.py')
-rw-r--r--sc/qa/uitest/chart/tdf122398.py135
1 files changed, 67 insertions, 68 deletions
diff --git a/sc/qa/uitest/chart/tdf122398.py b/sc/qa/uitest/chart/tdf122398.py
index 279d46ccce4c..c6093f61677c 100644
--- a/sc/qa/uitest/chart/tdf122398.py
+++ b/sc/qa/uitest/chart/tdf122398.py
@@ -15,80 +15,79 @@ from uitest.uihelper.common import get_state_as_dict, type_text, get_url_for_dat
class tdf122398(UITestCase):
def test_tdf122398_chart_min_max_x_axis(self):
- calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf122398.ods"))
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
- document = self.ui_test.get_component()
+ with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ document = self.ui_test.get_component()
- #Open attached file. Set chart into edit mode. Select x-axis and then Format Selection.
- #Disable the Automatic for min and max. You cannot change the values at all, neither with direct
- #input nor with up-down arrow buttons.
- 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": "DiagramAxisX"})) # X Axis...
- xDialog = self.xUITest.getTopFocusWindow()
- #Click on tab "Scale".
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ #Open attached file. Set chart into edit mode. Select x-axis and then Format Selection.
+ #Disable the Automatic for min and max. You cannot change the values at all, neither with direct
+ #input nor with up-down arrow buttons.
+ 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": "DiagramAxisX"})) # X Axis...
+ xDialog = self.xUITest.getTopFocusWindow()
+ #Click on tab "Scale".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- autoMinimum = xDialog.getChild("CBX_AUTO_MIN")
- autoMaximum = xDialog.getChild("CBX_AUTO_MAX")
- majorInterval = xDialog.getChild("CBX_AUTO_STEP_MAIN")
- minorInterval = xDialog.getChild("CBX_AUTO_STEP_HELP")
- minimum = xDialog.getChild("EDT_MIN")
- maximum = xDialog.getChild("EDT_MAX")
- major = xDialog.getChild("EDT_STEP_MAIN")
- minor = xDialog.getChild("MT_STEPHELP")
+ autoMinimum = xDialog.getChild("CBX_AUTO_MIN")
+ autoMaximum = xDialog.getChild("CBX_AUTO_MAX")
+ majorInterval = xDialog.getChild("CBX_AUTO_STEP_MAIN")
+ minorInterval = xDialog.getChild("CBX_AUTO_STEP_HELP")
+ minimum = xDialog.getChild("EDT_MIN")
+ maximum = xDialog.getChild("EDT_MAX")
+ major = xDialog.getChild("EDT_STEP_MAIN")
+ minor = xDialog.getChild("MT_STEPHELP")
- autoMinimum.executeAction("CLICK", tuple())
- autoMaximum.executeAction("CLICK", tuple())
- majorInterval.executeAction("CLICK", tuple())
- minorInterval.executeAction("CLICK", tuple())
- #In a chart that contains an axis with a date datatype, the UI does not allow specifying
- #a minimum or maximum value greater than 09/04/1900 (i.e., April 9, 1900)
- minimum.executeAction("CLEAR", tuple())
- minimum.executeAction("TYPE", mkPropertyValues({"TEXT":"01.01.2018"}))
- maximum.executeAction("DOWN", tuple()) #29.04.2018
- major.executeAction("UP", tuple()) #21
- minor.executeAction("DOWN", tuple()) #1
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ autoMinimum.executeAction("CLICK", tuple())
+ autoMaximum.executeAction("CLICK", tuple())
+ majorInterval.executeAction("CLICK", tuple())
+ minorInterval.executeAction("CLICK", tuple())
+ #In a chart that contains an axis with a date datatype, the UI does not allow specifying
+ #a minimum or maximum value greater than 09/04/1900 (i.e., April 9, 1900)
+ minimum.executeAction("CLEAR", tuple())
+ minimum.executeAction("TYPE", mkPropertyValues({"TEXT":"01.01.2018"}))
+ maximum.executeAction("DOWN", tuple()) #29.04.2018
+ major.executeAction("UP", tuple()) #21
+ minor.executeAction("DOWN", tuple()) #1
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- #reopen and verify
- 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": "DiagramAxisX"}))
- xDialog = self.xUITest.getTopFocusWindow()
- #Click on tab "Scale".
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ #reopen and verify
+ 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": "DiagramAxisX"}))
+ xDialog = self.xUITest.getTopFocusWindow()
+ #Click on tab "Scale".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- autoMinimum = xDialog.getChild("CBX_AUTO_MIN")
- autoMaximum = xDialog.getChild("CBX_AUTO_MAX")
- majorInterval = xDialog.getChild("CBX_AUTO_STEP_MAIN")
- minorInterval = xDialog.getChild("CBX_AUTO_STEP_HELP")
- minimum = xDialog.getChild("EDT_MIN")
- maximum = xDialog.getChild("EDT_MAX")
- major = xDialog.getChild("EDT_STEP_MAIN")
- minor = xDialog.getChild("MT_STEPHELP")
+ autoMinimum = xDialog.getChild("CBX_AUTO_MIN")
+ autoMaximum = xDialog.getChild("CBX_AUTO_MAX")
+ majorInterval = xDialog.getChild("CBX_AUTO_STEP_MAIN")
+ minorInterval = xDialog.getChild("CBX_AUTO_STEP_HELP")
+ minimum = xDialog.getChild("EDT_MIN")
+ maximum = xDialog.getChild("EDT_MAX")
+ major = xDialog.getChild("EDT_STEP_MAIN")
+ minor = xDialog.getChild("MT_STEPHELP")
- self.assertEqual(get_state_as_dict(autoMinimum)["Selected"], "false")
- self.assertEqual(get_state_as_dict(autoMaximum)["Selected"], "false")
- self.assertEqual(get_state_as_dict(majorInterval)["Selected"], "false")
- self.assertEqual(get_state_as_dict(minorInterval)["Selected"], "false")
- self.assertEqual(get_state_as_dict(minimum)["Text"], "01.01.2018")
- self.assertEqual(get_state_as_dict(maximum)["Text"], "29.04.2018")
- self.assertEqual(get_state_as_dict(major)["Text"], "21")
- self.assertEqual(get_state_as_dict(minor)["Text"], "1")
+ self.assertEqual(get_state_as_dict(autoMinimum)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(autoMaximum)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(majorInterval)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(minorInterval)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(minimum)["Text"], "01.01.2018")
+ self.assertEqual(get_state_as_dict(maximum)["Text"], "29.04.2018")
+ self.assertEqual(get_state_as_dict(major)["Text"], "21")
+ self.assertEqual(get_state_as_dict(minor)["Text"], "1")
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: