Add basic integration tests for commands

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2019-05-10 09:32:43 +02:00 коммит произвёл Joas Schilling
Родитель 2825271bcc
Коммит da98d161f1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
1 изменённых файлов: 33 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,33 @@
Feature: chat/commands
Background:
Given user "participant1" exists
Given user "participant2" exists
Scenario: user can see own help command and others can not
Given user "participant1" creates room "group room"
| roomType | 2 |
| roomName | room |
And user "participant1" adds "participant2" to room "group room" with 200
When user "participant1" sends message "/help" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | bots | talk | talk-bot | There are currently no commands available. | [] |
And user "participant2" sees the following messages in room "group room" with 200
Scenario: user can see own help command along with regular messages and others can not
Given user "participant1" creates room "group room"
| roomType | 2 |
| roomName | room |
And user "participant1" adds "participant2" to room "group room" with 200
When user "participant1" sends message "Message 1" to room "group room" with 201
And user "participant1" sends message "/help" to room "group room" with 201
And user "participant1" sends message "Message 2" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 2 | [] |
| group room | bots | talk | talk-bot | There are currently no commands available. | [] |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 2 | [] |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |