Skip to content

Commit

Permalink
auto-sync-disabled: Added tests to lists shares, when same file share…
Browse files Browse the repository at this point in the history
…d by two user
  • Loading branch information
grgprarup committed Feb 14, 2024
1 parent 9e4b6ab commit 6c1fce5
Showing 1 changed file with 295 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1316,3 +1316,298 @@ Feature: listing sharedWithMe when auto-sync is disabled
}
}
"""


Scenario: user lists the file with same name shared by two users with him/her when auto sync is disabled
Given user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
And user "Carol" has uploaded file with content "to share" to "textfile.txt"
And user "Brian" has disabled the auto-sync share
And user "Alice" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Carol" has sent the following share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" 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",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"@UI.Hidden": {
"type": "boolean",
"enum": [false]
},
"@client.synchronize": {
"type": "boolean",
"enum": [false]
},
"createdBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Carol King"]
}
}
}
}
},
"name": {
"type": "string",
"enum": ["textfile.txt"]
},
"remoteItem": {
"type": "object",
"required": [
"createdBy",
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"createdBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName","id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Carol King"]
}
}
}
}
},
"name": {
"type": "string",
"enum": ["textfile.txt"]
},
"permissions": {
"type": "array",
"items": [
{
"type": "object",
"required": ["grantedToV2", "id", "invitation", "roles"],
"properties": {
"grantedToV2": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Brian Murphy"]
}
}
}
}
}
},
"invitation": {
"type": "object",
"required": ["invitedBy"],
"properties": {
"invitedBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Carol King"]
}
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"@UI.Hidden": {
"type": "boolean",
"enum": [false]
},
"@client.synchronize": {
"type": "boolean",
"enum": [false]
},
"createdBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Alice Hansen"]
}
}
}
}
},
"name": {
"type": "string",
"enum": ["textfile.txt"]
},
"remoteItem": {
"type": "object",
"required": [
"createdBy",
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"createdBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Alice Hansen"]
}
}
}
}
},
"name": {
"type": "string",
"enum": ["textfile.txt"]
},
"permissions": {
"type": "array",
"items": [
{
"type": "object",
"required": ["grantedToV2", "id", "invitation", "roles"],
"properties": {
"grantedToV2": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Brian Murphy"]
}
}
}
}
}
},
"invitation": {
"type": "object",
"required": ["invitedBy"],
"properties": {
"invitedBy": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["Alice Hansen"]
}
}
}
}
}
}
}
}
]
}
}
}
}
}
]
}
}
}
}
"""

0 comments on commit 6c1fce5

Please sign in to comment.