mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
matrixsynapse: Convert functional tests to non-BDD python format
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> [sunil: Add markers] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
c2844d358e
commit
9cc69ed32c
@ -1,21 +0,0 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
@apps @matrixsynapse
|
||||
Feature: Matrix Synapse VoIP and Chat Server
|
||||
Run Matrix Synapse server
|
||||
|
||||
Background:
|
||||
Given I'm a logged in user
|
||||
Given the domain name is set to mydomain.example
|
||||
Given the matrixsynapse application is installed
|
||||
Given the domain name for matrixsynapse is set to mydomain.example
|
||||
|
||||
Scenario: Enable matrixsynapse application
|
||||
Given the matrixsynapse application is disabled
|
||||
When I enable the matrixsynapse application
|
||||
Then the matrixsynapse service should be running
|
||||
|
||||
Scenario: Disable matrixsynapse application
|
||||
Given the matrixsynapse application is enabled
|
||||
When I disable the matrixsynapse application
|
||||
Then the matrixsynapse service should not be running
|
||||
@ -3,6 +3,30 @@
|
||||
Functional, browser based tests for matrixsynapse app.
|
||||
"""
|
||||
|
||||
from pytest_bdd import scenarios
|
||||
import pytest
|
||||
from plinth.tests import functional
|
||||
|
||||
scenarios('matrixsynapse.feature')
|
||||
pytestmark = [pytest.mark.apps, pytest.mark.matrixsynapse]
|
||||
|
||||
|
||||
@pytest.fixture(scope='module', autouse=True)
|
||||
def fixture_background(session_browser):
|
||||
"""Login and install the app."""
|
||||
functional.login(session_browser)
|
||||
functional.set_domain_name(session_browser, 'mydomain.example')
|
||||
functional.install(session_browser, 'matrixsynapse')
|
||||
functional.app_select_domain_name(session_browser, 'matrixsynapse',
|
||||
'mydomain.example')
|
||||
yield
|
||||
functional.app_disable(session_browser, 'matrixsynapse')
|
||||
|
||||
|
||||
def test_enable_disable(session_browser):
|
||||
"""Test enabling the app."""
|
||||
functional.app_disable(session_browser, 'matrixsynapse')
|
||||
|
||||
functional.app_enable(session_browser, 'matrixsynapse')
|
||||
assert functional.service_is_running(session_browser, 'matrixsynapse')
|
||||
|
||||
functional.app_disable(session_browser, 'matrixsynapse')
|
||||
assert functional.service_is_not_running(session_browser, 'matrixsynapse')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user