mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
* feat(tests): Adds option to skip suite. * fix(tests): Rename context to ctx to avoid clashing mocha's one. * feat(tests): Moves room name generation in hooks. Move also the proxy connection in the hooks. * fix(tests): Avatar checks when using a token. Token has its avatar so we skip the token for avatar tests. * feat(tests): Renames avatars to drop Test from name. * feat(tests): Updates dependencies. * feat(tests): Fix end test log. * feat(tests): AVModeration tests.
67 lines
1.8 KiB
TypeScript
67 lines
1.8 KiB
TypeScript
import { Participant } from '../helpers/Participant';
|
|
|
|
const START_AUDIO_MODERATION = 'participants-pane-context-menu-start-audio-moderation';
|
|
const STOP_AUDIO_MODERATION = 'participants-pane-context-menu-stop-audio-moderation';
|
|
const START_VIDEO_MODERATION = 'participants-pane-context-menu-start-video-moderation';
|
|
const STOP_VIDEO_MODERATION = 'participants-pane-context-menu-stop-video-moderation';
|
|
|
|
/**
|
|
* Represents the Audio Video Moderation menu in the participants pane.
|
|
*/
|
|
export default class AVModerationMenu {
|
|
private participant: Participant;
|
|
|
|
/**
|
|
* Represents the Audio Video Moderation menu in the participants pane.
|
|
* @param participant
|
|
*/
|
|
constructor(participant: Participant) {
|
|
this.participant = participant;
|
|
}
|
|
|
|
/**
|
|
* Clicks the start audio moderation menu item.
|
|
*/
|
|
async clickStartAudioModeration() {
|
|
await this.clickButton(START_AUDIO_MODERATION);
|
|
}
|
|
|
|
/**
|
|
* Clicks the stop audio moderation menu item.
|
|
*/
|
|
async clickStopAudioModeration() {
|
|
await this.clickButton(STOP_AUDIO_MODERATION);
|
|
}
|
|
|
|
/**
|
|
* Clicks the start video moderation menu item.
|
|
*/
|
|
async clickStartVideoModeration() {
|
|
await this.clickButton(START_VIDEO_MODERATION);
|
|
}
|
|
|
|
/**
|
|
* Clicks the stop audio moderation menu item.
|
|
*/
|
|
async clickStopVideoModeration() {
|
|
await this.clickButton(STOP_VIDEO_MODERATION);
|
|
}
|
|
|
|
/**
|
|
* Clicks a context menu button.
|
|
* @param id
|
|
* @private
|
|
*/
|
|
private async clickButton(id: string) {
|
|
const button = this.participant.driver.$(`#${id}`);
|
|
|
|
await button.waitForDisplayed();
|
|
await button.click();
|
|
|
|
await button.moveTo({
|
|
xOffset: -40,
|
|
yOffset: -40
|
|
});
|
|
}
|
|
}
|