[full-ci][tests-only]add tests coverage for removing expiration date from shares (#8490)

* add tests coverage for removing expiration date from share link

* add coverage for folder
This commit is contained in:
Amrita
2024-02-21 14:54:40 +05:45
committed by GitHub
parent d2d4fcd43b
commit c92ebf4b46
3 changed files with 151 additions and 6 deletions
@@ -83,6 +83,80 @@ Feature: Update permission of a share
"""
Scenario Outline: user removes expiration date of a share
Given user "Alice" has uploaded file with content "hello world" to "testfile.txt"
And user "Alice" has created folder "folder"
And user "Alice" has sent the following share invitation:
| resource | <path> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
| expirationDateTime | 2025-07-15T14:00:00Z |
When user "Alice" updates the last share with the following using the Graph API:
| space | Personal |
| resource | <path> |
| expirationDateTime | |
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"minItems": 3,
"maxItems": 3,
"required": [
"grantedToV2",
"id",
"roles"
],
"properties": {
"grantedToV2": {
"type": "object",
"required": [
"user"
],
"properties":{
"user": {
"type": "object",
"required": [
"displayName",
"id"
],
"properties": {
"displayName": {
"type": "string",
"enum": ["Brian Murphy"]
},
"id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
}
}
}
}
},
"id": {
"type": "string",
"pattern": "^%permissions_id_pattern%$"
},
"roles": {
"type": "array",
"items": [
{
"type": "string",
"pattern": "^%role_id_pattern%$"
}
]
}
}
}
"""
Examples:
| path |
| testfile.txt |
| folder |
Scenario Outline: user updates role of a share
Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
And user "Alice" has created folder "FolderToShare"
@@ -157,4 +231,4 @@ Feature: Update permission of a share
| Editor | FolderToShare | Viewer |
| Editor | FolderToShare | Uploader |
| Uploader | FolderToShare | Editor |
| Uploader | FolderToShare | Viewer |
| Uploader | FolderToShare | Viewer |