[tests-only][full-ci] check same name resources shared by different users (#8630)

* list resources and check resource name with same name shared from different users

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>

* PR address

---------

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
This commit is contained in:
Sagar Gurung
2024-03-21 12:05:20 +05:45
committed by GitHub
parent 88ab4369fd
commit ec8a4a044b

View File

@@ -4691,4 +4691,94 @@ Feature: an user gets the resources shared to them
}
}
}
"""
"""
@issue-8471
Scenario: user list resources with same name shared from different users
Given using spaces DAV path
And user "Carol" has been created with default attributes and without skeleton files
And user "Brian" has created folder "folder"
And user "Brian" has uploaded file with content "hello world" to "/textfile.txt"
And user "Carol" has created folder "folder"
And user "Carol" has uploaded file with content "hello world" to "/textfile.txt"
And user "Brian" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has sent the following share invitation:
| resource | folder |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Carol" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Carol" has sent the following share invitation:
| resource | folder |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" lists the shares shared with him 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",
"maxItems": 4,
"minItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "folder"
}
}
},
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "folder (1)"
}
}
},
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "textfile.txt"
}
}
},
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"const": "textfile (1).txt"
}
}
}
]
}
}
}
}
"""