diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-23 15:40:08 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-06-10 10:10:45 +0200 |
commit | 16064329c4c4385ca53b243354b04e0d794b1ca6 (patch) | |
tree | eec7032f49dddbdbe25a81b127b52edb86cb5263 /uitest | |
parent | c8522043b239aa0e463e6793b7c9b019d79b2d9d (diff) |
editengine-columns: Create document model and dialog page
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116868
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/uihelper/guarded.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/uitest/uitest/uihelper/guarded.py b/uitest/uitest/uihelper/guarded.py index b7e5ce099d1e..b75aea332ff3 100644 --- a/uitest/uitest/uihelper/guarded.py +++ b/uitest/uitest/uihelper/guarded.py @@ -18,6 +18,16 @@ def load_file(testCase, url): finally: testCase.ui_test.close_doc() +# Calls UITest.close_doc at exit +@contextmanager +def create_doc_in_start_center(testCase, app): + testCase.ui_test.create_doc_in_start_center(app) + component = testCase.ui_test.get_component() + try: + yield component + finally: + testCase.ui_test.close_doc() + # Calls UITest.close_dialog_through_button at exit @contextmanager def execute_dialog_through_action(testCase, ui_object, action, parameters = None, event_name = "DialogExecute", close_button = "ok"): @@ -28,4 +38,14 @@ def execute_dialog_through_action(testCase, ui_object, action, parameters = None finally: testCase.ui_test.close_dialog_through_button(xDialog.getChild(close_button)) +# Calls UITest.close_dialog_through_button at exit +@contextmanager +def execute_dialog_through_command(testCase, command, printNames=False, close_button = "ok"): + testCase.ui_test.execute_dialog_through_command(command, printNames) + xDialog = testCase.xUITest.getTopFocusWindow() + try: + yield xDialog + finally: + testCase.ui_test.close_dialog_through_button(xDialog.getChild(close_button)) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |