diff --git a/plinth/modules/i2p/tests/test_functional.py b/plinth/modules/i2p/tests/test_functional.py index c3e2c0a11..d71a5f7ef 100644 --- a/plinth/modules/i2p/tests/test_functional.py +++ b/plinth/modules/i2p/tests/test_functional.py @@ -14,3 +14,4 @@ class TestI2pApp(BaseAppTests): app_name = 'i2p' has_service = True has_web = True + diagnostics_delay = 1 diff --git a/plinth/modules/matrixsynapse/tests/test_functional.py b/plinth/modules/matrixsynapse/tests/test_functional.py index 893593ea9..4d844fefd 100644 --- a/plinth/modules/matrixsynapse/tests/test_functional.py +++ b/plinth/modules/matrixsynapse/tests/test_functional.py @@ -4,7 +4,6 @@ Functional, browser based tests for matrixsynapse app. """ import pytest -import time from plinth.tests import functional @@ -15,6 +14,7 @@ class TestMatrixSynapseApp(functional.BaseAppTests): app_name = 'matrixsynapse' has_service = True has_web = False + diagnostics_delay = 1 @pytest.fixture(scope='class', autouse=True) def fixture_setup(self, session_browser): @@ -24,8 +24,3 @@ class TestMatrixSynapseApp(functional.BaseAppTests): functional.install(session_browser, self.app_name) functional.app_select_domain_name(session_browser, self.app_name, 'mydomain.example') - - def test_run_diagnostics(self, session_browser): - """Add a short delay before checking diagnostics.""" - time.sleep(1) - super().test_run_diagnostics(session_browser) diff --git a/plinth/tests/functional/__init__.py b/plinth/tests/functional/__init__.py index 7d4f8e2a0..acee59ca7 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -599,6 +599,7 @@ class BaseAppTests: has_service = False has_web = True check_diagnostics = True + diagnostics_delay = 0 def assert_app_running(self, session_browser): """Assert that the app is running.""" @@ -639,6 +640,7 @@ class BaseAppTests: if not self.check_diagnostics: pytest.skip(f'Skipping diagnostics check for ${self.app_name}.') + time.sleep(self.diagnostics_delay) session_browser.find_by_id('id_extra_actions_button').click() submit(session_browser, form_class='form-diagnostics-button')