[QA] Test coverage for activites api
Description
Add tests coverage for activities api https://owncloud.dev/libre-graph-api/#/activities/GetActivities
-
GET
/v1beta1/extensions/org.libregraph/activities -
web is using this api endpoint ( implemented)
Scenarios:
-
check activities on ocm https://github.com/owncloud/ocis/issues/10073
-
[ ] check activities for events (applicable to files, folders or spaces):
- [ ] Resource (file/folder):
- https://github.com/owncloud/ocis/issues/9712
- https://github.com/owncloud/ocis/issues/9744
- [x] Added https://github.com/owncloud/ocis/pull/9678
- [x] Deleted https://github.com/owncloud/ocis/pull/9705
- [x] Moved https://github.com/owncloud/ocis/pull/9731
- [x] Renamed https://github.com/owncloud/ocis/pull/9743
- [x] Activities inside of a folder (file creation, deletion...) https://github.com/owncloud/ocis/pull/9796
- [ ] Edited https://github.com/owncloud/ocis/issues/10001
- [ ] download https://github.com/owncloud/ocis/issues/10007
- [ ] Unauthenticated download (public download) https://github.com/owncloud/ocis/issues/10007
- [ ] file version download https://github.com/owncloud/ocis/issues/10008
- [ ] restore deleted file https://github.com/owncloud/ocis/issues/10010
- [ ] activities of a folder (check if scenario mentioned in #9536 is covered)
- https://github.com/owncloud/ocis/pull/9796
- [ ] Share: @prashant-gurung899
- [x] Created https://github.com/owncloud/ocis/pull/9795
- [x] Removed https://github.com/owncloud/ocis/pull/9795
- [x] Sharee actions (add/edit/delete) on the share - check activity by sharer https://github.com/owncloud/ocis/pull/9818
- [x] Link Created https://github.com/owncloud/ocis/pull/9803
- [x] Link Removed https://github.com/owncloud/ocis/pull/9803
- [x] Member Added https://github.com/owncloud/ocis/pull/9824
- [x] Member Removed https://github.com/owncloud/ocis/pull/9824
- [ ] Public actions (add/edit/delete) on the share - check activity by sharer #9676
- [ ] update share https://github.com/owncloud/ocis/issues/10011
- [ ] update link share https://github.com/owncloud/ocis/issues/10012
-
[ ] try to list activities of another user's file https://github.com/owncloud/ocis/issues/9860
- https://github.com/owncloud/ocis/pull/10132
-
[ ] Activity filter: @Salipa-Gurung
- [x] depth (
depth:-1) https://github.com/owncloud/ocis/issues/9850- https://github.com/owncloud/ocis/pull/10062
- [x] depth (
depth:1) - for folder, should not list the activities for files inside that folder https://github.com/owncloud/ocis/pull/9861 - [x] limit (
limit:2) https://github.com/owncloud/ocis/pull/9861 - [ ] limit (
limit:0,limit:-1) https://github.com/owncloud/ocis/issues/9880
- [x] depth (
-
[ ] share receiver can not see any activities, similar to versions (https://github.com/owncloud/ocis/issues/9849) @prashant-gurung899
if the user who makes the search request doesn't have the permission to see activities, early return with an error
- https://github.com/owncloud/ocis/pull/9842 response (403?)
-
[x] check activity
messagetranslation to the language other than English (https://github.com/owncloud/ocis/issues/9856) @prashant-gurung899- https://github.com/owncloud/ocis/pull/9875
- https://github.com/owncloud/ocis/pull/9889
Bug reports:
- https://github.com/owncloud/ocis/issues/9676
Moving it to backlog blocked untill these issues are fixed:
- https://github.com/owncloud/ocis/issues/9676
- https://github.com/owncloud/ocis/issues/9712
- https://github.com/owncloud/ocis/issues/9744
- https://github.com/owncloud/ocis/issues/9849
- https://github.com/owncloud/ocis/issues/9860
- https://github.com/owncloud/ocis/issues/9880
Scenarios to test for COPY/MOVE actions:
-
copy/move file (having some content) inside a folder
- check activities of the destination file
- check activities of the destination folder
-
copy/move file (0 byte) inside a folder
- check activities of the destination file
- check activities of the destination folder
-
copy/move file (some content and 0 byte) inside a folder by renaming the destination file
- check activities of the destination file
- check activities of the destination folder
-
copy file (some content and 0 byte) into same folder by renaming the destination file
- check activities of the destination file
Scenarios to test for COPY/MOVE actions:
copy/move file (having some content) inside a folder
- check activities of the destination file
For this particular MOVE scenario, tests are already covered by :
Scenario: check move activity
Scenario: check move activity for a file and a folder
For other MOVE scenarios, tests are covered in PR: https://github.com/owncloud/ocis/pull/10407 and https://github.com/owncloud/ocis/pull/10409
And I'm currently working on COPY scenarios. CC @saw-jan
@saw-jan There are few cases where we dont get the copy response or no response at all. Please go through the following:
COPY (without using file-id)
copy file (having some content) inside a folder
check activities of the destination file
> full response
check activities of the destination folder
> full response
copy file (0 byte) inside a folder
check activities of the destination file
> blank response --> {"value":[]}
check activities of the destination folder
> no copy response. only folder creation response.
copy file (some content and 0 byte) inside a folder by renaming the destination file
file with content
check activities of the destination file
> only file added response for "renamed.txt". No previous history.
check activities of the destination folder
> full response
zero byte file
check activities of the destination file
> blank response --> {"value":[]}
check activities of the destination folder
> only folder creation response. no copy response
copy file (some content and 0 byte) into same folder by renaming the destination file
file with content
check activities of the destination file
> only file added response for "renamed.txt". No previous history.
zero byte file
check activities of the destination file
> blank response --> {"value":[]}
I have made a new issue to report a bug related to copying zero byte file: https://github.com/owncloud/ocis/issues/10417 cc @saw-jan
COPY (without using file-id)
Test cases for COPY activities are covered in this PR: https://github.com/owncloud/ocis/pull/10485 For zero byte files, see :https://github.com/owncloud/ocis/issues/9543#issuecomment-2437464133
@saw-jan Similarly for copying file using file-id, the zero byte file have no response at all. I have already created a bug report for that. See: https://github.com/owncloud/ocis/issues/9543#issuecomment-2437464133. For other suitable cases, i will write tests in next PR ASAP.
Please go through the following:
COPY (using file-id)
copy file (having some content) inside a folder
check activities of the destination file
> full response
check activities of the destination folder
> full response
copy file (0 byte) inside a folder
check activities of the destination file
> blank response --> {"value":[]}
check activities of the destination folder
> no copy response. only folder creation response.
copy file (some content and 0 byte) inside a folder by renaming the destination file
file with content
check activities of the destination file
> only file added response for "renamed.txt". No previous history.
check activities of the destination folder
> full response
zero byte file
check activities of the destination file
> blank response --> {"value":[]}
check activities of the destination folder
> only folder creation response. no copy response
copy file (some content and 0 byte) into same folder by renaming the destination file
file with content
check activities of the destination file
> only file added response for "renamed.txt". No previous history.
zero byte file
check activities of the destination file
> blank response --> {"value":[]}
COPY (using file-id)
Test cases for COPY activities using file-id are covered in this PR: https://github.com/owncloud/ocis/pull/10534 For zero byte files, see :https://github.com/owncloud/ocis/issues/9543#issuecomment-2437464133
check activities for events (applicable to files, folders or spaces):
Resource (file/folder):
- [ ] file version download (knowingly disabled in
https://github.com/owncloud/ocis/pull/10368)
https://github.com/owncloud/ocis/issues/10008
The behavior is not known yet. So moved this to the backlog of QA project board. Since test coverages for all other issues/fixes have been written, closing this issue.