From 851644574d4b3c2727798b48389eb131a0f63c65 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 14 Feb 2022 18:35:53 -0800 Subject: [PATCH] email: Add basic functional tests Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/email/tests/test_functional.py | 27 +++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 28 insertions(+) create mode 100644 plinth/modules/email/tests/test_functional.py diff --git a/plinth/modules/email/tests/test_functional.py b/plinth/modules/email/tests/test_functional.py new file mode 100644 index 000000000..c334b9ed4 --- /dev/null +++ b/plinth/modules/email/tests/test_functional.py @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +""" +Functional, browser based tests for email app. +""" + +import pytest + +from plinth.tests import functional + +pytestmark = [pytest.mark.apps, pytest.mark.email] + + +class TestEmailApp(functional.BaseAppTests): + app_name = 'email' + has_service = True + has_web = False + check_diagnostics = True + + @pytest.fixture(autouse=True) + def fixture_background(self, session_browser): + functional.login(session_browser) + functional.set_advanced_mode(session_browser, True) + functional.install(session_browser, self.app_name) + functional.app_enable(session_browser, self.app_name) + yield + functional.login(session_browser) + functional.app_disable(session_browser, self.app_name) diff --git a/pyproject.toml b/pyproject.toml index 79690006f..43b6fe51a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ markers = [ "domain", "dynamicdns", "ejabberd", + "email", "gitweb", "help", "i2p",