mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
diagnostics: tests: functional: Pick errors more specifically
- When notifications badge is present in navigation bar, that could be confused for a diagnostics failure. Make the diagnostics failure selector more specific to avoid this. - This was caused because of removing .badge-warning/error classes in favor of .text-bg-warning/danger classes. Tests: - Enable ejabberd app and use 'systemctl stop ejabberd.service'. Run system-wide diagnostics to see a notification with error it and error badge on the notification icon. Then run functional tests on transmission app which includes diagnostic tests. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
4fdf6a7ffe
commit
765e3176fa
@ -794,12 +794,14 @@ class BaseAppTests:
|
||||
session_browser.find_by_id('id_extra_actions_button').click()
|
||||
submit(session_browser, form_class='form-diagnostics-button')
|
||||
|
||||
warning_results = session_browser.find_by_css('.text-bg-warning')
|
||||
warning_results = session_browser.find_by_css(
|
||||
'.diagnostic-result > .text-bg-warning')
|
||||
if warning_results:
|
||||
warnings.warn(
|
||||
f'Diagnostics warnings for {self.app_name}: {warning_results}')
|
||||
|
||||
failure_results = session_browser.find_by_css('.text-bg-danger')
|
||||
failure_results = session_browser.find_by_css(
|
||||
'.diagnostic-result > .text-bg-danger')
|
||||
assert not failure_results
|
||||
|
||||
@pytest.mark.backups
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user