From 45bd9d390550ecbf5f61bf3d8ea12e77730bf959 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 14 Feb 2020 16:14:40 -0800 Subject: [PATCH] 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 --- functional_tests/support/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functional_tests/support/interface.py b/functional_tests/support/interface.py index 4b35885f0..6e989a3b0 100644 --- a/functional_tests/support/interface.py +++ b/functional_tests/support/interface.py @@ -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/')