diff --git a/plinth/modules/storage/tests/storage.feature b/plinth/modules/storage/tests/storage.feature deleted file mode 100644 index bc3f51e5b..000000000 --- a/plinth/modules/storage/tests/storage.feature +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later - -@system @storage @essential -Feature: Storage - Show information about the disks. - -Background: - Given I'm a logged in user - -Scenario: List disks - Given I'm on the storage page - Then the root disk should be shown diff --git a/plinth/modules/storage/tests/test_functional.py b/plinth/modules/storage/tests/test_functional.py index 3125d8a3d..cdfc085c1 100644 --- a/plinth/modules/storage/tests/test_functional.py +++ b/plinth/modules/storage/tests/test_functional.py @@ -3,24 +3,24 @@ Functional, browser based tests for storage app. """ import pytest -from pytest_bdd import given, parsers, scenarios, then - from plinth.tests import functional -scenarios('storage.feature') +pytestmark = [pytest.mark.system, pytest.mark.essential, pytest.mark.storage] -@then('the root disk should be shown') -def storage_root_disk_is_shown(session_browser): - assert _is_root_disk_shown(session_browser) +@pytest.fixture(scope='module', autouse=True) +def fixture_background(session_browser): + """Login.""" + functional.login(session_browser) -@given(parsers.parse("I'm on the {name:w} page")) -def go_to_module(session_browser, name): +def test_list_disks(session_browser): + """Test that root disk is shown on storage page.""" if functional.running_inside_container: pytest.skip('Storage doesn\'t work inside a container') else: - functional.nav_to_module(session_browser, name) + functional.nav_to_module(session_browser, 'storage') + assert _is_root_disk_shown(session_browser) def _is_root_disk_shown(browser):