mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 03:40:01 -06:00
Merge pull request #10617 from owncloud/test/test-coverage-for-bug#9536
[tests-only][full-ci] Add test coverage for correct parent folder reference in activity messages
This commit is contained in:
@@ -3930,3 +3930,242 @@ Feature: check activities
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
@issue-9536
|
||||
Scenario: check activities after moving a file inside a subfolder in a 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 "parent" in space "new-space"
|
||||
And user "Alice" has created a folder "parent/subfolder" in space "new-space"
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "parent/test.md"
|
||||
And user "Alice" has moved file "parent/test.md" to "parent/subfolder/test.md" in space "new-space"
|
||||
When user "Alice" lists the activities of folder "parent" 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": "parent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "parent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "parent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user