sc/qa/uitest/chart2/tdf167859.py | 48 +++++++++++++++++++++++++++++++++++++++ sc/qa/uitest/data/tdf167859.ods |binary 2 files changed, 48 insertions(+)
New commits: commit 52057ff157498b311f334ff1479675cc0b0bdcf5 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Aug 8 16:10:48 2025 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Aug 8 18:24:07 2025 +0200 tdf#167859: sc: Add UItest Change-Id: I26ef08709d5b93e2e1e683d17ef480ede8a80d45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189198 Tested-by: Xisco Fauli <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/qa/uitest/chart2/tdf167859.py b/sc/qa/uitest/chart2/tdf167859.py new file mode 100644 index 000000000000..871448d81ae0 --- /dev/null +++ b/sc/qa/uitest/chart2/tdf167859.py @@ -0,0 +1,48 @@ +# -*- 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 tdf167859(UITestCase): + + def test_tdf167859(self): + with self.ui_test.load_file(get_url_for_data_file("tdf167859.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") + + # Without the fix in place, this would have crashed here + with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisA"})) as xDialog: + + #Click on tab "Scale". + tabcontrol = xDialog.getChild("tabcontrol") + select_pos(tabcontrol, "0") + + xReverseBtn = xDialog.getChild("CBX_REVERSE") + xReverseBtn.executeAction("CLICK", tuple()) + + with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisB"})) as xDialog: + + #Click on tab "Scale". + tabcontrol = xDialog.getChild("tabcontrol") + select_pos(tabcontrol, "0") + + xReverseBtn = xDialog.getChild("CBX_REVERSE") + xReverseBtn.executeAction("CLICK", tuple()) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/tdf167859.ods b/sc/qa/uitest/data/tdf167859.ods new file mode 100644 index 000000000000..c590b7a1c58f Binary files /dev/null and b/sc/qa/uitest/data/tdf167859.ods differ
