Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
import { setTestProperties } from '../../../helpers/TestProperties';
|
|
import { joinMuc, generateJaasToken as t } from '../../helpers/jaas';
|
|
|
|
setTestProperties(__filename, {
|
|
useJaas: true,
|
|
useWebhookProxy: true,
|
|
usesBrowsers: [ 'p1', 'p2', 'p3' ]
|
|
});
|
|
|
|
describe('Visitors triggered by reaching participantsSoftLimit', () => {
|
|
it('test participantsSoftLimit', async () => {
|
|
ctx.webhooksProxy.defaultMeetingSettings = {
|
|
participantsSoftLimit: 2,
|
|
visitorsEnabled: true
|
|
};
|
|
|
|
/// XXX the "name" of the participant MUST match one of the "capabilities" defined in wdio. It's not a "participant", it's an instance configuration!
|
|
const m = await joinMuc(
|
|
'p1',
|
|
t({ room: ctx.roomName, displayName: 'Mo de Rator', moderator: true })
|
|
);
|
|
|
|
expect(await m.isInMuc()).toBe(true);
|
|
expect(await m.isModerator()).toBe(true);
|
|
expect(await m.isVisitor()).toBe(false);
|
|
console.log('Moderator joined');
|
|
|
|
// Joining with a participant token before participantSoftLimit has been reached
|
|
const p = await joinMuc(
|
|
'p2',
|
|
t({ room: ctx.roomName, displayName: 'Parti Cipant' })
|
|
);
|
|
|
|
expect(await p.isInMuc()).toBe(true);
|
|
expect(await p.isModerator()).toBe(false);
|
|
expect(await p.isVisitor()).toBe(false);
|
|
console.log('Participant joined');
|
|
|
|
// Joining with a participant token after participantSoftLimit has been reached
|
|
const v = await joinMuc(
|
|
'p3',
|
|
t({ room: ctx.roomName, displayName: 'Visi Tor' })
|
|
);
|
|
|
|
expect(await v.isInMuc()).toBe(true);
|
|
expect(await v.isModerator()).toBe(false);
|
|
expect(await v.isVisitor()).toBe(true);
|
|
console.log('Visitor joined');
|
|
});
|
|
});
|