Skip to content

Commit

Permalink
add tests to remove access of shared resource to federated user
Browse files Browse the repository at this point in the history
Signed-off-by: prashant-gurung899 <[email protected]>
  • Loading branch information
prashant-gurung899 committed Nov 28, 2024
1 parent 2e40f99 commit 7ba257a
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions tests/acceptance/features/apiOcm/share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -776,3 +776,75 @@ Feature: an user shares resources using ScienceMesh application
And for user "Brian" the content of file "textfile.txt" of federated share "textfile.txt" should be "this is a new content"
And using server "LOCAL"
And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "this is a new content"

@issue-10213
Scenario: local user deletes access of shared resource to federated user
Given using spaces DAV path
And using server "REMOTE"
And "Brian" has created the federation share invitation
And using server "LOCAL"
And "Alice" has accepted invitation
And user "Alice" has created a folder "FOLDER" in space "Personal"
And user "Alice" has sent the following resource share invitation to federated user:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Alice" removes the access of user "Brian" from resource "FOLDER" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
When using server "REMOTE"
And user "Brian" lists the shares shared with him without retry using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should not contain resource "FOLDER" with the following data:
"""
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "array",
"minItems": 0,
"maxItems": 0,
}
}
}
"""

@issue-10213
Scenario: federation user deletes access of shared resource to local user
Given using spaces DAV path
And using server "LOCAL"
And "Alice" has created the federation share invitation
And using server "REMOTE"
And "Brian" has accepted invitation
And user "Brian" has created a folder "FOLDER" in space "Personal"
And user "Brian" has sent the following resource share invitation to federated user:
| resource | FOLDER |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" removes the access of user "Alice" from resource "FOLDER" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
When using server "LOCAL"
And user "Alice" lists the shares shared with her without retry using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should not contain resource "FOLDER" with the following data:
"""
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "array",
"minItems": 0,
"maxItems": 0,
}
}
}
"""

0 comments on commit 7ba257a

Please sign in to comment.