summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/writer_tests7/tdf104795.py
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest/writer_tests7/tdf104795.py')
-rw-r--r--sw/qa/uitest/writer_tests7/tdf104795.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/sw/qa/uitest/writer_tests7/tdf104795.py b/sw/qa/uitest/writer_tests7/tdf104795.py
index 1fcc20f5b013..58316db101b5 100644
--- a/sw/qa/uitest/writer_tests7/tdf104795.py
+++ b/sw/qa/uitest/writer_tests7/tdf104795.py
@@ -13,19 +13,17 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
class tdf104795(UITestCase):
def test_tdf104795(self):
- writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf104795.odt"))
- self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
- xDialog = self.xUITest.getTopFocusWindow()
+ with self.ui_test.load_file(get_url_for_data_file("tdf104795.odt")) as writer_doc:
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
- sShowSignedText = get_state_as_dict(xDialog.getChild('showsigned'))['Text']
+ sShowSignedText = get_state_as_dict(xDialog.getChild('showsigned'))['Text']
- xOkBtn = xDialog.getChild("ok")
- xOkBtn.executeAction("CLICK", tuple())
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
- # Without the fix in place, this test would have failed with
- # AssertionError: '12/19/2016, 23:06:31, timur.davletshin' != '12/19/2016, 00:00:00, !!br0ken!!'
- self.assertEqual("12/19/2016, 23:06:31, timur.davletshin", sShowSignedText.split('@')[0])
-
- self.ui_test.close_doc()
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '12/19/2016, 23:06:31, timur.davletshin' != '12/19/2016, 00:00:00, !!br0ken!!'
+ self.assertEqual("12/19/2016, 23:06:31, timur.davletshin", sShowSignedText.split('@')[0])
# vim: set shiftwidth=4 softtabstop=4 expandtab: