Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(tests): Tests improvements.

damenchob087b54575e6
diff --git a/tests/specs/2way/iFrameApiTranscriptions.spec.ts b/tests/specs/2way/iFrameApiTranscriptions.spec.ts
index 9b57e2c8b3..f43911f227 100644
--- a/tests/specs/2way/iFrameApiTranscriptions.spec.ts
+++ b/tests/specs/2way/iFrameApiTranscriptions.spec.ts
@@ -137,6 +137,10 @@ describe('Transcriptions', () => {
await p1.getIframeAPI().executeCommand('hangup');
await p2.getIframeAPI().executeCommand('hangup');
+ // sometimes events are not immediately received,
+ // let's wait for destroy event before waiting for those that depends on it
+ await webhooksProxy.waitForEvent('ROOM_DESTROYED', 10000);
+
if (webhooksProxy) {
const event: {
data: {
@@ -213,7 +217,7 @@ async function checkReceivingChunks(p1: Participant, p2: Participant, webhooksPr
const checkTranscripts = stable.includes(tr.stable || tr.final) || (tr.stable || tr.final).includes(stable);
if (!checkTranscripts) {
- console.log('received events', result);
+ console.log('received events', JSON.stringify(result));
}
expect(checkTranscripts).toBe(true);
diff --git a/tests/specs/3way/breakoutRooms.spec.ts b/tests/specs/3way/breakoutRooms.spec.ts
index 63dded1056..145ba93b32 100644
--- a/tests/specs/3way/breakoutRooms.spec.ts
+++ b/tests/specs/3way/breakoutRooms.spec.ts
@@ -319,7 +319,8 @@ describe('BreakoutRooms', () => {
// because the participants rejoin so fast, the meeting is not properly ended,
// so the previous breakout rooms would still be there.
// To avoid this issue we use a different meeting
- ctx.roomName += '-breakout-rooms';
+ // Respect room name suffix as it is important in multi-shard testing
+ ctx.roomName += `new-${ctx.roomName}`;
await ensureTwoParticipants(ctx);
const { p1, p2 } = ctx;
diff --git a/tests/specs/alone/iFrameApiRecording.spec.ts b/tests/specs/alone/iFrameApiRecording.spec.ts
index f5e0823bf1..1c661c82bd 100644
--- a/tests/specs/alone/iFrameApiRecording.spec.ts
+++ b/tests/specs/alone/iFrameApiRecording.spec.ts
@@ -26,6 +26,9 @@ describe('Recording', () => {
await testRecordingStarted(true);
await testRecordingStopped(true);
+
+ // to avoid limits
+ await ctx.p1.driver.pause(30000);
});
it('start/stop command', async () => {
@@ -35,6 +38,9 @@ describe('Recording', () => {
await testRecordingStarted(false);
await testRecordingStopped(false);
+
+ // to avoid limits
+ await ctx.p1.driver.pause(30000);
});
it('start/stop Livestreaming command', async () => {
@@ -82,7 +88,7 @@ describe('Recording', () => {
const liveStreamEvent: {
customerId: string;
eventType: string;
- } = await webhooksProxy.waitForEvent('LIVE_STREAM_ENDED');
+ } = await webhooksProxy.waitForEvent('LIVE_STREAM_ENDED', 20000);
expect('LIVE_STREAM_ENDED').toBe(liveStreamEvent.eventType);
expect(liveStreamEvent.customerId).toBe(customerId);
@@ -160,7 +166,7 @@ async function testRecordingStopped(command: boolean) {
const liveStreamEvent: {
customerId: string;
eventType: string;
- } = await webhooksProxy.waitForEvent('RECORDING_ENDED');
+ } = await webhooksProxy.waitForEvent('RECORDING_ENDED', 20000);
expect('RECORDING_ENDED').toBe(liveStreamEvent.eventType);
expect(liveStreamEvent.customerId).toBe(customerId);
diff --git a/tests/specs/helpers/DialIn.ts b/tests/specs/helpers/DialIn.ts
index c9dc485b87..ff736ed6f0 100644
--- a/tests/specs/helpers/DialIn.ts
+++ b/tests/specs/helpers/DialIn.ts
@@ -98,4 +98,5 @@ export async function dialIn(participant: Participant) {
});
console.log(`dial-in.test.call_session_history_id:${JSON.parse(responseData).call_session_history_id}`);
+ console.log(`API response:${responseData}`);
}