diff options
author | Joas Schilling <coding@schilljs.com> | 2024-03-14 12:56:39 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-03-14 12:56:39 +0100 |
commit | afb65c1f7ffb786a1188220dd88524707de2c636 (patch) | |
tree | 878ac9ad1ec598592c3f6995045ecddc28fc7ffb /tests/integration | |
parent | 0df96313031bec9db6913e56e8926015b4cc59da (diff) |
test(federation): Add integration tests for setting all kind of read markers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/features/federation/chat.feature | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/integration/features/federation/chat.feature b/tests/integration/features/federation/chat.feature index 0849772cd..0c12fb3f0 100644 --- a/tests/integration/features/federation/chat.feature +++ b/tests/integration/features/federation/chat.feature @@ -126,6 +126,48 @@ Feature: federation/chat | room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | Message deleted by author | | room | federated_users | participant1@{$BASE_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","server":"{$BASE_URL}"}} | | + Scenario: Read marker checking + Given the following "spreed" app config is set + | federation_enabled | yes | + Given user "participant1" creates room "room" (v4) + | roomType | 2 | + | roomName | room | + And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4) + And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4) + And user "participant2" has the following invitations (v1) + | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | + | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname | + And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1) + | id | name | type | remoteServer | remoteToken | + | room | room | 2 | LOCAL | room | + And user "participant3" has the following invitations (v1) + | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | + | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname | + And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1) + | id | name | type | remoteServer | remoteToken | + | room | room | 2 | LOCAL | room | + Then user "participant2" is participant of the following rooms (v4) + | id | type | unreadMessages | unreadMention | unreadMentionDirect | + | room | 2 | 0 | 0 | 0 | + And user "participant1" sends message "Message 1" to room "room" with 201 + And user "participant1" sends message "Message 2" to room "room" with 201 + When user "participant2" marks room "LOCAL::room" as unread with 200 (v1) + Then user "participant2" is participant of the following rooms (v4) + | id | type | unreadMessages | unreadMention | unreadMentionDirect | + | room | 2 | 1 | 0 | 0 | + When user "participant2" reads message "NULL" in room "LOCAL::room" with 200 (v1) + Then user "participant2" is participant of the following rooms (v4) + | id | type | unreadMessages | unreadMention | unreadMentionDirect | + | room | 2 | 0 | 0 | 0 | + When user "participant2" reads message "Message 1" in room "LOCAL::room" with 200 (v1) + Then user "participant2" is participant of the following rooms (v4) + | id | type | unreadMessages | unreadMention | unreadMentionDirect | + | room | 2 | 1 | 0 | 0 | + When user "participant2" reads message "Message 2" in room "LOCAL::room" with 200 (v1) + Then user "participant2" is participant of the following rooms (v4) + | id | type | unreadMessages | unreadMention | unreadMentionDirect | + | room | 2 | 0 | 0 | 0 | + Scenario: Error handling of chatting (posting a too long message) Given the following "spreed" app config is set | federation_enabled | yes | |