diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-24 01:53:06 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-24 02:40:43 +0200 |
commit | 9a89eea4c3c58d2efce8afe709c0317869839ff9 (patch) | |
tree | f235036802674593f9cf6253f2f6363664494233 /sc/qa/uitest/options/tdf122977.py | |
parent | 6805efdecb240fad8c82a5c1756a2a0e92f12b7d (diff) |
Revert "uitest: guard create_doc_in_start_center"
This reverts commit 374baf308979306aa35575118c40ccd7caae1e29.
Many uitests are failing randomly in jenkins for no apparent
reason
Change-Id: I5960330fab4967518bfeea32b3b8c5f8bfbea57e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117752
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/options/tdf122977.py')
-rw-r--r-- | sc/qa/uitest/options/tdf122977.py | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/sc/qa/uitest/options/tdf122977.py b/sc/qa/uitest/options/tdf122977.py index 417427ad8928..b81adbc2616a 100644 --- a/sc/qa/uitest/options/tdf122977.py +++ b/sc/qa/uitest/options/tdf122977.py @@ -15,45 +15,47 @@ from libreoffice.uno.propertyvalue import mkPropertyValues class chartDefaultColors(UITestCase): def test_tdf122977_crash_chart_default_colors_options(self): - with self.ui_test.create_doc_in_start_center("calc"): - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() - - #Go to Tools -> Options -> Charts -> Default Colors - self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog - xDialogOpt = self.xUITest.getTopFocusWindow() - - xPages = xDialogOpt.getChild("pages") - xChartEntry = xPages.getChild('5') # Charts - xChartEntry.executeAction("EXPAND", tuple()) - xChartGeneralEntry = xChartEntry.getChild('0') - xChartGeneralEntry.executeAction("SELECT", tuple()) #Default Colors - xColors = xDialogOpt.getChild("colors") - xAdd = xDialogOpt.getChild("add") - xDelete = xDialogOpt.getChild("delete") - xDefault = xDialogOpt.getChild("default") - - #click Default - reset - xDefault.executeAction("CLICK", tuple()) - nrDefaultColors = get_state_as_dict(xColors)["Children"] - nrDefaultColors1 = int(nrDefaultColors) + 1 - xAdd.executeAction("CLICK", tuple()) #add new color - self.assertEqual(get_state_as_dict(xColors)["Children"], str(nrDefaultColors1)) - - #delete new color - with self.ui_test.execute_blocking_action(xDelete.executeAction, args=('CLICK', ()), close_button="yes"): - pass - - self.assertEqual(get_state_as_dict(xColors)["Children"], nrDefaultColors) - - xAdd.executeAction("CLICK", tuple()) #add new color - self.assertEqual(get_state_as_dict(xColors)["Children"], str(nrDefaultColors1)) - #click Default - xDefault.executeAction("CLICK", tuple()) - self.assertEqual(get_state_as_dict(xColors)["Children"], nrDefaultColors) - - xCancelBtn = xDialogOpt.getChild("cancel") - self.ui_test.close_dialog_through_button(xCancelBtn) + calc_doc = self.ui_test.create_doc_in_start_center("calc") + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") + document = self.ui_test.get_component() + + #Go to Tools -> Options -> Charts -> Default Colors + self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog + xDialogOpt = self.xUITest.getTopFocusWindow() + + xPages = xDialogOpt.getChild("pages") + xChartEntry = xPages.getChild('5') # Charts + xChartEntry.executeAction("EXPAND", tuple()) + xChartGeneralEntry = xChartEntry.getChild('0') + xChartGeneralEntry.executeAction("SELECT", tuple()) #Default Colors + xColors = xDialogOpt.getChild("colors") + xAdd = xDialogOpt.getChild("add") + xDelete = xDialogOpt.getChild("delete") + xDefault = xDialogOpt.getChild("default") + + #click Default - reset + xDefault.executeAction("CLICK", tuple()) + nrDefaultColors = get_state_as_dict(xColors)["Children"] + nrDefaultColors1 = int(nrDefaultColors) + 1 + xAdd.executeAction("CLICK", tuple()) #add new color + self.assertEqual(get_state_as_dict(xColors)["Children"], str(nrDefaultColors1)) + + #delete new color + with self.ui_test.execute_blocking_action(xDelete.executeAction, args=('CLICK', ()), close_button="yes"): + pass + + self.assertEqual(get_state_as_dict(xColors)["Children"], nrDefaultColors) + + xAdd.executeAction("CLICK", tuple()) #add new color + self.assertEqual(get_state_as_dict(xColors)["Children"], str(nrDefaultColors1)) + #click Default + xDefault.executeAction("CLICK", tuple()) + self.assertEqual(get_state_as_dict(xColors)["Children"], nrDefaultColors) + + xCancelBtn = xDialogOpt.getChild("cancel") + self.ui_test.close_dialog_through_button(xCancelBtn) + + self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: |