diff options
-rw-r--r-- | docs/recording.md | 2 | ||||
-rw-r--r-- | tests/integration/features/bootstrap/FeatureContext.php | 3 | ||||
-rw-r--r-- | tests/integration/features/recording/recording.feature | 31 |
3 files changed, 31 insertions, 5 deletions
diff --git a/docs/recording.md b/docs/recording.md index efbf437a1..e600d3740 100644 --- a/docs/recording.md +++ b/docs/recording.md @@ -19,6 +19,7 @@ + `400 Bad Request` Message: `status`. When the status to start is invalid. + `400 Bad Request` Message: `config`. Need to enable the config `recording`. + `400 Bad Request` Message: `room`. Already have a recording in progress. + + `403 Forbidden` When the user is not a moderator/owner. + `412 Precondition Failed` When the lobby is active and the user is not a moderator. ## Stop call recording @@ -32,4 +33,5 @@ + `200 OK` + `400 Bad Request` Message: `config`. Need to enable the config `recording`. + `400 Bad Request` Message: `room`. Recording has already been stopped. + + `403 Forbidden` When the user is not a moderator/owner. + `412 Precondition Failed` When the lobby is active and the user is not a moderator. diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 2ad015330..def3660de 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -2961,10 +2961,11 @@ class FeatureContext implements Context, SnippetAcceptingContext { } /** - * @When /^user "([^"]*)" starts "(audio|video)" recording in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ + * @When /^user "([^"]*)" starts "(invalid|audio|video)" recording in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ */ public function userStartRecordingInRoom(string $user, string $recordingType, string $identifier, int $statusCode, string $apiVersion = 'v1'): void { $recordingTypes = [ + 'invalid' => -1, 'video' => 1, 'audio' => 2, ]; diff --git a/tests/integration/features/recording/recording.feature b/tests/integration/features/recording/recording.feature index 84588df71..f7f367c47 100644 --- a/tests/integration/features/recording/recording.feature +++ b/tests/integration/features/recording/recording.feature @@ -39,6 +39,29 @@ Feature: recording/recording | room1 | users | participant1 | participant1-displayname | audio_recording_started | | room1 | users | participant1 | participant1-displayname | conversation_created | + Scenario: Get error when start|stop recording and already did this + Given the following "spreed" app config is set + | signaling_dev | yes | + And user "participant1" creates room "room1" (v4) + | roomType | 2 | + | roomName | room1 | + When user "participant1" starts "audio" recording in room "room1" with 200 (v1) + Then user "participant1" starts "audio" recording in room "room1" with 400 (v1) + When user "participant1" stops recording in room "room1" with 200 (v1) + Then user "participant1" stops recording in room "room1" with 400 (v1) + When user "participant1" starts "video" recording in room "room1" with 200 (v1) + Then user "participant1" starts "video" recording in room "room1" with 400 (v1) + When user "participant1" stops recording in room "room1" with 200 (v1) + Then user "participant1" stops recording in room "room1" with 400 (v1) + + Scenario: Get error when try to start recording with invalid status + When the following "spreed" app config is set + | signaling_dev | yes | + And user "participant1" creates room "room1" (v4) + | roomType | 2 | + | roomName | room1 | + Then user "participant1" starts "invalid" recording in room "room1" with 400 (v1) + Scenario: Manager try without success to start recording when signaling is internal When the following "spreed" app config is set | signaling_dev | no | @@ -46,10 +69,10 @@ Feature: recording/recording | roomType | 2 | | roomName | room1 | And user "participant1" adds user "participant2" to room "room1" with 200 (v4) - Then user "participant1" starts "video" recording in room "room1" with 403 (v1) - Then user "participant1" starts "audio" recording in room "room1" with 403 (v1) + Then user "participant1" starts "video" recording in room "room1" with 400 (v1) + And user "participant1" starts "audio" recording in room "room1" with 400 (v1) - Scenario: Get error when non manager try to start recording + Scenario: Get error when non moderator/owner try to start recording When the following "spreed" app config is set | signaling_dev | yes | And user "participant1" creates room "room1" (v4) @@ -57,4 +80,4 @@ Feature: recording/recording | roomName | room1 | And user "participant1" adds user "participant2" to room "room1" with 200 (v4) Then user "participant2" starts "video" recording in room "room1" with 403 (v1) - Then user "participant2" starts "audio" recording in room "room1" with 403 (v1) + And user "participant2" starts "audio" recording in room "room1" with 403 (v1) |