diff --git a/tests/features/api/api_deposit_open.feature b/tests/features/api/api_deposit_open.feature index a120c5c6a..8782e7f2d 100644 --- a/tests/features/api/api_deposit_open.feature +++ b/tests/features/api/api_deposit_open.feature @@ -60,7 +60,7 @@ Feature: Deposit API (open) And deposit exists And deposit is archived And user viewer is authenticated - And as viewer the Yoda browse collections API is queried with # Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689 + And the Yoda browse collections API is queried with Then the response status code is "200" And the browse result contains deposit diff --git a/tests/features/api/api_deposit_restricted.feature b/tests/features/api/api_deposit_restricted.feature index 3155de18e..573957e74 100644 --- a/tests/features/api/api_deposit_restricted.feature +++ b/tests/features/api/api_deposit_restricted.feature @@ -49,7 +49,7 @@ Feature: Deposit API (restricted) And deposit exists And deposit is archived And user viewer is authenticated - And as viewer the Yoda browse collections API is queried with # Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689 + And the Yoda browse collections API is queried with Then the response status code is "200" And the browse result does not contain deposit diff --git a/tests/requirements.txt b/tests/requirements.txt index ca93ffea6..6caab6ffa 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,7 +3,7 @@ requests==2.32.2 selenium==4.21.0 splinter==0.21.0 pytest-splinter==3.3.2 -pytest_bdd==7.2.0 +pytest_bdd==7.3.0 pytest==8.2.2 deepdiff==6.6.1 pyperclip==1.9.0 diff --git a/tests/step_defs/api/test_api_deposit.py b/tests/step_defs/api/test_api_deposit.py index e4665cb6e..621dcc25c 100644 --- a/tests/step_defs/api/test_api_deposit.py +++ b/tests/step_defs/api/test_api_deposit.py @@ -143,13 +143,12 @@ def data_access_restriction_restricted(user, deposit_name): ) -# Workaround for https://github.com/pytest-dev/pytest-bdd/issues/689 -@given(parsers.parse("as viewer the Yoda browse collections API is queried with {collection}"), target_fixture="api_response") -def api_browse_folder(collection): +@given(parsers.parse("the Yoda browse collections API is queried with {collection}"), target_fixture="api_response") +def api_browse_collections(user, collection): return api_request( - "viewer", - "browse_folder", - {"coll": collection} + user, + "browse_collections", + {"coll": collection, "sort_order": "desc"} )