Merge branch 'master' into spaces-registry

This commit is contained in:
Jörn Friedrich Dreyer
2022-01-04 19:30:00 +00:00
80 changed files with 6205 additions and 501 deletions

View File

@@ -39,6 +39,7 @@ default:
- ChecksumContext:
- FavoritesContext:
- FilesVersionsContext:
- OCSContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:

View File

@@ -26,6 +26,9 @@ _ocdav: double check the webdav property parsing when custom namespaces are used
- [apiVersions/fileVersions.feature:455](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersions.feature#L455)
- [apiVersions/fileVersionsSharingToShares.feature:305](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersionsSharingToShares.feature#L305)
#### [file versions do not report the version author](https://github.com/owncloud/ocis/issues/2914)
- [apiVersions/fileVersions.feature:474](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersions.feature#L474)
### Sync
Synchronization features like etag propagation, setting mtime and locking files
@@ -857,8 +860,8 @@ special character username not valid
- [apiProvisioning-v1/editUser.feature:29](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/editUser.feature#L29)
- [apiProvisioning-v1/editUser.feature:30](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/editUser.feature#L30)
- [apiProvisioning-v1/enableUser.feature:20](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/enableUser.feature#L20)
- [apiProvisioning-v1/getUser.feature:36](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L36)
- [apiProvisioning-v1/getUser.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L37)
- [apiProvisioning-v1/getUser.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L38)
- [apiProvisioning-v1/getUser.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L39)
- [apiProvisioning-v2/addUser.feature:20](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/addUser.feature#L20)
- [apiProvisioning-v2/addUser.feature:123](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/addUser.feature#L123)
- [apiProvisioning-v2/deleteUser.feature:19](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/deleteUser.feature#L19)
@@ -866,8 +869,8 @@ special character username not valid
- [apiProvisioning-v2/editUser.feature:29](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/editUser.feature#L29)
- [apiProvisioning-v2/editUser.feature:30](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/editUser.feature#L30)
- [apiProvisioning-v2/enableUser.feature:20](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/enableUser.feature#L20)
- [apiProvisioning-v2/getUser.feature:36](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L36)
- [apiProvisioning-v2/getUser.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L37)
- [apiProvisioning-v2/getUser.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L38)
- [apiProvisioning-v2/getUser.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L39)
- [apiTrashbin/trashbinFilesFolders.feature:245](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L245)
- [apiTrashbin/trashbinFilesFolders.feature:246](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L246)
- [apiTrashbin/trashbinFilesFolders.feature:247](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L247)
@@ -915,30 +918,30 @@ special character username not valid
#### [user can get info of other users/ cloud/users endpoints not authenticated](https://github.com/owncloud/product/issues/248)
- [apiProvisioning-v2/deleteUser.feature:57](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/deleteUser.feature#L57)
- [apiProvisioning-v1/getUser.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L88)
- [apiProvisioning-v2/getUser.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L88)
- [apiProvisioning-v2/getUser.feature:92](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L92)
- [apiProvisioning-v2/getUsers.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUsers.feature#L44)
#### [incorrect ocs(v2) status value when getting info of user that does not exist should be 404, gives 998](https://github.com/owncloud/product/issues/250)
_ocs: api compatibility, return correct status code_
- [apiProvisioning-v2/getUser.feature:52](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L52)
- [apiProvisioning-v2/getUser.feature:55](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L55)
#### [Provisioning API does not provide last_login in response](https://github.com/owncloud/ocis/issues/2729)
- [apiProvisioning-v1/getUser.feature:11](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L11)
- [apiProvisioning-v1/getUser.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L40)
- [apiProvisioning-v1/getUser.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L99)
- [apiProvisioning-v1/getUser.feature:111](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L111)
- [apiProvisioning-v1/getUser.feature:123](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L123)
- [apiProvisioning-v1/getUser.feature:135](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L135)
- [apiProvisioning-v1/getUser.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L147)
- [apiProvisioning-v1/getUser.feature:159](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L159)
- [apiProvisioning-v1/getUser.feature:42](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L42)
- [apiProvisioning-v1/getUser.feature:92](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L92)
- [apiProvisioning-v1/getUser.feature:103](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L103)
- [apiProvisioning-v1/getUser.feature:116](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L116)
- [apiProvisioning-v1/getUser.feature:129](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L129)
- [apiProvisioning-v1/getUser.feature:142](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L142)
- [apiProvisioning-v1/getUser.feature:155](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L155)
- [apiProvisioning-v1/getUser.feature:168](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/getUser.feature#L168)
- [apiProvisioning-v2/getUser.feature:11](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L11)
- [apiProvisioning-v2/getUser.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L40)
- [apiProvisioning-v2/getUser.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L99)
- [apiProvisioning-v2/getUser.feature:111](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L111)
- [apiProvisioning-v2/getUser.feature:123](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L123)
- [apiProvisioning-v2/getUser.feature:135](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L135)
- [apiProvisioning-v2/getUser.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L147)
- [apiProvisioning-v2/getUser.feature:42](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L42)
- [apiProvisioning-v2/getUser.feature:103](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L103)
- [apiProvisioning-v2/getUser.feature:116](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L116)
- [apiProvisioning-v2/getUser.feature:129](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L129)
- [apiProvisioning-v2/getUser.feature:142](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L142)
- [apiProvisioning-v2/getUser.feature:155](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/getUser.feature#L155)
#### [incorrect ocs(v2) status value when getting info of share that does not exist should be 404, gives 998](https://github.com/owncloud/product/issues/250)
_ocs: api compatibility, return correct status code_
@@ -1368,8 +1371,8 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [apiWebdavProperties1/copyFile.feature:108](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L108)
- [apiWebdavProperties1/createFolder.feature:71](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/createFolder.feature#L71)
- [apiWebdavProperties1/createFolder.feature:72](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/createFolder.feature#L72)
- [apiWebdavUpload1/uploadFile.feature:127](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload1/uploadFile.feature#L127)
- [apiWebdavUpload1/uploadFile.feature:128](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload1/uploadFile.feature#L128)
- [apiWebdavUpload1/uploadFile.feature:132](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload1/uploadFile.feature#L132)
- [apiWebdavUpload1/uploadFile.feature:133](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload1/uploadFile.feature#L133)
- [apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:19](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature#L19)
- [apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature#L35)
- [apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:36](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature#L36)

View File

@@ -20,7 +20,7 @@ Only the web scenarios tagged ocisSmokeTest are run by default in OCIS CI. This
### [name of public link is empty and not "Public link" when not specified in the create request](https://github.com/owncloud/ocis/issues/1237)
- [webUISharingPublicBasic/publicLinkCreate.feature:11](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature#L11)
- [webUISharingPublicBasic/publicLinkCreate.feature:28](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature#L28)
### [Copy private link option not available](https://github.com/owncloud/ocis/issues/1409)
- [webUIPrivateLinks/accessingPrivateLinks.feature:9](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPrivateLinks/accessingPrivateLinks.feature#L9)
@@ -31,13 +31,10 @@ Only the web scenarios tagged ocisSmokeTest are run by default in OCIS CI. This
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:34](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L34)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:35](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L35)
### [name of public link is empty and not "Public link" when not specified in the create request](https://github.com/owncloud/ocis/issues/1237)
- [webUISharingPublicBasic/publicLinkCreate.feature:28](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature#L28)
### [impossible to navigate into a folder in the trashbin](https://github.com/owncloud/web/issues/1725)
- [webUITrashbinDelete/trashbinDelete.feature:29](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature#L29)
### [Sharing seems to work but does not work](https://github.com/owncloud/ocis/issues/1303)
- [webUISharingInternalUsers/shareWithUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L52)
- [webUISharingInternalUsers/shareWithUsers.feature:53](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L53)
- [webUISharingInternalUsers/shareWithUsers.feature:54](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L54)
- [webUISharingInternalUsers/shareWithUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L52)

View File

@@ -12,13 +12,9 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUIPreview/imageMediaViewer.feature:84](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L84)
- [webUIPreview/imageMediaViewer.feature:91](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L91)
### [Media Viewer preview not visible for files with .jpeg, .ogg, .webm and .gif formats](https://github.com/owncloud/ocis/issues/1490)
- [webUIPreview/imageMediaViewer.feature:141](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L141)
- [webUIPreview/imageMediaViewer.feature:159](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L159)
### [Endless loading when opening a file in section "Shared with me" or "Shared with other"](https://github.com/owncloud/web/issues/5324)
- [webUIPreview/imageMediaViewer.feature:182](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L182)
- [webUIPreview/imageMediaViewer.feature:191](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L191)
- [webUIPreview/imageMediaViewer.feature:143](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L143)
- [webUIPreview/imageMediaViewer.feature:152](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIPreview/imageMediaViewer.feature#L152)
### [Exit page re-appears in loop when logged in user is deleted](https://github.com/owncloud/web/issues/4677)
- [webUILogin/openidLogin.feature:50](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUILogin/openidLogin.feature#L50)
@@ -45,33 +41,28 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUIFilesSearch/search.feature:153](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L151)
- [webUIFilesSearch/search.feature:165](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L163)
- [webUIFilesSearch/search.feature:175](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L173)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:120](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L120)
- [webUIResharing1/reshareUsers.feature:230](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L230)
### [file_path property is not unique for a share created with same resource name i.e already present in sharee](https://github.com/owncloud/ocis/issues/2249)
- [webUIRenameFiles/renameFiles.feature:205](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L205)
- [webUIRenameFiles/renameFiles.feature:199](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L199)
### [when sharer renames the shared resource, sharee get the updated name](https://github.com/owncloud/ocis/issues/2256)
- [webUIRenameFiles/renameFiles.feature:230](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L230)
- [webUIRenameFiles/renameFiles.feature:224](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L224)
### [Viewer cannot share a shared resource](https://github.com/owncloud/ocis/issues/2260)
- [webUISharingInternalUsers/shareWithUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L52)
- [webUISharingInternalUsers/shareWithUsers.feature:53](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L53)
- [webUISharingInternalUsers/shareWithUsers.feature:54](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L54)
- [webUISharingInternalUsers/shareWithUsers.feature:137](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L137)
- [webUISharingInternalUsers/shareWithUsers.feature:180](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L180)
- [webUISharingInternalUsers/shareWithUsers.feature:195](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L195)
- [webUISharingInternalUsers/shareWithUsers.feature:229](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L229)
- [webUISharingInternalUsers/shareWithUsers.feature:275](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L275)
- [webUISharingInternalUsers/shareWithUsers.feature:276](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L276)
- [webUISharingInternalUsers/shareWithUsers.feature:277](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L277)
- [webUISharingInternalUsers/shareWithUsers.feature:346](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L346)
- [webUISharingInternalUsers/shareWithUsers.feature:328](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature#L328)
- [webUISharingInternalUsersCollaborator/shareWithUsers.feature:34](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L34)
- [webUISharingInternalUsersCollaborator/shareWithUsers.feature:35](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L35)
- [webUISharingInternalUsersCollaborator/shareWithUsers.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L36)
- [webUISharingInternalUsersCollaborator/shareWithUsers.feature:37](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L37)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:156](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L156)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:160](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L160)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:199](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L199)
- [webUISharingPermissionsUsers/sharePermissionsUsers.feature:21](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L21)
- [webUISharingPermissionsUsers/sharePermissionsUsers.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L36)
@@ -120,8 +111,8 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUIFilesActionMenu/versions.feature:48](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L48)
- [webUIFilesActionMenu/versions.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L63)
### [Change the file content of a received shared file](https://github.com/owncloud/ocis/issues/2319)
- [webUIFilesActionMenu/versions.feature:77](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L77)
### [downloading an old version of a file returns 501](https://github.com/owncloud/ocis/issues/2261)
- [webUIFilesActionMenu/versions.feature:107](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L107)
### [No occ command in ocis](https://github.com/owncloud/ocis/issues/1317)
- [webUIRestrictSharing/restrictReSharing.feature:23](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature#L23)
@@ -204,10 +195,9 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:295](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L295)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:304](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L304)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:313](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L313)
- [webUIFilesCopy/copy.feature:98](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesCopy/copy.feature#L98)
- [webUIMoveFilesFolders/moveFiles.feature:97](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature#L97)
- [webUIMoveFilesFolders/moveFolders.feature:72](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIMoveFilesFolders/moveFolders.feature#L72)
- [webUIFilesActionMenu/versions.feature:90](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L90)
- [webUIFilesActionMenu/versions.feature:94](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L94)
### [Accepting different shares with same filename from different users overwrites one file](https://github.com/owncloud/ocis/issues/713)
- [webUISharingAcceptShares/acceptShares.feature:212](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L212)
@@ -292,13 +282,11 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingInternalGroups/shareWithGroups.feature:277](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L277)
### [Different path for shares inside folder](https://github.com/owncloud/ocis/issues/1231)
### [Different share permissions provides varying roles in oc10 and ocis](https://github.com/owncloud/ocis/issues/1277)
- [webUISharingInternalGroups/shareWithGroups.feature:212](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L212)
### [Expiration date set is not implemented in user share](https://github.com/owncloud/ocis/issues/1250)
- [webUISharingInternalGroups/shareWithGroups.feature:255](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L255)
- [webUISharingInternalGroups/shareWithGroups.feature:307](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L307)
- [webUISharingInternalGroups/shareWithGroups.feature:308](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L308)
- [webUISharingInternalGroups/shareWithGroups.feature:309](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L309)
### [Sharing Indicator difference](https://github.com/owncloud/ocis/issues/1949)
- [webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature:61](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature#L61)
@@ -351,9 +339,6 @@ Other free text and markdown formatting can be used elsewhere in the document if
### [share permissions not enforced](https://github.com/owncloud/product/issues/270)
- [webUIResharing1/reshareUsers.feature:248](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L248)
### [share recipient doesn't see resharer in collaborators list](https://github.com/owncloud/web/issues/5462)
- [webUIResharing1/reshareUsers.feature:260](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L260)
#### [Searching sharee with displayname](https://github.com/owncloud/ocis/issues/547)
- [apiSharees/sharees.feature:586](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L586)
- [apiSharees/sharees.feature:587](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L587)
@@ -384,7 +369,6 @@ Other free text and markdown formatting can be used elsewhere in the document if
### [Group shares support](https://github.com/owncloud/ocis/issues/1289)
- [webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature:80](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature#L80)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:187](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L187)
### [Deletion of a recursive folder from trashbin is not possible](https://github.com/owncloud/product/issues/188)
- [webUITrashbinDelete/trashbinDelete.feature:86](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature#L86)
@@ -406,7 +390,7 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUITags/createTags.feature:79](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUITags/createTags.feature#L79)
### [When a user shares folder to a group, the sharer is shown as group in group member's sharing-sidebar](https://github.com/owncloud/web/issues/5216)
- [webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature:41](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature#L41)
- [webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature:41](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature#L41)
- [webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature:42](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsEdgeCases/shareWithGroupsEdgeCases.feature#L42)
### [impossible to navigate into a folder in the trashbin](https://github.com/owncloud/web/issues/1725)

View File

@@ -1,7 +1,7 @@
@api @skipOnOcV10
Feature: Change data of space
As a user
I want to be able to change the data of the created space(increase the quota, change name, etc.)
As a user with admin rights
I want to be able to change the data of a created space (increase the quota, change name, etc.)
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
@@ -10,7 +10,7 @@ Feature: Change data of space
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "Admin" using the settings api
Scenario: Alice changes a name of the space via the Graph api, she expects a 204 code and checks that the space name has changed
Scenario: An admin user can change the name of a Space via the Graph API
Given user "Alice" has created a space "Project Jupiter" of type "project" with quota "20"
When user "Alice" changes the name of the "Project Jupiter" space to "Project Death Star"
Then the HTTP status code should be "200"
@@ -22,7 +22,7 @@ Feature: Change data of space
| quota@@@total | 20 |
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
Scenario: Alice increases quota of the space via the Graph api, she expects a 204 code and checks that the quota has changed
Scenario: An admin user can increase the quota of a Space via the Graph API
Given user "Alice" has created a space "Project Earth" of type "project" with quota "20"
When user "Alice" changes the quota of the "Project Earth" space to "100"
Then the HTTP status code should be "200"

View File

@@ -9,7 +9,7 @@ Feature: List and create spaces
Background:
Given user "Alice" has been created with default attributes and without skeleton files
Scenario: Alice request her space via the Graph api, she expects a 200 code and the correct data in the response
Scenario: An ordinary user can request information about their Space via the Graph API
When user "Alice" lists all available spaces via the GraphApi
Then the HTTP status code should be "200"
And the json responded should contain a space "Alice Hansen" with these key and value pairs:
@@ -20,16 +20,16 @@ Feature: List and create spaces
| quota@@@state | normal |
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
Scenario: Alice requests her space via webDav api, she expects a 207 code
Scenario: An ordinary user can access their Space via the webDav API
When user "Alice" lists all available spaces via the GraphApi
And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api
Then the HTTP status code should be "207"
Scenario: Alice tries to create Space via Graph api without permission, she expects a response of 401
Scenario: An ordinary user cannot create a Space via Graph API
When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi
Then the HTTP status code should be "401"
Scenario: Alice creates Space via Graph api with default quota, she expects a 201 code the correct data and that space exists
Scenario: An admin user can create a Space via the Graph API with default quota
Given the administrator has given "Alice" the role "Admin" using the settings api
When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi
Then the HTTP status code should be "201"
@@ -44,7 +44,7 @@ Feature: List and create spaces
Then the propfind result of the space should contain these entries:
| .space/ |
Scenario: Alice creates Space via Graph api with certain quota, she expects a 201 code and the correct data in the response
Scenario: An admin user can create a Space via the Graph API with certain quota
Given the administrator has given "Alice" the role "Admin" using the settings api
When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi
Then the HTTP status code should be "201"

View File

@@ -14,11 +14,11 @@ Feature: State of the quota
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "Admin" using the settings api
Scenario Outline: check the quota display
Given user "Alice" has created a space "<spaceName>" of type "project" with quota "<total>"
And user "Alice" has uploaded a file inside space "<spaceName>" with content "<fileContent>" to "test.txt"
Scenario Outline: Quota information is returned in the list of spaces returned via the Graph API
Given user "Alice" has created a space "<spaceName>" of type "project" with quota "<total>"
And user "Alice" has uploaded a file inside space "<spaceName>" with content "<fileContent>" to "test.txt"
When user "Alice" lists all available spaces via the GraphApi
Then the json responded should contain a space "<spaceName>" with these key and value pairs:
| key | value |
@@ -37,32 +37,31 @@ Feature: State of the quota
| Quota99% | 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 | critical | 100 | 1 | 99 |
| Quota100% | 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890 | exceeded | 100 | 0 | 100 |
Scenario: uploading a file with an insufficient quota
Given user "Alice" has created a space "Project Alfa" of type "project" with quota "10"
Scenario: A file cannot be uploaded if there is insufficient quota
Given user "Alice" has created a space "Project Alfa" of type "project" with quota "10"
When user "Alice" uploads a file inside space "Project Alfa" with content "More than 10 bytes" to "test.txt" using the WebDAV API
Then the HTTP status code should be "507"
Scenario: creating a folder with an insufficient quota
Scenario: A folder can be created even if there is insufficient quota for file content
Given user "Alice" has created a space "Project Beta" of type "project" with quota "7"
And user "Alice" has uploaded a file inside space "Project Beta" with content "7 bytes" to "test.txt"
When user "Alice" creates a folder "NewFolder" in space "Project Beta" using the WebDav Api
Then the HTTP status code should be "201"
Then the HTTP status code should be "201"
And for user "Alice" the space "Project Beta" should contain these entries:
| NewFolder |
Scenario: overwriting a file with an enough quota
Given user "Alice" has created a space "Project Gamma" of type "project" with quota "10"
And user "Alice" has uploaded a file inside space "Project Gamma" with content "7 bytes" to "test.txt"
Scenario: A file can be overwritten if there is enough quota
Given user "Alice" has created a space "Project Gamma" of type "project" with quota "10"
And user "Alice" has uploaded a file inside space "Project Gamma" with content "7 bytes" to "test.txt"
When user "Alice" uploads a file inside space "Project Gamma" with content "0010 bytes" to "test.txt" using the WebDAV API
Then the HTTP status code should be "204"
Scenario: overwriting a file with an insufficient quota
When user "Alice" has created a space "Project Delta" of type "project" with quota "10"
And user "Alice" has uploaded a file inside space "Project Delta" with content "7 bytes" to "test.txt"
Scenario: A file cannot be overwritten if there is insufficient quota
When user "Alice" has created a space "Project Delta" of type "project" with quota "10"
And user "Alice" has uploaded a file inside space "Project Delta" with content "7 bytes" to "test.txt"
When user "Alice" uploads a file inside space "Project Delta" with content "00011 bytes" to "test.txt" using the WebDAV API
Then the HTTP status code should be "507"

View File

@@ -0,0 +1,64 @@
@api @skipOnOcV10
Feature: Share spaces
As the owner of a space
I want to be able to add members to a space, and to remove access for them
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And user "Brian" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "Admin" using the settings api
Scenario: A user can share a space to another user
Given user "Alice" has created a space "Space to share" of type "project" with quota "10"
When user "Alice" shares a space "Space to share" to user "Brian"
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
Scenario: A user can see that a received shared space is available
Given user "Alice" has created a space "Share space to Brian" of type "project" with quota "10"
And user "Alice" has shared a space "Share space to Brian" to user "Brian"
When user "Brian" lists all available spaces via the GraphApi
Then the json responded should contain a space "Share space to Brian" with these key and value pairs:
| key | value |
| driveType | share |
| id | %space_id% |
| name | Share space to Brian |
| quota@@@state | normal |
| root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
Scenario: A user can see a file in a received shared space
Given user "Alice" has created a space "Share space with file" of type "project" with quota "10"
And user "Alice" has uploaded a file inside space "Share space with file" with content "Test" to "test.txt"
When user "Alice" has shared a space "Share space with file" to user "Brian"
Then for user "Brian" the space "Share space with file" should contain these entries:
| test.txt |
Scenario: A user can see a folder in received shared space
Given user "Alice" has created a space "Share space with folder" of type "project" with quota "10"
And user "Alice" has created a folder "Folder Main" in space "Share space with folder"
When user "Alice" has shared a space "Share space with folder" to user "Brian"
Then for user "Brian" the space "Share space with folder" should contain these entries:
| Folder Main |
Scenario: When a user unshares a space, the space becomes unavailable to the receiver
Given user "Alice" has created a space "Unshare space" of type "project" with quota "10"
And user "Alice" has shared a space "Unshare space" to user "Brian"
When user "Brian" lists all available spaces via the GraphApi
Then the json responded should contain a space "Unshare space" with these key and value pairs:
| key | value |
| driveType | share |
| id | %space_id% |
| name | Unshare space |
When user "Alice" unshares a space "Unshare space" to user "Brian"
Then the HTTP status code should be "200"
And user "Brian" lists all available spaces via the GraphApi
And the json responded should not contain a space "Unshare space"

View File

@@ -11,22 +11,22 @@ Feature: Upload files into a space
And user "Bob" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "Admin" using the settings api
Scenario: Alice creates a folder via the Graph api in space, she expects a 201 code and she checks that folder exists
Given user "Alice" has created a space "Project Ceres" of type "project" with quota "2000"
Scenario: A user can create a folder in a Space via the Graph API
Given user "Alice" has created a space "Project Ceres" of type "project" with quota "2000"
When user "Alice" creates a folder "mainFolder" in space "Project Ceres" using the WebDav Api
Then the HTTP status code should be "201"
And for user "Alice" the space "Project Ceres" should contain these entries:
| mainFolder |
Scenario: Bob creates a folder via the Graph api in a space, he expects a 404 code and Alice checks that this folder does not exist
Scenario: A user cannot create a folder in a Space if they do not have permission
Given user "Alice" has created a space "Project Merkur" of type "project" with quota "2000"
And user "Bob" creates a folder "forAlice" in space "Project Merkur" owned by the user "Alice" using the WebDav Api
Then the HTTP status code should be "404"
And for user "Alice" the space "Project Merkur" should not contain these entries:
| forAlice |
Scenario: Alice creates a folder via Graph api and uploads a file
Given user "Alice" has created a space "Project Moon" of type "project" with quota "2000"
Scenario: A user can create a folder and upload a file to a Space
Given user "Alice" has created a space "Project Moon" of type "project" with quota "2000"
When user "Alice" creates a folder "NewFolder" in space "Project Moon" using the WebDav Api
Then the HTTP status code should be "201"
And user "Alice" uploads a file inside space "Project Moon" with content "Test" to "test.txt" using the WebDAV API
@@ -35,14 +35,14 @@ Feature: Upload files into a space
| NewFolder |
| test.txt |
Scenario: Bob uploads a file via the Graph api in a space, he expects a 404 code and Alice checks that this file does not exist
Given user "Alice" has created a space "Project Pluto" of type "project" with quota "2000"
Scenario: A user cannot upload a file in a Space if they do not have permission
Given user "Alice" has created a space "Project Pluto" of type "project" with quota "2000"
When user "Bob" uploads a file inside space "Project Pluto" owned by the user "Alice" with content "Test" to "test.txt" using the WebDAV API
Then the HTTP status code should be "404"
And for user "Alice" the space "Project Pluto" should not contain these entries:
| test.txt |
Scenario: Alice creates uploads a file and checks her quota
Scenario: A user can upload a file in a Space and see the remaining quota
When user "Alice" creates a space "Project Saturn" of type "project" with quota "2000" using the GraphApi
And the json responded should contain a space "Project Saturn" with these key and value pairs:
| key | value |

View File

@@ -41,6 +41,16 @@ class SpacesContext implements Context {
*/
private FeatureContext $featureContext;
/**
* @var OCSContext
*/
private OCSContext $ocsContext;
/**
* @var string
*/
private string $baseUrl;
/**
* @var array key is space name and value is the username that created the space
*/
@@ -209,10 +219,14 @@ class SpacesContext implements Context {
$environment = $scope->getEnvironment();
// Get all the contexts you need in this context
$this->featureContext = $environment->getContext('FeatureContext');
$this->ocsContext = $environment->getContext('OCSContext');
// Run the BeforeScenario function in OCSContext to set it up correctly
$this->ocsContext->before($scope);
$this->baseUrl = \trim($this->featureContext->getBaseUrl(), "/");
SetupHelper::init(
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$this->featureContext->getBaseUrl(),
$this->baseUrl,
$this->featureContext->getOcPath()
);
}
@@ -220,7 +234,6 @@ class SpacesContext implements Context {
/**
* Send Graph List Spaces Request
*
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $urlArguments
@@ -233,19 +246,14 @@ class SpacesContext implements Context {
* @throws GuzzleException
*/
public function listSpacesRequest(
string $baseUrl,
string $user,
string $password,
string $urlArguments,
string $urlArguments = '',
string $xRequestId = '',
array $body = [],
array $headers = []
): ResponseInterface {
$fullUrl = $baseUrl;
if (!str_ends_with($fullUrl, '/')) {
$fullUrl .= '/';
}
$fullUrl .= "graph/v1.0/me/drives/" . $urlArguments;
$fullUrl = $this->baseUrl . "/graph/v1.0/me/drives/" . $urlArguments;
return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body);
}
@@ -253,7 +261,6 @@ class SpacesContext implements Context {
/**
* Send Graph Create Space Request
*
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $body
@@ -265,18 +272,13 @@ class SpacesContext implements Context {
* @throws GuzzleException
*/
public function sendCreateSpaceRequest(
string $baseUrl,
string $user,
string $password,
string $body,
string $xRequestId = '',
array $headers = []
): ResponseInterface {
$fullUrl = $baseUrl;
if (!str_ends_with($fullUrl, '/')) {
$fullUrl .= '/';
}
$fullUrl .= "graph/v1.0/drives/";
$fullUrl = $this->baseUrl . "/graph/v1.0/drives/";
return HttpRequestHelper::post($fullUrl, $xRequestId, $user, $password, $headers, $body);
}
@@ -341,11 +343,8 @@ class SpacesContext implements Context {
public function theUserListsAllHisAvailableSpacesUsingTheGraphApi(string $user): void {
$this->featureContext->setResponse(
$this->listSpacesRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
"",
""
$this->featureContext->getPasswordForUser($user)
)
);
$this->rememberTheAvailableSpaces();
@@ -372,11 +371,9 @@ class SpacesContext implements Context {
$body = json_encode($space, JSON_THROW_ON_ERROR);
$this->featureContext->setResponse(
$this->sendCreateSpaceRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
""
$body
)
);
$this->setSpaceCreator($spaceName, $user);
@@ -405,11 +402,9 @@ class SpacesContext implements Context {
$body = json_encode($space);
$this->featureContext->setResponse(
$this->sendCreateSpaceRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
""
$body
)
);
$this->setSpaceCreator($spaceName, $user);
@@ -434,12 +429,8 @@ class SpacesContext implements Context {
$accounts = [];
$assignment = [];
$baseUrl = $this->featureContext->getBaseUrl();
if (!str_ends_with($baseUrl, '/')) {
$baseUrl .= '/';
}
// get the roles list first
$fullUrl = $baseUrl . "api/v0/settings/roles-list";
$fullUrl = $this->baseUrl . "/api/v0/settings/roles-list";
$this->featureContext->setResponse(HttpRequestHelper::post($fullUrl, "", $admin, $password, $headers, "{}"));
if ($this->featureContext->getResponse()) {
$rawBody = $this->featureContext->getResponse()->getBody()->getContents();
@@ -457,7 +448,7 @@ class SpacesContext implements Context {
Assert::assertNotEmpty($roleToAssign, "The selected role $role could not be found");
// get the accounts list first
$fullUrl = $baseUrl . "api/v0/accounts/accounts-list";
$fullUrl = $this->baseUrl . "/api/v0/accounts/accounts-list";
$this->featureContext->setResponse(HttpRequestHelper::post($fullUrl, "", $admin, $password, $headers, "{}"));
if ($this->featureContext->getResponse()) {
$rawBody = $this->featureContext->getResponse()->getBody()->getContents();
@@ -475,7 +466,7 @@ class SpacesContext implements Context {
Assert::assertNotEmpty($accountToChange, "The selected account $user does not exist");
// set the new role
$fullUrl = $baseUrl . "api/v0/settings/assignments-add";
$fullUrl = $this->baseUrl . "/api/v0/settings/assignments-add";
$body = json_encode(["account_uuid" => $accountToChange["id"], "role_id" => $roleToAssign["id"]], JSON_THROW_ON_ERROR);
$this->featureContext->setResponse(HttpRequestHelper::post($fullUrl, "", $admin, $password, $headers, $body));
@@ -559,7 +550,7 @@ class SpacesContext implements Context {
public function thePropfindResultShouldContainEntries(
string $shouldOrNot,
TableNode $expectedFiles
):void {
): void {
$this->propfindResultShouldContainEntries(
$shouldOrNot,
$expectedFiles,
@@ -581,7 +572,7 @@ class SpacesContext implements Context {
string $spaceName,
string $shouldOrNot,
TableNode $expectedFiles
):void {
): void {
$this->theUserListsTheContentOfAPersonalSpaceRootUsingTheWebDAvApi(
$this->getSpaceCreator($spaceName),
$spaceName
@@ -609,7 +600,7 @@ class SpacesContext implements Context {
string $spaceName,
string $shouldOrNot,
TableNode $expectedFiles
):void {
): void {
$this->theUserListsTheContentOfAPersonalSpaceRootUsingTheWebDAvApi(
$user,
$spaceName
@@ -667,6 +658,20 @@ class SpacesContext implements Context {
}
}
/**
* @Then /^the json responded should not contain a space "([^"]*)"$/
*
* @param string $spaceName
*
* @return void
* @throws Exception
*/
public function jsonRespondedShouldNotContain(
string $spaceName
): void {
Assert::assertEmpty($this->getSpaceByNameFromResponse($spaceName), "space $spaceName should not be available for a user");
}
/**
* @param string $shouldOrNot (not|)
* @param TableNode $expectedFiles
@@ -801,21 +806,30 @@ class SpacesContext implements Context {
string $folder,
string $spaceName
): void {
$space = $this->getSpaceByName($user, $spaceName);
$this->theUserCreatesAFolderToAnotherOwnerSpaceUsingTheGraphApi($user, $folder, $spaceName);
}
$baseUrl = $this->featureContext->getBaseUrl();
if (!str_ends_with($baseUrl, '/')) {
$baseUrl .= '/';
}
$fullUrl = $baseUrl . "dav/spaces/" . $space['id'] . '/' . $folder;
/**
* @Given /^user "([^"]*)" has created a folder "([^"]*)" in space "([^"]*)"$/
*
* @param string $user
* @param string $folder
* @param string $spaceName
*
* @return void
*
* @throws GuzzleException
*/
public function theUserHasCreateAFolderUsingTheGraphApi(
string $user,
string $folder,
string $spaceName
): void {
$this->theUserCreatesAFolderUsingTheGraphApi($user, $folder, $spaceName);
$this->featureContext->setResponse(
$this->sendCreateFolderRequest(
$fullUrl,
"MKCOL",
$user,
$this->featureContext->getPasswordForUser($user)
)
$this->featureContext->theHTTPStatusCodeShouldBe(
201,
"Expected response status code should be 201"
);
}
@@ -835,15 +849,15 @@ class SpacesContext implements Context {
string $user,
string $folder,
string $spaceName,
string $ownerUser
string $ownerUser = ''
): void {
if ($ownerUser === '') {
$ownerUser = $user;
}
$space = $this->getSpaceByName($ownerUser, $spaceName);
$baseUrl = $this->featureContext->getBaseUrl();
if (!str_ends_with($baseUrl, '/')) {
$baseUrl .= '/';
}
$fullUrl = $baseUrl . "dav/spaces/" . $space['id'] . '/' . $folder;
$fullUrl = $this->baseUrl . "/dav/spaces/" . $space['id'] . '/' . $folder;
$this->featureContext->setResponse(
$this->sendCreateFolderRequest(
@@ -974,7 +988,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
$this->sendUpdateSpaceRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
@@ -1007,7 +1020,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
$this->sendUpdateSpaceRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
@@ -1019,7 +1031,6 @@ class SpacesContext implements Context {
/**
* Send Graph Update Space Request
*
* @param string $baseUrl
* @param string $user
* @param string $password
* @param mixed $body
@@ -1032,7 +1043,6 @@ class SpacesContext implements Context {
* @throws GuzzleException
*/
public function sendUpdateSpaceRequest(
string $baseUrl,
string $user,
string $password,
$body,
@@ -1040,11 +1050,7 @@ class SpacesContext implements Context {
string $xRequestId = '',
array $headers = []
): ResponseInterface {
$fullUrl = $baseUrl;
if (!str_ends_with($fullUrl, '/')) {
$fullUrl .= '/';
}
$fullUrl .= "graph/v1.0/drives/$spaceId";
$fullUrl = $this->baseUrl . "/graph/v1.0/drives/$spaceId";
$method = 'PATCH';
return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, $method, $user, $password, $headers, $body);
@@ -1060,16 +1066,19 @@ class SpacesContext implements Context {
*
* @return void
*/
public function userHasCreatedSpace(string $user, string $spaceName, string $spaceType, int $quota):void {
public function userHasCreatedSpace(
string $user,
string $spaceName,
string $spaceType,
int $quota
): void {
$space = ["Name" => $spaceName, "driveType" => $spaceType, "quota" => ["total" => $quota]];
$body = json_encode($space);
$this->featureContext->setResponse(
$this->sendCreateSpaceRequest(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
""
$body
)
);
$this->featureContext->theHTTPStatusCodeShouldBe(
@@ -1088,7 +1097,12 @@ class SpacesContext implements Context {
*
* @return void
*/
public function userHasUploadedFile(string $user, string $spaceName, string $fileContent, string $destination):void {
public function userHasUploadedFile(
string $user,
string $spaceName,
string $fileContent,
string $destination
): void {
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi($user);
$space = $this->getSpaceByName($user, $spaceName);
@@ -1108,4 +1122,83 @@ class SpacesContext implements Context {
$this->featureContext->theHTTPStatusCodeShouldBeOr(201, 204);
}
/**
* @When /^user "([^"]*)" shares a space "([^"]*)" to user "([^"]*)"$/
*
* @param string $user
* @param string $spaceName
* @param string $userRecipient
*
* @return void
* @throws GuzzleException
*/
public function sendShareSpaceRequest(
string $user,
string $spaceName,
string $userRecipient
): void {
$space = $this->getSpaceByName($user, $spaceName);
$body = ["space_ref" => $space['id'], "shareType" => 7, "shareWith" => $userRecipient];
$fullUrl = $this->baseUrl . "/ocs/v2.php/apps/files_sharing/api/v1/shares";
$this->featureContext->setResponse(
HttpRequestHelper::post(
$fullUrl,
"",
$user,
$this->featureContext->getPasswordForUser($user),
[],
$body
)
);
}
/**
* @Given /^user "([^"]*)" has shared a space "([^"]*)" to user "([^"]*)"$/
*
* @param string $user
* @param string $spaceName
* @param string $userRecipient
*
* @return void
* @throws GuzzleException
*/
public function userHasSharedSpace(
string $user,
string $spaceName,
string $userRecipient
): void {
$this->sendShareSpaceRequest($user, $spaceName, $userRecipient);
$expectedHTTPStatus = "200";
$this->featureContext->theHTTPStatusCodeShouldBe(
$expectedHTTPStatus,
"Expected response status code should be $expectedHTTPStatus"
);
$expectedOCSStatus = "200";
$this->ocsContext->theOCSStatusCodeShouldBe($expectedOCSStatus, "Expected OCS response status code $expectedOCSStatus");
}
/**
* @When /^user "([^"]*)" unshares a space "([^"]*)" to user "([^"]*)"$/
*
* @param string $user
* @param string $spaceName
* @param string $userRecipient
*
* @return void
* @throws GuzzleException
*/
public function sendUnshareSpaceRequest(
string $user,
string $spaceName,
string $userRecipient
): void {
$space = $this->getSpaceByName($user, $spaceName);
$fullUrl = $this->baseUrl . "/ocs/v2.php/apps/files_sharing/api/v1/shares/" . $space['id'] . "?shareWith=" . $userRecipient;
HttpRequestHelper::delete($fullUrl, "", $user, $this->featureContext->getPasswordForUser($user));
}
}

View File

@@ -0,0 +1,2 @@
!config
output

View File

@@ -0,0 +1,40 @@
default:
autoload:
"": "%paths.base%/../features/bootstrap"
suites:
apiShareManagement:
paths:
- "%paths.base%/../features/apiShareManagement"
context: &common_ldap_suite_context
parameters:
ldapAdminPassword: admin
ldapUsersOU: TestUsers
ldapGroupsOU: TestGroups
ldapInitialUserFilePath: /ldap_users_groups.ldif
contexts:
- ParallelContext:
- FeatureContext: &common_feature_context_params
baseUrl: https://ocis:9200
adminUsername: admin
adminPassword: admin
regularUserPassword: 1234
ocPath: apps/testing/api/v1/occ
- OccContext:
apiWebdavOperations:
paths:
- "%paths.base%/../features/apiWebdavOperations"
context: *common_ldap_suite_context
contexts:
- ParallelContext:
- FeatureContext: *common_feature_context_params
extensions:
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
outputDir: "%paths.base%/../output/"
rdx\behatvars\BehatVariablesExtension: ~
Cjm\Behat\StepThroughExtension: ~

View File

@@ -0,0 +1,7 @@
dn: ou=TestUsers,dc=owncloud,dc=com
objectClass: organizationalUnit
ou: TestUsers
dn: ou=TestGroups,dc=owncloud,dc=com
objectClass: organizationalUnit
ou: TestGroups

View File

@@ -0,0 +1,10 @@
# This LDIF files describes the ownCloud schema and can be used to
# add two optional attributes: ownCloudQuota and ownCloudUUID
# The ownCloudUUID is used to store a unique, non-reassignable, persistent identifier for users and groups
dn: cn=owncloud,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: owncloud
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.1 NAME 'ownCloudQuota' DESC 'User Quota (e.g. 2 GB)' EQUALITY caseExactMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.2 NAME 'ownCloudUUID' DESC 'A non-reassignable and persistent account ID)' EQUALITY uuidMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.1.16.1 SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.3 NAME 'ownCloudSelector' DESC 'A selector attribute for a route in the ownCloud Infinte Scale proxy)' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcObjectClasses: ( 1.3.6.1.4.1.39430.1.2.1 NAME 'ownCloud' DESC 'ownCloud LDAP Schema' AUXILIARY MAY ( ownCloudQuota $ ownCloudUUID $ ownCloudSelector ) )

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
echo "Writing custom config files..."
# openidconnect
gomplate \
-f /etc/templates/oidc.config.php \
-o ${OWNCLOUD_VOLUME_CONFIG}/oidc.config.php
# we need at least version 2.1.0 of the oenidconnect app
occ market:upgrade --major openidconnect
occ app:enable openidconnect
# user LDAP
gomplate \
-f /etc/templates/ldap-config.tmpl.json \
-o ${OWNCLOUD_VOLUME_CONFIG}/ldap-config.json
CONFIG=$(cat ${OWNCLOUD_VOLUME_CONFIG}/ldap-config.json)
occ config:import <<< $CONFIG
occ ldap:test-config "s01"
occ app:enable user_ldap
/bin/bash -c 'occ user:sync "OCA\User_LDAP\User_Proxy" -r -m remove'
occ market:upgrade --major web
occ app:enable web
# enable testing app
echo "Cloning and enabling testing app..."
git clone --depth 1 https://github.com/owncloud/testing.git /var/www/owncloud/apps/testing
occ app:enable testing
true

View File

@@ -0,0 +1,53 @@
{
"apps": {
"user_ldap": {
"s01has_memberof_filter_support": "0",
"s01home_folder_naming_rule": "",
"s01last_jpegPhoto_lookup": "0",
"s01ldap_agent_password": "{{ .Env.STORAGE_LDAP_BIND_PASSWORD | base64.Encode }}",
"s01ldap_attributes_for_group_search": "",
"s01ldap_attributes_for_user_search": "{{ .Env.LDAP_USERATTRIBUTEFILTERS }}",
"s01ldap_backup_host": "",
"s01ldap_backup_port": "",
"s01ldap_base_groups": "{{ .Env.LDAP_BASE_DN }}",
"s01ldap_base_users": "{{ .Env.LDAP_BASE_DN }}",
"s01ldap_base": "{{ .Env.LDAP_BASE_DN }}",
"s01ldap_cache_ttl": "60",
"s01ldap_configuration_active": "1",
"s01ldap_display_name": "{{ .Env.LDAP_USER_SCHEMA_DISPLAYNAME }}",
"s01ldap_dn": "{{ .Env.STORAGE_LDAP_BIND_DN }}",
"s01ldap_dynamic_group_member_url": "",
"s01ldap_email_attr": "{{ .Env.LDAP_USER_SCHEMA_MAIL }}",
"s01ldap_experienced_admin": "1",
"s01ldap_expert_username_attr": "{{ .Env.LDAP_USER_SCHEMA_NAME_ATTR }}",
"s01ldap_expert_uuid_group_attr": "",
"s01ldap_expert_uuid_user_attr": "{{ .Env.LDAP_USER_SCHEMA_UID }}",
"s01ldap_group_display_name": "{{ .Env.LDAP_GROUP_SCHEMA_DISPLAYNAME }}",
"s01ldap_group_filter_mode": "0",
"s01ldap_group_filter": "{{ .Env.LDAP_GROUPFILTER }}",
"s01ldap_group_member_assoc_attribute": "{{ .Env.LDAP_GROUP_MEMBER_ASSOC_ATTR }}",
"s01ldap_groupfilter_groups": "",
"s01ldap_groupfilter_objectclass": "",
"s01ldap_host": "{{ .Env.LDAP_HOST }}",
"s01ldap_login_filter_mode": "0",
"s01ldap_login_filter": "{{ .Env.LDAP_LOGINFILTER }}",
"s01ldap_loginfilter_attributes": "",
"s01ldap_loginfilter_email": "1",
"s01ldap_loginfilter_username": "1",
"s01ldap_nested_groups": "0",
"s01ldap_override_main_server": "",
"s01ldap_paging_size": "100",
"s01ldap_port": "{{ .Env.LDAP_PORT }}",
"s01ldap_quota_attr": "",
"s01ldap_quota_def": "",
"s01ldap_tls": "0",
"s01ldap_turn_off_cert_check": "0",
"s01ldap_user_display_name_2": "",
"s01ldap_user_filter_mode": "0",
"s01ldap_userfilter_groups": "",
"s01ldap_userfilter_objectclass": "",
"s01ldap_userlist_filter": "{{ .Env.LDAP_USERFILTER }}",
"s01use_memberof_to_detect_membership": "1"
}
}
}

View File

@@ -0,0 +1,22 @@
<?php
# reference: https://doc.owncloud.com/server/admin_manual/configuration/user/oidc/
function getOIDCConfigFromEnv() {
$config = [
'openid-connect' => [
'provider-url' => getenv('IDP_OIDC_ISSUER'),
'client-id' => 'oc10',
'client-secret' => getenv('IDP_OIDC_CLIENT_SECRET'),
'loginButtonName' => 'OpenId Connect',
'search-attribute' => 'preferred_username',
'mode' => 'userid',
'autoRedirectOnLoginPage' => true,
'insecure' => true,
'post_logout_redirect_uri' => 'https://' . getenv('CLOUD_DOMAIN'),
],
];
return $config;
}
$CONFIG = getOIDCConfigFromEnv();

View File

@@ -0,0 +1,109 @@
{
"log": {
"level": "PROXY_LOG_LEVEL"
},
"policy_selector": {
"claims": {
"default_policy": "oc10",
"unauthenticated_policy": "oc10"
}
},
"policies": [
{
"name": "ocis",
"routes": [
{
"endpoint": "/",
"backend": "http://localhost:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://localhost:9130"
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/user/signing-key",
"backend": "http://localhost:9110"
},
{
"endpoint": "/ocs/",
"backend": "http://localhost:9140"
},
{
"type": "query",
"endpoint": "/remote.php/?preview=1",
"backend": "http://localhost:9115"
},
{
"endpoint": "/remote.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/dav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/webdav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/status.php",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/login",
"backend": "http://localhost:9100"
},
{
"endpoint": "/login",
"backend": "http://localhost:9100"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph/",
"backend": "http://localhost:9120"
},
{
"endpoint": "/app/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/archiver",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph-explorer/",
"backend": "http://localhost:9135"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://localhost:9190"
},
{
"endpoint": "/settings.js",
"backend": "http://localhost:9190"
}
]
},
{
"name": "oc10",
"routes": [
{
"endpoint": "/",
"backend": "http://oc10:8080"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
}
]
}
]
}

View File

@@ -0,0 +1,5 @@
## Scenarios that are expected to fail in parallel deployment
#### [[WIP] Add a SharesStorageProvider and an oc10 sql share manager](https://github.com/owncloud/ocis/pull/2232)
- [apiShareManagement/acceptShares.feature:22](https://github.com/owncloud/ocis/blob/master/tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature#L22)

View File

@@ -0,0 +1,30 @@
# Sharing tests currently doesn't work
# Accessing oc10 shares from ocis still WIP in PR #2232
# https://github.com/owncloud/ocis/pull/2232
@api
Feature: sharing files and folders
As a user
I want to share files/folders with other users
So that I can give access to my files/folders to others
Background:
Given using "oc10" as owncloud selector
And the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And using OCS API version "1"
And using new DAV path
And user "Alice" has been created with default attributes and without skeleton files
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt"
Scenario: accept a pending share
Given user "Alice" has shared folder "/textfile.txt" with user "Brian"
And using "ocis" as owncloud selector
When user "Brian" accepts share "/textfile.txt" offered by user "Alice" using the sharing API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the sharing API should report to user "Brian" that these shares are in the accepted state
| path |
| /Shares/textfile.txt |

View File

@@ -0,0 +1,146 @@
@api
Feature: download file
As a user
I want to be able to download files
So that I can work wih local copies of files on my client system
Background:
Given using "oc10" as owncloud selector
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt"
Scenario Outline: download a file
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" using the WebDAV API
Then the downloaded content should be "ownCloud test text file"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: download a file with range
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" with range "bytes=0-7" using the WebDAV API
Then the downloaded content should be "ownCloud"
Examples:
| dav_version |
| old |
| new |
Scenario: Get the size of a file
Given using "ocis" as owncloud selector
When user "Alice" gets the size of file "textfile.txt" using the WebDAV API
Then the HTTP status code should be "207"
And the size of the file should be "23"
Scenario Outline: Download a file with comma in the filename
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "file with comma in filename" to <filename>
And using "ocis" as owncloud selector
When user "Alice" downloads file <filename> using the WebDAV API
Then the downloaded content should be "file with comma in filename"
Examples:
| dav_version | filename |
| old | "sample,1.txt" |
| old | ",,,.txt" |
| old | ",,,.," |
| new | "sample,1.txt" |
| new | ",,,.txt" |
| new | ",,,.," |
Scenario Outline: download a file with single part ranges
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" with range "bytes=0-7" using the WebDAV API
Then the HTTP status code should be "206"
And the following headers should be set
| header | value |
| Content-Length | 8 |
| Content-Range | bytes 0-7/23 |
And the downloaded content should be "ownCloud"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: download a file with last byte range out of bounds
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" with range "bytes=0-24" using the WebDAV API
Then the HTTP status code should be "206"
And the downloaded content should be "ownCloud test text file"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: download a range at the end of a file
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" with range "bytes=-4" using the WebDAV API
Then the HTTP status code should be "206"
And the downloaded content should be "file"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: download a file with range out of bounds
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" with range "bytes=24-30" using the WebDAV API
Then the HTTP status code should be "416"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: download a hidden file
Given using <dav_version> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has uploaded the following files with content "hidden file"
| path |
| .hidden_file |
| FOLDER/.hidden_file |
And using "ocis" as owncloud selector
When user "Alice" downloads file ".hidden_file" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "hidden file"
When user "Alice" downloads file "FOLDER/.hidden_file" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "hidden file"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: Downloading a file should serve security headers
Given using "ocis" as owncloud selector
And using <dav_version> DAV path
When user "Alice" downloads file "textfile.txt" using the WebDAV API
Then the following headers should be set
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''textfile.txt; filename="textfile.txt" |
| Content-Security-Policy | default-src 'none'; |
| X-Content-Type-Options | nosniff |
| X-Download-Options | noopen |
| X-Frame-Options | SAMEORIGIN |
| X-Permitted-Cross-Domain-Policies | none |
| X-Robots-Tag | none |
| X-XSS-Protection | 1; mode=block |
Examples:
| dav_version |
| old |
| new |

View File

@@ -0,0 +1,71 @@
<?php declare(strict_types=1);
/**
* ownCloud
*
* @author Sajan Gurung <sajan@jankaritech.com>
* @copyright Copyright (c) 2021 Sajan Gurung sajan@jankaritech.com
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License,
* as published by the Free Software Foundation;
* either version 3 of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use TestHelpers\SetupHelper;
use TestHelpers\HttpRequestHelper;
require_once 'bootstrap.php';
/**
* Steps related to parallel deploy setup
*/
class ParallelContext implements Context {
/**
* @var FeatureContext
*/
private FeatureContext $featureContext;
/**
* @BeforeScenario
*
* @param BeforeScenarioScope $scope
*
* @return void
*
* @throws Exception
*/
public function setUpScenario(BeforeScenarioScope $scope): void {
$environment = $scope->getEnvironment();
$this->featureContext = $environment->getContext('FeatureContext');
SetupHelper::init(
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$this->featureContext->getBaseUrl(),
$this->featureContext->getOcPath()
);
}
/**
* @Given using :selector as owncloud selector
*
* @param string $selector 'ocis' or 'oc10'
*
* @return void
*/
public function usingOwncloudSelector(string $selector): void {
$this->featureContext->setOCSelector($selector);
HttpRequestHelper::setOCSelectorCookie("owncloud-selector=$selector;path=/;");
}
}

View File

@@ -0,0 +1,37 @@
<?php declare(strict_types=1);
/**
* ownCloud
*
* @author Phil Davis <phil@jankaritech.com>
* @copyright Copyright (c) 2020 Phil Davis phil@jankaritech.com
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License,
* as published by the Free Software Foundation;
* either version 3 of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
$pathToCore = \getenv('PATH_TO_CORE');
if ($pathToCore === false) {
$pathToCore = "../core";
}
require_once $pathToCore . '/tests/acceptance/features/bootstrap/bootstrap.php';
$classLoader = new \Composer\Autoload\ClassLoader();
$classLoader->addPsr4(
"",
$pathToCore . "/tests/acceptance/features/bootstrap",
true
);
$classLoader->register();