diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-11-30 17:36:39 -0200 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-11-30 17:36:39 -0200 |
commit | b6f60fd007efc84ef7cc2b63988448a61bbeb8d2 (patch) | |
tree | 4461d14d412fa6923b221b4cbfe21071273a7299 /service/test/functional/features/environment.py | |
parent | ab17f819d5b724b45927e559de7c5dc796cb7fa6 (diff) |
Add sign up smoke test
See: https://github.com/pixelated/project-issues/issues/381
Diffstat (limited to 'service/test/functional/features/environment.py')
-rw-r--r-- | service/test/functional/features/environment.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py index 981fd33e..efbf3412 100644 --- a/service/test/functional/features/environment.py +++ b/service/test/functional/features/environment.py @@ -16,6 +16,7 @@ import os import re import time +from urlparse import urlparse from crochet import setup, wait_for from leap.common.events.server import ensure_server @@ -45,8 +46,16 @@ def before_all(context): userdata = context.config.userdata context.host = userdata.get('host', 'http://localhost') + if not context.host.startswith('http'): + context.host = 'https://{}'.format(context.host) + + hostname = urlparse(context.host).hostname + context.signup_url = 'https://{}/signup'.format(hostname) + context.login_url = 'https://mail.{}/login'.format(hostname) + if 'localhost' in context.host: _mock_user_agent(context) + context.login_url = context.multi_user_url + '/login' def _mock_user_agent(context): @@ -74,16 +83,19 @@ def _define_url(port): def after_all(context): context.browser.quit() - context.single_user_client.stop() + if 'localhost' in context.host: + context.single_user_client.stop() def before_feature(context, feature): - context.browser.get(context.single_user_url) + if 'localhost' in context.host: + context.browser.get(context.single_user_url) def after_feature(context, feature): - cleanup_all_mails(context) - context.last_mail = None + if 'localhost' in context.host: + cleanup_all_mails(context) + context.last_mail = None def after_step(context, step): |