From f1cc5d2229956e3698fd40a4d900fe45e7f8e160 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 14 Mar 2021 14:37:19 +0200 Subject: throw exception for errors in uitest actions so we abort early when a uitest goes wrong, instead of letting tests become fragile because it looks like its passing, but the code is just accidentally working Remove code in python uitests that was not actually doing anything (and now crashes because we throw an exception for actions that don't mean anything) Change-Id: I9c52f9fdc06f1c01e9b93b58a5200f9c3684db1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112471 Tested-by: Jenkins Reviewed-by: Noel Grandin --- uitest/demo_ui/listbox.py | 9 --------- uitest/demo_ui/spinfield.py | 6 ------ uitest/demo_ui/tabdialog.py | 6 ------ 3 files changed, 21 deletions(-) (limited to 'uitest') diff --git a/uitest/demo_ui/listbox.py b/uitest/demo_ui/listbox.py index 780da1ff20b0..7e9ae16e6543 100644 --- a/uitest/demo_ui/listbox.py +++ b/uitest/demo_ui/listbox.py @@ -19,9 +19,6 @@ class ListBoxTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - categoryLB = xCellsDlg.getChild("categorylb") - select_pos(categoryLB, "4") - xOkBtn = xCellsDlg.getChild("ok") self.ui_test.close_dialog_through_button(xOkBtn) @@ -34,12 +31,6 @@ class ListBoxTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - categoryLB = xCellsDlg.getChild("categorylb") - props = {"TEXT": "Time"} - - actionProps = mkPropertyValues(props) - categoryLB.executeAction("SELECT", actionProps) - xOkBtn = xCellsDlg.getChild("ok") self.ui_test.close_dialog_through_button(xOkBtn) diff --git a/uitest/demo_ui/spinfield.py b/uitest/demo_ui/spinfield.py index 3f73006b10bd..a74e47206274 100644 --- a/uitest/demo_ui/spinfield.py +++ b/uitest/demo_ui/spinfield.py @@ -19,9 +19,6 @@ class SpinFieldTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - # select the numbers tab page - select_pos(xCellsDlg, "0") - xDecimalPlaces = xCellsDlg.getChild("leadzerosed") xDecimalPlaces.executeAction("UP", tuple()) @@ -40,9 +37,6 @@ class SpinFieldTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - # select the numbers tab page - select_pos(xCellsDlg, "0") - xDecimalPlaces = xCellsDlg.getChild("leadzerosed") xDecimalPlaces.executeAction("UP", tuple()) xDecimalPlaces.executeAction("UP", tuple()) diff --git a/uitest/demo_ui/tabdialog.py b/uitest/demo_ui/tabdialog.py index ed46379ab05b..861b270989d9 100644 --- a/uitest/demo_ui/tabdialog.py +++ b/uitest/demo_ui/tabdialog.py @@ -19,8 +19,6 @@ class TabDialogTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - select_pos(xCellsDlg, "1") - xOkBtn = xCellsDlg.getChild("ok") self.ui_test.close_dialog_through_button(xOkBtn) @@ -33,10 +31,6 @@ class TabDialogTest(UITestCase): self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") xCellsDlg = self.xUITest.getTopFocusWindow() - props = {"NAME": "Borders"} - propsUNO = mkPropertyValues(props) - xCellsDlg.executeAction("SELECT", propsUNO) - xOkBtn = xCellsDlg.getChild("ok") self.ui_test.close_dialog_through_button(xOkBtn) -- cgit