diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-03-14 14:37:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-17 12:30:41 +0100 |
commit | f1cc5d2229956e3698fd40a4d900fe45e7f8e160 (patch) | |
tree | 91c6d4dcafd5932c60ff2b46f845053bc9dcdd00 /uitest | |
parent | 32a0b409282554df7d66b7212ddd0fe187f86690 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/demo_ui/listbox.py | 9 | ||||
-rw-r--r-- | uitest/demo_ui/spinfield.py | 6 | ||||
-rw-r--r-- | uitest/demo_ui/tabdialog.py | 6 |
3 files changed, 0 insertions, 21 deletions
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) |