[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 2 14:41:50 UTC 2020
sc/qa/uitest/chart/chartTitles.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 40de76681c47fb6561a5a236a46114355a5f5072
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Oct 2 12:14:36 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Oct 2 16:41:05 2020 +0200
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 <xiscofauli at libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
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())
More information about the Libreoffice-commits
mailing list