Skip to content

Commit

Permalink
Added tests to lists folder shared with group when sync is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Feb 6, 2024
1 parent 941b369 commit 5f24533
Showing 1 changed file with 244 additions and 0 deletions.
244 changes: 244 additions & 0 deletions tests/acceptance/features/apiSharingNg/sharedWithMe.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1373,3 +1373,247 @@ Feature: an user gets the resources shared to them
}
}
"""


Scenario: group member lists the folder shared with them when auto-sync is disabled
And user "Carol" has been created with default attributes and without skeleton files
And group "grp1" has been created
And the following users have been added to the following groups
| username | groupname |
| Brian | grp1 |
| Carol | grp1 |
Given user "Alice" has created folder "folderToShare"
And user "Brian" has disabled the auto-sync share
And user "Alice" has sent the following share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| 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": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"eTag",
"folder",
"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"]
},
"id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
}
}
}
}
},
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"id": {
"type": "string",
"pattern": "^%share_id_pattern%$"
},
"name": {
"type": "string",
"enum": ["folderToShare"]
},
"parentReference": {
"type": "object",
"required": ["driveId", "driveType", "id"],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"type": "string",
"enum": ["virtual"]
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
}
}
},
"remoteItem": {
"type": "object",
"required": [
"createdBy",
"eTag",
"folder",
"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"]
},
"id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
}
}
}
}
},
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"type": "string",
"enum": ["folderToShare"]
},
"parentReference": {
"type": "object",
"required": ["driveId", "driveType"],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"driveType": {
"type": "string",
"enum": ["personal"]
}
}
},
"permissions": {
"type": "array",
"items": [
{
"type": "object",
"required": [
"grantedToV2",
"id",
"invitation",
"roles"
],
"properties": {
"grantedToV2": {
"type": "object",
"required": ["group"],
"properties": {
"user": {
"type": "object",
"required": ["displayName", "id"],
"properties": {
"displayName": {
"type": "string",
"enum": ["grp1"]
},
"id": {
"type": "string",
"pattern": "^%group_id_pattern%$"
}
}
}
}
}
},
"id": {
"type": "string",
"pattern": "^%permissions_id_pattern%$"
},
"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"]
},
"id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
}
}
}
}
}
}
},
"roles": {
"type": "array",
"items": [
{
"type": "string",
"pattern": "^%role_id_pattern%$"
}
]
}
}
]
}
}
}
}
}
}
}
}
"""

0 comments on commit 5f24533

Please sign in to comment.