mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
apps: Do not show status block if service is running
If at least one related service/daemon is not running, show the alert if app is enabled, otherwise set alert as hidden (for functional tests). Closes #1752 Signed-off-by: Veiko Aasa <veiko17@disroot.org> [sunil: Minor code simplification in app template, status section] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
b668e62f6f
commit
995af05866
25 files changed
+16
-60
No files matched your search
@@ -23,12 +23,12 @@ def get_service_module(service_name):
|
||||
|
||||
def is_running(browser, service_name):
|
||||
interface.nav_to_module(browser, get_service_module(service_name))
|
||||
return len(browser.find_by_css('.running-status.active')) != 0
|
||||
return len(browser.find_by_id('service-not-running')) == 0
|
||||
|
||||
|
||||
def is_not_running(browser, service_name):
|
||||
interface.nav_to_module(browser, get_service_module(service_name))
|
||||
return len(browser.find_by_css('.running-status.inactive')) != 0
|
||||
return len(browser.find_by_id('service-not-running')) != 0
|
||||
|
||||
|
||||
def eventually(function, args=[], timeout=30):
|
||||
|
||||
Reference in new issue
Block a user