[tests-only][full-ci]Added tests to lists shared by me after sharee is deleted (#8450)

* Added tests to lists shared by me after sharee is deleted

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

* Refactor tests

* Review address

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

* Review address

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

---------

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
This commit is contained in:
Sagar Gurung
2024-02-16 15:16:29 +05:45
committed by GitHub
parent 21ea45cabf
commit c3d895445e
2 changed files with 100 additions and 9 deletions
@@ -1451,3 +1451,66 @@ Feature: resources shared by user
}
}
"""
@env-config
Scenario: user lists shared resources for deleted sharee
Given the config "GRAPH_SPACES_USERS_CACHE_TTL" has been set to "1"
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And user "Alice" has uploaded file with content "hello world" to "textfile.txt"
And user "Alice" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And the administrator has deleted user "Brian" using the provisioning API
When user "Alice" lists the shares shared by her after clearing user cache 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":0,
"maxItems":0
}
}
}
"""
@env-config
Scenario: user lists shared resources for deleted group
Given the config "GRAPH_SPACES_GROUPS_CACHE_TTL" has been set to "1"
And group "grp1" has been created
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And user "Alice" has uploaded file with content "hello world" to "textfile.txt"
And user "Alice" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And group "grp1" has been deleted
When user "Alice" lists the shares shared by her after clearing group cache 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":0,
"maxItems":0
}
}
}
"""