Skip to content

Commit

Permalink
added test to list drives after share has been disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
PrajwolAmatya committed Dec 30, 2024
1 parent 0345f21 commit 829f4e6
Showing 1 changed file with 138 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ Feature: enable disable permissions role
}
}
"""
And user "Brian" should have a share "<resource>" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "<resource>" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:name | <resource> |
| oc:permissions | SX |
Examples:
| resource | resource-type |
| textfile.txt | file |
Expand Down Expand Up @@ -202,6 +209,9 @@ Feature: enable disable permissions role
}
}
"""
And user "Brian" should not have a share "folderToShare" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" with depth "0" using the WebDAV API
Then the HTTP status code should be "404"


Scenario Outline: users list the shares shared with Secure Viewer after the role is disabled (Project Space)
Expand Down Expand Up @@ -329,6 +339,13 @@ Feature: enable disable permissions role
}
}
"""
And user "Brian" should have a share "<resource>" shared by user "Alice" from space "new-space"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "<resource>" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:name | <resource> |
| oc:permissions | SX |
Examples:
| resource | resource-type |
| textfile.txt | file |
Expand Down Expand Up @@ -399,3 +416,124 @@ Feature: enable disable permissions role
}
}
"""
And user "Brian" should not have a share "folderToShare" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" with depth "0" using the WebDAV API
Then the HTTP status code should be "404"


Scenario: sharee lists drives after the share role Space Editor Without Versions has been disabled
Given using spaces DAV path
Given the administrator has enabled the permissions role "Space Editor Without Versions"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Editor Without Versions |
And the administrator has disabled the permissions role "Space Editor Without Versions"
When user "Brian" lists all available spaces via the Graph API
Then the HTTP status code should be "200"
And the JSON response should contain space called "new-space" and match
"""
{
"type": "object",
"required": [
"driveType",
"driveAlias",
"name",
"id",
"quota",
"root",
"webUrl"
],
"properties": {
"root": {
"type": "object",
"required": [
"eTag",
"id",
"permissions",
"webDavUrl"
],
"properties": {
"permissions": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"oneOf": [
{
"type": "object",
"required": ["grantedToV2", "roles"],
"properties": {
"grantedToV2": {
"type": "object",
"required": ["user"],
"properties": {
"user" : {
"type": "object",
"required": ["@libre.graph.userType", "displayName", "id"],
"properties": {
"@libre.graph.userType": { "const": "Member" },
"displayName": { "const": "Alice Hansen" },
"id": { "pattern": "^%user_id_pattern%$" }
}
}
}
},
"roles": { "pattern": "^%role_id_pattern%$" }
}
},
{
"type": "object",
"required": ["@libre.graph.permissions.actions", "grantedToV2"],
"properties": {
"@libre.graph.permissions.actions": {
"const": [
"libre.graph/driveItem/children/create",
"libre.graph/driveItem/standard/delete",
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/quota/read",
"libre.graph/driveItem/content/read",
"libre.graph/driveItem/upload/create",
"libre.graph/driveItem/permissions/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/deleted/read",
"libre.graph/driveItem/path/update",
"libre.graph/driveItem/deleted/update",
"libre.graph/driveItem/basic/read"
]
},
"grantedToV2": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"type": "object",
"required": ["@libre.graph.userType", "displayName", "id"],
"properties": {
"@libre.graph.userType": { "const": "Member" },
"displayName": { "const": "Brian Murphy" },
"id": { "pattern": "^%user_id_pattern%$" }
}
}
}
}
}
}
]
}
}
}
}
}
}
"""
When user "Brian" sends PROPFIND request to space "new-space" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:name | new-space |
| oc:permissions | DNVCK |

0 comments on commit 829f4e6

Please sign in to comment.