Skip to content

Commit ad893a2

Browse files
Merge pull request #7411 from nextcloud/feature/7189/integration-test-for-reaction-notifications
Add integration tests for reaction notifications
2 parents 54c23c9 + 1e2ee71 commit ad893a2

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

tests/integration/features/chat/notifications.feature

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,32 @@ Feature: chat/notifications
8282
Then user "participant2" has the following notifications
8383
| app | object_type | object_id | subject |
8484

85+
Scenario: Reaction in the one-to-one
86+
When user "participant1" creates room "one-to-one room" (v4)
87+
| roomType | 1 |
88+
| invite | participant2 |
89+
# Join and leave to clear the invite notification
90+
Given user "participant2" joins room "one-to-one room" with 200 (v4)
91+
Given user "participant2" leaves room "one-to-one room" with 200 (v4)
92+
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
93+
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
94+
Then user "participant2" has the following notifications
95+
| app | object_type | object_id | subject |
96+
| spreed | chat | one-to-one room/Message 1 | participant1-displayname reacted with 🚀 to your private message |
97+
98+
Scenario: Reaction when recipient disabled notifications in the one-to-one
99+
When user "participant1" creates room "one-to-one room" (v4)
100+
| roomType | 1 |
101+
| invite | participant2 |
102+
# Join and leave to clear the invite notification
103+
Given user "participant2" joins room "one-to-one room" with 200 (v4)
104+
Given user "participant2" leaves room "one-to-one room" with 200 (v4)
105+
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
106+
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
107+
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
108+
Then user "participant2" has the following notifications
109+
| app | object_type | object_id | subject |
110+
85111
Scenario: At-all when recipient is online in the one-to-one
86112
When user "participant1" creates room "one-to-one room" (v4)
87113
| roomType | 1 |
@@ -264,3 +290,31 @@ Feature: chat/notifications
264290
When user "participant1" deletes message "Message 1" from room "one-to-one room" with 200 (v1)
265291
Then user "participant2" has the following notifications
266292
| app | object_type | object_id | subject |
293+
294+
Scenario: Reaction when recipient full enables notifications in the group room
295+
When user "participant1" creates room "room" (v4)
296+
| roomType | 2 |
297+
| roomName | room |
298+
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
299+
# Join and leave to clear the invite notification
300+
Given user "participant2" joins room "room" with 200 (v4)
301+
Given user "participant2" leaves room "room" with 200 (v4)
302+
When user "participant2" sends message "Message 1" to room "room" with 201
303+
And user "participant2" sets notifications to all for room "room" (v4)
304+
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
305+
Then user "participant2" has the following notifications
306+
| app | object_type | object_id | subject |
307+
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
308+
309+
Scenario: Reaction when recipient has default notifications (disabled) in the group room
310+
When user "participant1" creates room "room" (v4)
311+
| roomType | 2 |
312+
| roomName | room |
313+
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
314+
# Join and leave to clear the invite notification
315+
Given user "participant2" joins room "room" with 200 (v4)
316+
Given user "participant2" leaves room "room" with 200 (v4)
317+
When user "participant2" sends message "Message 1" to room "room" with 201
318+
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
319+
Then user "participant2" has the following notifications
320+
| app | object_type | object_id | subject |

0 commit comments

Comments
 (0)