Skip to content

Commit 98a4270

Browse files
committed
Add an integration test for sub and subname mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent ad3b25b commit 98a4270

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/integration/features/chat/rich-messages.feature

+12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Feature: chat/public
33
Given user "participant1" exists
44
Given user "participant2" exists
55
Given user "participant3" exists
6+
Given user "participant3a" exists
67

78
Scenario: message without enrichable references has empty parameters
89
Given user "participant1" creates room "public room"
@@ -48,3 +49,14 @@ Feature: chat/public
4849
Then user "participant1" sees the following messages in room "public room" with 200
4950
| room | actorType | actorId | actorDisplayName | message | messageParameters |
5051
| public room | users | participant1 | participant1-displayname | Mention to {mention-user1}, @unknownUser, {mention-user1} again and {mention-user2} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} |
52+
53+
Scenario: message with mentions of subname users (uid1 is fully part of uid2)
54+
Given user "participant1" creates room "public room"
55+
| roomType | 3 |
56+
| roomName | room |
57+
When user "participant1" sends message "Mention to @participant3 and @participant3a" to room "public room" with 201
58+
When user "participant1" sends message "Mention to @participant3a and @participant3" to room "public room" with 201
59+
Then user "participant1" sees the following messages in room "public room" with 200
60+
| room | actorType | actorId | actorDisplayName | message | messageParameters |
61+
| public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user2} | {"mention-user1":{"type":"user","id":"participant3a","name":"participant3a-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} |
62+
| public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user2} | {"mention-user1":{"type":"user","id":"participant3","name":"participant3-displayname"},"mention-user2":{"type":"user","id":"participant3a","name":"participant3a-displayname"}} |

0 commit comments

Comments
 (0)