mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
quassel: Convert functional tests to non-BDD python format
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
650c16f914
commit
8daa9aa49d
@ -1,27 +0,0 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
@apps @quassel
|
||||
Feature: Quassel IRC Client
|
||||
Run Quassel core.
|
||||
|
||||
Background:
|
||||
Given I'm a logged in user
|
||||
Given the quassel application is installed
|
||||
|
||||
Scenario: Enable quassel application
|
||||
Given the quassel application is disabled
|
||||
When I enable the quassel application
|
||||
Then the quassel service should be running
|
||||
|
||||
# TODO: Improve this to actually check that data configured servers is restored.
|
||||
@backups
|
||||
Scenario: Backup and restore quassel
|
||||
Given the quassel application is enabled
|
||||
When I create a backup of the quassel app data with name test_quassel
|
||||
And I restore the quassel app data backup with name test_quassel
|
||||
Then the quassel service should be running
|
||||
|
||||
Scenario: Disable quassel application
|
||||
Given the quassel application is enabled
|
||||
When I disable the quassel application
|
||||
Then the quassel service should not be running
|
||||
@ -3,6 +3,38 @@
|
||||
Functional, browser based tests for quassel app.
|
||||
"""
|
||||
|
||||
from pytest_bdd import scenarios
|
||||
import pytest
|
||||
from plinth.tests import functional
|
||||
|
||||
scenarios('quassel.feature')
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.quassel]
|
||||
|
||||
|
||||
@pytest.fixture(scope='module', autouse=True)
|
||||
def fixture_background(session_browser):
|
||||
"""Login and install the app."""
|
||||
functional.login(session_browser)
|
||||
functional.install(session_browser, 'quassel')
|
||||
yield
|
||||
functional.app_disable(session_browser, 'quassel')
|
||||
|
||||
|
||||
def test_enable_disable(session_browser):
|
||||
"""Test enabling the app."""
|
||||
functional.app_disable(session_browser, 'quassel')
|
||||
|
||||
functional.app_enable(session_browser, 'quassel')
|
||||
assert functional.service_is_running(session_browser, 'quassel')
|
||||
|
||||
functional.app_disable(session_browser, 'quassel')
|
||||
assert functional.service_is_not_running(session_browser, 'quassel')
|
||||
|
||||
|
||||
# TODO: Improve this to actually check that data configured servers is
|
||||
# restored.
|
||||
@pytest.mark.backups
|
||||
def test_backup_restore(session_browser):
|
||||
"""Test backup and restore of app data."""
|
||||
functional.app_enable(session_browser, 'quassel')
|
||||
functional.backup_create(session_browser, 'quassel', 'test_quassel')
|
||||
functional.backup_restore(session_browser, 'quassel', 'test_quassel')
|
||||
assert functional.service_is_running(session_browser, 'quassel')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user