mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
roundcube: Use BaseAppTests for functional tests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
ed46278550
commit
6358d4fcd3
@ -4,35 +4,13 @@ Functional, browser based tests for roundcube app.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from plinth.tests import functional
|
|
||||||
|
from plinth.tests.functional import BaseAppTests
|
||||||
|
|
||||||
pytestmark = [pytest.mark.apps, pytest.mark.roundcube]
|
pytestmark = [pytest.mark.apps, pytest.mark.roundcube]
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='module', autouse=True)
|
class TestRoundcubeApp(BaseAppTests):
|
||||||
def fixture_background(session_browser):
|
app_name = 'roundcube'
|
||||||
"""Login and install the app."""
|
has_service = False
|
||||||
functional.login(session_browser)
|
has_web = True
|
||||||
functional.install(session_browser, 'roundcube')
|
|
||||||
yield
|
|
||||||
functional.app_disable(session_browser, 'roundcube')
|
|
||||||
|
|
||||||
|
|
||||||
def test_enable_disable(session_browser):
|
|
||||||
"""Test enabling the app."""
|
|
||||||
functional.app_disable(session_browser, 'roundcube')
|
|
||||||
|
|
||||||
functional.app_enable(session_browser, 'roundcube')
|
|
||||||
assert functional.is_available(session_browser, 'roundcube')
|
|
||||||
|
|
||||||
functional.app_disable(session_browser, 'roundcube')
|
|
||||||
assert not functional.is_available(session_browser, 'roundcube')
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.backups
|
|
||||||
def test_backup_restore(session_browser):
|
|
||||||
"""Test backup and restore."""
|
|
||||||
functional.app_enable(session_browser, 'roundcube')
|
|
||||||
functional.backup_create(session_browser, 'roundcube', 'test_roundcube')
|
|
||||||
functional.backup_restore(session_browser, 'roundcube', 'test_roundcube')
|
|
||||||
assert functional.is_available(session_browser, 'roundcube')
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user