From 2db1c943ceccb0aee0b505e72fa145a537f85db7 Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Mon, 16 Sep 2024 15:53:23 +0545 Subject: [PATCH] add test for default depth filter --- .../features/apiActivities/activities.feature | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/tests/acceptance/features/apiActivities/activities.feature b/tests/acceptance/features/apiActivities/activities.feature index 63f452878ef..5a3432fbdde 100644 --- a/tests/acceptance/features/apiActivities/activities.feature +++ b/tests/acceptance/features/apiActivities/activities.feature @@ -1327,6 +1327,135 @@ Feature: check activities } """ + @issue-9850 + Scenario: check activity with default depth filter + Given user "Alice" has created folder "/New Folder" + And user "Alice" has created folder "/New Folder/Sub Folder" + And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/New Folder/Sub Folder/textfile.txt" + When user "Alice" lists the activities for folder "New Folder" of space "Personal" with depth "-1" using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": ["id", "template", "times"], + "properties": { + "template": { + "type": "object", + "required": ["message", "variables"], + "properties": { + "message": { + "const": "{user} added {resource} to {space}" + }, + "variables": { + "type": "object", + "required": ["resource", "space", "user"], + "properties": { + "resource": { + "type": "object", + "required": ["id", "name"], + "properties": { + "name": { + "const": "New Folder" + } + } + } + } + } + } + }, + "times": { + "type": "object", + "required": ["recordedTime"] + } + } + }, + { + "type": "object", + "required": ["id", "template", "times"], + "properties": { + "template": { + "type": "object", + "required": ["message", "variables"], + "properties": { + "message": { + "const": "{user} added {resource} to {space}" + }, + "variables": { + "type": "object", + "required": ["resource", "space", "user"], + "properties": { + "resource": { + "type": "object", + "required": ["id", "name"], + "properties": { + "name": { + "const": "Sub Folder" + } + } + } + } + } + } + }, + "times": { + "type": "object", + "required": ["recordedTime"] + } + } + }, + { + "type": "object", + "required": ["id", "template", "times"], + "properties": { + "template": { + "type": "object", + "required": ["message", "variables"], + "properties": { + "message": { + "const": "{user} added {resource} to {space}" + }, + "variables": { + "type": "object", + "required": ["resource", "space", "user"], + "properties": { + "resource": { + "type": "object", + "required": ["id", "name"], + "properties": { + "name": { + "const": "textfile.txt" + } + } + } + } + } + } + }, + "times": { + "type": "object", + "required": ["recordedTime"] + } + } + } + ] + } + } + } + } + """ + @issue-9850 Scenario: check activity with depth filter Given user "Alice" has created folder "/New Folder"