diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-01-26 23:43:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 23:43:01 +0100 |
commit | 34b1cb830f61c7d3551f42224c601ee9e6fde84d (patch) | |
tree | 99954c78702428d0f52120ec699e88a36416eb6a /tests | |
parent | 910145e019ecf589745819c661bd8666e869b54e (diff) | |
parent | 1f877eb892c4e1fe4c16e80ff3262fc07bb86567 (diff) |
Merge pull request #8602 from nextcloud/feature/stop-recording-after-end-call
Stop recording after end call
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/features/bootstrap/FeatureContext.php | 3 | ||||
-rw-r--r-- | tests/integration/features/callapi/recording.feature | 79 |
2 files changed, 82 insertions, 0 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 718c02e06..7e91444b4 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -423,6 +423,9 @@ class FeatureContext implements Context, SnippetAcceptingContext { if (isset($expectedRoom['messageExpiration'])) { $data['messageExpiration'] = (int) $room['messageExpiration']; } + if (isset($expectedRoom['callRecording'])) { + $data['callRecording'] = (int) $room['callRecording']; + } if (isset($expectedRoom['participants'])) { throw new \Exception('participants key needs to be checked via participants endpoint'); } diff --git a/tests/integration/features/callapi/recording.feature b/tests/integration/features/callapi/recording.feature index 5b4919723..abdad9af4 100644 --- a/tests/integration/features/callapi/recording.feature +++ b/tests/integration/features/callapi/recording.feature @@ -17,6 +17,9 @@ Feature: callapi/recording | room1 | users | participant1 | participant1-displayname | recording_started | | room1 | users | participant1 | participant1-displayname | call_started | | room1 | users | participant1 | participant1-displayname | conversation_created | + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 1 | When user "participant1" stops recording in room "room1" with 200 (v1) Then user "participant1" sees the following system messages in room "room1" with 200 (v1) | room | actorType | actorId | actorDisplayName | systemMessage | @@ -24,6 +27,9 @@ Feature: callapi/recording | room1 | users | participant1 | participant1-displayname | recording_started | | room1 | users | participant1 | participant1-displayname | call_started | | room1 | users | participant1 | participant1-displayname | conversation_created | + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Start and stop audio recording When the following "spreed" app config is set @@ -39,6 +45,9 @@ Feature: callapi/recording | room1 | users | participant1 | participant1-displayname | audio_recording_started | | room1 | users | participant1 | participant1-displayname | call_started | | room1 | users | participant1 | participant1-displayname | conversation_created | + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 2 | When user "participant1" stops recording in room "room1" with 200 (v1) Then user "participant1" sees the following system messages in room "room1" with 200 (v1) | room | actorType | actorId | actorDisplayName | systemMessage | @@ -46,6 +55,9 @@ Feature: callapi/recording | room1 | users | participant1 | participant1-displayname | audio_recording_started | | room1 | users | participant1 | participant1-displayname | call_started | | room1 | users | participant1 | participant1-displayname | conversation_created | + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Get error when start|stop recording and already did this Given the following "spreed" app config is set @@ -58,13 +70,25 @@ Feature: callapi/recording When user "participant1" starts "audio" recording in room "room1" with 200 (v1) Then user "participant1" starts "audio" recording in room "room1" with 400 (v1) And the response error matches with "recording" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 2 | When user "participant1" stops recording in room "room1" with 200 (v1) Then user "participant1" stops recording in room "room1" with 200 (v1) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | When user "participant1" starts "video" recording in room "room1" with 200 (v1) Then user "participant1" starts "video" recording in room "room1" with 400 (v1) And the response error matches with "recording" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 1 | When user "participant1" stops recording in room "room1" with 200 (v1) Then user "participant1" stops recording in room "room1" with 200 (v1) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Get error when try to start recording with invalid status When the following "spreed" app config is set @@ -76,6 +100,9 @@ Feature: callapi/recording And user "participant1" joins call "room1" with 200 (v4) Then user "participant1" starts "invalid" recording in room "room1" with 400 (v1) And the response error matches with "status" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Manager try without success to start recording when signaling is internal When the following "spreed" app config is set @@ -87,8 +114,14 @@ Feature: callapi/recording And user "participant1" joins call "room1" with 200 (v4) Then user "participant1" starts "video" recording in room "room1" with 400 (v1) And the response error matches with "config" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | And user "participant1" starts "audio" recording in room "room1" with 400 (v1) And the response error matches with "config" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Get error when non moderator/owner try to start recording Given the following "spreed" app config is set @@ -103,6 +136,9 @@ Feature: callapi/recording And user "participant2" joins call "room1" with 200 (v4) Then user "participant2" starts "video" recording in room "room1" with 403 (v1) And user "participant2" starts "audio" recording in room "room1" with 403 (v1) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Get error when try to start recording and no call started Given the following "spreed" app config is set @@ -112,8 +148,14 @@ Feature: callapi/recording | roomName | room1 | Then user "participant1" starts "video" recording in room "room1" with 400 (v1) And the response error matches with "call" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Then user "participant1" starts "audio" recording in room "room1" with 400 (v1) And the response error matches with "call" + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | Scenario: Store recording Given user "participant1" creates room "room1" (v4) @@ -124,3 +166,40 @@ Feature: callapi/recording And user "participant1" has the following notifications | app | object_type | object_id | subject | | spreed | chat | room1 | Recording for the call in room1 was uploaded. | + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | + + Scenario: Stop recording automatically when end the call + When the following "spreed" app config is set + | signaling_dev | yes | + And user "participant1" creates room "room1" (v4) + | roomType | 2 | + | roomName | room1 | + And user "participant1" joins room "room1" with 200 (v4) + And user "participant1" joins call "room1" with 200 (v4) + And user "participant1" starts "audio" recording in room "room1" with 200 (v1) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 2 | + Then user "participant1" ends call "room1" with 200 (v4) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | + + Scenario: Stop recording automatically when the last participant go out + When the following "spreed" app config is set + | signaling_dev | yes | + And user "participant1" creates room "room1" (v4) + | roomType | 2 | + | roomName | room1 | + And user "participant1" joins room "room1" with 200 (v4) + And user "participant1" joins call "room1" with 200 (v4) + And user "participant1" starts "audio" recording in room "room1" with 200 (v1) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 2 | + Then user "participant1" leaves room "room1" with 200 (v4) + And user "participant1" is participant of the following unordered rooms (v4) + | type | name | callRecording | + | 2 | room1 | 0 | |