ocis
ocis copied to clipboard
[Sharing NG] Add tests coverage for (enable sync/disable sync) share
Description
This PR https://github.com/owncloud/ocis/pull/7885 adds api endpoint for accept/decline share. After PR merge, add test coverage
- default (auto-accept)
- [x] ~~decline share~~ disable sync of share resource https://github.com/owncloud/ocis/pull/8636
- disable auto-accept
- [x] ~~accept share~~ enable sync of share resource https://github.com/owncloud/ocis/pull/8623
- [x] enable and disable sync feature in group share https://github.com/owncloud/ocis/pull/8734
- [ ] enable sync twice [ Related issue: https://github.com/owncloud/ocis/issues/8876 ]
- [ ] Personal
- [ ] Project
- [ ] disable sync twice
- [ ] Personal
- [ ] Project
- [x] enable /disable sync of resource from Project to user https://github.com/owncloud/ocis/pull/8789
- [x] enable /disable sync of resource from Project to group https://github.com/owncloud/ocis/pull/8796
- [ ] sharer deleted (user/group) when sync enabled
- [ ] Personal
- [ ] Project
- [ ] sharer deleted (user/group) when sync disabled
- [ ] Personal
- [ ] Project
- [ ] sharee deleted (user/group) when sync enabled
- [ ] Personal
- [ ] Project
- [ ] sharee deleted (user/group) when sync disabled
- [ ] Personal
- [ ] Project
Edge cases:
- [x] try to enable sync using:
- [x] non-existing item id (https://github.com/owncloud/ocis/issues/8724)
- https://github.com/owncloud/ocis/pull/8875
- [x] empty id (
""
) @grgprarup https://github.com/owncloud/ocis/pull/8963 - [x] not shared item id @grgprarup https://github.com/owncloud/ocis/pull/8991
- [x] non-existing item id (https://github.com/owncloud/ocis/issues/8724)
- [ ] try to disbale sync using non-existing id @grgprarup https://github.com/owncloud/ocis/pull/8992 https://github.com/owncloud/ocis/issues/9001
Previously, the phrase mount
and unmount
was used. Currently enable and disable share is used. PR that refactors this change:
- [x] https://github.com/owncloud/ocis/pull/8786
For ~~declining~~ disabling sync an upcoming share
curl -X DELETE 'https://host.docker.internal:9200/graph/v1beta1/drives/{drive-id}/items/{item-id}' -u username:password
This will change @client.synchronize property of the item to false (disable sync) which refer to declining incoming share
See https://github.com/owncloud/ocis/issues/7792#issuecomment-1827601792 Swagger Reference: driveItem
For ~~accepting pending share~~ enabling share sync
curl -X POST 'https://host.docker.internal:9200/graph/v1beta1/drives/{share-Space-Id}/root/children'
-d '{
"remoteItem": {
"id":"'remote-item-id"
}
}'
~~This request returns drive item . remote-item-id
and permission-id
can be received from sharedWithMe
object~~ . Only item id is needed
See drives.root
Related bug issues for mount and unmount endpoint
- https://github.com/owncloud/ocis/issues/8724
- https://github.com/owncloud/ocis/issues/8735
- https://github.com/owncloud/ocis/issues/8731
@S-Panta @SagarGi @nirajacharya2 Please, check if this can be closed or not
I think there are two bugs reported relating to enable and disable share. Test should be written to cover those scenarios too
I think there are two bugs reported relating to enable and disable share. Test should be written to cover those scenarios too
update the links if test has been added and check if those issues are tracked in other qa tickets or not
- [ ] sharer deleted (user/group) when sync enabled
- [ ] Personal
- [ ] Project
- [ ] sharer deleted (user/group) when sync disabled
- [ ] Personal
- [ ] Project
@amrita-shrestha Could elaborate the scenario for these? Similar to these scenarios or different? https://github.com/owncloud/ocis/blob/582f8b7af887b28ff566dd8ab494f341716d54be/tests/acceptance/features/apiSharingNg/sharedByMe.feature#L1456 https://github.com/owncloud/ocis/blob/582f8b7af887b28ff566dd8ab494f341716d54be/tests/acceptance/features/apiSharingNg/sharedByMe.feature#L1487 https://github.com/owncloud/ocis/blob/582f8b7af887b28ff566dd8ab494f341716d54be/tests/acceptance/features/apiSharingNg/sharedWithMe.feature#L4194 https://github.com/owncloud/ocis/blob/582f8b7af887b28ff566dd8ab494f341716d54be/tests/acceptance/features/apiSharingNg/sharedWithMe.feature#L4405
I am extending coverage in https://github.com/owncloud/ocis/pull/8964 if that's the case
And in https://github.com/owncloud/ocis/pull/8967
@saw-jan @S-Panta, it appears that your PRs cover some scenarios, but there are still some that could be added to the "enable and disable sync" feature file. Those extended scenarios involve checking if the list shared with me lists all resources or not. However, what we need to address in the "enable/disable sync" is whether a user can change the sync state of shared resources whose owner has been deleted. Additionally, we need to consider scenarios where a shared resource's sync state is changed and the sharee(user/group to whom resource is deleted) is deleted. In these cases, the sharer(resource owner) needs to check whether the shared resource contains information about the deleted user in the propfind response or not? similar to mentioned in this issue https://github.com/owncloud/ocis/issues/9119
I will check on these scenerio.
@saw-jan @S-Panta, it appears that your PRs cover some scenarios, but there are still some that could be added to the "enable and disable sync" feature file. Those extended scenarios involve checking if the list shared with me lists all resources or not. However, what we need to address in the "enable/disable sync" is whether a user can change the sync state of shared resources whose owner has been deleted. Additionally, we need to consider scenarios where a shared resource's sync state is changed and the sharee(user/group to whom resource is deleted) is deleted. In these cases, the sharer(resource owner) needs to check whether the shared resource contains information about the deleted user in the propfind response or not?
@S-Panta What's the status of the remaining tasks here?
@S-Panta What's the status of the remaining tasks here?
Beside contract testing, I feel like most of the scenarios for this endpoint is covered.
Could you add those to the other mentioned issue? Then we can close this one
I have linked the share in another issue. I think we can close this now