Browse Source
Added integration tests for joining listable rooms
Added integration tests for joining listable rooms
Added guest app to CI for callapi tests. Added test scenarios for joining listable rooms. Signed-off-by: Vincent Petry <vincent@nextcloud.com>pull/4706/head
No known key found for this signature in database
GPG Key ID: E055D6A4D513575C
4 changed files with 129 additions and 8 deletions
-
2.drone.yml
-
2lib/Service/ParticipantService.php
-
36tests/integration/features/bootstrap/FeatureContext.php
-
97tests/integration/features/callapi/joining-listable-rooms.feature
@ -0,0 +1,97 @@ |
|||
Feature: callapi/listable-rooms |
|||
Background: |
|||
Given user "creator" exists |
|||
And user "regular-user" exists |
|||
And user "user-guest" exists |
|||
And user "user-guest" is member of group "guest_app" |
|||
# implicit: And user "guest" is a guest user with no account |
|||
|
|||
# ----------------------------------------------------------------------------- |
|||
# Non-listed rooms |
|||
# ----------------------------------------------------------------------------- |
|||
Scenario: Nobody can join a non-listed group room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 2 | |
|||
| roomName | room | |
|||
When user "creator" allows listing room "room" for "none" with 200 |
|||
Then user "regular-user" joins room "room" with 404 |
|||
And user "user-guest" joins room "room" with 404 |
|||
And user "guest" joins room "room" with 404 |
|||
|
|||
Scenario: Anyone can join a non-listed public room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "creator" allows listing room "room" for "none" with 200 |
|||
When user "regular-user" joins room "room" with 200 |
|||
And user "user-guest" joins room "room" with 200 |
|||
And user "guest" joins room "room" with 200 |
|||
Then user "creator" sees the following attendees in room "room" with 200 (v3) |
|||
| actorId | participantType | actorType | |
|||
| creator | OWNER | users | |
|||
| regular-user | USER_SELF_JOINED | users | |
|||
| user-guest | USER_SELF_JOINED | users | |
|||
| "guest" | GUEST | guests | |
|||
|
|||
# ----------------------------------------------------------------------------- |
|||
# User-listed rooms |
|||
# ----------------------------------------------------------------------------- |
|||
Scenario: Only regular users can join a user-listed group room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 2 | |
|||
| roomName | room | |
|||
And user "creator" allows listing room "room" for "users" with 200 |
|||
When user "regular-user" joins room "room" with 200 |
|||
And user "user-guest" joins room "room" with 404 |
|||
And user "guest" joins room "room" with 404 |
|||
Then user "creator" sees the following attendees in room "room" with 200 (v3) |
|||
| actorId | participantType | actorType | |
|||
| creator | OWNER | users | |
|||
| regular-user | USER | users | |
|||
|
|||
Scenario: Anyone can join a user-listed public room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "creator" allows listing room "room" for "users" with 200 |
|||
When user "regular-user" joins room "room" with 200 |
|||
And user "user-guest" joins room "room" with 200 |
|||
And user "guest" joins room "room" with 200 |
|||
Then user "creator" sees the following attendees in room "room" with 200 (v3) |
|||
| actorId | participantType | actorType | |
|||
| creator | OWNER | users | |
|||
| regular-user | USER | users | |
|||
| user-guest | USER_SELF_JOINED | users | |
|||
| "guest" | GUEST | guests | |
|||
|
|||
# ----------------------------------------------------------------------------- |
|||
# All-listed rooms |
|||
# ----------------------------------------------------------------------------- |
|||
Scenario: Only users with accounts can join an all-listed group room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 2 | |
|||
| roomName | room | |
|||
And user "creator" allows listing room "room" for "all" with 200 |
|||
When user "regular-user" joins room "room" with 200 |
|||
And user "user-guest" joins room "room" with 200 |
|||
And user "guest" joins room "room" with 404 |
|||
Then user "creator" sees the following attendees in room "room" with 200 (v3) |
|||
| actorId | participantType | actorType | |
|||
| creator | OWNER | users | |
|||
| regular-user | USER | users | |
|||
| user-guest | USER_SELF_JOINED | users | |
|||
|
|||
Scenario: Anyone can join an all-listed public room |
|||
Given user "creator" creates room "room" |
|||
| roomType | 3 | |
|||
| roomName | room | |
|||
And user "creator" allows listing room "room" for "all" with 200 |
|||
When user "regular-user" joins room "room" with 200 |
|||
And user "user-guest" joins room "room" with 200 |
|||
And user "guest" joins room "room" with 200 |
|||
Then user "creator" sees the following attendees in room "room" with 200 (v3) |
|||
| actorId | participantType | actorType | |
|||
| creator | OWNER | users | |
|||
| regular-user | USER | users | |
|||
| user-guest | USER | users | |
|||
| "guest" | GUEST | guests | |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue