Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-03-03 12:54:25 +01:00
Родитель 5bff56f2ca
Коммит 79d52e6791
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
4 изменённых файлов: 48 добавлений и 50 удалений

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

@ -437,21 +437,19 @@ return [
],
[
'name' => 'Room#setLobby',
'url' => '/api/{apiVersion}/room/{token}/{webinar}/lobby',
'url' => '/api/{apiVersion}/room/{token}/webinar/lobby',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'webinar' => 'webinary?',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#setSIPEnabled',
'url' => '/api/{apiVersion}/room/{token}/{webinar}/sip',
'url' => '/api/{apiVersion}/room/{token}/webinar/sip',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v3',
'webinar' => 'webinary?',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],

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

@ -833,15 +833,15 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
* @When /^user "([^"]*)" sets lobby state for room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/
* @When /^user "([^"]*)" sets lobby state for room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/
*
* @param string $user
* @param string $identifier
* @param string $lobbyStateString
* @param string $statusCode
* @param int $statusCode
* @param string $apiVersion
*/
public function userSetsLobbyStateForRoomTo($user, $identifier, $lobbyStateString, $statusCode, $apiVersion = 'v1') {
public function userSetsLobbyStateForRoomTo(string $user, string $identifier, string $lobbyStateString, int $statusCode, string $apiVersion) {
if ($lobbyStateString === 'no lobby') {
$lobbyState = 0;
} elseif ($lobbyStateString === 'non moderators') {
@ -859,15 +859,15 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
* @When /^user "([^"]*)" sets SIP state for room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/
* @When /^user "([^"]*)" sets SIP state for room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/
*
* @param string $user
* @param string $identifier
* @param string $SIPStateString
* @param string $statusCode
* @param int $statusCode
* @param string $apiVersion
*/
public function userSetsSIPStateForRoomTo($user, $identifier, $SIPStateString, $statusCode, $apiVersion = 'v1') {
public function userSetsSIPStateForRoomTo(string $user, string $identifier, string $SIPStateString, int $statusCode, string $apiVersion) {
if ($SIPStateString === 'disabled') {
$SIPState = 0;
} elseif ($SIPStateString === 'enabled') {

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

@ -13,12 +13,12 @@ Feature: conversation/lobby
And user "participant1" adds "participant2" to room "room" with 200
And user "participant1" promotes "participant2" in room "room" with 200
And user "participant1" adds "participant3" to room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
And user "participant1" sets lobby state for room "room" to "no lobby" with 200
And user "participant2" sets lobby state for room "room" to "non moderators" with 200
And user "participant2" sets lobby state for room "room" to "no lobby" with 200
And user "participant3" sets lobby state for room "room" to "non moderators" with 403
And user "participant3" sets lobby state for room "room" to "no lobby" with 403
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant1" sets lobby state for room "room" to "no lobby" with 200 (v4)
And user "participant2" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant2" sets lobby state for room "room" to "no lobby" with 200 (v4)
And user "participant3" sets lobby state for room "room" to "non moderators" with 403 (v4)
And user "participant3" sets lobby state for room "room" to "no lobby" with 403 (v4)
Scenario: set lobby state in public room
Given user "participant1" creates room "room"
@ -31,27 +31,27 @@ Feature: conversation/lobby
And user "guest" joins room "room" with 200
And user "participant1" promotes "guest" in room "room" with 200
And user "guest2" joins room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
And user "participant1" sets lobby state for room "room" to "no lobby" with 200
And user "participant2" sets lobby state for room "room" to "non moderators" with 200
And user "participant2" sets lobby state for room "room" to "no lobby" with 200
And user "participant3" sets lobby state for room "room" to "non moderators" with 403
And user "participant3" sets lobby state for room "room" to "no lobby" with 403
And user "participant4" sets lobby state for room "room" to "non moderators" with 403
And user "participant4" sets lobby state for room "room" to "no lobby" with 403
And user "guest" sets lobby state for room "room" to "non moderators" with 401
And user "guest" sets lobby state for room "room" to "no lobby" with 401
And user "guest2" sets lobby state for room "room" to "non moderators" with 401
And user "guest2" sets lobby state for room "room" to "no lobby" with 401
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant1" sets lobby state for room "room" to "no lobby" with 200 (v4)
And user "participant2" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant2" sets lobby state for room "room" to "no lobby" with 200 (v4)
And user "participant3" sets lobby state for room "room" to "non moderators" with 403 (v4)
And user "participant3" sets lobby state for room "room" to "no lobby" with 403 (v4)
And user "participant4" sets lobby state for room "room" to "non moderators" with 403 (v4)
And user "participant4" sets lobby state for room "room" to "no lobby" with 403 (v4)
And user "guest" sets lobby state for room "room" to "non moderators" with 401 (v4)
And user "guest" sets lobby state for room "room" to "no lobby" with 401 (v4)
And user "guest2" sets lobby state for room "room" to "non moderators" with 401 (v4)
And user "guest2" sets lobby state for room "room" to "no lobby" with 401 (v4)
Scenario: set lobby state in one-to-one room
Given user "participant1" creates room "room"
| roomType | 1 |
| invite | participant2 |
When user "participant1" sets lobby state for room "room" to "non moderators" with 400
And user "participant1" sets lobby state for room "room" to "no lobby" with 400
And user "participant2" sets lobby state for room "room" to "non moderators" with 400
And user "participant2" sets lobby state for room "room" to "no lobby" with 400
When user "participant1" sets lobby state for room "room" to "non moderators" with 400 (v4)
And user "participant1" sets lobby state for room "room" to "no lobby" with 400 (v4)
And user "participant2" sets lobby state for room "room" to "non moderators" with 400 (v4)
And user "participant2" sets lobby state for room "room" to "no lobby" with 400 (v4)
Scenario: set lobby state in file room
Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100
@ -60,17 +60,17 @@ Feature: conversation/lobby
And user "participant2" gets the room for path "welcome (2).txt" with 200
And user "participant1" joins room "file welcome.txt room" with 200
And user "participant2" joins room "file welcome (2).txt room" with 200
When user "participant1" sets lobby state for room "file welcome.txt room" to "non moderators" with 403
And user "participant1" sets lobby state for room "file welcome.txt room" to "no lobby" with 403
And user "participant2" sets lobby state for room "file welcome (2).txt room" to "non moderators" with 403
And user "participant2" sets lobby state for room "file welcome (2).txt room" to "no lobby" with 403
When user "participant1" sets lobby state for room "file welcome.txt room" to "non moderators" with 403 (v4)
And user "participant1" sets lobby state for room "file welcome.txt room" to "no lobby" with 403 (v4)
And user "participant2" sets lobby state for room "file welcome (2).txt room" to "non moderators" with 403 (v4)
And user "participant2" sets lobby state for room "file welcome (2).txt room" to "no lobby" with 403 (v4)
Scenario: set lobby state of a room not joined to
Given user "participant1" creates room "room"
| roomType | 3 |
| roomName | room |
When user "participant2" sets lobby state for room "room" to "non moderators" with 404
And user "participant2" sets lobby state for room "room" to "no lobby" with 404
When user "participant2" sets lobby state for room "room" to "non moderators" with 404 (v4)
And user "participant2" sets lobby state for room "room" to "no lobby" with 404 (v4)
@ -81,7 +81,7 @@ Feature: conversation/lobby
And user "participant1" adds "participant2" to room "room" with 200
And user "participant1" promotes "participant2" in room "room" with 200
And user "participant1" adds "participant3" to room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant1" joins room "room" with 200
And user "participant2" joins room "room" with 200
And user "participant3" joins room "room" with 200
@ -98,7 +98,7 @@ Feature: conversation/lobby
And user "participant1" adds "participant2" to room "room" with 200
And user "participant1" promotes "participant2" in room "room" with 200
And user "participant1" adds "participant3" to room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant1" joins room "room" with 200
And user "participant2" joins room "room" with 200
And user "participant3" joins room "room" with 200
@ -124,7 +124,7 @@ Feature: conversation/lobby
And user "guest" joins room "room" with 200
And user "participant1" promotes "guest" in room "room" with 200
And user "guest2" joins room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant1" sends message "Message 1" to room "room" with 201
And user "participant2" sends message "Message 2" to room "room" with 201
And user "participant3" sends message "Message 3" to room "room" with 412
@ -164,7 +164,7 @@ Feature: conversation/lobby
And user "guest" joins room "room" with 200
And user "participant1" promotes "guest" in room "room" with 200
And user "guest2" joins room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant1" joins call "room" with 200
And user "participant2" joins call "room" with 200
And user "participant3" joins call "room" with 412
@ -195,7 +195,7 @@ Feature: conversation/lobby
And user "guest" joins room "room" with 200
And user "participant1" promotes "guest" in room "room" with 200
And user "guest2" joins room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant1" leaves room "room" with 200
And user "participant2" leaves room "room" with 200
And user "participant3" leaves room "room" with 200
@ -228,7 +228,7 @@ Feature: conversation/lobby
And user "guest" joins room "room" with 200
And user "participant1" promotes "guest" in room "room" with 200
And user "guest2" joins room "room" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant1" sends message "Message 1" to room "room" with 201
And user "participant1" sets description for room "room" to "the description" with 200
Then user "participant1" is participant of room "room" (v3)

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

@ -17,7 +17,7 @@ Feature: public
And user "participant1" is participant of the following rooms (v3)
| id | type | participantType | sipEnabled | attendeePin |
| room | 3 | 1 | 0 | |
When user "participant1" sets SIP state for room "room" to "enabled" with 200 (v3)
When user "participant1" sets SIP state for room "room" to "enabled" with 200 (v4)
Then user "participant1" is participant of the following rooms (v3)
| id | type | participantType | sipEnabled | attendeePin |
| room | 3 | 1 | 1 | **PIN** |
@ -33,7 +33,7 @@ Feature: public
| 1 | 0 | users | participant1 | **PIN** |
| 3 | 0 | users | participant2 | **PIN** |
| 3 | 0 | users | participant3 | **PIN** |
When user "participant2" sets SIP state for room "room" to "disabled" with 403 (v3)
When user "participant2" sets SIP state for room "room" to "disabled" with 403 (v4)
Then user "participant1" sees the following attendees in room "room" with 200 (v3)
| participantType | inCall | actorType | actorId | attendeePin |
| 4 | 0 | emails | test@example.tld | **PIN** |
@ -41,7 +41,7 @@ Feature: public
| 1 | 0 | users | participant1 | **PIN** |
| 3 | 0 | users | participant2 | **PIN** |
| 3 | 0 | users | participant3 | **PIN** |
When user "participant1" sets SIP state for room "room" to "disabled" with 200 (v3)
When user "participant1" sets SIP state for room "room" to "disabled" with 200 (v4)
Then user "participant1" sees the following attendees in room "room" with 200 (v3)
| participantType | inCall | actorType | actorId | attendeePin |
| 4 | 0 | emails | test@example.tld | |
@ -61,7 +61,7 @@ Feature: public
And user "participant2" is participant of the following rooms (v3)
| id | type | participantType | sipEnabled | attendeePin |
| room | 3 | 1 | 0 | |
When user "participant2" sets SIP state for room "room" to "enabled" with 403 (v3)
When user "participant2" sets SIP state for room "room" to "enabled" with 403 (v4)
And user "participant2" is participant of the following rooms (v3)
| id | type | participantType | sipEnabled | attendeePin |
| room | 3 | 1 | 0 | |