UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06). Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
This commit is contained in:
@@ -0,0 +1,971 @@
|
||||
Feature: chat-2/poll
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
|
||||
Scenario: Create a public poll without max votes limit
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | not voted |
|
||||
Then user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | not voted |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [1] |
|
||||
| details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":1}] |
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | not voted |
|
||||
| details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":1}] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Participants can update their votes but only while open
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
Then user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [1] |
|
||||
| details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":1}] |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Participants can only vote for valid options
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[-1]" on poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" votes for options "[2]" on poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Participants can not exceed the maxVotes
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | 1 |
|
||||
Then user "participant1" votes for options "[0,1]" on poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Participants can vote for multiple options
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0,1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1,"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0,1] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Participants can not vote for the same option multiple times
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[1,1]" on poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Non-moderators can also create polls and close it themselves
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant2" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
Then user "participant2" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | not voted |
|
||||
| details | {} |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant2 | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Non-moderators can not create polls without chat permission
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
# Removing chat permission only
|
||||
Then user "participant1" sets permissions for "participant2" in room "room" to "CSJLAVP" with 200 (v4)
|
||||
When user "participant2" creates a poll in room "room" with 403
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
|
||||
Scenario: Moderators can close polls of others
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant2" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | not voted |
|
||||
| details | {} |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: There are system messages for opening, voting and closing on public polls
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
Then user "participant2" votes for options "[1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1,"option-1":1} |
|
||||
| numVoters | 2 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1,"option-1":1} |
|
||||
| numVoters | 2 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [0] |
|
||||
| details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":0},{"actorType":"users","actorId":"participant2","actorDisplayName":"participant2-displayname","optionId":1}] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
Then user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
|
||||
Scenario: There are only system messages for opening and closing on hidden polls
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 1 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
Then user "participant2" votes for options "[1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1,"option-1":1} |
|
||||
| numVoters | 2 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [0] |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 400
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant1 | participant1-displayname | poll_closed |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
Then user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
|
||||
Scenario: Non-moderators can not close polls of others
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant2" closes poll "What is the question?" in room "room" with 403
|
||||
|
||||
Scenario: Votes and details are not accessible in hidden result mode
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
Then user "participant2" votes for options "[1]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 1 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | not voted |
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | not voted |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Number of voters and votes are restricted to the very same poll
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
When user "participant2" creates a poll in room "room" with 201
|
||||
| question | Another one ... |
|
||||
| options | ["... bites the dust!","... bites de_dust!"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant2" votes for options "[1]" on poll "Another one ..." in room "room" with 200
|
||||
| id | POLL_ID(Another one ...) |
|
||||
| question | Another one ... |
|
||||
| options | ["... bites the dust!","... bites de_dust!"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant2" sees poll "Another one ..." in room "room" with 200
|
||||
| id | POLL_ID(Another one ...) |
|
||||
| question | Another one ... |
|
||||
| options | ["... bites the dust!","... bites de_dust!"] |
|
||||
| votes | {"option-1":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [1] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(Another one ...),"name":"Another one ..."}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Remove all votes
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
Then user "participant1" votes for options "{}" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [] |
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Empty question and options
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 400
|
||||
| question | Also we need at least 2 non empty options |
|
||||
| options | ["\t"," ","a"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
When user "participant1" creates a poll in room "room" with 400
|
||||
| question | |
|
||||
| options | ["Empty question is not","allowed either"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
|
||||
Scenario: Can not poll in one-to-one
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
When user "participant1" creates a poll in room "room" with 400
|
||||
| question | Can I poll in one-to-one? |
|
||||
| options | ["No","Nope"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
|
||||
Scenario: Deleting a user neutralizes their details
|
||||
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" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
And user "participant2" votes for options "[0]" on poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | open |
|
||||
| votedSelf | [0] |
|
||||
And user "participant2" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [0] |
|
||||
| details | [{"actorType":"users","actorId":"participant2","actorDisplayName":"participant2-displayname","optionId":0}] |
|
||||
When user "participant2" is deleted
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | {"option-0":1} |
|
||||
| numVoters | 1 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | deleted_users |
|
||||
| actorId | deleted_users |
|
||||
| actorDisplayName | |
|
||||
| status | closed |
|
||||
| votedSelf | [] |
|
||||
| details | [{"actorType":"deleted_users","actorId":"deleted_users","actorDisplayName":"","optionId":0}] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | admin | user_removed | {actor} removed {user} | !ISSET | "IGNORE" |
|
||||
| room | deleted_users | deleted_users | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"highlight","id":"deleted_users","name":"Deleted user"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"highlight","id":"deleted_users","name":"Deleted user"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Deleting the poll message removes all details
|
||||
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" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | {object} | "IGNORE" |
|
||||
And user "participant1" deletes message "{object}" from room "room" with 200 (v1)
|
||||
And user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 404
|
||||
And user "participant2" votes for options "[0]" on poll "What is the question?" in room "room" with 404
|
||||
And user "participant1" closes poll "What is the question?" in room "room" with 404
|
||||
And user "participant2" closes poll "What is the question?" in room "room" with 404
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 404
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | Message deleted by you | "IGNORE" |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Deleting a closed poll message removes also the close 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" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | {object} | "IGNORE" |
|
||||
And user "participant2" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [] |
|
||||
| details | [] |
|
||||
And user "participant1" deletes message "{object}" from room "room" with 200 (v1)
|
||||
And user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 404
|
||||
And user "participant2" votes for options "[0]" on poll "What is the question?" in room "room" with 404
|
||||
And user "participant1" closes poll "What is the question?" in room "room" with 404
|
||||
And user "participant2" closes poll "What is the question?" in room "room" with 404
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 404
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | Message deleted by you | "IGNORE" |
|
||||
| room | users | participant2 | participant2-displayname | Message deleted by you | "IGNORE" |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
| room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Deleting the chat history also deletes polls
|
||||
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" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant2 | participant2-displayname | {object} | "IGNORE" |
|
||||
And user "participant1" deletes chat history for room "room" with 200
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 404
|
||||
And user "participant1" sees the following messages in room "room" with 200 (v1)
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | history_cleared | You cleared the history of the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Only author and moderators can close polls
|
||||
Given user "participant3" exists
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant2" creates a poll in room "room" with 201
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
Then user "participant3" closes poll "What is the question?" in room "room" with 404
|
||||
When user "participant1" adds user "participant3" to room "room" with 200 (v4)
|
||||
Then user "participant3" closes poll "What is the question?" in room "room" with 403
|
||||
Then user "participant2" closes poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["Where are you?","How much is the fish?"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant2 |
|
||||
| actorDisplayName | participant2-displayname |
|
||||
| status | closed |
|
||||
| votedSelf | [] |
|
||||
| details | [] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant2 | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant3","name":"participant3-displayname","mention-id":"participant3"}} |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Drafts
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 200
|
||||
| question | What is the question? |
|
||||
| options | ["You","me"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| draft | 1 |
|
||||
When user "participant1" creates a poll in room "room" with 200
|
||||
| question | Shall we draft 2 questions? |
|
||||
| options | ["Yes","No"] |
|
||||
| resultMode | hidden |
|
||||
| maxVotes | 1 |
|
||||
| draft | 1 |
|
||||
When user "participant1" creates a poll in room "room" with 201
|
||||
| question | This is not a draft! |
|
||||
| options | ["Yes!","Ok!"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | 1 |
|
||||
| draft | 0 |
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question? | ["You","me"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
| POLL_ID(Shall we draft 2 questions?) | Shall we draft 2 questions? | ["Yes","No"] | users | participant1 | participant1-displayname | draft | hidden | 1 |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(This is not a draft!),"name":"This is not a draft!"}} |
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question? |
|
||||
| options | ["You","me"] |
|
||||
| votes | [] |
|
||||
| numVoters | 0 |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| actorType | users |
|
||||
| actorId | participant1 |
|
||||
| actorDisplayName | participant1-displayname |
|
||||
| status | draft |
|
||||
| votedSelf | not voted |
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 404
|
||||
Then user "participant2" votes for options "[1]" on poll "What is the question?" in room "room" with 404
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 202
|
||||
Then user "participant1" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant2" sees poll "What is the question?" in room "room" with 404
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
Then user "participant2" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
|
||||
Scenario: Update a Draft Poll
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 200
|
||||
| question | What is the question? |
|
||||
| options | ["You","me"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| draft | 1 |
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question? | ["You","me"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
Then user "participant1" updates a draft poll in room "room" with 200
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question again? |
|
||||
| options | ["You","her"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question again? | ["You","her"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
|
||||
Scenario: Update a Draft Poll fails
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
When user "participant1" creates a poll in room "room" with 200
|
||||
| question | What is the question? |
|
||||
| options | ["You","me"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| draft | 1 |
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question? | ["You","me"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
Then user "participant1" updates a draft poll in room "room" with 400
|
||||
| id | POLL_ID(What is the question?) |
|
||||
| question | What is the question again? |
|
||||
| options | [""] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question? | ["You","me"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
|
||||
Scenario: Only moderators can delete drafts
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" creates a poll in room "room" with 200
|
||||
| question | What is the question? |
|
||||
| options | ["You","me"] |
|
||||
| resultMode | public |
|
||||
| maxVotes | unlimited |
|
||||
| draft | 1 |
|
||||
Then user "participant2" closes poll "What is the question?" in room "room" with 404
|
||||
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
|
||||
Then user "participant2" closes poll "What is the question?" in room "room" with 404
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
| id | question | options | actorType | actorId | actorDisplayName | status | resultMode | maxVotes |
|
||||
| POLL_ID(What is the question?) | What is the question? | ["You","me"] | users | participant1 | participant1-displayname | draft | public | 0 |
|
||||
Then user "participant1" closes poll "What is the question?" in room "room" with 202
|
||||
When user "participant1" gets poll drafts for room "room" with 200
|
||||
Then user "participant1" sees the following system messages in room "room" with 200 (v1)
|
||||
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
|
||||
| room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
|
||||
| room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
|
||||
@@ -0,0 +1,69 @@
|
||||
Feature: chat-2/public-read-only
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
Given user "participant3" exists
|
||||
And group "attendees1" exists
|
||||
And user "participant2" is member of group "attendees1"
|
||||
|
||||
Scenario: owner can send and receive chat messages to and from group room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
When user "participant1" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant1" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
When user "participant1" locks room "public room" with 200 (v4)
|
||||
When user "participant1" sends message "Message 2" to room "public room" with 403
|
||||
Then user "participant1" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
When user "participant1" unlocks room "public room" with 200 (v4)
|
||||
When user "participant1" sends message "Message 3" to room "public room" with 201
|
||||
Then user "participant1" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant1 | participant1-displayname | Message 3 | [] |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
|
||||
Scenario: invited user can send and receive chat messages to and from group room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
|
||||
When user "participant2" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant2 | participant2-displayname | Message 1 | [] |
|
||||
When user "participant1" locks room "public room" with 200 (v4)
|
||||
When user "participant2" sends message "Message 2" to room "public room" with 403
|
||||
Then user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant2 | participant2-displayname | Message 1 | [] |
|
||||
When user "participant1" unlocks room "public room" with 200 (v4)
|
||||
When user "participant2" sends message "Message 3" to room "public room" with 201
|
||||
Then user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant2 | participant2-displayname | Message 3 | [] |
|
||||
| public room | users | participant2 | participant2-displayname | Message 1 | [] |
|
||||
|
||||
Scenario: not invited but joined user can send and receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant3" joins room "public room" with 200 (v4)
|
||||
When user "participant3" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant3" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant3 | participant3-displayname | Message 1 | [] |
|
||||
When user "participant1" locks room "public room" with 200 (v4)
|
||||
When user "participant3" sends message "Message 2" to room "public room" with 403
|
||||
Then user "participant3" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant3 | participant3-displayname | Message 1 | [] |
|
||||
When user "participant1" unlocks room "public room" with 200 (v4)
|
||||
When user "participant3" sends message "Message 3" to room "public room" with 201
|
||||
Then user "participant3" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant3 | participant3-displayname | Message 3 | [] |
|
||||
| public room | users | participant3 | participant3-displayname | Message 1 | [] |
|
||||
@@ -0,0 +1,119 @@
|
||||
Feature: chat-2/public
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
Given user "participant3" exists
|
||||
|
||||
Scenario: owner can send and receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
When user "participant1" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant1" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
|
||||
Scenario: invited user can send and receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
|
||||
When user "participant2" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant2 | participant2-displayname | Message 1 | [] |
|
||||
|
||||
Scenario: invited user can not send without chat permissions
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
|
||||
# Removing chat permission only
|
||||
Then user "participant1" sets permissions for "participant2" in room "public room" to "CSJLAVP" with 200 (v4)
|
||||
When user "participant2" sends message "Message 1" to room "public room" with 403
|
||||
When user "participant1" sends message "Message 2" to room "public room" with 201
|
||||
Then user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant1 | participant1-displayname | Message 2 | [] |
|
||||
|
||||
Scenario: not invited but joined user can send and receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant3" joins room "public room" with 200 (v4)
|
||||
When user "participant3" sends message "Message 1" to room "public room" with 201
|
||||
Then user "participant3" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | users | participant3 | participant3-displayname | Message 1 | [] |
|
||||
|
||||
Scenario: not invited user can not send nor receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
When user "participant3" sends message "Message 1" to room "public room" with 404
|
||||
And user "participant1" sends message "Message 2" to room "public room" with 201
|
||||
Then user "participant3" sees the following messages in room "public room" with 404
|
||||
|
||||
Scenario: joined guest can send and receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "guest" joins room "public room" with 200 (v4)
|
||||
When user "guest" sends message "Message 1" to room "public room" with 201
|
||||
Then user "guest" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | guests | guest | | Message 1 | [] |
|
||||
|
||||
Scenario: not joined guest can not send nor receive chat messages to and from public room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
When user "guest" sends message "Message 1" to room "public room" with 404
|
||||
And user "participant1" sends message "Message 2" to room "public room" with 201
|
||||
Then user "guest" sees the following messages in room "public room" with 404
|
||||
|
||||
Scenario: everyone in a public room can receive messages from everyone in that room
|
||||
Given user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
|
||||
And user "guest" joins room "public room" with 200 (v4)
|
||||
When user "participant1" sends message "Message 1" to room "public room" with 201
|
||||
And user "participant2" sends message "Message 2" to room "public room" with 201
|
||||
And user "guest" sends message "Message 3" to room "public room" with 201
|
||||
Then user "participant1" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | guests | guest | | Message 3 | [] |
|
||||
| public room | users | participant2 | participant2-displayname | Message 2 | [] |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
And user "participant2" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | guests | guest | | Message 3 | [] |
|
||||
| public room | users | participant2 | participant2-displayname | Message 2 | [] |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
And user "guest" sees the following messages in room "public room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| public room | guests | guest | | Message 3 | [] |
|
||||
| public room | users | participant2 | participant2-displayname | Message 2 | [] |
|
||||
| public room | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
|
||||
|
||||
Scenario: Create room with big name and rename
|
||||
# 260 chars
|
||||
When user "participant1" creates room "public room" with 400 (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | A name with 260 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 |
|
||||
# 255 chars
|
||||
And user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | A name with 255 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123 |
|
||||
# 260 chars
|
||||
And user "participant1" renames room "public room" to "A name with 260 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678" with 400 (v4)
|
||||
# 255 chars
|
||||
And user "participant1" renames room "public room" to "Another name with 255 chars 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567" with 200 (v4)
|
||||
|
||||
Scenario: Create public room with a password
|
||||
When user "participant1" creates room "public room" with 201 (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | A room name |
|
||||
| password | ARoomPassword123. |
|
||||
@@ -0,0 +1,205 @@
|
||||
Feature: chat-2/reaction
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
|
||||
Scenario: React to message with success
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant2 | participant2-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | reactions | reactionsSelf |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | {"👍":1} | |
|
||||
And user "participant1" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
|
||||
Then user "guest" joins room "room" with 200 (v4)
|
||||
And user "guest" react with "👤" on 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 | reactions | reactionsSelf |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | {"👍":2,"👤":1,"🚀":1} | ["👍","🚀"] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | guests | guest | | reaction |
|
||||
| room | users | participant1 | participant1-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | reaction |
|
||||
| room | users | participant2 | participant2-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
|
||||
Scenario: React to message fails without chat permission
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant2 | participant2-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
# Removing chat permission only
|
||||
Then user "participant1" sets permissions for "participant2" in room "room" to "CSJLAVP" with 200 (v4)
|
||||
When user "participant2" delete react with "👍" on message "Message 1" to room "room" with 403
|
||||
And user "participant2" react with "💙" on message "Message 1" to room "room" with 403
|
||||
And user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant2 | participant2-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
|
||||
Scenario: React two times to same message with the same reaction
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant2" react with "👍" on message "Message 1" to room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | reactions |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | {"👍":1} |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant2 | participant2-displayname | reaction |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
|
||||
Scenario: React to message does not fail when the author left the conversation
|
||||
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 "participant2" sends message "Message 1" to room "room" with 201
|
||||
And user "participant2" removes themselves from room "room" with 200 (v4)
|
||||
And user "participant1" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | users | participant1 | participant1-displayname | reaction |
|
||||
| room | users | participant2 | participant2-displayname | user_removed |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
|
||||
Scenario: Delete reaction to message with success
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
Then user "guest" joins room "room" with 200 (v4)
|
||||
And user "guest" react with "👤" on 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 | reactions |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | {"👍":1,"👤":1} |
|
||||
And user "participant2" delete react with "👍" on message "Message 1" to room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| guests | guest | | 👤 |
|
||||
And user "guest" delete react with "👤" on message "Message 1" to room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | reactions |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | [] |
|
||||
Then user "participant1" sees the following system messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | systemMessage |
|
||||
| room | guests | guest | | reaction_revoked |
|
||||
| room | users | participant2 | participant2-displayname | reaction_revoked |
|
||||
| room | guests | guest | | reaction_deleted |
|
||||
| room | users | participant2 | participant2-displayname | reaction_deleted |
|
||||
| room | users | participant1 | participant1-displayname | user_added |
|
||||
| room | users | participant1 | participant1-displayname | conversation_created |
|
||||
|
||||
Scenario: Retrieve reactions of a message
|
||||
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
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
And user "participant1" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
And user "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant2" react with "👎" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
| users | participant2 | participant2-displayname | 👎 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant1" retrieve reactions "👎" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👎 |
|
||||
And user "participant1" retrieve reactions "all" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant1 | participant1-displayname | 👍 |
|
||||
| users | participant2 | participant2-displayname | 👎 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
|
||||
Scenario: Delete message that was reacted to
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | reactions |
|
||||
| room | users | participant1 | participant1-displayname | Message 1 | [] | {"👍":1} |
|
||||
Then user "participant1" deletes message "Message 1" from room "room" with 200 (v1)
|
||||
And user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | reactions |
|
||||
| room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | [] |
|
||||
|
||||
Scenario: Deleting a user neutralizes their details
|
||||
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 "participant2" react with "👍" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
And user "participant2" react with "👎" on message "Message 1" to room "room" with 201
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| users | participant2 | participant2-displayname | 👎 |
|
||||
| users | participant2 | participant2-displayname | 👍 |
|
||||
When user "participant2" is deleted
|
||||
And user "participant1" retrieve reactions "👎" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| deleted_users | deleted_users | | 👎 |
|
||||
And user "participant1" retrieve reactions "all" of message "Message 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| deleted_users | deleted_users | | 👎 |
|
||||
| deleted_users | deleted_users | | 👍 |
|
||||
@@ -0,0 +1,150 @@
|
||||
Feature: chat-2/read-status
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
Given user "participant3" exists
|
||||
|
||||
Scenario: User toggles the read privacy
|
||||
Given user "participant1" creates room "chatting" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
|
||||
# Check type safety
|
||||
When user "participant1" sets setting "read_status_privacy" to "1" with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant1" sets setting "read_status_privacy" to "0abcdef" with 400 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant1" sets setting "read_status_privacy" to "0" with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
When user "participant1" sets setting "read_status_privacy" to 1 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant1" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
|
||||
# Private
|
||||
When user "participant1" sets setting "read_status_privacy" to 1 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant1" sends message "Message 1" to room "chatting" with 201
|
||||
Then last response has no last common read message header
|
||||
|
||||
# Public
|
||||
When user "participant1" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
When user "participant1" reads message "Message 1" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
|
||||
# Private again
|
||||
When user "participant1" sets setting "read_status_privacy" to 1 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant1" reads message "Message 1" in room "chatting" with 200
|
||||
Then last response has no last common read message header
|
||||
|
||||
|
||||
Scenario: Read status is the minimum of all public users
|
||||
Given user "participant1" creates room "chatting" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "chatting" with 200 (v4)
|
||||
|
||||
When user "participant1" sets setting "read_status_privacy" to 1 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
When user "participant2" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant2" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
|
||||
When user "participant1" sends message "Message 1" to room "chatting" with 201
|
||||
Then last response has no last common read message header
|
||||
When user "participant2" sends message "Message 2" to room "chatting" with 201
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
|
||||
When user "participant1" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
|
||||
When user "participant2" sends message "Message 3" to room "chatting" with 201
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
When user "participant1" reads message "Message 3" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 3"
|
||||
When user "participant2" reads message "Message 3" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 3"
|
||||
|
||||
When next message request has the following parameters set
|
||||
| lastCommonReadId | Message 1 |
|
||||
| lastKnownMessageId | Message 1 |
|
||||
| timeout | 0 |
|
||||
| lookIntoFuture | 1 |
|
||||
Then user "participant1" sees the following messages in room "chatting" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| chatting | users | participant2 | participant2-displayname | Message 2 | [] |
|
||||
| chatting | users | participant2 | participant2-displayname | Message 3 | [] |
|
||||
Then last response has last common read message header set to "Message 3"
|
||||
When next message request has the following parameters set
|
||||
| lastCommonReadId | Message 1 |
|
||||
| lastKnownMessageId | Message 3 |
|
||||
| timeout | 0 |
|
||||
| lookIntoFuture | 1 |
|
||||
Then user "participant1" sees the following messages in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 3"
|
||||
When next message request has the following parameters set
|
||||
| lastCommonReadId | Message 3 |
|
||||
| lastKnownMessageId | Message 3 |
|
||||
| timeout | 0 |
|
||||
| lookIntoFuture | 1 |
|
||||
Then user "participant1" sees the following messages in room "chatting" with 304
|
||||
|
||||
|
||||
Scenario: User switching to private is not considered anymore
|
||||
Given user "participant1" creates room "chatting" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "chatting" with 200 (v4)
|
||||
|
||||
When user "participant1" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
When user "participant2" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant2" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
|
||||
When user "participant1" sends message "Message 1" to room "chatting" with 201
|
||||
Then last response has last common read message header less than "Message 1"
|
||||
When user "participant2" reads message "Message 1" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
|
||||
When user "participant2" sends message "Message 2" to room "chatting" with 201
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
When user "participant2" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
|
||||
When user "participant1" sets setting "read_status_privacy" to 1 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 1
|
||||
|
||||
When user "participant2" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
|
||||
|
||||
Scenario: New users added start with the last message of when they are added
|
||||
Given user "participant1" creates room "chatting" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "chatting" with 200 (v4)
|
||||
|
||||
When user "participant1" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
When user "participant2" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant2" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
When user "participant3" sets setting "read_status_privacy" to 0 with 200 (v1)
|
||||
Then user "participant3" has capability "spreed=>config=>chat=>read-privacy" set to 0
|
||||
|
||||
When user "participant1" sends message "Message 1" to room "chatting" with 201
|
||||
Then last response has last common read message header less than "Message 1"
|
||||
When user "participant2" sends message "Message 2" to room "chatting" with 201
|
||||
Then last response has last common read message header set to "Message 1"
|
||||
When user "participant1" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
|
||||
And user "participant1" adds user "participant3" to room "chatting" with 200 (v4)
|
||||
|
||||
When user "participant1" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
When user "participant2" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
When user "participant3" reads message "Message 2" in room "chatting" with 200
|
||||
Then last response has last common read message header set to "Message 2"
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
Feature: chat-2/reference-id
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
|
||||
Scenario: user can send a message with a reference id and see it afterwards
|
||||
Given user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" sends message "Message 1" with reference id "ref 1" to room "group room" with 201
|
||||
When user "participant1" sends message "Message 2" with reference id "ref 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 | referenceId |
|
||||
| group room | users | participant1 | participant1-displayname | Message 2 | [] | ref 2 |
|
||||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | ref 1 |
|
||||
|
||||
Scenario: user can send a message with the same reference id
|
||||
Given user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" sends message "Message 1" with reference id "ref 1" to room "group room" with 201
|
||||
When user "participant1" sends message "Message 2" with reference id "ref 1" 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 | referenceId |
|
||||
| group room | users | participant1 | participant1-displayname | Message 2 | [] | ref 1 |
|
||||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | ref 1 |
|
||||
|
||||
Scenario: too long references dont break the api
|
||||
Given user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When user "participant1" sends message "Message 1" with reference id "f0a1611b73992b57a8533c7f618bbd145b17ef62238ece5bda548f47c76c02b2" to room "group room" with 201
|
||||
When user "participant1" sends message "Message 2" with reference id "too long ref is cut off f0a1611b73992b57a8533c7f618bbd145b17ef62238ece5bda548f47c76c02b2" 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 | referenceId |
|
||||
| group room | users | participant1 | participant1-displayname | Message 2 | [] | too long ref is cut off f0a1611b73992b57a8533c7f618bbd145b17ef62 |
|
||||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | f0a1611b73992b57a8533c7f618bbd145b17ef62238ece5bda548f47c76c02b2 |
|
||||
@@ -0,0 +1,183 @@
|
||||
Feature: chat-2/reminder
|
||||
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
|
||||
Scenario: Reminder in one-to-one chat (and sender is deleted)
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
Given user "participant2" creates room "room" with 200 (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant1 |
|
||||
And user "participant2" joins room "room" with 200 (v4)
|
||||
And user "participant1" sends message "Message 1" to room "room" with 201
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant2" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: You in private conversation participant2-displayname |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: participant1-displayname in private conversation |
|
||||
When user "participant1" is deleted
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: A deleted user in private conversation participant1-displayname |
|
||||
And user "participant2" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Reminder in one-to-one chat recipient is deleted
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
Given user "participant2" creates room "room" with 200 (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant1 |
|
||||
And user "participant2" joins room "room" with 200 (v4)
|
||||
And user "participant1" sends message "Message 1" to room "room" with 201
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant2" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: You in private conversation participant2-displayname |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: participant1-displayname in private conversation |
|
||||
When user "participant2" is deleted
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: You in private conversation participant2-displayname |
|
||||
And user "participant1" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Reminder on user message
|
||||
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 "participant2" joins room "room" with 200 (v4)
|
||||
And user "participant1" sends message "Message 1" to room "room" with 201
|
||||
# Participant1 is in 2037 so not triggering for now
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 2133349024 with 201 (v1)
|
||||
And user "participant2" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: participant1-displayname in conversation room |
|
||||
# Participant1 sets timestamp to past so it should trigger now
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: You in conversation room |
|
||||
When user "participant1" is deleted
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: A deleted user in conversation room |
|
||||
And user "participant2" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Deleting reminder before the job is executed never triggers a notification
|
||||
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 "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant1" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Reminder on anonymous guest message
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "guest" joins room "room" with 200 (v4)
|
||||
And user "guest" sends message "Message 1" to room "room" with 201
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant2" sets reminder for message "Message 1" in room "room" for time 1234567 with 404 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: A guest in conversation room |
|
||||
And user "participant2" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And user "participant1" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Reminder on named guest message
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
And user "guest" joins room "room" with 200 (v4)
|
||||
And guest "guest" sets name to "FooBar" in room "room" with 200
|
||||
And user "guest" sends message "Message 1" to room "room" with 201
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room" for time 1234567 with 201 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | reminder | room/Message 1 | Reminder: FooBar (guest) in conversation room |
|
||||
And user "participant1" deletes reminder for message "Message 1" in room "room" with 200 (v1)
|
||||
And user "participant1" has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
|
||||
Scenario: Upcoming reminders
|
||||
Given user "participant1" creates room "room1" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room1 |
|
||||
Given user "participant2" creates room "room2" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room2 |
|
||||
And user "participant2" adds user "participant1" to room "room2" with 200 (v4)
|
||||
Given user "participant1" creates room "room3" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
And user "participant1" sends message "Message 1" to room "room1" with 201
|
||||
And user "participant2" sends message "Message 2" to room "room2" with 201
|
||||
And user "participant1" sends message "Message 3" to room "room3" with 201
|
||||
When user "participant1" sets reminder for message "Message 1" in room "room1" for time 1234567 with 201 (v1)
|
||||
And user "participant1" sets reminder for message "Message 2" in room "room2" for time 1234568 with 201 (v1)
|
||||
And user "participant1" sets reminder for message "Message 3" in room "room3" for time 1234569 with 201 (v1)
|
||||
Then user "participant1" gets upcoming reminders (v1)
|
||||
| reminderTimestamp | roomToken | messageId | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| 1234567 | room1 | Message 1 | users | participant1 | participant1-displayname | Message 1 | [] |
|
||||
| 1234568 | room2 | Message 2 | users | participant2 | participant2-displayname | Message 2 | [] |
|
||||
| 1234569 | room3 | Message 3 | users | participant1 | participant1-displayname | Message 3 | [] |
|
||||
And user "participant2" removes "participant1" from room "room2" with 200 (v4)
|
||||
And user "participant1" marks room "room1" as sensitive with 200 (v4)
|
||||
Then user "participant1" gets upcoming reminders (v1)
|
||||
| reminderTimestamp | roomToken | messageId | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| 1234567 | room1 | Message 1 | users | participant1 | participant1-displayname | | [] |
|
||||
| 1234569 | room3 | Message 3 | users | participant1 | participant1-displayname | Message 3 | [] |
|
||||
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
|
||||
Then user "participant1" gets upcoming reminders (v1)
|
||||
Reference in New Issue
Block a user