jsxc: 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:
James Valleroy 2021-09-07 17:20:26 -04:00 committed by Sunil Mohan Adapa
parent 9cc69ed32c
commit e097250d90
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 23 additions and 21 deletions

View File

@ -1,19 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
@apps @jsxc
Feature: JSXC XMPP Client
Run the JSXC XMPP client.
Background:
Given I'm a logged in user
Scenario: Install jsxc application
Given the jsxc application is installed
Then the jsxc site should be available
@backups
Scenario: Backup and restore jsxc
Given the jsxc application is installed
When I create a backup of the jsxc app data with name test_jsxc
And I restore the jsxc app data backup with name test_jsxc
Then the jsxc site should be available

View File

@ -3,6 +3,27 @@
Functional, browser based tests for jsxc app.
"""
from pytest_bdd import scenarios
import pytest
from plinth.tests import functional
scenarios('jsxc.feature')
pytestmark = [pytest.mark.apps, pytest.mark.jsxc]
@pytest.fixture(scope='module', autouse=True)
def fixture_background(session_browser):
"""Login."""
functional.login(session_browser)
def test_install(session_browser):
"""Test installing the app."""
functional.install(session_browser, 'jsxc')
assert functional.is_available(session_browser, 'jsxc')
@pytest.mark.backups
def test_backup(session_browser):
"""Test backing up and restoring."""
functional.backup_create(session_browser, 'jsxc', 'test_jsxc')
functional.backup_restore(session_browser, 'jsxc', 'test_jsxc')
assert functional.is_available(session_browser, 'jsxc')