diff --git a/plinth/modules/snapshot/tests/snapshot.feature b/plinth/modules/snapshot/tests/snapshot.feature index 542d9d90e..ce49b2580 100644 --- a/plinth/modules/snapshot/tests/snapshot.feature +++ b/plinth/modules/snapshot/tests/snapshot.feature @@ -11,7 +11,7 @@ Background: Scenario: Create a snapshot Given the list of snapshots is empty When I manually create a snapshot - Then there should be 1 snapshot in the list + Then there should be 1 more snapshots in the list Scenario: Configure snapshots Given snapshots are configured with free space 30, timeline snapshots disabled, software snapshots disabled, hourly limit 10, daily limit 3, weekly limit 2, monthly limit 2, yearly limit 0 diff --git a/plinth/modules/snapshot/tests/test_functional.py b/plinth/modules/snapshot/tests/test_functional.py index 0eecf3c53..0a5fc1894 100644 --- a/plinth/modules/snapshot/tests/test_functional.py +++ b/plinth/modules/snapshot/tests/test_functional.py @@ -13,6 +13,7 @@ scenarios('snapshot.feature') @given('the list of snapshots is empty') def empty_snapshots_list(session_browser): _delete_all(session_browser) + return _get_count(session_browser) @when('I manually create a snapshot') @@ -20,10 +21,9 @@ def create_snapshot(session_browser): _create(session_browser) -@then(parsers.parse('there should be {count:d} snapshot in the list')) -def verify_snapshot_count(session_browser, count): - num_snapshots = _get_count(session_browser) - assert num_snapshots == count +@then(parsers.parse('there should be {count:d} more snapshots in the list')) +def verify_snapshot_count(session_browser, count, empty_snapshots_list): + assert _get_count(session_browser) == count + empty_snapshots_list @given(