language: Fix tests broken by recent feature

Tests were breaking because of the following reasons:
- Language options were moved to another page
- Language selections were changed from English to their respective languages

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:35:39 -04:00
1 parent 143a24a64a
commit b2fea1b0de
5 files changed
+40 -40

No files matched your search

+6 -6
View File
@@ -59,12 +59,12 @@ def set_domain_name(browser, domain_name):
def set_language(browser, language_code):
nav_to_module(browser, 'config')
browser.find_by_xpath(
'//select[@id="id_configuration-language"]//option[@value="' \
+ language_code + '"]'
).first.click()
submit(browser)
username = config['DEFAULT']['username']
browser.visit(config['DEFAULT']['url'] +
'/plinth/sys/users/{}/edit/'.format(username))
browser.find_by_xpath('//select[@id="id_language"]//option[@value="' +
language_code + '"]').first.click()
browser.find_by_css('input[type=submit]').click()
def check_language(browser, language_code):