Skip to content

Commit fa68509

Browse files
add test to check versions after chaing share role to and from editorWithVersions role
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent c2736df commit fa68509

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

tests/acceptance/features/apiOptionalShareRole/editorWithVersions.feature

+96
Original file line numberDiff line numberDiff line change
@@ -1194,3 +1194,99 @@ Feature: an user shares resources
11941194
}
11951195
}
11961196
"""
1197+
1198+
1199+
Scenario Outline: sharee checks versions after updating the permission role of a shared file from other roles to FileEditorWithVersions
1200+
Given using spaces DAV path
1201+
And the administrator has enabled the permissions role 'File Editor With Versions'
1202+
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
1203+
And we save it into "FILEID"
1204+
And user "Alice" has sent the following resource share invitation:
1205+
| resource | textfile.txt |
1206+
| space | Personal |
1207+
| sharee | Brian |
1208+
| shareType | user |
1209+
| permissionsRole | <permissions-role> |
1210+
And user "Alice" has updated the last resource share with the following properties:
1211+
| permissionsRole | File Editor With Versions |
1212+
| space | Personal |
1213+
| resource | textfile.txt |
1214+
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
1215+
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
1216+
Then the HTTP status code should be "207"
1217+
And the number of versions should be "1"
1218+
Examples:
1219+
| permissions-role |
1220+
| File Editor |
1221+
| Viewer |
1222+
1223+
1224+
Scenario Outline: sharee tries to check versions after updating the permission role of a shared file from FileEditorWithVersions to other roles
1225+
Given using spaces DAV path
1226+
And the administrator has enabled the permissions role 'File Editor With Versions'
1227+
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
1228+
And user "Alice" has sent the following resource share invitation:
1229+
| resource | textfile.txt |
1230+
| space | Personal |
1231+
| sharee | Brian |
1232+
| shareType | user |
1233+
| permissionsRole | File Editor With Versions |
1234+
And user "Brian" has uploaded file with content "updated content" to "Shares/textfile.txt"
1235+
And user "Alice" has updated the last resource share with the following properties:
1236+
| permissionsRole | <permissions-role> |
1237+
| space | Personal |
1238+
| resource | textfile.txt |
1239+
When user "Brian" tries to get versions of file "textfile.txt" from "Alice"
1240+
Then the HTTP status code should be "403"
1241+
Examples:
1242+
| permissions-role |
1243+
| File Editor |
1244+
| Viewer |
1245+
1246+
1247+
Scenario Outline: sharee checks versions after updating the permission role of the shared folder from other roles to EditorWithVersions
1248+
Given the administrator has enabled the permissions role 'Editor With Versions'
1249+
And user "Alice" has created folder "folderToShare"
1250+
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
1251+
And we save it into "FILEID"
1252+
And user "Alice" has sent the following resource share invitation:
1253+
| resource | folderToShare |
1254+
| space | Personal |
1255+
| sharee | Brian |
1256+
| shareType | user |
1257+
| permissionsRole | <permissions-role> |
1258+
And user "Alice" has updated the last resource share with the following properties:
1259+
| permissionsRole | Editor With Versions |
1260+
| space | Personal |
1261+
| resource | folderToShare |
1262+
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
1263+
When user "Brian" gets the number of versions of file "textfile.txt" using file-id "<<FILEID>>"
1264+
Then the HTTP status code should be "207"
1265+
And the number of versions should be "1"
1266+
Examples:
1267+
| permissions-role |
1268+
| Editor |
1269+
| Viewer |
1270+
1271+
1272+
Scenario Outline: sharee tries to check versions after updating the permission role of the shared folder from EditorWithVersions to other roles
1273+
Given the administrator has enabled the permissions role 'Editor With Versions'
1274+
And user "Alice" has created folder "folderToShare"
1275+
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
1276+
And user "Alice" has sent the following resource share invitation:
1277+
| resource | folderToShare |
1278+
| space | Personal |
1279+
| sharee | Brian |
1280+
| shareType | user |
1281+
| permissionsRole | Editor With Versions |
1282+
And user "Brian" has uploaded file with content "updated content" to "Shares/folderToShare/textfile.txt"
1283+
And user "Alice" has updated the last resource share with the following properties:
1284+
| permissionsRole | <permissions-role> |
1285+
| space | Personal |
1286+
| resource | folderToShare |
1287+
When user "Brian" tries to get versions of file "folderToShare/textfile.txt" from "Alice"
1288+
Then the HTTP status code should be "403"
1289+
Examples:
1290+
| permissions-role |
1291+
| Editor |
1292+
| Viewer |

0 commit comments

Comments
 (0)