Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

AVModerationMenu.ts 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import BasePageObject from './BasePageObject';
  2. const START_AUDIO_MODERATION = 'participants-pane-context-menu-start-audio-moderation';
  3. const STOP_AUDIO_MODERATION = 'participants-pane-context-menu-stop-audio-moderation';
  4. const START_VIDEO_MODERATION = 'participants-pane-context-menu-start-video-moderation';
  5. const STOP_VIDEO_MODERATION = 'participants-pane-context-menu-stop-video-moderation';
  6. /**
  7. * Represents the Audio Video Moderation menu in the participants pane.
  8. */
  9. export default class AVModerationMenu extends BasePageObject {
  10. /**
  11. * Clicks the start audio moderation menu item.
  12. */
  13. async clickStartAudioModeration() {
  14. await this.clickButton(START_AUDIO_MODERATION);
  15. }
  16. /**
  17. * Clicks the stop audio moderation menu item.
  18. */
  19. async clickStopAudioModeration() {
  20. await this.clickButton(STOP_AUDIO_MODERATION);
  21. }
  22. /**
  23. * Clicks the start video moderation menu item.
  24. */
  25. async clickStartVideoModeration() {
  26. await this.clickButton(START_VIDEO_MODERATION);
  27. }
  28. /**
  29. * Clicks the stop audio moderation menu item.
  30. */
  31. async clickStopVideoModeration() {
  32. await this.clickButton(STOP_VIDEO_MODERATION);
  33. }
  34. /**
  35. * Clicks a context menu button.
  36. * @param id
  37. * @private
  38. */
  39. private async clickButton(id: string) {
  40. const button = this.participant.driver.$(`#${id}`);
  41. await button.waitForDisplayed();
  42. await button.click();
  43. await button.moveTo({
  44. xOffset: -40,
  45. yOffset: -40
  46. });
  47. }
  48. }