diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-22 11:17:29 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-22 21:47:11 +0200 |
commit | 374baf308979306aa35575118c40ccd7caae1e29 (patch) | |
tree | 2570881a42fe5b5555db1dbf2aecc0a3fdd33878 /uitest/demo_ui/tabdialog.py | |
parent | b2331179fc508fd6bc37355e5c3c5a5ee54557c4 (diff) |
uitest: guard create_doc_in_start_center
Mostly done by a script
for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac
< UITest: introduce guarded context managers >
Change-Id: I75ef7712af3676363a9a464acf83f6f68ffc4f85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117617
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest/demo_ui/tabdialog.py')
-rw-r--r-- | uitest/demo_ui/tabdialog.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/uitest/demo_ui/tabdialog.py b/uitest/demo_ui/tabdialog.py index 861b270989d9..00e9c0e161b8 100644 --- a/uitest/demo_ui/tabdialog.py +++ b/uitest/demo_ui/tabdialog.py @@ -14,26 +14,22 @@ class TabDialogTest(UITestCase): def test_select_tab_page_pos(self): - self.ui_test.create_doc_in_start_center("calc") + with self.ui_test.create_doc_in_start_center("calc"): - self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") - xCellsDlg = self.xUITest.getTopFocusWindow() + self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") + xCellsDlg = self.xUITest.getTopFocusWindow() - xOkBtn = xCellsDlg.getChild("ok") - self.ui_test.close_dialog_through_button(xOkBtn) - - self.ui_test.close_doc() + xOkBtn = xCellsDlg.getChild("ok") + self.ui_test.close_dialog_through_button(xOkBtn) def test_select_tab_page_name(self): - self.ui_test.create_doc_in_start_center("calc") - - self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") - xCellsDlg = self.xUITest.getTopFocusWindow() + with self.ui_test.create_doc_in_start_center("calc"): - xOkBtn = xCellsDlg.getChild("ok") - self.ui_test.close_dialog_through_button(xOkBtn) + self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") + xCellsDlg = self.xUITest.getTopFocusWindow() - self.ui_test.close_doc() + xOkBtn = xCellsDlg.getChild("ok") + self.ui_test.close_dialog_through_button(xOkBtn) # vim: set shiftwidth=4 softtabstop=4 expandtab: |