mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(tests): Adds subject test.
This commit is contained in:
32
tests/specs/2way/subject.spec.ts
Normal file
32
tests/specs/2way/subject.spec.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { Participant } from '../../helpers/Participant';
|
||||
import { ensureTwoParticipants } from '../../helpers/participants';
|
||||
|
||||
const MY_TEST_SUBJECT = 'My Test Subject';
|
||||
const SUBJECT_XPATH = '//div[starts-with(@class, "subject-text")]';
|
||||
|
||||
describe('Subject', () => {
|
||||
it('joining the meeting', () => ensureTwoParticipants(ctx, {
|
||||
configOverwrite: {
|
||||
subject: MY_TEST_SUBJECT
|
||||
}
|
||||
}));
|
||||
|
||||
it('check', async () => {
|
||||
await checkSubject(ctx.p1, MY_TEST_SUBJECT);
|
||||
await checkSubject(ctx.p2, MY_TEST_SUBJECT);
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Check was subject set.
|
||||
*
|
||||
* @param participant
|
||||
* @param subject
|
||||
*/
|
||||
async function checkSubject(participant: Participant, subject: string) {
|
||||
const localTile = participant.driver.$(SUBJECT_XPATH);
|
||||
|
||||
await localTile.moveTo();
|
||||
|
||||
expect(await localTile.getText()).toBe(subject);
|
||||
}
|
||||
Reference in New Issue
Block a user