add tests to list peoject spaces resources shared by two users with him/her (#8516)
This commit is contained in:
@@ -3157,3 +3157,624 @@ Feature: listing sharedWithMe when auto-sync is disabled
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: sharee lists the files with same name shared from different project-spaces
|
||||||
|
Given user "Carol" has been created with default attributes and without skeleton files
|
||||||
|
And using spaces DAV path
|
||||||
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||||
|
And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API
|
||||||
|
And user "Alice" has created a space "projectSpace1" with the default quota using the Graph API
|
||||||
|
And user "Carol" has created a space "projectSpace2" with the default quota using the Graph API
|
||||||
|
And user "Alice" has uploaded a file inside space "projectSpace1" with content "to share" to "textfile.txt"
|
||||||
|
And user "Alice" has sent the following share invitation:
|
||||||
|
| resource | textfile.txt |
|
||||||
|
| space | projectSpace1 |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
And user "Carol" has uploaded a file inside space "projectSpace2" with content "to share" to "textfile.txt"
|
||||||
|
And user "Carol" has sent the following share invitation:
|
||||||
|
| resource | textfile.txt |
|
||||||
|
| space | projectSpace2 |
|
||||||
|
| 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",
|
||||||
|
"minItems": 2,
|
||||||
|
"maxItems": 2,
|
||||||
|
"uniqueItems": true,
|
||||||
|
"items": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"@UI.Hidden",
|
||||||
|
"@client.synchronize",
|
||||||
|
"eTag",
|
||||||
|
"file",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"remoteItem",
|
||||||
|
"size"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"@UI.Hidden": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"@client.synchronize": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"const": "textfile.txt"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%space_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "virtual"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"remoteItem": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"eTag",
|
||||||
|
"file",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"const": "textfile.txt"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"permissions": {
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"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": {
|
||||||
|
"const": "Brian Murphy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"invitation": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["invitedBy"],
|
||||||
|
"properties": {
|
||||||
|
"invitedBy": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["user"],
|
||||||
|
"properties": {
|
||||||
|
"user": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"displayName",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"displayName": {
|
||||||
|
"const": "Carol King"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"@UI.Hidden",
|
||||||
|
"@client.synchronize",
|
||||||
|
"eTag",
|
||||||
|
"file",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"remoteItem"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"@UI.Hidden": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"@client.synchronize": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"const": "textfile.txt"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%space_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "virtual"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"remoteItem": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"eTag",
|
||||||
|
"file",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"const": "textfile.txt"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"permissions": {
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"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": {
|
||||||
|
"const": "Brian Murphy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"invitation": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["invitedBy"],
|
||||||
|
"properties": {
|
||||||
|
"invitedBy": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["user"],
|
||||||
|
"properties": {
|
||||||
|
"user": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"displayName",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"displayName": {
|
||||||
|
"const": "Alice Hansen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: sharee lists the folders with same name shared from different project-spaces
|
||||||
|
Given user "Carol" has been created with default attributes and without skeleton files
|
||||||
|
And using spaces DAV path
|
||||||
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||||
|
And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API
|
||||||
|
And user "Alice" has created a space "projectSpace1" with the default quota using the Graph API
|
||||||
|
And user "Carol" has created a space "projectSpace2" with the default quota using the Graph API
|
||||||
|
And user "Alice" has created a folder "folderToShare" in space "projectSpace1"
|
||||||
|
And user "Alice" has sent the following share invitation:
|
||||||
|
| resource | folderToShare |
|
||||||
|
| space | projectSpace1 |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
And user "Carol" has created a folder "folderToShare" in space "projectSpace2"
|
||||||
|
And user "Carol" has sent the following share invitation:
|
||||||
|
| resource | folderToShare |
|
||||||
|
| space | projectSpace2 |
|
||||||
|
| 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",
|
||||||
|
"maxItems": 2,
|
||||||
|
"minItems": 2,
|
||||||
|
"uniqueItems": true,
|
||||||
|
"items": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"@UI.Hidden",
|
||||||
|
"@client.synchronize",
|
||||||
|
"eTag",
|
||||||
|
"folder",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"remoteItem"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"@UI.Hidden": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"@client.synchronize": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"const": "folderToShare"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%space_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "virtual"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"remoteItem": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"eTag",
|
||||||
|
"folder",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"const": "folderToShare"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"permissions": {
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"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": {
|
||||||
|
"const": "Brian Murphy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"invitation": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["invitedBy"],
|
||||||
|
"properties": {
|
||||||
|
"invitedBy": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["user"],
|
||||||
|
"properties": {
|
||||||
|
"user": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"displayName",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"displayName": {
|
||||||
|
"const": "Alice Hansen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"@UI.Hidden",
|
||||||
|
"@client.synchronize",
|
||||||
|
"eTag",
|
||||||
|
"folder",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"remoteItem"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"@UI.Hidden": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"@client.synchronize": {
|
||||||
|
"const": false
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"const": "folderToShare"
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"driveId",
|
||||||
|
"driveType",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"driveId": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%space_id_pattern%$"
|
||||||
|
},
|
||||||
|
"driveType": {
|
||||||
|
"const": "virtual"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^%file_id_pattern%$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"remoteItem": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"eTag",
|
||||||
|
"folder",
|
||||||
|
"id",
|
||||||
|
"lastModifiedDateTime",
|
||||||
|
"name",
|
||||||
|
"parentReference",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"const": "folderToShare"
|
||||||
|
},
|
||||||
|
"permissions": {
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"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": {
|
||||||
|
"const": "Brian Murphy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"invitation": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["invitedBy"],
|
||||||
|
"properties": {
|
||||||
|
"invitedBy": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["user"],
|
||||||
|
"properties": {
|
||||||
|
"user": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"displayName",
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"displayName": {
|
||||||
|
"const": "Carol King"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user