tests: functional: Fix expecting FreedomBox to be home page

In some cases, we are visiting / and expecting to reach the home page of
FreedomBox UI. When due to failed tests in config app, the home page is set to
something other than FreedomBox UI, these tests fail. Fix this by visiting
/freedombox explicitly instead.

Tests:

- When hope page is set to Syncthing, kiwix functional tests pass.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2026-03-02 20:50:36 -05:00
1 parent 168f662a17
commit bbbe2cf950
3 files changed
+8 -5

No files matched your search

@@ -115,6 +115,6 @@ def _is_anonymous_read_allowed(browser) -> bool:
def _shortcut_exists(browser) -> bool:
"""Check that the Kiwix shortcut exists on the front page."""
browser.visit(_default_url)
browser.visit(_default_url + '/freedombox/')
links_found = browser.links.find_by_href('/kiwix')
return len(links_found) == 1
@@ -31,10 +31,12 @@ class TestOpenvpnApp(functional.BaseAppTests):
if not functional.user_exists(session_browser, 'nonvpnuser'):
functional.create_user(session_browser, 'nonvpnuser', groups=[])
functional.login_with_account(session_browser, base_url, 'vpnuser')
functional.login_with_account(session_browser,
base_url + '/freedombox/', 'vpnuser')
_download_profile(session_browser)
functional.login_with_account(session_browser, base_url, 'nonvpnuser')
functional.login_with_account(session_browser,
base_url + '/freedombox/', 'nonvpnuser')
_not_on_front_page(session_browser)
functional.login(session_browser)