Skip to content

Commit

Permalink
added test to list shares shredWithMe after the share role has been d…
Browse files Browse the repository at this point in the history
…isabled
  • Loading branch information
PrajwolAmatya committed Dec 12, 2024
1 parent e0da92a commit 09dc702
Showing 1 changed file with 192 additions and 6 deletions.
198 changes: 192 additions & 6 deletions tests/acceptance/features/apiSharingNg1/sharedByMe.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3917,10 +3917,86 @@ Feature: resources shared by user
}
}
"""
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": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"remoteItem": {
"type": "object",
"required": [
"createdBy",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"name": {
"const": "<resource>"
},
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"type": "array",
"enum": [[
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]]
},
"roles": { "const": null }
}
}
}
}
}
}
}
}
}
}
"""
Examples:
| resource |
| textfile.txt |
| folderToShare |
| resource | resource-type |
| textfile.txt | file |
| folderToShare | folder |

@env-config
Scenario: sharer lists folder share with role Denied after share role is disabled (Personal Space)
Expand Down Expand Up @@ -3969,6 +4045,24 @@ Feature: resources shared by user
}
}
"""
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": 0,
"maxItems": 0
}
}
}
"""

@env-config
Scenario Outline: sharer lists share with role Secure Viewer after share role is disabled (Project Space)
Expand Down Expand Up @@ -4026,10 +4120,84 @@ Feature: resources shared by user
}
}
"""
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": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"remoteItem": {
"type": "object",
"required": [
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"name": {
"const": "<resource>"
},
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"type": "array",
"enum": [[
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]]
},
"roles": { "const": null }
}
}
}
}
}
}
}
}
}
}
"""
Examples:
| resource |
| textfile.txt |
| folderToShare |
| resource | resource-type |
| textfile.txt | file |
| folderToShare | folder |

@env-config
Scenario: sharer lists folder share with role Denied after share role is disabled (Project Space)
Expand Down Expand Up @@ -4081,3 +4249,21 @@ Feature: resources shared by user
}
}
"""
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": 0,
"maxItems": 0
}
}
}
"""

0 comments on commit 09dc702

Please sign in to comment.