jsxc: Fix functional test case failure

The optimization for not visiting FreedomBox pages again while on FreedomBox
pages fails as it assumes that all URLs starting with /plinth/ are part of
FreedomBox. /plinth/app/jsxc/jsxc/ is an exception. Fix the optimization
condition by adding a conditional check. Better ways can be found later.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-02-14 16:14:40 -08:00 committed by James Valleroy
parent 591ed5c4ae
commit 45bd9d3905
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -37,7 +37,8 @@ default_url = config['DEFAULT']['url']
def login(browser, url, username, password):
if '/plinth/' not in browser.url:
# XXX: Find a way to remove the hardcoded jsxc URL
if '/plinth/' not in browser.url or '/jsxc/jsxc' in browser.url:
browser.visit(url)
apps_link = browser.find_link_by_href('/plinth/apps/')