summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/chart/chartGrid.py
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart/chartGrid.py')
-rw-r--r--sc/qa/uitest/chart/chartGrid.py274
1 files changed, 137 insertions, 137 deletions
diff --git a/sc/qa/uitest/chart/chartGrid.py b/sc/qa/uitest/chart/chartGrid.py
index c54e03637ee7..bd017248adeb 100644
--- a/sc/qa/uitest/chart/chartGrid.py
+++ b/sc/qa/uitest/chart/chartGrid.py
@@ -17,184 +17,184 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
class chartGrid(UITestCase):
def test_tdf98390_chart_grid_dialog(self):
with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")):
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
- change_measurement_unit(self, "Centimeter")
-
- #X Axis Major Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYMain"})) as xDialog:
- #tab "Line".
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
-
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ with change_measurement_unit(self, "Centimeter"):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ #X Axis Major Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYMain"})) as xDialog:
+ #tab "Line".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- xWidth.executeAction("UP", tuple())
- transparency.executeAction("UP", tuple())
+ xWidth.executeAction("UP", tuple())
+ transparency.executeAction("UP", tuple())
- #reopen and verify X Axis Major Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYMain"})) as xDialog:
+ #reopen and verify X Axis Major Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYMain"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
- self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
+ self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
+ self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
- #Y Axis Major Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXMain"})) as xDialog:
+ #Y Axis Major Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXMain"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- xWidth.executeAction("UP", tuple())
- transparency.executeAction("UP", tuple())
+ xWidth.executeAction("UP", tuple())
+ transparency.executeAction("UP", tuple())
- #reopen and verify Y Axis Major Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXMain"})) as xDialog:
+ #reopen and verify Y Axis Major Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXMain"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
- self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
+ self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
+ self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
- #Y Axis Minor Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXHelp"})) as xDialog:
+ #Y Axis Minor Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXHelp"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- xWidth.executeAction("UP", tuple())
- transparency.executeAction("UP", tuple())
+ xWidth.executeAction("UP", tuple())
+ transparency.executeAction("UP", tuple())
- #reopen and verify Y Axis Minor Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXHelp"})) as xDialog:
+ #reopen and verify Y Axis Minor Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridXHelp"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
-
- self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
- self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+
+ self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
+ self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
- #X Axis Minor Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
+ #X Axis Minor Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- xWidth.executeAction("UP", tuple())
- transparency.executeAction("UP", tuple())
+ xWidth.executeAction("UP", tuple())
+ transparency.executeAction("UP", tuple())
- #reopen and verify X Axis Minor Grid
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
+ #reopen and verify X Axis Minor Grid
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
- self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
+ self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.10 cm")
+ self.assertEqual(get_state_as_dict(transparency)["Text"], "5%")
- #All Grids
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridAll"})) as xDialog:
+ #All Grids
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridAll"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- xWidth.executeAction("UP", tuple())
- transparency.executeAction("UP", tuple())
+ xWidth.executeAction("UP", tuple())
+ transparency.executeAction("UP", tuple())
- #reopen and verify X Axis Minor Grid (changed in All Grids)
- 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")
- with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
+ #reopen and verify X Axis Minor Grid (changed in All Grids)
+ 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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramGridYHelp"})) as xDialog:
- tabcontrol = xDialog.getChild("tabcontrol")
- select_pos(tabcontrol, "0")
- xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
- transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ transparency = xDialog.getChild("MTR_LINE_TRANSPARENT")
- self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.20 cm")
- self.assertEqual(get_state_as_dict(transparency)["Text"], "10%")
+ self.assertEqual(get_state_as_dict(xWidth)["Text"], "0.20 cm")
+ self.assertEqual(get_state_as_dict(transparency)["Text"], "10%")
# vim: set shiftwidth=4 softtabstop=4 expandtab: