Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] [full-ci] Test to check activities of a folder #9796

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
352 changes: 352 additions & 0 deletions tests/acceptance/features/apiGraph/activities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,355 @@ Feature: check activities
}
}
"""

@issue-9712
Scenario: check activities of a folder
Given user "Alice" has created folder "/New Folder"
And user "Alice" has created folder "/New Folder/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/textfile0.txt"
And user "Alice" has moved file "/New Folder/textfile0.txt" to "/New Folder/Sub Folder/textfile0.txt"
And user "Alice" has moved folder "/New Folder/Folder" to "/New Folder/Sub Folder/Folder"
And user "Alice" has moved file "/New Folder/Sub Folder/textfile0.txt" to "/New Folder/Sub Folder/renamed.txt"
And user "Alice" has moved folder "/New Folder/Sub Folder/Folder" to "/New Folder/Sub Folder/Renamed Folder"
And user "Alice" has deleted file "/New Folder/Sub Folder/renamed.txt"
And user "Alice" has deleted folder "/New Folder/Sub Folder/Renamed Folder"
When user "Alice" lists the activities for folder "/New Folder" of space "Personal" 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": 10,
"maxItems": 10,
"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"
}
}
}
}
}
}
}
}
},
{
"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": "Folder"
}
}
}
}
}
}
}
}
},
{
"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"
}
}
}
}
}
}
}
}
},
{
"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": "textfile0.txt"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} moved {resource} to {space}"
},
"variables": {
"type": "object",
"required": ["resource", "space", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "textfile0.txt"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} moved {resource} to {space}"
},
"variables": {
"type": "object",
"required": ["resource", "space", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "Folder"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} renamed {oldResource} to {resource}"
},
"variables": {
"type": "object",
"required": ["oldResource", "resource", "user"],
"properties": {
"oldResource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "textfile0.txt"
}
}
},
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "renamed.txt"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} renamed {oldResource} to {resource}"
},
"variables": {
"type": "object",
"required": ["oldResource", "resource", "user"],
"properties": {
"oldResource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "Folder"
}
}
},
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "Renamed Folder"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} deleted {resource} from {space}"
},
"variables": {
"type": "object",
"required": ["resource", "space", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "renamed.txt"
}
}
}
}
}
}
}
}
},
{
"type": "object",
"required": ["id", "template", "times"],
"properties": {
"template": {
"type": "object",
"required": ["message", "variables"],
"properties": {
"message": {
"const": "{user} deleted {resource} from {space}"
},
"variables": {
"type": "object",
"required": ["resource", "space", "user"],
"properties": {
"resource": {
"type": "object",
"required": ["id", "name"],
"properties": {
"name": {
"const": "Renamed Folder"
}
}
}
}
}
}
}
}
}
]
}
}
}
}
"""