-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add integration test for summary
Signed-off-by: Joas Schilling <coding@schilljs.com>
- Loading branch information
1 parent
d9f8219
commit 9c60223
Showing
2 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Feature: chat-4/summary | ||
Background: | ||
Given user "participant1" exists | ||
Given user "participant2" exists | ||
|
||
Scenario: sending a message clears unread counter for sender | ||
Given Fake summary task provider is enabled | ||
And the following spreed app config is set | ||
| ai_unread_summary_batch_size | 3 | | ||
And user "participant1" creates room "room" (v4) | ||
| roomType | 2 | | ||
| roomName | room | | ||
And user "participant1" adds user "participant2" to room "room" with 200 (v4) | ||
When user "participant1" sends message "Message 1" to room "room" with 201 | ||
And user "participant1" sends message "Message 2" to room "room" with 201 | ||
And user "participant1" sends message "Message 3" to room "room" with 201 | ||
And user "participant1" sends message "Message 4" to room "room" with 201 | ||
And user "participant2" requests summary for "room" starting from "Message 1" with 201 | ||
| nextOffset | Message 3 | | ||
And repeating run "OC\TaskProcessing\SynchronousBackgroundJob" background jobs | ||
Then user "participant2" receives summary for "room" with 200 | ||
| contains | This is a fake summary | | ||
And user "participant2" requests summary for "room" starting from "Message 3" with 201 |