summaryrefslogtreecommitdiffstats
path: root/sc/qa/uitest/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart2')
-rw-r--r--sc/qa/uitest/chart2/tdf122398.py87
-rw-r--r--sc/qa/uitest/chart2/tdf123013.py52
-rw-r--r--sc/qa/uitest/chart2/tdf123231.py65
-rw-r--r--sc/qa/uitest/chart2/tdf123520.py62
-rw-r--r--sc/qa/uitest/chart2/tdf124111.py53
-rw-r--r--sc/qa/uitest/chart2/tdf124295.py32
-rw-r--r--sc/qa/uitest/chart2/tdf129587.py56
-rw-r--r--sc/qa/uitest/chart2/tdf131715.py28
-rw-r--r--sc/qa/uitest/chart2/tdf133630.py61
-rw-r--r--sc/qa/uitest/chart2/tdf134059.py64
-rw-r--r--sc/qa/uitest/chart2/tdf142851.py34
11 files changed, 594 insertions, 0 deletions
diff --git a/sc/qa/uitest/chart2/tdf122398.py b/sc/qa/uitest/chart2/tdf122398.py
new file mode 100644
index 0000000000..7f41c428f1
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf122398.py
@@ -0,0 +1,87 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+# Bug 122398 - UI: Cannot specify min/max in axis scale or axis position. Limited between 0 and 100
+class tdf122398(UITestCase):
+ def test_tdf122398_chart_min_max_x_axis(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ #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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisX"})) as xDialog:
+ #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.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
+
+ #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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisX"})) as xDialog:
+ #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")
+
+ 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")
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf123013.py b/sc/qa/uitest/chart2/tdf123013.py
new file mode 100644
index 0000000000..d7a0b32c87
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf123013.py
@@ -0,0 +1,52 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+# Bug 123013 - Can not change Trendline name in charts
+class tdf123013(UITestCase):
+ def test_tdf96432_chart_trendline_name(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf123013.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ 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": "FormatTrendline"})) as xDialog:
+ #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"}))
+
+ #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")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatTrendline"})) as xDialog:
+ #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")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf123231.py b/sc/qa/uitest/chart2/tdf123231.py
new file mode 100644
index 0000000000..86c31f74f4
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf123231.py
@@ -0,0 +1,65 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+# Bug 123231 - Chart set trendline format regression type Power twice
+class tdf123231(UITestCase):
+ def test_tdf123231_chart_trendline_dialog_power(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ #Change regression Type to Power
+ 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": "FormatTrendline"})) as xDialog:
+ #Click on tab "Type".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ power = xDialog.getChild("exponential") #type regression power
+
+ power.executeAction("CLICK", tuple()) #set power
+
+ #reopen dialog and close dialog
+ 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": "FormatTrendline"})) as xDialog:
+ #Click on tab "Type".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ power = xDialog.getChild("exponential") #type regression power
+ self.assertEqual(get_state_as_dict(power)["Checked"], "true")
+
+ #reopen and verify Power
+ 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": "FormatTrendline"})) as xDialog:
+ #Click on tab "Type".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+ power = xDialog.getChild("exponential") #type regression power
+
+ self.assertEqual(get_state_as_dict(power)["Checked"], "true")
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf123520.py b/sc/qa/uitest/chart2/tdf123520.py
new file mode 100644
index 0000000000..6854ef0449
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf123520.py
@@ -0,0 +1,62 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_by_text, select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+# Bug 123520 - Y axis - positioning tab, textbox "Cross other axis at" date changed
+class tdf123520(UITestCase):
+ def test_tdf123520_chart_y_cross_other_axis(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf123520.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ 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": "DiagramAxisY"})) as xDialog:
+ #Click on tab "positioning".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value
+ placeLabels = xDialog.getChild("LB_PLACE_LABELS")
+ crossAxisValue.executeAction("CLEAR", tuple())
+ crossAxisValue.executeAction("TYPE", mkPropertyValues({"TEXT":"01.01.2018"}))
+ #crossAxisValue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"TAB"}))
+ #TAB doesn't works- add "a" at the end of textbox
+ #workaround - edit another ui item, it should trigger leave of textbox
+ select_by_text(placeLabels, "Outside start")
+
+ #reopen and verify tab "positioning".
+ 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": "DiagramAxisY"})) as xDialog:
+
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT")
+ crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value
+ placeLabels = xDialog.getChild("LB_PLACE_LABELS")
+
+ self.assertEqual(get_state_as_dict(crossAxis)["SelectEntryText"], "Value")
+ self.assertEqual(get_state_as_dict(crossAxisValue)["Text"], "01.01.2018")
+ self.assertEqual(get_state_as_dict(placeLabels)["SelectEntryText"], "Outside start")
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf124111.py b/sc/qa/uitest/chart2/tdf124111.py
new file mode 100644
index 0000000000..91fac95e0a
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf124111.py
@@ -0,0 +1,53 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+# Bug 124111 - Cannot enter negative number for cross other axis at value
+class tdf124111(UITestCase):
+ def test_tdf124111_chart_x_negative_cross(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf124111.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ 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": "DiagramAxisX"})) as xDialog:
+ #Click on tab "positioning".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value
+ crossAxisValue.executeAction("DOWN", tuple()) #-1
+
+ #reopen and verify tab "positioning".
+ 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": "DiagramAxisX"})) as xDialog:
+
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT")
+ crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value
+
+ self.assertEqual(get_state_as_dict(crossAxis)["SelectEntryText"], "Value")
+ self.assertEqual(get_state_as_dict(crossAxisValue)["Text"], "-1")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf124295.py b/sc/qa/uitest/chart2/tdf124295.py
new file mode 100644
index 0000000000..0c64e0e238
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf124295.py
@@ -0,0 +1,32 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+
+
+class tdf124295(UITestCase):
+
+ def test_tdf124295(self):
+ # Open spreadsheet and insert chart
+ with self.ui_test.create_doc_in_start_center("calc"):
+ with self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart", close_button="cancel") as xChartDlg:
+
+ # Click 3D look check button
+ x3DCheckBtn = xChartDlg.getChild("3dlook")
+ x3DCheckBtn.executeAction("CLICK", tuple())
+
+ x3DSchemeLstBox = xChartDlg.getChild("3dscheme")
+ # Without the fix in place, this test would have failed with:
+ # AssertionError: 'Realistic' != ''
+ self.assertEqual("Realistic", get_state_as_dict(x3DSchemeLstBox)["SelectEntryText"])
+
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf129587.py b/sc/qa/uitest/chart2/tdf129587.py
new file mode 100644
index 0000000000..1fa06c889f
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf129587.py
@@ -0,0 +1,56 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf129587(UITestCase):
+ def test_tdf129587(self):
+
+ with self.ui_test.load_file(get_url_for_data_file("tdf129587.ods")) as calc_doc:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+ self.assertEqual("$Tabelle1.$F$2:$G$11", xDataSeries[0].ErrorBarY.ErrorBarRangeNegative)
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+
+ xSeriesObj = xChartMain.getChild("CID/MultiClick/D=0:CS=0:CT=0:Series=0:ErrorsY=")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatYErrorBars"})) as xDialog:
+
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+
+ xPerBtn = xDialog.getChild("RB_PERCENT")
+ xPerBtn.executeAction("CLICK", tuple())
+
+ xPosField = xDialog.getChild("MF_POSITIVE")
+ xNegField = xDialog.getChild("MF_NEGATIVE")
+
+ self.assertEqual("0%", get_state_as_dict(xPosField)['Text'])
+ self.assertEqual("0%", get_state_as_dict(xNegField)['Text'])
+
+ #Increase value by one
+ xPosField.executeAction("UP", tuple())
+
+ #Both fields are updated because 'Same value for both' is enabled
+ self.assertEqual("1%", get_state_as_dict(xPosField)['Text'])
+ self.assertEqual("1%", get_state_as_dict(xNegField)['Text'])
+
+
+ #Without the fix in place, it would have crashed here
+ xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+ self.assertEqual(1.0, xDataSeries[0].ErrorBarY.PercentageError)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf131715.py b/sc/qa/uitest/chart2/tdf131715.py
new file mode 100644
index 0000000000..e001eaa7be
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf131715.py
@@ -0,0 +1,28 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+
+class tdf131715(UITestCase):
+
+ def test_tdf131715(self):
+ with self.ui_test.create_doc_in_start_center("calc"):
+ with self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart", close_button="finish") as xChartDlg:
+
+ xWizard = xChartDlg.getChild('Wizard')
+
+ for i in range(10):
+ #without the fix in place, it would crash here
+ select_pos(xWizard, "2")
+
+ self.assertEqual(get_state_as_dict(xWizard)['CurrentStep'], "2")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf133630.py b/sc/qa/uitest/chart2/tdf133630.py
new file mode 100644
index 0000000000..ba8099bdc0
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf133630.py
@@ -0,0 +1,61 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos, get_url_for_data_file
+from uitest.uihelper.common import change_measurement_unit
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf133630(UITestCase):
+
+ def test_tdf133630(self):
+
+ with self.ui_test.load_file(get_url_for_data_file("chartArea.ods")) as calc_doc:
+
+ with change_measurement_unit(self, "Centimeter"):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ xCS = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0]
+ self.assertEqual(0, xCS.getAxisByDimension(0, 0).LineWidth)
+ self.assertEqual(80, xCS.ChartTypes[0].DataSeries[0].LineWidth)
+
+ # First change the line width of one element
+ 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:Axis=0,0")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisX"})) as xDialog:
+
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "2")
+
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ xWidth.executeAction("UP", tuple())
+
+
+ self.assertEqual(100, xCS.getAxisByDimension(0, 0).LineWidth)
+ self.assertEqual(80, xCS.ChartTypes[0].DataSeries[0].LineWidth)
+
+ # Now change the line width of another element
+ xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatDataSeries"})) as xDialog:
+
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ xWidth = xDialog.getChild("MTR_FLD_LINE_WIDTH")
+ xWidth.executeAction("UP", tuple())
+
+ # Without the fix in place, this test would have crashed here
+
+ self.assertEqual(100, xCS.getAxisByDimension(0, 0).LineWidth)
+ self.assertEqual(100, xCS.ChartTypes[0].DataSeries[0].LineWidth)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf134059.py b/sc/qa/uitest/chart2/tdf134059.py
new file mode 100644
index 0000000000..92be27ffa0
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf134059.py
@@ -0,0 +1,64 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.calc.document import get_row
+
+class Tdf134059(UITestCase):
+
+ def assertSeriesNames(self, gridwin):
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+
+ xPage = xChartMain.getChild("CID/Page=")
+
+ with self.ui_test.execute_dialog_through_action(xPage, "COMMAND", mkPropertyValues({"COMMAND": "DataRanges"})) as xDialog:
+
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+
+ xSeries = xDialog.getChild("LB_SERIES")
+ self.assertEqual(3, len(xSeries.getChildren()))
+ self.assertEqual("Col. 1", get_state_as_dict(xSeries.getChild('0'))['Text'])
+ self.assertEqual("Col. 2", get_state_as_dict(xSeries.getChild('1'))['Text'])
+ self.assertEqual("Col. 3", get_state_as_dict(xSeries.getChild('2'))['Text'])
+
+
+ gridwin.executeAction("DESELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+
+ def test_tdf134059(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf134059.ods")) as calc_doc:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ self.assertSeriesNames(gridwin)
+
+ # Hide row 10
+ gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A10"}))
+ self.ui_test._xUITest.executeCommand(".uno:HideRow")
+
+ row = get_row(calc_doc, 9)
+ self.assertFalse(row.getPropertyValue("IsVisible"))
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 'Col. 1' != 'Column C'
+ self.assertSeriesNames(gridwin)
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ self.assertTrue(row.getPropertyValue("IsVisible"))
+
+ self.assertSeriesNames(gridwin)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf142851.py b/sc/qa/uitest/chart2/tdf142851.py
new file mode 100644
index 0000000000..e48b9cf466
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf142851.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+# Bug 142851 - UI Chart Type dialog empty with unsupported combo chart
+
+class tdf142851(UITestCase):
+ def test_tdf142851_combo_chart_type(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf142851.xlsx")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Diagram 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+ xChart = xChartMain.getChild("CID/Page=")
+
+ with self.ui_test.execute_dialog_through_action(xChart, "COMMAND", mkPropertyValues({"COMMAND" : "DiagramType"})) as xDialog:
+ chartTypeVisible = get_state_as_dict(xDialog.getChild("charttype"))['Visible']
+ subTypeVisible = get_state_as_dict(xDialog.getChild("subtype"))['Visible']
+
+ self.assertEqual('true', chartTypeVisible)
+ self.assertEqual('true', subTypeVisible)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: