Skip to content

Commit

Permalink
test: test-coverage-for-api-activities(bug #9536)
Browse files Browse the repository at this point in the history
  • Loading branch information
anon-pradip committed Nov 21, 2024
1 parent bbb3f2b commit 1739ca8
Showing 1 changed file with 243 additions and 0 deletions.
243 changes: 243 additions & 0 deletions tests/acceptance/features/apiActivities/activities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3930,3 +3930,246 @@ Feature: check activities
}
}
"""

@issue-9536
Scenario: check activities after moving a file inside subfolder inside project space
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "/folder" in space "new-space"
And user "Alice" has created a folder "/folder/subfolder" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "/folder/test.md"
And user "Alice" has moved file "/folder/test.md" to "/folder/subfolder/test.md" in space "new-space"
When user "Alice" lists the activities of folder "/folder" from space "new-space" 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": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} added {resource} to {folder}"
},
"variables": {
"type": "object",
"required": ["resource", "folder", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "folder"
}
}
},
"folder": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "new-space"
}
}
},
"user": {
"type": "object",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"pattern": "%user_id_pattern%"
},
"displayName": {
"const": "Alice Hansen"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} added {resource} to {folder}"
},
"variables": {
"type": "object",
"required": ["resource", "folder", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "subfolder"
}
}
},
"folder": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "folder"
}
}
},
"user": {
"type": "object",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"pattern": "%user_id_pattern%"
},
"displayName": {
"const": "Alice Hansen"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} added {resource} to {folder}"
},
"variables": {
"type": "object",
"required": ["resource", "folder", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "test.md"
}
}
},
"folder": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "folder"
}
}
},
"user": {
"type": "object",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"pattern": "%user_id_pattern%"
},
"displayName": {
"const": "Alice Hansen"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} moved {resource} to {folder}"
},
"variables": {
"type": "object",
"required": ["resource", "folder", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "test.md"
}
}
},
"folder": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "subfolder"
}
}
},
"user": {
"type": "object",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"pattern": "%user_id_pattern%"
},
"displayName": {
"const": "Alice Hansen"
}
}
}
}
}
}
},
"times": {
"type": "object",
"required": ["recordedTime"]
}
}
}
]
}
}
}
}
"""

0 comments on commit 1739ca8

Please sign in to comment.