Browse Source
Add integration tests for read-only conversations
Add integration tests for read-only conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>pull/1640/head
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
5 changed files with 230 additions and 0 deletions
-
17tests/integration/features/bootstrap/FeatureContext.php
-
28tests/integration/features/callapi/group-read-only.feature
-
69tests/integration/features/callapi/public-read-only.feature
-
47tests/integration/features/chat/group-read-only.feature
-
69tests/integration/features/chat/public-read-only.feature
@ -0,0 +1,28 @@ |
|||
Feature: callapi/group-read-only |
|||
Background: |
|||
Given user "participant1" exists |
|||
And user "participant2" exists |
|||
And user "participant3" exists |
|||
And group "attendees1" exists |
|||
And user "participant2" is member of group "attendees1" |
|||
|
|||
Scenario: User1 invites group attendees1 to a group room and they cant join the call in a locked conversation |
|||
When user "participant1" creates room "room" |
|||
| roomType | 2 | |
|||
| invite | attendees1 | |
|||
Then user "participant1" is participant of room "room" |
|||
And user "participant2" is participant of room "room" |
|||
Then user "participant1" sees 0 peers in call "room" with 200 |
|||
And user "participant2" sees 0 peers in call "room" with 200 |
|||
When user "participant1" locks room "room" with 200 |
|||
And user "participant1" joins room "room" with 200 |
|||
And user "participant1" joins call "room" with 403 |
|||
And user "participant2" joins room "room" with 200 |
|||
And user "participant2" joins call "room" with 403 |
|||
Then user "participant1" sees 0 peers in call "room" with 403 |
|||
And user "participant2" sees 0 peers in call "room" with 403 |
|||
When user "participant1" unlocks room "room" with 200 |
|||
And user "participant1" joins call "room" with 200 |
|||
And user "participant2" joins call "room" with 200 |
|||
Then user "participant1" sees 2 peers in call "room" with 200 |
|||
And user "participant2" sees 2 peers in call "room" with 200 |
|||
@ -0,0 +1,69 @@ |
|||
Feature: callapi/public-read-only |
|||
Background: |
|||
Given user "participant1" exists |
|||
And user "participant2" exists |
|||
And user "participant3" exists |
|||
|
|||
Scenario: User1 invites user2 to a public room and they cant join the call in a locked conversation |
|||
When user "participant1" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant1" adds "participant2" to room "room" with 200 |
|||
Then user "participant1" is participant of room "room" |
|||
And user "participant2" is participant of room "room" |
|||
Then user "participant1" sees 0 peers in call "room" with 200 |
|||
And user "participant2" sees 0 peers in call "room" with 200 |
|||
When user "participant1" locks room "room" with 200 |
|||
And user "participant1" joins room "room" with 200 |
|||
And user "participant1" joins call "room" with 403 |
|||
And user "participant2" joins room "room" with 200 |
|||
And user "participant2" joins call "room" with 403 |
|||
Then user "participant1" sees 0 peers in call "room" with 403 |
|||
And user "participant2" sees 0 peers in call "room" with 403 |
|||
When user "participant1" unlocks room "room" with 200 |
|||
And user "participant1" joins call "room" with 200 |
|||
And user "participant2" joins call "room" with 200 |
|||
Then user "participant1" sees 2 peers in call "room" with 200 |
|||
And user "participant2" sees 2 peers in call "room" with 200 |
|||
|
|||
Scenario: User1 invites user2 to a public room and user3 cant join the call in a locked conversation |
|||
When user "participant1" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant1" adds "participant2" to room "room" with 200 |
|||
Then user "participant1" is participant of room "room" |
|||
Then user "participant3" is not participant of room "room" |
|||
When user "participant1" locks room "room" with 200 |
|||
And user "participant1" joins room "room" with 200 |
|||
And user "participant1" joins call "room" with 403 |
|||
And user "participant3" joins room "room" with 200 |
|||
And user "participant3" joins call "room" with 403 |
|||
Then user "participant1" sees 0 peers in call "room" with 403 |
|||
And user "participant3" sees 0 peers in call "room" with 403 |
|||
When user "participant1" unlocks room "room" with 200 |
|||
And user "participant1" joins call "room" with 200 |
|||
And user "participant3" joins call "room" with 200 |
|||
Then user "participant1" sees 2 peers in call "room" with 200 |
|||
And user "participant3" sees 2 peers in call "room" with 200 |
|||
|
|||
Scenario: User1 invites user2 to a public room and guest cant join the call in a locked conversation |
|||
When user "participant1" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant1" adds "participant2" to room "room" with 200 |
|||
Then user "participant1" is participant of room "room" |
|||
When user "participant1" locks room "room" with 200 |
|||
And user "guest" sees 0 peers in call "room" with 404 |
|||
Then user "participant1" joins room "room" with 200 |
|||
Then user "participant1" joins call "room" with 403 |
|||
Then user "guest" joins room "room" with 200 |
|||
And user "guest" joins call "room" with 403 |
|||
Then user "participant1" sees 0 peers in call "room" with 403 |
|||
And user "guest" sees 0 peers in call "room" with 403 |
|||
When user "participant1" unlocks room "room" with 200 |
|||
And user "participant1" sees 0 peers in call "room" with 200 |
|||
And user "guest" sees 0 peers in call "room" with 200 |
|||
Then user "participant1" joins call "room" with 200 |
|||
And user "guest" joins call "room" with 200 |
|||
Then user "participant1" sees 2 peers in call "room" with 200 |
|||
And user "guest" sees 2 peers in call "room" with 200 |
|||
@ -0,0 +1,47 @@ |
|||
Feature: chat/group-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 "group room" |
|||
| roomType | 2 | |
|||
| invite | attendees1 | |
|||
When user "participant1" sends message "Message 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 | |
|||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | |
|||
When user "participant1" locks room "group room" with 200 |
|||
When user "participant1" sends message "Message 2" to room "group room" with 403 |
|||
Then user "participant1" sees the following messages in room "group room" with 200 |
|||
| room | actorType | actorId | actorDisplayName | message | messageParameters | |
|||
| group room | users | participant1 | participant1-displayname | Message 1 | [] | |
|||
When user "participant1" unlocks room "group room" with 200 |
|||
When user "participant1" sends message "Message 3" to room "group room" with 201 |
|||
Then user "participant1" sees the following messages in room "group room" with 200 |
|||
| room | actorType | actorId | actorDisplayName | message | messageParameters | |
|||
| group room | users | participant1 | participant1-displayname | Message 3 | [] | |
|||
| group 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 "group room" |
|||
| roomType | 2 | |
|||
| invite | attendees1 | |
|||
When user "participant2" sends message "Message 1" to room "group room" with 201 |
|||
Then user "participant2" sees the following messages in room "group room" with 200 |
|||
| room | actorType | actorId | actorDisplayName | message | messageParameters | |
|||
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
|||
When user "participant1" locks room "group room" with 200 |
|||
When user "participant2" sends message "Message 2" to room "group room" with 403 |
|||
Then user "participant2" sees the following messages in room "group room" with 200 |
|||
| room | actorType | actorId | actorDisplayName | message | messageParameters | |
|||
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
|||
When user "participant1" unlocks room "group room" with 200 |
|||
When user "participant2" sends message "Message 3" to room "group room" with 201 |
|||
Then user "participant2" sees the following messages in room "group room" with 200 |
|||
| room | actorType | actorId | actorDisplayName | message | messageParameters | |
|||
| group room | users | participant2 | participant2-displayname | Message 3 | [] | |
|||
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
|||
@ -0,0 +1,69 @@ |
|||
Feature: chat/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" |
|||
| 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 |
|||
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 |
|||
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" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant1" adds "participant2" to room "public room" with 200 |
|||
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 |
|||
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 |
|||
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" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "participant3" joins room "public room" with 200 |
|||
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 |
|||
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 |
|||
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 | [] | |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue