Compare commits

...

7 Commits

Author SHA1 Message Date
damencho
374cd9f95f fix(tests): Fix passing correct participant options. 2025-08-22 14:13:09 -05:00
damencho
211c31865e dump: debug5. 2025-08-22 14:04:52 -05:00
damencho
c7eafde7fd dump: debug4. 2025-08-22 13:02:56 -05:00
damencho
288bbd2c42 dump: debug3. 2025-08-22 12:58:14 -05:00
damencho
5acab03d93 dump: debug2. 2025-08-22 12:49:19 -05:00
damencho
4cf29b8605 fix(tests): Make sure first participant is moderator. 2025-08-22 12:41:04 -05:00
damencho
99c40d193f dump: debug1. 2025-08-22 12:26:10 -05:00
6 changed files with 15 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ export default class WebhookProxy {
* Connects.
*/
connect() {
console.log('Connecting...' + this.url);
this.ws = new WebSocket(this.url, {
headers: {
Authorization: this.secret

View File

@@ -28,6 +28,7 @@ export async function ensureOneParticipant(options?: IJoinOptions): Promise<void
participantOps.token = generateToken({
...options?.tokenOptions,
displayName: participantOps.name,
moderator: true
});
}
}
@@ -140,7 +141,7 @@ export async function ensureTwoParticipants(options?: IJoinOptions): Promise<voi
await ensureOneParticipant(options);
const participantOptions = { name: P2 } as IParticipantOptions;
console.log('1111', options?.preferGenerateToken)
if (options?.preferGenerateToken) {
participantOptions.token = generateToken({
...options?.tokenOptions,
@@ -148,7 +149,10 @@ export async function ensureTwoParticipants(options?: IJoinOptions): Promise<voi
});
}
await joinParticipant({ name: P2 }, options);
await joinParticipant({
...participantOptions,
name: P2
}, options);
if (options?.skipInMeetingChecks) {
return Promise.resolve();

View File

@@ -77,7 +77,8 @@ export function generatePayload(options: ITokenOptions): any {
},
'room': options.room || '*'
};
console.log('4444', options.moderator);
console.log('5555', options.visitor);
if (options.moderator) {
// @ts-ignore
payload.context.user.moderator = true;
@@ -93,6 +94,7 @@ export function generatePayload(options: ITokenOptions): any {
* Generate a signed token.
*/
export function generateToken(options: ITokenOptions): IToken {
console.log('2222', JSON.stringify(options));
const keyId = options.keyId || config.jwt.kid;
const keyPath = options.keyPath || config.jwt.privateKeyPath;
const headers = {

View File

@@ -168,7 +168,7 @@ async function checkDialEvents(participant: Participant, direction: string, star
participantJid: string;
};
eventType: string;
} = await webhooksProxy.waitForEvent(startedEventName);
} = await webhooksProxy.waitForEvent(startedEventName, 60000);
expect(startedEventName).toBe(dialInStartedEvent.eventType);
expect(dialInStartedEvent.data.direction).toBe(direction);

View File

@@ -90,7 +90,7 @@ describe('Participants presence', () => {
{ participantId: string; }
];
eventType: string;
} = await webhooksProxy.waitForEvent('USAGE');
} = await webhooksProxy.waitForEvent('USAGE', 60000);
expect('USAGE').toBe(event.eventType);
@@ -141,7 +141,7 @@ describe('Participants presence', () => {
isBreakout: boolean;
};
eventType: string;
} = await webhooksProxy.waitForEvent('ROOM_CREATED');
} = await webhooksProxy.waitForEvent('ROOM_CREATED', 60000);
expect('ROOM_CREATED').toBe(event.eventType);
expect(event.data.conference).toBe(conferenceJid);

View File

@@ -58,7 +58,8 @@ const chromePreferences = {
};
const specs = [
'specs/**/*.spec.ts'
'specs/iframe/visitors.spec.ts',
// 'specs/iframe/participantsPresence.spec.ts'
];
/**