Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions tests/integration/features/chat/notifications.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,32 @@ Feature: chat/notifications
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |

Scenario: Reaction in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "one-to-one room" with 200 (v4)
Given user "participant2" leaves room "one-to-one room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Message 1 | participant1-displayname reacted with 🚀 to your private message |

Scenario: Reaction when recipient disabled notifications in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "one-to-one room" with 200 (v4)
Given user "participant2" leaves room "one-to-one room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |

Scenario: At-all when recipient is online in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
Expand Down Expand Up @@ -264,3 +290,31 @@ Feature: chat/notifications
When user "participant1" deletes message "Message 1" from room "one-to-one room" with 200 (v1)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |

Scenario: Reaction when recipient full enables notifications 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)
# 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)
When user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |

Scenario: Reaction when recipient has default notifications (disabled) 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)
# 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)
When user "participant2" sends message "Message 1" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |