diff options
author | Thais Siqueira <thais.siqueira@gmail.com> | 2017-04-25 16:35:40 -0300 |
---|---|---|
committer | Thais Siqueira <thais.siqueira@gmail.com> | 2017-04-26 11:34:38 -0300 |
commit | f47b414f8231c5f62e3477711df4623969e86284 (patch) | |
tree | 5b32ccd511da48dcf19b74e3961342038e6bb248 /service | |
parent | 3e639b17b5d2a43b6428e07f1106803965c9ab31 (diff) |
Includes logout after scenarios
with @tayanefernandes
Diffstat (limited to 'service')
-rw-r--r-- | service/test/functional/features/environment.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py index 379583bc..98c7fa99 100644 --- a/service/test/functional/features/environment.py +++ b/service/test/functional/features/environment.py @@ -135,18 +135,20 @@ def after_feature(context, feature): context.last_mail = None +def after_scenario(context, scenario): + _logout(context) + context.browser.refresh() + + def after_step(context, step): if step.status == 'failed': _debug_on_error(context, step) _save_screenshot(context, step) - _logout(context, step) + _logout(context) -def _logout(context, step): - if context.browser.current_url == context.inbox_url: - utils.log_out() - elif context.browser.current_url == context.backup_account_url: - BackupAccountPage().logout() +def _logout(context): + context.browser.delete_all_cookies() def _debug_on_error(context, step): |