tor: Make tests independent of language

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2018-04-08 12:36:22 -04:00
1 parent a152811d70
commit 42e2995abc
2 files changed
+6 -8

No files matched your search

+5 -7
View File
@@ -34,12 +34,10 @@ app_checkbox_id = {
'tor': 'id_tor-enabled',
}
app_config_updating_text = {
'tor': 'Tor configuration is being updated',
}
default_url = config['DEFAULT']['url']
apps_with_loaders = ['tor']
def get_app_module(app_name):
module = app_name
@@ -80,7 +78,7 @@ def _change_status(browser, app_name, change_status_to='enabled'):
checkbox = browser.find_by_id(get_app_checkbox_id(app_name))
checkbox.check() if change_status_to == 'enabled' else checkbox.uncheck()
interface.submit(browser, 'form-configuration')
if app_name == app_config_updating_text:
if app_name in apps_with_loaders:
wait_for_config_update(browser, app_name)
@@ -93,8 +91,8 @@ def disable(browser, app_name):
def wait_for_config_update(browser, app_name):
while browser.is_text_present(app_config_updating_text['tor']):
sleep(1)
while len(browser.find_by_css('.running-status.loading')) != 0:
sleep(0.1)
def select_domain_name(browser, app_name, domain_name):