mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
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:
parent
9cc69ed32c
commit
e097250d90
@ -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
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user