From 40de76681c47fb6561a5a236a46114355a5f5072 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 2 Oct 2020 12:14:36 +0200 Subject: uitest: chartTitles.py: assert changes in chart Change-Id: If6f0fdf6b26f09f467a0226468f6f00e885c4f41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103830 Tested-by: Jenkins Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli --- sc/qa/uitest/chart/chartTitles.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sc') diff --git a/sc/qa/uitest/chart/chartTitles.py b/sc/qa/uitest/chart/chartTitles.py index 8b500ccba3e0..c6c2488bcadc 100644 --- a/sc/qa/uitest/chart/chartTitles.py +++ b/sc/qa/uitest/chart/chartTitles.py @@ -27,6 +27,13 @@ class chartTitles(UITestCase): gridwin = xCalcDoc.getChild("grid_window") document = self.ui_test.get_component() + xCS = document.Sheets[0].Charts[0].getEmbeddedObject().FirstDiagram.CoordinateSystems[0] + + self.assertFalse(document.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) + self.assertFalse(document.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) + self.assertIsNone(xCS.getAxisByDimension(0, 0).TitleObject) + self.assertIsNone(xCS.getAxisByDimension(1, 0).TitleObject) + gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) xChartMainTop = self.xUITest.getTopFocusWindow() @@ -52,6 +59,15 @@ class chartTitles(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) + self.assertTrue(document.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) + self.assertTrue(document.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) + self.assertEqual("A", document.Sheets[0].Charts[0].getEmbeddedObject().Title.String) + self.assertEqual("B", document.Sheets[0].Charts[0].getEmbeddedObject().SubTitle.String) + self.assertEqual("C", xCS.getAxisByDimension(0, 0).TitleObject.Text[0].String) + self.assertEqual("D", xCS.getAxisByDimension(1, 0).TitleObject.Text[0].String) + self.assertEqual("E", xCS.getAxisByDimension(0, 1).TitleObject.Text[0].String) + self.assertEqual("F", xCS.getAxisByDimension(1, 1).TitleObject.Text[0].String) + #reopen and verify InsertMenuTitles dialog gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) -- cgit