Browse Source
Add integration test for search
Add integration test for search
Signed-off-by: Joas Schilling <coding@schilljs.com>pull/8057/head
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC
2 changed files with 82 additions and 0 deletions
-
51tests/integration/features/bootstrap/FeatureContext.php
-
31tests/integration/features/chat/search.feature
@ -0,0 +1,31 @@ |
|||
|
|||
Feature: chat/search |
|||
Background: |
|||
Given user "participant1" exists |
|||
Given user "participant2" exists |
|||
|
|||
Scenario: Can not search when not a participant |
|||
Given user "participant1" creates room "room" (v4) |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant1" sends message "Message 1" to room "room" with 201 |
|||
When user "participant2" searches for "essa" in room "room" with 200 |
|||
|
|||
Scenario: Search for message when being a participant |
|||
Given user "participant1" creates room "room" (v4) |
|||
| roomType | 3 | |
|||
| 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 |
|||
When user "participant2" searches for "essa" in room "room" with 200 |
|||
| title | subline | attributes.conversation | attributes.messageId | |
|||
| participant1-displayname | Message 1 | room | Message 1 | |
|||
|
|||
Scenario: Can not search when being blocked by the lobby |
|||
Given user "participant1" creates room "room" (v4) |
|||
| roomType | 3 | |
|||
| 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 |
|||
And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) |
|||
When user "participant2" searches for "essa" in room "room" with 200 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue