diff options
author | Joas Schilling <coding@schilljs.com> | 2023-03-14 09:33:26 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-03-14 18:11:05 +0100 |
commit | 2c201f9e43e826185ac1ab84b4f1a922261196f0 (patch) | |
tree | 6ac8bb7af7bf79fe6ffdcd87d70c2acef2f868e7 /tests | |
parent | bb46e9325bf9c13fa7336f68ff28ef48d357096a (diff) |
fix(mentions): Only allow to mention groups which are members of the conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/features/chat/notifications.feature | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/integration/features/chat/notifications.feature b/tests/integration/features/chat/notifications.feature index 1e6d0da72..527f6201d 100644 --- a/tests/integration/features/chat/notifications.feature +++ b/tests/integration/features/chat/notifications.feature @@ -283,17 +283,29 @@ Feature: chat/notifications | roomType | 2 | | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds group "attendees1" to room "room" with 200 (v4) Given user "participant2" joins room "room" with 200 (v4) When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201 Then user "participant2" has the following notifications | app | object_type | object_id | subject | | spreed | chat | room/Hi @"group/attendees1" bye | participant1-displayname mentioned group attendees1 in conversation room | + Scenario: Group-mention when group is not a member of the room + When user "participant1" creates room "room" (v4) + | roomType | 2 | + | roomName | room | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Given user "participant2" joins room "room" with 200 (v4) + When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201 + Then user "participant2" has the following notifications + | app | object_type | object_id | subject | + Scenario: Group-mention when recipient is offline in the group room When user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds group "attendees1" to room "room" with 200 (v4) # Join and leave to clear the invite notification Given user "participant2" joins room "room" with 200 (v4) Given user "participant2" leaves room "room" with 200 (v4) @@ -307,6 +319,7 @@ Feature: chat/notifications | roomType | 2 | | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds group "attendees1" to room "room" with 200 (v4) # Join and leave to clear the invite notification Given user "participant2" joins room "room" with 200 (v4) Given user "participant2" leaves room "room" with 200 (v4) @@ -319,6 +332,7 @@ Feature: chat/notifications | roomType | 2 | | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds group "attendees1" to room "room" with 200 (v4) # Join and leave to clear the invite notification Given user "participant2" joins room "room" with 200 (v4) Given user "participant2" leaves room "room" with 200 (v4) @@ -332,6 +346,7 @@ Feature: chat/notifications | roomType | 2 | | roomName | room | And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds group "attendees1" to room "room" with 200 (v4) # Join and leave to clear the invite notification Given user "participant2" joins room "room" with 200 (v4) Given user "participant2" leaves room "room" with 200 (v4) |