summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/calc_tests9/forms.py
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-21 16:21:30 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-22 14:46:39 +0200
commitbe0a41679fea524e0935dc6617b5e65349812dd1 (patch)
treef14372226d5054c045f954e38ea09da5c412215b /sc/qa/uitest/calc_tests9/forms.py
parent14069d84174ca7a4e60db4d75912903e9679b643 (diff)
uitest: guard load_file
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Ia924293dc2a12230fd13f69fd734875ced86be8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117593 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests9/forms.py')
-rw-r--r--sc/qa/uitest/calc_tests9/forms.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/sc/qa/uitest/calc_tests9/forms.py b/sc/qa/uitest/calc_tests9/forms.py
index b682cf69c9ea..aceb5a8b589d 100644
--- a/sc/qa/uitest/calc_tests9/forms.py
+++ b/sc/qa/uitest/calc_tests9/forms.py
@@ -12,19 +12,17 @@ class Forms(UITestCase):
def test_tdf131000(self):
- self.ui_test.load_file(get_url_for_data_file("tdf131000.ods"))
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
+ with self.ui_test.load_file(get_url_for_data_file("tdf131000.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
- gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "form"}))
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "form"}))
- # Without the fix in place, this test would have hung here
- self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties")
+ # Without the fix in place, this test would have hung here
+ self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties")
- xCellRange = self.ui_test.wait_until_child_is_available('textfield-Source cell range')
+ xCellRange = self.ui_test.wait_until_child_is_available('textfield-Source cell range')
- self.assertEqual("A1:A7000", get_state_as_dict(xCellRange)['Text'])
-
- self.ui_test.close_doc()
+ self.assertEqual("A1:A7000", get_state_as_dict(xCellRange)['Text'])
# vim: set shiftwidth=4 softtabstop=4 expandtab: