diff --git a/plinth/modules/infinoted/tests/infinoted.feature b/plinth/modules/infinoted/tests/infinoted.feature deleted file mode 100644 index 9687a6b9c..000000000 --- a/plinth/modules/infinoted/tests/infinoted.feature +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later - -@apps @infinoted -Feature: Infinoted Collaborative Text Editor - Run Gobby Server - Infinoted - -Background: - Given I'm a logged in user - Given the infinoted application is installed - -Scenario: Enable infinoted application - Given the infinoted application is disabled - When I enable the infinoted application - Then the infinoted service should be running - -Scenario: Disable infinoted application - Given the infinoted application is enabled - When I disable the infinoted application - Then the infinoted service should not be running diff --git a/plinth/modules/infinoted/tests/test_functional.py b/plinth/modules/infinoted/tests/test_functional.py index be32e536e..eab534960 100644 --- a/plinth/modules/infinoted/tests/test_functional.py +++ b/plinth/modules/infinoted/tests/test_functional.py @@ -3,6 +3,27 @@ Functional, browser based tests for infinoted app. """ -from pytest_bdd import scenarios +import pytest +from plinth.tests import functional -scenarios('infinoted.feature') +pytestmark = [pytest.mark.apps, pytest.mark.infinoted] + + +@pytest.fixture(scope='module', autouse=True) +def fixture_background(session_browser): + """Login and install the app.""" + functional.login(session_browser) + functional.install(session_browser, 'infinoted') + yield + functional.app_disable(session_browser, 'infinoted') + + +def test_enable_disable(session_browser): + """Test enabling the app.""" + functional.app_disable(session_browser, 'infinoted') + + functional.app_enable(session_browser, 'infinoted') + assert functional.service_is_running(session_browser, 'infinoted') + + functional.app_disable(session_browser, 'infinoted') + assert functional.service_is_not_running(session_browser, 'infinoted')