2022-03-16 12:15:22 +01:00
|
|
|
import { expect } from 'chai';
|
2023-03-01 12:23:38 +01:00
|
|
|
import { Builder, Key, WebDriver } from 'selenium-webdriver';
|
2022-11-24 18:21:05 +01:00
|
|
|
import { OPENVIDU_SECRET, OPENVIDU_SERVER_URL } from './config';
|
2022-10-27 17:51:51 +02:00
|
|
|
import { getBrowserOptionsWithoutDevices, WebComponentConfig } from './selenium.conf';
|
2022-10-17 18:08:12 +02:00
|
|
|
import { OpenViduComponentsPO } from './utils.po.test';
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2022-11-24 18:21:05 +01:00
|
|
|
const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_SERVER_URL}&OV_SECRET=${OPENVIDU_SECRET}`;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// describe('Testing API Directives', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// // console.log('data:image/png;base64,' + await browser.takeScreenshot());
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should join with ONLY ONE TOKEN', async () => {
|
|
|
|
// await browser.get(`${url}&singleToken=true`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if prejoin page exist
|
|
|
|
// await utils.checkPrejoinIsPresent();
|
2022-07-14 09:38:08 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const joinButton = await utils.waitForElement('#join-button');
|
|
|
|
// await joinButton.click();
|
2022-07-14 09:38:08 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if session container is present
|
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-14 09:38:08 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if screenshare button is not present
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.false;
|
|
|
|
// });
|
2022-07-14 09:38:08 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should set the MINIMAL UI', async () => {
|
|
|
|
// await browser.get(`${url}&minimal=true`);
|
|
|
|
// // Checking if prejoin page exist
|
|
|
|
// await utils.checkPrejoinIsPresent();
|
2022-03-17 12:05:54 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if layout is present
|
|
|
|
// await utils.checkLayoutPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if stream component is present
|
|
|
|
// utils.checkStreamIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio detection is not displayed
|
|
|
|
// expect(await utils.isPresent('#audio-wave-container')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const joinButton = await utils.waitForElement('#join-button');
|
|
|
|
// await joinButton.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if session container is present
|
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if screenshare button is not present
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if more options button is not present
|
|
|
|
// expect(await utils.isPresent('#more-options-btn')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participants panel button is not present
|
|
|
|
// expect(await utils.isPresent('#participants-panel-btn')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if activities panel button is not present
|
|
|
|
// expect(await utils.isPresent('#activities-panel-btn')).to.be.false;
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if logo is not displayed
|
|
|
|
// expect(await utils.isPresent('#branding-logo')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if session name is not displayed
|
|
|
|
// expect(await utils.isPresent('#session-name')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if nickname is not displayed
|
|
|
|
// await browser.findElements(By.id('nickname-container'));
|
|
|
|
// expect(await utils.isPresent('#nickname-container')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio detection is not displayed
|
|
|
|
// expect(await utils.isPresent('#audio-wave-container')).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if settings button is not displayed
|
|
|
|
// expect(await utils.isPresent('#settings-container')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should change the UI LANG ', async () => {
|
|
|
|
// await browser.get(`${url}&lang=es`);
|
2022-11-24 14:13:18 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkPrejoinIsPresent();
|
2022-11-24 14:13:18 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// let element = await utils.waitForElement('.lang-button');
|
|
|
|
// expect(await element.getText()).equal('Españolexpand_more');
|
2022-11-24 14:13:18 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#join-button');
|
|
|
|
// expect(await element.getText()).equal('Unirme ahora');
|
|
|
|
// });
|
2022-11-24 14:13:18 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should show the PREJOIN page', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=true`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkPrejoinIsPresent();
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should not show the PREJOIN page', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should run the app with VIDEO MUTED in prejoin page', async () => {
|
|
|
|
// try {
|
|
|
|
// let idVideoEnabled;
|
|
|
|
// const script = 'return document.getElementsByTagName("video")[0].srcObject.getVideoTracks()[0].enabled;';
|
2022-10-14 16:20:05 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&prejoin=true&videoMuted=true`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkPrejoinIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video is displayed
|
|
|
|
// await utils.checkVideoElementIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if virtual background button is disabled
|
|
|
|
// const button = await utils.waitForElement('#background-effects-btn');
|
|
|
|
// expect(await button.isEnabled()).to.be.false;
|
2022-11-24 11:57:21 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video track is disabled/muted
|
|
|
|
// idVideoEnabled = await browser.executeScript<boolean>(script);
|
|
|
|
// expect(idVideoEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#videocam_off');
|
|
|
|
// await utils.clickOn('#join-button');
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video is muted after join the room
|
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// idVideoEnabled = await browser.executeScript<boolean>(script);
|
|
|
|
// expect(idVideoEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#videocam_off');
|
|
|
|
// expect(await utils.isPresent('#videocam_off')).to.be.true;
|
|
|
|
// } catch (error) {
|
|
|
|
// console.log(error);
|
|
|
|
// console.log(await browser.takeScreenshot());
|
|
|
|
// }
|
|
|
|
// });
|
2023-02-28 11:30:35 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should run the app with VIDEO MUTED and WITHOUT PREJOIN page', async () => {
|
|
|
|
// let isVideoEnabled;
|
|
|
|
// const videoEnableScript = 'return document.getElementsByTagName("video")[0].srcObject.getVideoTracks()[0].enabled;';
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false&videoMuted=true`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(2000);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2023-02-28 11:30:35 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video is displayed
|
|
|
|
// await utils.checkVideoElementIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video track is disabled/muted
|
|
|
|
// isVideoEnabled = await browser.executeScript(videoEnableScript);
|
|
|
|
// expect(isVideoEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#videocam_off');
|
|
|
|
// expect(await utils.isPresent('#videocam_off')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should run the app with AUDIO MUTED in prejoin page', async () => {
|
|
|
|
// let isAudioEnabled;
|
|
|
|
// const script = 'return document.getElementsByTagName("video")[0].srcObject.getAudioTracks()[0].enabled;';
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&audioMuted=true`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkPrejoinIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video is displayed
|
|
|
|
// await utils.checkVideoElementIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio track is disabled/muted
|
|
|
|
// isAudioEnabled = await browser.executeScript(script);
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#mic_off');
|
|
|
|
// expect(await utils.isPresent('#mic_off')).to.be.true;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.clickOn('#join-button');
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio is muted after join the room
|
|
|
|
// await utils.checkSessionIsPresent();
|
|
|
|
// isAudioEnabled = await browser.executeScript(script);
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#mic_off');
|
|
|
|
// expect(await utils.isPresent('#mic_off')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should run the app with VIDEO MUTED and WITHOUT PREJOIN page', async () => {
|
|
|
|
// let isAudioEnabled;
|
|
|
|
// const audioEnableScript = 'return document.getElementsByTagName("video")[0].srcObject.getAudioTracks()[0].enabled;';
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false&audioMuted=true`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if video is displayed
|
|
|
|
// await utils.checkVideoElementIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio track is disabled/muted
|
|
|
|
// isAudioEnabled = await browser.executeScript(audioEnableScript);
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#mic_off');
|
|
|
|
// expect(await utils.isPresent('#mic_off')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the SCREENSHARE button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&screenshareBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if screenshare button is not present
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the FULLSCREEN button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&fullscreenBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if fullscreen button is not present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-06-02 18:13:22 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.findElements(By.id('fullscreen-btn'));
|
|
|
|
// expect(await utils.isPresent('#fullscreen-btn')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the CAPTIONS button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&toolbarCaptionsBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if captions button is not present
|
|
|
|
// expect(await utils.isPresent('#captions-btn')).to.be.false;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.clickOn('#toolbar-settings-btn');
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.settings-container');
|
|
|
|
// expect(await utils.isPresent('.settings-container')).to.be.true;
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#captions-opt')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the TOOLBAR RECORDING button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&toolbarRecordingButton=false`);
|
2022-07-05 12:03:35 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if recording button is not present
|
|
|
|
// expect(await utils.isPresent('#recording-btn')).to.be.false;
|
|
|
|
// });
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the TOOLBAR BROADCASTING button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&toolbarBroadcastingButton=false`);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if broadcasting button is not present
|
|
|
|
// expect(await utils.isPresent('#broadcasting-btn')).to.be.false;
|
|
|
|
// });
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the TOOLBAR SETTINGS button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&toolbarSettingsBtn=false`);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if fullscreen button is not present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#toolbar-settings-btn')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the LEAVE button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&leaveBtn=false`);
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if leave button is not present
|
|
|
|
// await browser.findElements(By.id('leave-btn'));
|
|
|
|
// expect(await utils.isPresent('#leave-btn')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the ACTIVITIES PANEL button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&activitiesPanelBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if activities panel button is not present
|
|
|
|
// expect(await utils.isPresent('#activities-panel-btn')).to.be.false;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the CHAT PANEL button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&chatPanelBtn=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if chat panel button is not present
|
|
|
|
// expect(await utils.isPresent('#chat-panel-btn')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the PARTICIPANTS PANEL button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&participantsPanelBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participants panel button is not present
|
|
|
|
// expect(await utils.isPresent('#participants-panel-btn')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the LOGO', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&displayLogo=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.waitForElement('#info-container');
|
|
|
|
// expect(await utils.isPresent('#info-container')).to.be.true;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if logo is not displayed
|
|
|
|
// expect(await utils.isPresent('#branding-logo')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the SESSION NAME', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&displaySessionName=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.waitForElement('#info-container');
|
|
|
|
// expect(await utils.isPresent('#info-container')).to.be.true;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if session name is not displayed
|
|
|
|
// expect(await utils.isPresent('#session-name')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the PARTICIPANT NAME', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&displayParticipantName=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if stream component is present
|
|
|
|
// await utils.checkStreamIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if nickname is not present
|
|
|
|
// expect(await utils.isPresent('#nickname-container')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the AUDIO DETECTION element', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&displayAudioDetection=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-07 16:32:03 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if stream component is present
|
|
|
|
// await utils.checkStreamIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio detection is not present
|
|
|
|
// expect(await utils.isPresent('#audio-wave-container')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the STREAM SETTINGS button', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&settingsBtn=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-07 16:32:03 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if stream component is present
|
|
|
|
// await utils.checkStreamIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if settings button is not present
|
|
|
|
// expect(await utils.isPresent('#settings-container')).to.be.false;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the MUTE button in participants panel', async () => {
|
|
|
|
// const sessionName = 'e2etest';
|
|
|
|
// const fixedUrl = `${url}&prejoin=false&participantMuteBtn=false&sessionName=${sessionName}`;
|
|
|
|
// await browser.get(fixedUrl);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const participantsButton = await utils.waitForElement('#participants-panel-btn');
|
|
|
|
// await participantsButton.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participatns panel is displayed
|
|
|
|
// await utils.waitForElement('#participants-container');
|
|
|
|
// expect(await utils.isPresent('#participants-container')).to.be.true;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking remote participants item
|
|
|
|
// expect(await utils.isPresent('#remote-participant-item')).to.be.false;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Starting new browser for adding a new participant
|
|
|
|
// const newTabScript = `window.open("${fixedUrl}")`;
|
|
|
|
// await browser.executeScript(newTabScript);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Go to first tab
|
|
|
|
// const tabs = await browser.getAllWindowHandles();
|
|
|
|
// browser.switchTo().window(tabs[0]);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if mute button is not displayed in participant item
|
|
|
|
// await utils.waitForElement('#remote-participant-item');
|
|
|
|
// expect(await utils.isPresent('#remote-participant-item')).to.be.true;
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#mute-btn')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the RECORDING ACTIVITY in activities panel', async () => {
|
|
|
|
// let element;
|
|
|
|
// const fixedUrl = `${url}&prejoin=false&activitiesPanelRecordingActivity=false`;
|
|
|
|
// await browser.get(fixedUrl);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await element.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participatns panel is displayed
|
|
|
|
// await utils.waitForElement('#default-activities-panel');
|
|
|
|
// expect(await utils.isPresent('#default-activities-panel')).to.be.true;
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await browser.sleep(1000);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if recording activity exists
|
|
|
|
// await utils.waitForElement('.activities-body-container');
|
|
|
|
// expect(await utils.isPresent('ov-recording-activity')).to.be.false;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should SHOW a RECORDING ERROR in activities panel', async () => {
|
|
|
|
// let element;
|
|
|
|
// const fixedUrl = `${url}&prejoin=false&recordingError=TEST_ERROR`;
|
|
|
|
// await browser.get(fixedUrl);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await element.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participatns panel is displayed
|
|
|
|
// await utils.waitForElement('#default-activities-panel');
|
|
|
|
// expect(await utils.isPresent('#default-activities-panel')).to.be.true;
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if recording activity exists
|
|
|
|
// await utils.waitForElement('#activities-container');
|
|
|
|
// await utils.waitForElement('.activities-body-container');
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('ov-recording-activity');
|
|
|
|
// expect(await utils.isPresent('ov-recording-activity')).to.be.true;
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.failed');
|
|
|
|
// expect(await utils.isPresent('.failed')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open recording
|
|
|
|
// await browser.sleep(1000);
|
|
|
|
// element = await utils.waitForElement('ov-recording-activity');
|
|
|
|
// await element.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('.recording-error');
|
|
|
|
// expect(await element.getAttribute('innerText')).equal('"TEST_ERROR"');
|
|
|
|
// expect(await utils.isPresent('.recording-error')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should SHOW a BROADCASTING ERROR in activities panel', async () => {
|
|
|
|
// let element;
|
|
|
|
// const fixedUrl = `${url}&prejoin=false&broadcastingError=TEST_ERROR`;
|
|
|
|
// await browser.get(fixedUrl);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await element.click();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participatns panel is displayed
|
|
|
|
// await utils.waitForElement('#default-activities-panel');
|
|
|
|
// expect(await utils.isPresent('#default-activities-panel')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if broadcasting activity exists
|
|
|
|
// await utils.waitForElement('#activities-container');
|
|
|
|
// await utils.waitForElement('.activities-body-container');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('ov-broadcasting-activity');
|
|
|
|
// expect(await utils.isPresent('ov-broadcasting-activity')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const status = await utils.waitForElement('#broadcasting-status');
|
|
|
|
// expect(await status.getAttribute('innerText')).equals('FAILED');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open broadcasting
|
|
|
|
// await browser.sleep(1000);
|
|
|
|
// await utils.clickOn('ov-broadcasting-activity');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#broadcasting-error');
|
|
|
|
// expect(await element.getAttribute('innerText')).equal('TEST_ERROR');
|
|
|
|
// });
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should HIDE the BROADCASTING ACTIVITY in activities panel', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false&activitiesPanelBroadcastingActivity=false`);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await utils.clickOn('#activities-panel-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if participatns panel is displayed
|
|
|
|
// await utils.waitForElement('#default-activities-panel');
|
|
|
|
// expect(await utils.isPresent('#default-activities-panel')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await browser.sleep(1000);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if recording activity exists
|
|
|
|
// await utils.waitForElement('.activities-body-container');
|
|
|
|
// expect(await utils.isPresent('ov-broadcasting-activity')).to.be.false;
|
|
|
|
// });
|
|
|
|
// });
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// describe('Testing videoconference EVENTS', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onJoinButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#prejoin-container');
|
|
|
|
// expect(await utils.isPresent('#prejoin-container')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to join button
|
|
|
|
// await utils.waitForElement('#join-button');
|
|
|
|
// await utils.clickOn('#join-button');
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onJoinButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onJoinButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onJoinButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarLeaveButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to leave button
|
|
|
|
// const leaveButton = await utils.waitForElement('#leave-btn');
|
|
|
|
// expect(await utils.isPresent('#leave-btn')).to.be.true;
|
|
|
|
// await leaveButton.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarLeaveButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarLeaveButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarLeaveButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarCameraButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to leave button
|
|
|
|
// const cameraButton = await utils.waitForElement('#camera-btn');
|
|
|
|
// expect(await utils.isPresent('#camera-btn')).to.be.true;
|
|
|
|
// await cameraButton.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarCameraButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarCameraButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarCameraButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarMicrophoneButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to mic button
|
|
|
|
// const micButton = await utils.waitForElement('#mic-btn');
|
|
|
|
// expect(await utils.isPresent('#mic-btn')).to.be.true;
|
|
|
|
// await micButton.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarMicrophoneButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarMicrophoneButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarMicrophoneButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarScreenshareButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to leave button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarScreenshareButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarScreenshareButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarScreenshareButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarFullscreenButtonClicked event', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// element = await utils.waitForElement('#more-options-btn');
|
|
|
|
// expect(await utils.isPresent('#more-options-btn')).to.be.true;
|
|
|
|
// await element.click();
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to fullscreen button
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const fullscreenButton = await utils.waitForElement('#fullscreen-btn');
|
|
|
|
// expect(await utils.isPresent('#fullscreen-btn')).to.be.true;
|
|
|
|
// await fullscreenButton.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarFullscreenButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarFullscreenButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarFullscreenButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarChatPanelButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to chat button
|
|
|
|
// const chatButton = await utils.waitForElement('#chat-panel-btn');
|
|
|
|
// await chatButton.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarChatPanelButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarChatPanelButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarChatPanelButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarParticipantsPanelButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to participants button
|
|
|
|
// const participantsButton = await utils.waitForElement('#participants-panel-btn');
|
|
|
|
// await participantsButton.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarParticipantsPanelButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarParticipantsPanelButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarParticipantsPanelButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarActivitiesPanelButtonClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to activities button
|
|
|
|
// const activitiesButton = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await activitiesButton.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarActivitiesPanelButtonClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarActivitiesPanelButtonClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarActivitiesPanelButtonClicked')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onToolbarStartRecordingClicked event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.waitForElement('#more-options-btn');
|
|
|
|
// expect(await utils.isPresent('#more-options-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to recording button
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
2022-06-02 17:05:41 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#recording-btn');
|
|
|
|
// expect(await utils.isPresent('#recording-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#recording-btn');
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onToolbarStartRecordingClicked has been received
|
|
|
|
// await utils.waitForElement('#onToolbarStartRecordingClicked');
|
|
|
|
// expect(await utils.isPresent('#onToolbarStartRecordingClicked')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // TODO: it needs an OpenVidu PRO
|
|
|
|
// // it('should receive the onToolbarStopBroadcastingClicked event', async () => {
|
|
|
|
// // await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.checkSessionIsPresent();
|
|
|
|
// // await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // // Open more options menu
|
|
|
|
// // await utils.waitForElement('#more-options-btn');
|
|
|
|
// // expect(await utils.isPresent('#more-options-btn')).to.be.true;
|
|
|
|
// // await utils.clickOn('#more-options-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('.mat-menu-content');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('#broadcasting-btn');
|
|
|
|
// // await utils.clickOn('#broadcasting-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('.sidenav-menu');
|
|
|
|
// // await utils.waitForElement('#activities-container');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('#broadcasting-url-input');
|
|
|
|
// // const input = await utils.waitForElement('#broadcast-url-input');
|
|
|
|
// // await input.sendKeys('BroadcastUrl');
|
|
|
|
// // await utils.clickOn('#broadcasting-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // // Open more options menu
|
|
|
|
// // await utils.waitForElement('#more-options-btn');
|
|
|
|
// // expect(await utils.isPresent('#more-options-btn')).to.be.true;
|
|
|
|
// // await utils.clickOn('#more-options-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('.mat-menu-content');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.waitForElement('#broadcasting-btn');
|
|
|
|
// // await utils.clickOn('#broadcasting-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // // Checking if onToolbarStopBroadcastingClicked has been received
|
|
|
|
// // await utils.waitForElement('#onToolbarStopBroadcastingClicked');
|
|
|
|
// // expect(await utils.isPresent('#onToolbarStopBroadcastingClicked')).to.be.true;
|
|
|
|
// // });
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onActivitiesPanelStartRecordingClicked event', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open activities panel
|
|
|
|
// element = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// expect(await utils.isPresent('#activities-panel-btn')).to.be.true;
|
|
|
|
// await element.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(1000);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open recording
|
|
|
|
// element = await utils.waitForElement('ov-recording-activity');
|
|
|
|
// await element.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(1000);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to recording button
|
|
|
|
// element = await utils.waitForElement('#start-recording-btn');
|
|
|
|
// expect(await element.isEnabled()).to.be.true;
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await element.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onActivitiesPanelStartRecordingClicked has been received
|
|
|
|
// await utils.waitForElement('#onActivitiesPanelStartRecordingClicked');
|
|
|
|
// expect(await utils.isPresent('#onActivitiesPanelStartRecordingClicked')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the PLAY and DELETE recording events', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to activities button
|
|
|
|
// const activitiesButton = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// expect(await utils.isPresent('#activities-panel-btn')).to.be.true;
|
|
|
|
// await activitiesButton.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(1500);
|
|
|
|
// // Open recording
|
|
|
|
// element = await utils.waitForElement('ov-recording-activity');
|
|
|
|
// await element.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(1500);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Delete event
|
|
|
|
// element = await utils.waitForElement('#delete-recording-btn');
|
|
|
|
// expect(await utils.isPresent('#delete-recording-btn')).to.be.true;
|
|
|
|
// await element.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('#delete-recording-confirm-btn');
|
|
|
|
// expect(await utils.isPresent('#delete-recording-confirm-btn')).to.be.true;
|
|
|
|
// await element.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#onActivitiesPanelDeleteRecordingClicked');
|
|
|
|
// expect(await utils.isPresent('#onActivitiesPanelDeleteRecordingClicked')).to.be.true;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onActivitiesPanelStartBroadcasting event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Get activities button and click into it
|
|
|
|
// await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await utils.clickOn('#activities-panel-btn');
|
|
|
|
// await browser.sleep(500);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// await utils.waitForElement('#activities-container');
|
|
|
|
// expect(await utils.isPresent('#activities-container')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#broadcasting-activity');
|
|
|
|
// await utils.clickOn('#broadcasting-activity');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(1000);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const button = await utils.waitForElement('#broadcasting-btn');
|
|
|
|
// expect(await button.isEnabled()).to.be.false;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const input = await utils.waitForElement('#broadcast-url-input');
|
|
|
|
// await input.sendKeys('BroadcastUrl');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.clickOn('#broadcasting-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if onActivitiesPanelStartBroadcastingClicked has been received
|
|
|
|
// await utils.waitForElement('#onActivitiesPanelStartBroadcastingClicked');
|
|
|
|
// expect(await utils.isPresent('#onActivitiesPanelStartBroadcastingClicked')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // TODO: it needs an OpenVidu PRO (onActivitiesPanelStopBroadcastingClicked event)
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // expect(await utils.isPresent('#broadcasting-tag')).to.be.true;
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // await utils.clickOn('#stop-broadcasting-btn');
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // // Checking if onActivitiesPanelStopBroadcastingClicked has been received
|
|
|
|
// // await utils.waitForElement('#onActivitiesPanelStopBroadcastingClicked');
|
|
|
|
// // expect(await utils.isPresent('#onActivitiesPanelStopBroadcastingClicked')).to.be.true;
|
|
|
|
// // expect(await utils.isPresent('#broadcasting-tag')).to.be.false;
|
|
|
|
// });
|
2023-02-17 15:12:10 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive the onSessionCreated event', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-12-23 16:17:04 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#onSessionCreated');
|
|
|
|
// expect(await utils.isPresent('#onSessionCreated')).to.be.true;
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#onJoinButtonClicked')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // * PUBLISHER EVENTS
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive onParticipantCreated event from LOCAL participant', async () => {
|
|
|
|
// const participantName = 'TEST_USER';
|
|
|
|
// await browser.get(`${url}&participantName=${participantName}`);
|
|
|
|
// await utils.waitForElement(`#${participantName}-onParticipantCreated`);
|
|
|
|
// expect(await utils.isPresent(`#${participantName}-onParticipantCreated`)).to.be.true;
|
|
|
|
// });
|
2022-07-06 00:37:28 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // * SESSION EVENTS
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive connectionCreated event from LOCAL participant', async () => {
|
|
|
|
// const participantName = 'TEST_USER';
|
|
|
|
// await browser.get(`${url}&prejoin=false&participantName=${participantName}`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement(`#${participantName}-connectionCreated`);
|
|
|
|
// expect(await utils.isPresent(`#${participantName}-connectionCreated`)).to.be.true;
|
|
|
|
// });
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should receive sessionDisconnected event from LOCAL participant', async () => {
|
|
|
|
// const participantName = 'TEST_USER';
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false&participantName=${participantName}`);
|
2022-03-16 12:15:22 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-03-16 16:34:55 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if leave button is not present
|
|
|
|
// element = await utils.waitForElement('#leave-btn');
|
|
|
|
// await element.click();
|
2022-03-16 16:34:55 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement(`#${participantName}-sessionDisconnected`);
|
|
|
|
// expect(await utils.isPresent(`#${participantName}-sessionDisconnected`)).to.be.true;
|
|
|
|
// });
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// describe('Testing screenshare features', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-03-16 16:34:55 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-03-16 16:34:55 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should toggle screensharing twice', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2023-04-21 13:32:13 +02:00
|
|
|
describe('Testing stream video menu features', () => {
|
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should not show the Mute sound button for local participant', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkLayoutPresent();
|
|
|
|
|
|
|
|
await utils.waitForElement('#stream-menu-btn');
|
|
|
|
await utils.clickOn('#stream-menu-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if mute sound button is not present
|
|
|
|
expect(await utils.isPresent('#sound-btn')).to.be.false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2022-04-01 12:05:58 +02:00
|
|
|
describe('Testing screenshare features', () => {
|
|
|
|
let browser: WebDriver;
|
2022-10-17 18:08:12 +02:00
|
|
|
let utils: OpenViduComponentsPO;
|
2022-04-01 12:05:58 +02:00
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await screenshareButton.isDisplayed()).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.OV_big');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// await screenshareButton.click();
|
|
|
|
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
|
|
|
|
// // toggle screenshare again
|
|
|
|
// await screenshareButton.click();
|
|
|
|
|
|
|
|
// await utils.waitForElement('.OV_big');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
|
|
|
|
|
|
|
// await screenshareButton.click();
|
|
|
|
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
// });
|
|
|
|
|
|
|
|
// it('should show only screen if toggle screensharing with video muted', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
// await utils.checkLayoutPresent();
|
|
|
|
|
|
|
|
// const camButton = await utils.waitForElement('#camera-btn');
|
|
|
|
// await camButton.click();
|
|
|
|
|
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await screenshareButton.isDisplayed()).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
|
|
|
|
|
|
|
// await browser.sleep(1000);
|
|
|
|
// await utils.waitForElement('.OV_big');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
|
|
|
|
// await screenshareButton.click();
|
|
|
|
// await browser.sleep(1000);
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
// });
|
|
|
|
|
|
|
|
// it('should screensharing with audio muted', async () => {
|
|
|
|
// let element, isAudioEnabled;
|
|
|
|
// const getAudioScript = (className: string) => {
|
|
|
|
// return `return document.getElementsByClassName('${className}')[0].srcObject.getAudioTracks()[0].enabled;`;
|
|
|
|
// };
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
// await utils.checkLayoutPresent();
|
|
|
|
|
|
|
|
// const micButton = await utils.waitForElement('#mic-btn');
|
|
|
|
// await micButton.click();
|
|
|
|
|
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
|
|
|
|
|
|
|
// await utils.waitForElement('.screen-type');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
|
|
|
|
|
|
|
// isAudioEnabled = await browser.executeScript(getAudioScript('screen-type'));
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
|
|
|
|
|
|
|
// await utils.waitForElement('#statusMic');
|
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// await screenshareButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should show and hide CAMERA stream when muting video with screensharing', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await screenshareButton.isDisplayed()).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.OV_big');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const muteVideoButton = await utils.waitForElement('#camera-btn');
|
|
|
|
// await muteVideoButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should screenshare has audio active when camera is muted', async () => {
|
|
|
|
// let element, isAudioEnabled;
|
|
|
|
// const audioEnableScript = 'return document.getElementsByTagName("video")[0].srcObject.getAudioTracks()[0].enabled;';
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// expect(await utils.isPresent('#screenshare-btn')).to.be.true;
|
|
|
|
// await screenshareButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('.OV_big');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(1);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Muting camera video
|
|
|
|
// const muteVideoButton = await utils.waitForElement('#camera-btn');
|
|
|
|
// await muteVideoButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
|
|
|
// expect(await utils.isPresent('#statusMic')).to.be.false;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio is muted after join the room
|
|
|
|
// isAudioEnabled = await browser.executeScript(audioEnableScript);
|
|
|
|
// expect(isAudioEnabled).to.be.true;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Unmuting camera
|
|
|
|
// await muteVideoButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('.camera-type');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(1);
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should camera come back with audio muted when screensharing', async () => {
|
|
|
|
// let element, isAudioEnabled;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const getAudioScript = (className: string) => {
|
|
|
|
// return `return document.getElementsByClassName('${className}')[0].srcObject.getAudioTracks()[0].enabled;`;
|
|
|
|
// };
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Clicking to screensharing button
|
|
|
|
// const screenshareButton = await utils.waitForElement('#screenshare-btn');
|
|
|
|
// await screenshareButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.screen-type');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(1);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Mute camera
|
|
|
|
// const muteVideoButton = await utils.waitForElement('#camera-btn');
|
|
|
|
// await muteVideoButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(1);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#statusMic')).to.be.false;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if audio is muted after join the room
|
|
|
|
// isAudioEnabled = await browser.executeScript(getAudioScript('screen-type'));
|
|
|
|
// expect(isAudioEnabled).to.be.true;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Mute audio
|
|
|
|
// const muteAudioButton = await utils.waitForElement('#mic-btn');
|
|
|
|
// await muteAudioButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#statusMic');
|
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(1);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// isAudioEnabled = await browser.executeScript(getAudioScript('screen-type'));
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Unmute camera
|
|
|
|
// await muteVideoButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.camera-type');
|
|
|
|
// element = await browser.findElements(By.css('video'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await browser.findElements(By.id('statusMic'));
|
|
|
|
// expect(element.length).equals(2);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// isAudioEnabled = await browser.executeScript(getAudioScript('camera-type'));
|
|
|
|
// expect(isAudioEnabled).to.be.false;
|
|
|
|
// });
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// describe('Testing panels', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// /**
|
|
|
|
// * TODO
|
|
|
|
// * It only works with OpenVidu PRO because this is a PRO feature
|
|
|
|
// */
|
|
|
|
// // it('should toggle BACKGROUND panel on prejoin page when VIDEO is MUTED', async () => {
|
|
|
|
// // let element;
|
|
|
|
// // await browser.get(`${url}`);
|
|
|
|
// // element = await utils.waitForElement('#pre-join-container');
|
|
|
|
// // expect(await utils.isPresent('#pre-join-container')).to.be.true;
|
|
|
|
|
|
|
|
// // const backgroundButton = await utils.waitForElement('#background-effects-btn');
|
|
|
|
// // expect(await utils.isPresent('#background-effects-btn')).to.be.true;
|
|
|
|
// // expect(await backgroundButton.isEnabled()).to.be.true;
|
|
|
|
// // await backgroundButton.click();
|
|
|
|
// // await browser.sleep(500);
|
|
|
|
|
|
|
|
// // await utils.waitForElement('#background-effects-container');
|
|
|
|
// // expect(await utils.isPresent('#background-effects-container')).to.be.true;
|
|
|
|
|
|
|
|
// // element = await utils.waitForElement('#camera-button');
|
|
|
|
// // expect(await utils.isPresent('#camera-button')).to.be.true;
|
|
|
|
// // expect(await element.isEnabled()).to.be.true;
|
|
|
|
// // await element.click();
|
|
|
|
|
|
|
|
// // await browser.sleep(500);
|
|
|
|
// // element = await utils.waitForElement('#video-poster');
|
|
|
|
// // expect(await utils.isPresent('#video-poster')).to.be.true;
|
|
|
|
|
|
|
|
// // expect(await backgroundButton.isDisplayed()).to.be.true;
|
|
|
|
// // expect(await backgroundButton.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
// // expect(await utils.isPresent('#background-effects-container')).to.be.false;
|
|
|
|
// // });
|
|
|
|
|
|
|
|
// it('should toggle CHAT panel', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const chatButton = await utils.waitForElement('#chat-panel-btn');
|
|
|
|
// await chatButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// await utils.waitForElement('.input-container');
|
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.true;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.messages-container');
|
|
|
|
// expect(await utils.isPresent('.messages-container')).to.be.true;
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await chatButton.click();
|
2022-04-01 12:05:58 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.false;
|
|
|
|
// expect(await utils.isPresent('.messages-container')).to.be.false;
|
|
|
|
// });
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should toggle PARTICIPANTS panel', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const participantBtn = await utils.waitForElement('#participants-panel-btn');
|
|
|
|
// await participantBtn.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.local-participant-container');
|
|
|
|
// expect(await utils.isPresent('.local-participant-container')).to.be.true;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('ov-participant-panel-item');
|
|
|
|
// expect(await utils.isPresent('ov-participant-panel-item')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await participantBtn.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.local-participant-container')).to.be.false;
|
|
|
|
// expect(await utils.isPresent('ov-participant-panel-item')).to.be.false;
|
|
|
|
// });
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should toggle ACTIVITIES panel', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Get activities button and click into it
|
|
|
|
// const activitiesBtn = await utils.waitForElement('#activities-panel-btn');
|
|
|
|
// await activitiesBtn.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// await utils.waitForElement('#activities-container');
|
|
|
|
// expect(await utils.isPresent('#activities-container')).to.be.true;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('#recording-activity');
|
|
|
|
// expect(await utils.isPresent('#recording-activity')).to.be.true;
|
|
|
|
// await activitiesBtn.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('#activities-container')).to.be.false;
|
|
|
|
// expect(await utils.isPresent('#recording-activity')).to.be.false;
|
|
|
|
// });
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should toggle SETTINGS panel', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// element = await utils.waitForElement('#more-options-btn');
|
|
|
|
// await element.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if mat menu is present
|
|
|
|
// element = await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Get settings button and click into it
|
|
|
|
// const settingsBtn = await utils.waitForElement('#toolbar-settings-btn');
|
|
|
|
// await settingsBtn.click();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// element = await utils.waitForElement('.sidenav-menu');
|
|
|
|
// expect(await utils.isPresent('#default-settings-panel')).to.be.true;
|
|
|
|
// });
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should switching between PARTICIPANTS and CHAT panels', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-06-01 18:15:44 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open chat panel
|
|
|
|
// const chatButton = await utils.waitForElement('#chat-panel-btn');
|
|
|
|
// await chatButton.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// expect(await utils.isPresent('.sidenav-menu')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.input-container');
|
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.messages-container')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open participants panel
|
|
|
|
// const participantBtn = await utils.waitForElement('#participants-panel-btn');
|
|
|
|
// await participantBtn.click();
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.local-participant-container')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('ov-participant-panel-item')).to.be.true;
|
2022-06-16 15:56:57 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Switch to chat panel
|
|
|
|
// await chatButton.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.true;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.messages-container')).to.be.true;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('.local-participant-container')).to.be.false;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('ov-participant-panel-item')).to.be.false;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Close chat panel
|
|
|
|
// await chatButton.click();
|
|
|
|
// await browser.findElements(By.className('input-container'));
|
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.false;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('messages-container')).to.be.false;
|
|
|
|
// });
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should switching between sections in SETTINGS PANEL', async () => {
|
|
|
|
// let element;
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// element = await utils.waitForElement('#more-options-btn');
|
|
|
|
// await element.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Checking if mat menu is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Get settings button and click into it
|
|
|
|
// const settingsBtn = await utils.waitForElement('#toolbar-settings-btn');
|
|
|
|
// await settingsBtn.click();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// expect(await utils.isPresent('.sidenav-menu')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Check if general section is shown
|
|
|
|
// element = await utils.waitForElement('#general-opt');
|
|
|
|
// await element.click();
|
2022-04-06 10:02:54 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('ov-nickname-input')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Check if video section is shown
|
|
|
|
// element = await utils.waitForElement('#video-opt');
|
|
|
|
// await element.click();
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('ov-video-devices-select')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// // Check if audio section is shown
|
|
|
|
// element = await utils.waitForElement('#audio-opt');
|
|
|
|
// await element.click();
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// expect(await utils.isPresent('ov-audio-devices-select')).to.be.true;
|
|
|
|
// });
|
|
|
|
// });
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// describe('Testing CHAT features', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// it('should send an url message and converts in a link', async () => {
|
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.checkLayoutPresent();
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const chatButton = await utils.waitForElement('#chat-panel-btn');
|
|
|
|
// await chatButton.click();
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.sidenav-menu');
|
|
|
|
// await utils.waitForElement('.input-container');
|
|
|
|
// expect(await utils.isPresent('.input-container')).to.be.true;
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// const input = await utils.waitForElement('#chat-input');
|
|
|
|
// await input.sendKeys('demos.openvidu.io');
|
2022-09-23 16:37:23 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.clickOn('#send-btn');
|
2022-10-17 18:08:12 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
// await utils.waitForElement('.msg-content a');
|
|
|
|
// expect(await utils.isPresent('.msg-content a')).to.be.true;
|
|
|
|
// });
|
|
|
|
// });
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
describe('Testing TOOLBAR features', () => {
|
2022-11-03 11:16:15 +01:00
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
it('should mute and unmute the local microphone', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
await browser.get(`${url}&prejoin=false`);
|
2022-11-03 11:16:15 +01:00
|
|
|
|
|
|
|
await utils.checkLayoutPresent();
|
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
const micButton = await utils.waitForElement('#mic-btn');
|
|
|
|
await micButton.click();
|
|
|
|
|
|
|
|
await utils.waitForElement('#mic-btn #mic_off');
|
|
|
|
expect(await utils.isPresent('#mic-btn #mic_off')).to.be.true;
|
2022-11-03 11:16:15 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
await micButton.click();
|
|
|
|
|
|
|
|
await utils.waitForElement('#mic-btn #mic');
|
|
|
|
expect(await utils.isPresent('#mic-btn #mic')).to.be.true;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should mute and unmute the local camera', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkLayoutPresent();
|
2022-11-03 11:16:15 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
const cameraButton = await utils.waitForElement('#camera-btn');
|
|
|
|
await cameraButton.click();
|
2022-11-03 11:16:15 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
await utils.waitForElement('#camera-btn #videocam_off');
|
|
|
|
expect(await utils.isPresent('#camera-btn #videocam_off')).to.be.true;
|
2022-11-03 11:16:15 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
await cameraButton.click();
|
2022-11-03 11:16:15 +01:00
|
|
|
|
2023-03-01 12:23:38 +01:00
|
|
|
await utils.waitForElement('#camera-btn #videocam');
|
|
|
|
expect(await utils.isPresent('#camera-btn #videocam')).to.be.true;
|
2022-11-03 11:16:15 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2023-04-03 14:25:07 +02:00
|
|
|
|
|
|
|
describe('Testing video is playing', () => {
|
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should play the participant video with only audio', async () => {
|
|
|
|
const sessionName = 'audioOnlyE2E';
|
|
|
|
const fixedUrl = `${url}&sessionName=${sessionName}`;
|
|
|
|
await browser.get(fixedUrl);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
// Starting new browser for adding the second participant
|
|
|
|
const newTabScript = `window.open("${fixedUrl}")`;
|
|
|
|
await browser.executeScript(newTabScript);
|
|
|
|
const tabs = await browser.getAllWindowHandles();
|
|
|
|
await browser.switchTo().window(tabs[1]);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
await utils.clickOn('#camera-button');
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
// Go to first tab
|
|
|
|
await browser.switchTo().window(tabs[0]);
|
|
|
|
|
|
|
|
// Wait until NO_STREAM_PLAYING_EVENT exception timeout is reached
|
|
|
|
await browser.sleep(6000);
|
|
|
|
|
|
|
|
const exceptionQuantity = await utils.getNumberOfElements('#NO_STREAM_PLAYING_EVENT');
|
|
|
|
expect(exceptionQuantity).equals(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should play the participant video with only video', async () => {
|
|
|
|
const sessionName = 'videoOnlyE2E';
|
|
|
|
const fixedUrl = `${url}&sessionName=${sessionName}`;
|
|
|
|
await browser.get(fixedUrl);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
// Starting new browser for adding the second participant
|
|
|
|
const newTabScript = `window.open("${fixedUrl}")`;
|
|
|
|
await browser.executeScript(newTabScript);
|
|
|
|
const tabs = await browser.getAllWindowHandles();
|
|
|
|
await browser.switchTo().window(tabs[1]);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
await utils.clickOn('#microphone-button');
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
// Go to first tab
|
|
|
|
await browser.switchTo().window(tabs[0]);
|
|
|
|
|
|
|
|
// Wait until NO_STREAM_PLAYING_EVENT exception timeout is reached
|
|
|
|
await browser.sleep(6000);
|
|
|
|
|
|
|
|
const exceptionQuantity = await utils.getNumberOfElements('#NO_STREAM_PLAYING_EVENT');
|
|
|
|
expect(exceptionQuantity).equals(0);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Testing WITHOUT MEDIA DEVICES permissions', () => {
|
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(getBrowserOptionsWithoutDevices())
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to PREJOIN page', async () => {
|
|
|
|
await browser.get(`${url}`);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#microphone-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to ROOM page', async () => {
|
|
|
|
await browser.get(`${url}`);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#mic-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to ROOM page without prejoin', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#mic-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should the settings buttons be disabled', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
// Open more options menu
|
|
|
|
await utils.clickOn('#more-options-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if fullscreen button is not present
|
|
|
|
await utils.waitForElement('.mat-menu-content');
|
|
|
|
expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
|
|
|
|
|
|
|
await utils.clickOn('#toolbar-settings-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
await utils.waitForElement('.settings-container');
|
|
|
|
expect(await utils.isPresent('.settings-container')).to.be.true;
|
|
|
|
|
|
|
|
await utils.clickOn('#video-opt');
|
|
|
|
expect(await utils.isPresent('ov-video-devices-select')).to.be.true;
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
await utils.clickOn('#audio-opt');
|
|
|
|
expect(await utils.isPresent('ov-audio-devices-select')).to.be.true;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#microphone-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
describe('Testing PRO features with OpenVidu CE', () => {
|
2022-10-26 14:12:25 +02:00
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
it('should SHOW the VIRTUAL BACKGROUND PRO feature dialog', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
await browser.get(`${url}&prejoin=true`);
|
2022-11-24 11:57:21 +01:00
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
|
|
|
|
await utils.waitForElement('#background-effects-btn');
|
|
|
|
await utils.clickOn('#background-effects-btn');
|
|
|
|
|
|
|
|
await utils.chceckProFeatureAlertIsPresent();
|
|
|
|
|
2022-11-24 12:44:24 +01:00
|
|
|
// Close alert
|
|
|
|
await (await utils.waitForElement('html')).sendKeys(Key.ESCAPE);
|
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// Join to room
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
// Checking if toolbar is present
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
// Open more options menu
|
|
|
|
await utils.clickOn('#more-options-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if button panel is present
|
|
|
|
await utils.waitForElement('.mat-menu-content');
|
|
|
|
expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
|
|
|
|
|
|
|
await utils.waitForElement('#virtual-bg-btn');
|
|
|
|
await utils.clickOn('#virtual-bg-btn');
|
|
|
|
|
|
|
|
// Expect it shows the pro feature alert
|
|
|
|
await utils.chceckProFeatureAlertIsPresent();
|
|
|
|
});
|
|
|
|
|
2022-11-16 11:35:07 +01:00
|
|
|
it('should SHOW the CAPTIONS PRO feature dialog', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
await browser.get(`${url}&prejoin=false`);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
// Checking if toolbar is present
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
// Open more options menu
|
|
|
|
await utils.clickOn('#more-options-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if button panel is present
|
|
|
|
await utils.waitForElement('.mat-menu-content');
|
|
|
|
expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
|
|
|
|
2022-11-16 11:35:07 +01:00
|
|
|
await utils.waitForElement('#toolbar-settings-btn');
|
|
|
|
expect(await utils.isPresent('#toolbar-settings-btn')).to.be.true;
|
|
|
|
await utils.clickOn('#toolbar-settings-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-16 11:35:07 +01:00
|
|
|
// Expect captions panel shows the pro feature content
|
|
|
|
await utils.waitForElement('#settings-container');
|
|
|
|
await utils.clickOn('#captions-opt');
|
|
|
|
await utils.waitForElement('.pro-feature');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
|
|
|
// Open more options menu
|
|
|
|
await utils.clickOn('#more-options-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if button panel is present
|
|
|
|
await utils.waitForElement('.mat-menu-content');
|
|
|
|
expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
|
|
|
|
|
|
|
// Checking if captions button is present
|
|
|
|
await utils.waitForElement('#captions-btn');
|
|
|
|
expect(await utils.isPresent('#captions-btn')).to.be.true;
|
|
|
|
await utils.clickOn('#captions-btn');
|
|
|
|
|
2022-11-16 11:35:07 +01:00
|
|
|
await utils.waitForElement('ov-pro-feature-template');
|
|
|
|
expect(await utils.isPresent('.captions-container')).to.be.false;
|
|
|
|
});
|
2022-11-24 11:57:21 +01:00
|
|
|
});
|
|
|
|
|
2022-11-16 11:35:07 +01:00
|
|
|
/**
|
2022-11-24 11:57:21 +01:00
|
|
|
* TODO:
|
|
|
|
* The following E2E TESTS only work with OpenVidu PRO.
|
|
|
|
* It should run with OpenVidu PRO
|
2022-11-16 11:35:07 +01:00
|
|
|
*/
|
2022-11-24 11:57:21 +01:00
|
|
|
// describe('Testing captions features', () => {
|
|
|
|
// let browser: WebDriver;
|
|
|
|
// let utils: OpenViduComponentsPO;
|
|
|
|
// async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
// return await new Builder()
|
|
|
|
// .forBrowser(WebComponentConfig.browserName)
|
|
|
|
// .withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
// .setChromeOptions(WebComponentConfig.browserOptions)
|
|
|
|
// .usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
// .build();
|
|
|
|
// }
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// beforeEach(async () => {
|
|
|
|
// browser = await createChromeBrowser();
|
|
|
|
// utils = new OpenViduComponentsPO(browser);
|
|
|
|
// });
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// afterEach(async () => {
|
|
|
|
// await browser.quit();
|
|
|
|
// });
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// it('should OPEN the CAPTIONS container', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if captions button is present
|
|
|
|
// await utils.waitForElement('#captions-btn');
|
|
|
|
// expect(await utils.isPresent('#captions-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#captions-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.captions-container');
|
|
|
|
// });
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// it('should OPEN the SETTINGS panel from captions button', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if captions button is present
|
|
|
|
// await utils.waitForElement('#captions-btn');
|
|
|
|
// expect(await utils.isPresent('#captions-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#captions-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.captions-container');
|
|
|
|
// await utils.waitForElement('#caption-settings-btn');
|
|
|
|
// await utils.clickOn('#caption-settings-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.settings-container');
|
|
|
|
// expect(await utils.isPresent('.settings-container')).to.be.true;
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('ov-captions-settings');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Expect caption button is not present
|
|
|
|
// expect(await utils.isPresent('#caption-settings-btn')).to.be.false;
|
|
|
|
// });
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// it('should TOGGLE the CAPTIONS container from settings panel', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if captions button is present
|
|
|
|
// await utils.waitForElement('#captions-btn');
|
|
|
|
// expect(await utils.isPresent('#captions-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#captions-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.captions-container');
|
|
|
|
// await utils.waitForElement('#caption-settings-btn');
|
|
|
|
// await utils.clickOn('#caption-settings-btn');
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.settings-container');
|
|
|
|
// expect(await utils.isPresent('.settings-container')).to.be.true;
|
2022-10-26 14:12:25 +02:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('ov-captions-settings');
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// expect(await utils.isPresent('.captions-container')).to.be.true;
|
|
|
|
// await utils.clickOn('#captions-toggle-slide');
|
|
|
|
// expect(await utils.isPresent('.captions-container')).to.be.false;
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(200);
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.clickOn('#captions-toggle-slide');
|
|
|
|
// expect(await utils.isPresent('.captions-container')).to.be.true;
|
|
|
|
// });
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// it('should change the CAPTIONS language', async () => {
|
2022-11-24 18:21:05 +01:00
|
|
|
// await browser.get(`${url}&prejoin=false`);
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.checkSessionIsPresent();
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if toolbar is present
|
|
|
|
// await utils.checkToolbarIsPresent();
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Open more options menu
|
|
|
|
// await utils.clickOn('#more-options-btn');
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if button panel is present
|
|
|
|
// await utils.waitForElement('.mat-menu-content');
|
|
|
|
// expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// // Checking if captions button is present
|
|
|
|
// await utils.waitForElement('#captions-btn');
|
|
|
|
// expect(await utils.isPresent('#captions-btn')).to.be.true;
|
|
|
|
// await utils.clickOn('#captions-btn');
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.captions-container');
|
|
|
|
// await utils.waitForElement('#caption-settings-btn');
|
|
|
|
// await utils.clickOn('#caption-settings-btn');
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await browser.sleep(500);
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('.settings-container');
|
|
|
|
// expect(await utils.isPresent('.settings-container')).to.be.true;
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.waitForElement('ov-captions-settings');
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// expect(await utils.isPresent('.captions-container')).to.be.true;
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.clickOn('.lang-button');
|
|
|
|
// await browser.sleep(500);
|
2022-11-16 11:35:07 +01:00
|
|
|
|
2022-11-24 11:57:21 +01:00
|
|
|
// await utils.clickOn('#es-ES');
|
|
|
|
// await utils.clickOn('.panel-close-button');
|
|
|
|
|
|
|
|
// const button = await utils.waitForElement('#caption-settings-btn');
|
|
|
|
// expect(await button.getText()).equals('settingsEspañol');
|
|
|
|
|
|
|
|
// });
|
|
|
|
// });
|
2023-03-01 12:23:38 +01:00
|
|
|
|
|
|
|
describe('Testing WITHOUT MEDIA DEVICES permissions', () => {
|
|
|
|
let browser: WebDriver;
|
|
|
|
let utils: OpenViduComponentsPO;
|
|
|
|
async function createChromeBrowser(): Promise<WebDriver> {
|
|
|
|
return await new Builder()
|
|
|
|
.forBrowser(WebComponentConfig.browserName)
|
|
|
|
.withCapabilities(WebComponentConfig.browserCapabilities)
|
|
|
|
.setChromeOptions(getBrowserOptionsWithoutDevices())
|
|
|
|
.usingServer(WebComponentConfig.seleniumAddress)
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
browser = await createChromeBrowser();
|
|
|
|
utils = new OpenViduComponentsPO(browser);
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(async () => {
|
|
|
|
await browser.quit();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to PREJOIN page', async () => {
|
|
|
|
await browser.get(`${url}`);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#microphone-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to ROOM page', async () => {
|
|
|
|
await browser.get(`${url}`);
|
|
|
|
|
|
|
|
await utils.checkPrejoinIsPresent();
|
|
|
|
|
|
|
|
await utils.clickOn('#join-button');
|
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#mic-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be able to ACCESS to ROOM page without prejoin', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkSessionIsPresent();
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#mic-btn');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should the settings buttons be disabled', async () => {
|
|
|
|
await browser.get(`${url}&prejoin=false`);
|
|
|
|
|
|
|
|
await utils.checkToolbarIsPresent();
|
|
|
|
|
|
|
|
// Open more options menu
|
|
|
|
await utils.clickOn('#more-options-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
// Checking if fullscreen button is not present
|
|
|
|
await utils.waitForElement('.mat-menu-content');
|
|
|
|
expect(await utils.isPresent('.mat-menu-content')).to.be.true;
|
|
|
|
|
|
|
|
await utils.clickOn('#toolbar-settings-btn');
|
|
|
|
|
|
|
|
await browser.sleep(500);
|
|
|
|
|
|
|
|
await utils.waitForElement('.settings-container');
|
|
|
|
expect(await utils.isPresent('.settings-container')).to.be.true;
|
|
|
|
|
|
|
|
await utils.clickOn('#video-opt');
|
|
|
|
expect(await utils.isPresent('ov-video-devices-select')).to.be.true;
|
|
|
|
|
|
|
|
let button = await utils.waitForElement('#camera-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
|
|
|
|
await utils.clickOn('#audio-opt');
|
|
|
|
expect(await utils.isPresent('ov-audio-devices-select')).to.be.true;
|
|
|
|
|
|
|
|
button = await utils.waitForElement('#microphone-button');
|
|
|
|
expect(await button.isEnabled()).to.be.false;
|
|
|
|
});
|
|
|
|
});
|