web
web copied to clipboard
e2e tests for sse (server sent events)
related tasks and PRs:
- https://github.com/owncloud/web/issues/10650
- https://github.com/owncloud/web/pull/10807
- https://github.com/owncloud/web/issues/10833
- https://github.com/owncloud/ocis/issues/8950
- https://github.com/owncloud/web/issues/10648
e2e tests for SSE:
spaces resources:
creating:
- [ ] upload file/folder
- [ ] create file/folder (
.txt.odt) - [ ] restore file/folder from trash
- [ ] move file/folder
- [ ] copy file/folder
- [x] lock/unlock file
updating:
- [ ] rename file/folder
- [ ] change file content
- [ ] restore file version
space:
- [ ] disable
- [ ] enable
- [ ] delete
- [ ] change description/space image/space icon
- [x] space-member-added
- [x] space-member-removed
- [x] space-share-updated
share:
- [x] share created
- [x] share updated
- [x] share deleted
event in the eventStream in the GET api/v1/notifications/sse request:
NOTIFICATION = 'userlog-notification',
POSTPROCESSING_FINISHED = 'postprocessing-finished',
FILE_LOCKED = 'file-locked',
FILE_UNLOCKED = 'file-unlocked',
FILE_TOUCHED = 'file-touched',
ITEM_RENAMED = 'item-renamed',
ITEM_TRASHED = 'item-trashed',
ITEM_RESTORED = 'item-restored',
ITEM_MOVED = 'item-moved',
FOLDER_CREATED = 'folder-created',
SPACE_MEMBER_ADDED = 'space-member-added',
SPACE_MEMBER_REMOVED = 'space-member-removed',
SPACE_SHARE_UPDATED = 'space-share-updated',
SHARE_CREATED = 'share-created',
SHARE_REMOVED = 'share-removed',
SHARE_UPDATED = 'share-updated',
LINK_CREATED = 'link-created',
LINK_REMOVED = 'link-removed',
LINK_UPDATED = 'link-updated'
Besides the appearance/disappearance of resources on the web page, we usually check the api responses. but checking notifications/sse seems tricky. We need to somehow listen GET api/v1/notifications/sse during the whole test, which is triggered only once after login and gets 200 with an empty response.