snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
46
tests/specs/ui/displayName.spec.ts
Normal file
46
tests/specs/ui/displayName.spec.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { setTestProperties } from '../../helpers/TestProperties';
|
||||
import { ensureTwoParticipants } from '../../helpers/participants';
|
||||
|
||||
setTestProperties(__filename, {
|
||||
usesBrowsers: [ 'p1', 'p2' ]
|
||||
});
|
||||
|
||||
describe('Display name', () => {
|
||||
it('joining the meeting', () => ensureTwoParticipants({ skipDisplayName: true }));
|
||||
|
||||
it('check change', async () => {
|
||||
const { p1, p2 } = ctx;
|
||||
|
||||
// default remote display name
|
||||
const defaultDisplayName = await p1.execute(() => config.defaultRemoteDisplayName);
|
||||
const p1EndpointId = await p1.getEndpointId();
|
||||
const p2EndpointId = await p2.getEndpointId();
|
||||
|
||||
// Checks whether default display names are set and shown, when both sides still miss the display name.
|
||||
expect(await p1.getFilmstrip().getRemoteDisplayName(p2EndpointId)).toBe(defaultDisplayName);
|
||||
expect(await p2.getFilmstrip().getRemoteDisplayName(p1EndpointId)).toBe(defaultDisplayName);
|
||||
|
||||
const randomName = `Name${Math.trunc(Math.random() * 1_000_000)}`;
|
||||
|
||||
await p2.setLocalDisplayName(randomName);
|
||||
expect(await p2.getLocalDisplayName()).toBe(randomName);
|
||||
expect(await p1.getFilmstrip().getRemoteDisplayName(p2EndpointId)).toBe(randomName);
|
||||
});
|
||||
|
||||
it('check persistence', async () => {
|
||||
const { p2 } = ctx;
|
||||
const randomName = `Name${Math.trunc(Math.random() * 1_000_000)}`;
|
||||
|
||||
await p2.setLocalDisplayName(randomName);
|
||||
|
||||
expect(await p2.getLocalDisplayName()).toBe(randomName);
|
||||
|
||||
await p2.hangup();
|
||||
|
||||
await ensureTwoParticipants({
|
||||
skipDisplayName: true
|
||||
});
|
||||
|
||||
expect(await p2.getLocalDisplayName()).toBe(randomName);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user