summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/writer_tests6/tdf126226.py
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest/writer_tests6/tdf126226.py')
-rw-r--r--sw/qa/uitest/writer_tests6/tdf126226.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/sw/qa/uitest/writer_tests6/tdf126226.py b/sw/qa/uitest/writer_tests6/tdf126226.py
index e13505fc1f64..9d397a060792 100644
--- a/sw/qa/uitest/writer_tests6/tdf126226.py
+++ b/sw/qa/uitest/writer_tests6/tdf126226.py
@@ -10,20 +10,19 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
class Tdf126226(UITestCase):
def test_tdf126226(self):
- writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126226.odt"))
+ with self.ui_test.load_file(get_url_for_data_file("tdf126226.odt")) as writer_doc:
- self.xUITest.executeCommand(".uno:SelectAll")
+ self.xUITest.executeCommand(".uno:SelectAll")
- # Without the fix in place, this test would have crashed here
- self.ui_test.execute_dialog_through_command(".uno:CommentChangeTracking")
+ # Without the fix in place, this test would have crashed here
+ self.ui_test.execute_dialog_through_command(".uno:CommentChangeTracking")
- xDialog = self.xUITest.getTopFocusWindow()
+ xDialog = self.xUITest.getTopFocusWindow()
- self.assertEqual("Hello\n", get_state_as_dict(xDialog.getChild("edit"))["Text"])
- self.assertEqual("Autor desconocido, 07/04/2019 13:43:52",
- get_state_as_dict(xDialog.getChild("lastedit"))["Text"])
+ self.assertEqual("Hello\n", get_state_as_dict(xDialog.getChild("edit"))["Text"])
+ self.assertEqual("Autor desconocido, 07/04/2019 13:43:52",
+ get_state_as_dict(xDialog.getChild("lastedit"))["Text"])
- xOKBtn = xDialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOKBtn)
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
- self.ui_test.close_doc()