diff --git a/backend/tests/integration/api/recordings/get-media-recording.test.ts b/backend/tests/integration/api/recordings/get-media-recording.test.ts index ffa0568..3d66beb 100644 --- a/backend/tests/integration/api/recordings/get-media-recording.test.ts +++ b/backend/tests/integration/api/recordings/get-media-recording.test.ts @@ -187,7 +187,7 @@ describe('Recording API Tests', () => { expect(response.status).toBe(404); }); - it('should return 400 when recordingId format is invalid', async () => { + it('should return 422 when recordingId format is invalid', async () => { const invalidId = 'invalid-recording-id'; const response = await getRecordingMedia(invalidId); diff --git a/backend/tests/integration/api/recordings/get-recording.test.ts b/backend/tests/integration/api/recordings/get-recording.test.ts index 4ae4b1a..d961820 100644 --- a/backend/tests/integration/api/recordings/get-recording.test.ts +++ b/backend/tests/integration/api/recordings/get-recording.test.ts @@ -64,32 +64,32 @@ describe('Recording API Tests', () => { describe('Get Recording Validation', () => { it('should fail when recordingId has incorrect format', async () => { const response = await getRecording('incorrect-format'); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should fail when recordingId has less than 3 parts', async () => { const response = await getRecording('part1--part2'); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should fail when recordingId first part is empty', async () => { const response = await getRecording('--EG_12345--uid'); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should fail when recordingId second part does not start with EG_', async () => { const response = await getRecording(`${room.roomId}--INVALID--uid`); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should fail when recordingId second part is too short', async () => { const response = await getRecording(`${room.roomId}--EG_--uid`); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should fail when recordingId third part is empty', async () => { const response = await getRecording(`${room.roomId}--EG_12345--`); - expectValidationError(response, 'recordingId', 'does not follow the expected format'); + expectValidationError(response, 'params.recordingId', 'does not follow the expected format'); }); it('should sanitize recordingId before validation', async () => { diff --git a/backend/tests/integration/api/rooms/generate-recording-token.test.ts b/backend/tests/integration/api/rooms/generate-recording-token.test.ts index 2c9a214..d33c05d 100644 --- a/backend/tests/integration/api/rooms/generate-recording-token.test.ts +++ b/backend/tests/integration/api/rooms/generate-recording-token.test.ts @@ -45,13 +45,6 @@ describe('Room API Tests', () => { expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true); }); - it('should generate a recording token with canRetrieve and canDelete permissions when using the moderator secret and recording access is public', async () => { - await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.PUBLIC); - - const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret); - expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.MODERATOR, true, true); - }); - it('should generate a recording token without any permissions when using the publisher secret and recording access is admin-moderator', async () => { await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR); @@ -69,15 +62,8 @@ describe('Room API Tests', () => { expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.PUBLISHER, true, false); }); - it('should generate a recording token with canRetrieve permission but not canDelete when using the publisher secret and recording access is public', async () => { - await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.PUBLIC); - - const response = await generateRecordingToken(roomData.room.roomId, roomData.publisherSecret); - expectValidRecordingTokenResponse(response, roomData.room.roomId, ParticipantRole.PUBLISHER, true, false); - }); - it('should succeed even if the room is deleted', async () => { - await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.PUBLIC); + await updateRecordingAccessPreferencesInRoom(roomData.room.roomId, MeetRecordingAccess.ADMIN_MODERATOR_PUBLISHER); await deleteRoom(roomData.room.roomId); const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret); diff --git a/frontend/webcomponent/tests/e2e/recording-access.test.ts b/frontend/webcomponent/tests/e2e/recording-access.test.ts index b695243..041e835 100644 --- a/frontend/webcomponent/tests/e2e/recording-access.test.ts +++ b/frontend/webcomponent/tests/e2e/recording-access.test.ts @@ -198,45 +198,4 @@ test.describe('Recording Access Tests', () => { await waitForElementInIframe(page, 'ov-error', { state: 'hidden' }); await waitForElementInIframe(page, 'app-room-recordings', { state: 'visible' }); }); - - test('should allow moderators to access recording when access level is set to public', async ({ page }) => { - await updateRoomPreferences( - roomId, - { - chatPreferences: { enabled: true }, - recordingPreferences: { - enabled: true, - allowAccessTo: MeetRecordingAccess.PUBLIC - }, - virtualBackgroundPreferences: { enabled: true } - }, - adminCookie - ); - - await page.goto(testAppUrl); - await prepareForJoiningRoom(page, testAppUrl, testRoomPrefix); - await viewRecordingsAs('moderator', page); - await waitForElementInIframe(page, 'ov-error', { state: 'hidden' }); - await waitForElementInIframe(page, 'app-room-recordings', { state: 'visible' }); - }); - test('should allow publisher to access recording when access level is set to public', async ({ page }) => { - await updateRoomPreferences( - roomId, - { - chatPreferences: { enabled: true }, - recordingPreferences: { - enabled: true, - allowAccessTo: MeetRecordingAccess.PUBLIC - }, - virtualBackgroundPreferences: { enabled: true } - }, - adminCookie - ); - - await page.goto(testAppUrl); - await prepareForJoiningRoom(page, testAppUrl, testRoomPrefix); - await viewRecordingsAs('publisher', page); - await waitForElementInIframe(page, 'ov-error', { state: 'hidden' }); - await waitForElementInIframe(page, 'app-room-recordings', { state: 'visible' }); - }); });