Skip to content

Commit

Permalink
add test for default depth filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Salipa-Gurung committed Sep 16, 2024
1 parent 80dcb2a commit 2db1c94
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions tests/acceptance/features/apiActivities/activities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2db1c94

Please sign in to comment.