diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-30 11:01:58 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-30 13:17:54 +0200 |
commit | 57e8d25a40d7c053fef8ecb452e159264c659604 (patch) | |
tree | 9b7ca9fc7cbe8972d1caba9e583fc77f6c5a91b1 /sc/qa/uitest/calc_tests6/tdf121263.py | |
parent | adf59322c651e8e6740a8d97d963dcf0972bdc54 (diff) |
uitest: guard create_doc_in_start_center in sc
Mostly done by a script
for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac
< UITest: introduce guarded context managers >
Change-Id: I9392c56e6efccde958f0cdd497376b3939b75be4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118152
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests6/tdf121263.py')
-rw-r--r-- | sc/qa/uitest/calc_tests6/tdf121263.py | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/sc/qa/uitest/calc_tests6/tdf121263.py b/sc/qa/uitest/calc_tests6/tdf121263.py index 1a3776f811d9..b8db6a19811b 100644 --- a/sc/qa/uitest/calc_tests6/tdf121263.py +++ b/sc/qa/uitest/calc_tests6/tdf121263.py @@ -13,27 +13,25 @@ from uitest.uihelper.common import get_state_as_dict class tdf121263(UITestCase): def test_tdf121263_hide_more_sheets(self): - calc_doc = self.ui_test.create_doc_in_start_center("calc") - xTopWindow = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() - gridwin = xTopWindow.getChild("grid_window") + with self.ui_test.create_doc_in_start_center_guarded("calc"): + xTopWindow = self.xUITest.getTopFocusWindow() + gridwin = xTopWindow.getChild("grid_window") - with self.ui_test.execute_dialog_through_command(".uno:Insert"): - pass - with self.ui_test.execute_dialog_through_command(".uno:Insert"): - pass + with self.ui_test.execute_dialog_through_command(".uno:Insert"): + pass + with self.ui_test.execute_dialog_through_command(".uno:Insert"): + pass - gridwin.executeAction("SELECT", mkPropertyValues({"TABLE": "2"})) - #select previous sheet - self.xUITest.executeCommand(".uno:JumpToPrevTableSel") + gridwin.executeAction("SELECT", mkPropertyValues({"TABLE": "2"})) + #select previous sheet + self.xUITest.executeCommand(".uno:JumpToPrevTableSel") - #hide sheet - self.xUITest.executeCommand(".uno:Hide") + #hide sheet + self.xUITest.executeCommand(".uno:Hide") - #show sheet Dialog - with self.ui_test.execute_dialog_through_command(".uno:Show", close_button="cancel") as xDialog: - treeview = xDialog.getChild("treeview") - self.assertEqual(get_state_as_dict(treeview)["Children"], "2") + #show sheet Dialog + with self.ui_test.execute_dialog_through_command(".uno:Show", close_button="cancel") as xDialog: + treeview = xDialog.getChild("treeview") + self.assertEqual(get_state_as_dict(treeview)["Children"], "2") - self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: |