diff --git a/tests/api/favorites.hurl b/tests/api/favorites.hurl index 83976e4f..f766d997 100644 --- a/tests/api/favorites.hurl +++ b/tests/api/favorites.hurl @@ -30,13 +30,13 @@ jsonpath "$.access_token" isString # ───────────────────────────────────────────────────────────── # Step 2 – No favorites yet # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/favorites +GET {{base_url}}/api/favorites/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" isCollection -jsonpath "$" count == 0 +jsonpath "$.items" isCollection +jsonpath "$.items" count == 0 # ───────────────────────────────────────────────────────────── @@ -85,15 +85,15 @@ HTTP 201 # ───────────────────────────────────────────────────────────── # Step 5 – Favorites contains only hello-renamed.txt # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/favorites +GET {{base_url}}/api/favorites/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" count == 1 -jsonpath "$[0].item_id" == {{file_id}} -jsonpath "$[0].item_type" == "file" -jsonpath "$[0].item_name" == "hello-renamed.txt" +jsonpath "$.items" count == 1 +jsonpath "$.items[0].resource.id" == {{file_id}} +jsonpath "$.items[0].resource_type" == "file" +jsonpath "$.items[0].resource.name" == "hello-renamed.txt" # ───────────────────────────────────────────────────────────── @@ -108,14 +108,14 @@ HTTP 201 # ───────────────────────────────────────────────────────────── # Step 7 – Favorites contains both items (order-independent) # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/favorites +GET {{base_url}}/api/favorites/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" count == 2 -jsonpath "$[*].item_id" contains {{file_id}} -jsonpath "$[*].item_id" contains {{test1_id}} +jsonpath "$.items" count == 2 +jsonpath "$.items[*].resource.id" contains {{file_id}} +jsonpath "$.items[*].resource.id" contains {{test1_id}} # ───────────────────────────────────────────────────────────── @@ -130,15 +130,15 @@ HTTP 200 # ───────────────────────────────────────────────────────────── # Step 9 – Favorites contains only test1 folder # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/favorites +GET {{base_url}}/api/favorites/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" count == 1 -jsonpath "$[0].item_id" == {{test1_id}} -jsonpath "$[0].item_type" == "folder" -jsonpath "$[0].item_name" == "test1" +jsonpath "$.items" count == 1 +jsonpath "$.items[0].resource.id" == {{test1_id}} +jsonpath "$.items[0].resource_type" == "folder" +jsonpath "$.items[0].resource.name" == "test1" # ───────────────────────────────────────────────────────────── @@ -153,9 +153,9 @@ HTTP 200 # ───────────────────────────────────────────────────────────── # Step 11 – Favorites is empty again # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/favorites +GET {{base_url}}/api/favorites/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" count == 0 +jsonpath "$.items" count == 0 diff --git a/tests/api/grants.hurl b/tests/api/grants.hurl index a10ba6f1..264ae704 100644 --- a/tests/api/grants.hurl +++ b/tests/api/grants.hurl @@ -391,7 +391,7 @@ Authorization: Bearer {{adam_token}} HTTP 404 -GET {{base_url}}/api/folders/{{perm_folder_id}}/contents/paginated +GET {{base_url}}/api/folders/{{perm_folder_id}}/resources Authorization: Bearer {{adam_token}} HTTP 404 @@ -514,7 +514,7 @@ HTTP 200 jsonpath "$" count == 1 jsonpath "$[0].id" == "{{perm_child_id}}" -GET {{base_url}}/api/folders/{{perm_folder_id}}/contents/paginated +GET {{base_url}}/api/folders/{{perm_folder_id}}/resources Authorization: Bearer {{adam_token}} HTTP 200 diff --git a/tests/api/recent.hurl b/tests/api/recent.hurl index 2fd5c08b..c745adb4 100644 --- a/tests/api/recent.hurl +++ b/tests/api/recent.hurl @@ -71,14 +71,14 @@ HTTP 200 # ───────────────────────────────────────────────────────────── # Step 4 – Recent list contains hello-renamed.txt # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/recent +GET {{base_url}}/api/recent/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" count == 1 -jsonpath "$[0].item_type" == "file" -jsonpath "$[0].item_name" == "hello-renamed.txt" +jsonpath "$.items" count == 1 +jsonpath "$.items[0].resource_type" == "file" +jsonpath "$.items[0].resource.name" == "hello-renamed.txt" # ───────────────────────────────────────────────────────────── @@ -93,10 +93,10 @@ HTTP 200 # ───────────────────────────────────────────────────────────── # Step 6 – Recent list is empty after clear # ───────────────────────────────────────────────────────────── -GET {{base_url}}/api/recent +GET {{base_url}}/api/recent/resources Authorization: Bearer {{token}} HTTP 200 [Asserts] -jsonpath "$" isCollection -jsonpath "$" count == 0 +jsonpath "$.items" isCollection +jsonpath "$.items" count == 0