diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-14 12:02:53 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-14 17:29:02 +0100 |
commit | b05f2e0f3117ed59f63d97cebeb7ea7372df8ed5 (patch) | |
tree | 1cc7428a390565374535f423b9b45199eab84f46 /sc/qa | |
parent | 5c49a9c98620153e206a3aabc2a89ef19c0a1046 (diff) |
tdf#147394: sc: Add UItest
Change-Id: I0fa20d777247501593ac80ab394407d0570763bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129910
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/uitest/chart/chartLegend.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sc/qa/uitest/chart/chartLegend.py b/sc/qa/uitest/chart/chartLegend.py index 8bea7f189c1e..4372e47948b5 100644 --- a/sc/qa/uitest/chart/chartLegend.py +++ b/sc/qa/uitest/chart/chartLegend.py @@ -104,4 +104,27 @@ class chartLegend(UITestCase): self.assertEqual("4.51", get_state_as_dict(xDialog.getChild("MTR_FLD_POS_X"))['Value']) self.assertEqual("1.44", get_state_as_dict(xDialog.getChild("MTR_FLD_POS_Y"))['Value']) + def test_Tdf147394(self): + + with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")) as calc_doc: + 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") + + xLegend = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().Legend + self.assertTrue(xLegend.Show) + + # Select the legends + xLegends = xChartMain.getChild("CID/D=0:Legend=") + xLegends.executeAction("SELECT", tuple()) + + # Without the fix in place, this test would have crashed here + xChartMain.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"})) + + self.assertFalse(xLegend.Show) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |