-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): Add integration test for editing
Signed-off-by: Joas Schilling <[email protected]>
- Loading branch information
1 parent
c4687fa
commit db8d8a5
Showing
2 changed files
with
81 additions
and
0 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,52 @@ | ||
Feature: chat-1/edit-message | ||
Background: | ||
Given user "participant1" exists | ||
Given user "participant2" exists | ||
|
||
Scenario: Moderator edits their own message | ||
Given 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" sends message "Message 1" to room "room" with 201 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | | | ||
And user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 201 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | | | ||
Then user "participant2" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | | | ||
And user "participant2" edits message "Message 1 - Edit 1" in room "room" to "Message 1 - Edit 2" with 403 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | | | ||
Then user "participant2" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | | | ||
|
||
Scenario: User and moderator edit user message | ||
Given user "participant1" creates room "room" (v4) | ||
| roomType | 2 | | ||
| roomName | room | | ||
And user "participant1" adds user "participant2" to room "room" with 200 (v4) | ||
And user "participant2" sends message "Message 1" to room "room" with 201 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant2 | participant2-displayname | Message 1 | [] | | | ||
And user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 201 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant2 | participant2-displayname | Message 1 - Edit 1 | [] | | | ||
Then user "participant2" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant2 | participant2-displayname | Message 1 - Edit 1 | [] | | | ||
And user "participant2" edits message "Message 1 - Edit 1" in room "room" to "Message 1 - Edit 2" with 201 | ||
Then user "participant1" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] | | | ||
Then user "participant2" sees the following messages in room "room" with 200 | ||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | | ||
| group room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] | | |