summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-22 18:29:55 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-22 18:59:05 +0200
commit647623db579b0e7b176f9cbfa24bf8444cfd94d4 (patch)
tree57cffe9fbdbc7a98ea8695f0b4013527d9ad436c /sc/qa
parent8467a8e0587011269e376a65a0e397e096a36cc5 (diff)
uitest: fix build
regression from 1e7bf688967dc39540d24070c70c73b06bd1347f < tdf#142851 Chart UI: fix empty Chart Type dialog > self.ui_test.load_file was changed in be0a41679fea524e0935dc6617b5e65349812dd1 < uitest: guard load_file > Change-Id: I00cb5dc6e1213403f2eba5bc4b9dc0e876118536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117670 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/uitest/chart/tdf142851.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/sc/qa/uitest/chart/tdf142851.py b/sc/qa/uitest/chart/tdf142851.py
index 73c9bd68d6d0..512af056b65e 100644
--- a/sc/qa/uitest/chart/tdf142851.py
+++ b/sc/qa/uitest/chart/tdf142851.py
@@ -11,28 +11,27 @@ 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):
- calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf142851.xlsx"))
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
- document = self.ui_test.get_component()
+ 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")
+ document = self.ui_test.get_component()
- 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=")
+ 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=")
- self.ui_test.execute_dialog_through_action(xChart, "COMMAND",
- mkPropertyValues({"COMMAND" : "DiagramType"}))
- xDialog = self.xUITest.getTopFocusWindow()
- chartTypeVisible = get_state_as_dict(xDialog.getChild("charttype"))['Visible']
- subTypeVisible = get_state_as_dict(xDialog.getChild("subtype"))['Visible']
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ self.ui_test.execute_dialog_through_action(xChart, "COMMAND",
+ mkPropertyValues({"COMMAND" : "DiagramType"}))
+ xDialog = self.xUITest.getTopFocusWindow()
+ chartTypeVisible = get_state_as_dict(xDialog.getChild("charttype"))['Visible']
+ subTypeVisible = get_state_as_dict(xDialog.getChild("subtype"))['Visible']
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- self.assertEqual('true', chartTypeVisible)
- self.assertEqual('true', subTypeVisible)
+ self.assertEqual('true', chartTypeVisible)
+ self.assertEqual('true', subTypeVisible)
- self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: