test: enhance recording tests by validating room metadata deletion and response status

This commit is contained in:
Carlos Santos 2025-05-30 17:28:23 +02:00
parent 9177173221
commit ef45f4869c
3 changed files with 8 additions and 3 deletions

View File

@ -46,7 +46,6 @@ describe('Recording API Tests', () => {
it('should delete room metadata when deleting the last recording', async () => {
const meetStorageService = container.get<MeetStorageService>(MeetStorageService);
// Create two recordings in the same room
// Check that the room metadata exists after starting the first recording
let roomMetadata = await meetStorageService.getArchivedRoomMetadata(room.roomId);

View File

@ -34,6 +34,10 @@ describe('Recordings API Tests', () => {
describe('List Recordings Tests', () => {
afterEach(async () => {
await deleteAllRecordings();
const response = await getAllRecordings();
expect(response.status).toBe(200);
expectSuccessListRecordingResponse(response, 0, false, false);
});
afterAll(async () => {
@ -118,7 +122,7 @@ describe('Recordings API Tests', () => {
const nextResponse = await getAllRecordings({ maxItems: 3, nextPageToken });
expectSuccessListRecordingResponse(nextResponse, 3, false, false, 3);
nextResponse.body.recordings.forEach((recording: MeetRecordingInfo, i: number) => {
nextResponse.body.recordings.forEach((recording: MeetRecordingInfo) => {
const associatedRoom = rooms.find((r) => r.room.roomId === recording.roomId);
expectValidRecording(

View File

@ -8,7 +8,8 @@ import {
deleteAllRecordings,
sleep,
endMeeting,
updateWebbhookPreferences
updateWebbhookPreferences,
deleteAllRooms
} from '../../helpers/request-helpers.js';
import { MeetWebhookEvent, MeetWebhookEventType } from '../../../src/typings/ce/webhook.model.js';
@ -51,6 +52,7 @@ describe('Webhook Integration Tests', () => {
const defaultPreferences = await storageService['getDefaultPreferences']();
await updateWebbhookPreferences(defaultPreferences.webhooksPreferences);
await deleteAllRecordings();
await deleteAllRooms();
});
it('should not send webhooks when disabled', async () => {