mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
help: 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
373bda1133
commit
19fb965237
@ -1,18 +0,0 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
# TODO Scenario: Visit the wiki
|
|
||||||
# TODO Scenario: Visit the mailing list
|
|
||||||
# TODO Scenario: Visit the IRC channel
|
|
||||||
# TODO Scenario: View the manual
|
|
||||||
# TODO Scenario: View the about page
|
|
||||||
|
|
||||||
@help @system @essential
|
|
||||||
Feature: Help module
|
|
||||||
Show various information about the system.
|
|
||||||
|
|
||||||
Background:
|
|
||||||
Given I'm a logged in user
|
|
||||||
|
|
||||||
Scenario: Status logs
|
|
||||||
When I go to the status logs page
|
|
||||||
Then status logs should be shown
|
|
||||||
@ -3,20 +3,27 @@
|
|||||||
Functional, browser based tests for help app.
|
Functional, browser based tests for help app.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pytest_bdd import scenarios, then, when
|
import pytest
|
||||||
|
|
||||||
from plinth.tests import functional
|
from plinth.tests import functional
|
||||||
|
|
||||||
scenarios('help.feature')
|
pytestmark = [pytest.mark.system, pytest.mark.essential, pytest.mark.help]
|
||||||
|
|
||||||
|
# TODO Scenario: Visit the wiki
|
||||||
|
# TODO Scenario: Visit the mailing list
|
||||||
|
# TODO Scenario: Visit the IRC channel
|
||||||
|
# TODO Scenario: View the manual
|
||||||
|
# TODO Scenario: View the about page
|
||||||
|
|
||||||
|
|
||||||
@when('I go to the status logs page')
|
@pytest.fixture(scope='module', autouse=True)
|
||||||
def help_go_to_status_logs(session_browser):
|
def fixture_background(session_browser):
|
||||||
|
"""Login."""
|
||||||
|
functional.login(session_browser)
|
||||||
|
|
||||||
|
|
||||||
|
def test_view_status_logs(session_browser):
|
||||||
|
"""Test viewing the status logs."""
|
||||||
_go_to_status_logs(session_browser)
|
_go_to_status_logs(session_browser)
|
||||||
|
|
||||||
|
|
||||||
@then('status logs should be shown')
|
|
||||||
def help_status_logs_are_shown(session_browser):
|
|
||||||
assert _are_status_logs_shown(session_browser)
|
assert _are_status_logs_shown(session_browser)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user