diff --git a/openvidu-components-angular/e2e/nested-components/directives.test.ts b/openvidu-components-angular/e2e/nested-components/directives.test.ts index 6784b94542..b6a8341e52 100644 --- a/openvidu-components-angular/e2e/nested-components/directives.test.ts +++ b/openvidu-components-angular/e2e/nested-components/directives.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, By, WebDriver } from 'selenium-webdriver'; import { NestedConfig } from '../selenium.conf'; @@ -37,13 +36,13 @@ describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => { // Check if custom toolbar is present in DOM await utils.waitForElement('#custom-toolbar'); - expect(await utils.isPresent('#custom-toolbar')).to.be.true; + expect(await utils.isPresent('#custom-toolbar')).toBeTrue(); // Check if additional buttons element has not been rendered - expect(await utils.isPresent('#custom-toolbar-additional-buttons')).to.be.false; + expect(await utils.isPresent('#custom-toolbar-additional-buttons')).toBeFalse(); // Check if default toolbar is not present - expect(await utils.isPresent('#default-toolbar')).to.be.false; + expect(await utils.isPresent('#default-toolbar')).toBeFalse(); }); it('should inject the custom TOOLBAR with additional buttons', async () => { @@ -57,17 +56,17 @@ describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => { // Check if custom toolbar is present in DOM await utils.waitForElement('#custom-toolbar'); - expect(await utils.isPresent('#custom-toolbar')).to.be.true; + expect(await utils.isPresent('#custom-toolbar')).toBeTrue(); // Check if additional buttons element has been rendered; await utils.waitForElement('#custom-toolbar-additional-buttons'); - expect(await utils.isPresent('#custom-toolbar-additional-buttons')).to.be.true; + expect(await utils.isPresent('#custom-toolbar-additional-buttons')).toBeTrue(); const element = await browser.findElements(By.id('toolbar-additional-btn')); - expect(element.length).equals(2); + expect(element.length).toEqual(2); // Check if default toolbar is not present - expect(await utils.isPresent('#default-toolbar')).to.be.false; + expect(await utils.isPresent('#default-toolbar')).toBeFalse(); }); it('should inject the custom TOOLBAR with additional PANEL buttons', async () => { @@ -81,17 +80,17 @@ describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => { // Check if custom toolbar is present in DOM await utils.waitForElement('#custom-toolbar'); - expect(await utils.isPresent('#custom-toolbar')).to.be.true; + expect(await utils.isPresent('#custom-toolbar')).toBeTrue(); // Check if additional buttons element has been rendered; await utils.waitForElement('#custom-toolbar-additional-panel-buttons'); - expect(await utils.isPresent('#custom-toolbar-additional-panel-buttons')).to.be.true; + expect(await utils.isPresent('#custom-toolbar-additional-panel-buttons')).toBeTrue(); const element = await browser.findElements(By.id('toolbar-additional-panel-btn')); - expect(element.length).equals(1); + expect(element.length).toEqual(1); // Check if default toolbar is not present - expect(await utils.isPresent('#default-toolbar')).to.be.false; + expect(await utils.isPresent('#default-toolbar')).toBeFalse(); }); it('should inject the TOOLBAR ADDITIONAL BUTTONS only', async () => { @@ -104,17 +103,17 @@ describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => { // Check if default toolbar is present await utils.waitForElement('#default-toolbar'); - expect(await utils.isPresent('#default-toolbar')).to.be.true; + expect(await utils.isPresent('#default-toolbar')).toBeTrue(); // Check if additional buttons are present await utils.waitForElement('#custom-toolbar-additional-buttons'); - expect(await utils.isPresent('#custom-toolbar-additional-buttons')).to.be.true; + expect(await utils.isPresent('#custom-toolbar-additional-buttons')).toBeTrue(); element = await browser.findElements(By.id('toolbar-additional-btn')); - expect(element.length).equals(3); + expect(element.length).toEqual(3); // Check if custom toolbar not is present - expect(await utils.isPresent('#custom-toolbar')).to.be.false; + expect(await utils.isPresent('#custom-toolbar')).toBeFalse(); }); it('should inject the TOOLBAR ADDITIONAL PANEL BUTTONS only', async () => { @@ -127,17 +126,17 @@ describe('Testing TOOLBAR STRUCTURAL DIRECTIVES', () => { // Check if default toolbar is present await utils.waitForElement('#default-toolbar'); - expect(await utils.isPresent('#default-toolbar')).to.be.true; + expect(await utils.isPresent('#default-toolbar')).toBeTrue(); // Check if additional buttons are present await utils.waitForElement('#custom-toolbar-additional-panel-buttons'); - expect(await utils.isPresent('#custom-toolbar-additional-panel-buttons')).to.be.true; + expect(await utils.isPresent('#custom-toolbar-additional-panel-buttons')).toBeTrue(); element = await browser.findElements(By.id('toolbar-additional-panel-btn')); - expect(element.length).equals(2); + expect(element.length).toEqual(2); // Check if custom toolbar not is present - expect(await utils.isPresent('#custom-toolbar')).to.be.false; + expect(await utils.isPresent('#custom-toolbar')).toBeFalse(); }); }); @@ -178,25 +177,25 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if custom participant panel is not present - expect(await utils.isPresent('#custom-participants-panel')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel')).toBeFalse(); // Click on button for opening panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is not present - expect(await utils.isPresent('#default-chat-panel')).to.be.false; + expect(await utils.isPresent('#default-chat-panel')).toBeFalse(); // Check if custom chat panel is not present - expect(await utils.isPresent('#custom-chat-panel')).to.be.false; + expect(await utils.isPresent('#custom-chat-panel')).toBeFalse(); }); it('should inject the CUSTOM PANEL with ADDITIONAL PANEL only', async () => { @@ -217,15 +216,15 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present element = await browser.findElements(By.id('custom-additional-panel')); - expect(element.length).equals(1); + expect(element.length).toEqual(1); element = await utils.waitForElement('#additional-panel-title'); - expect(await utils.isPresent('#additional-panel-title')).to.be.true; - expect(await element.getAttribute('innerText')).equals('NEW PANEL'); + expect(await utils.isPresent('#additional-panel-title')).toBeTrue(); + expect(await element.getAttribute('innerText')).toEqual('NEW PANEL'); await utils.clickOn('#toolbar-additional-panel-btn'); - expect(await utils.isPresent('#custom-additional-panel')).to.be.false; + expect(await utils.isPresent('#custom-additional-panel')).toBeFalse(); }); it('should inject the CUSTOM PANEL with CHAT PANEL only', async () => { @@ -245,26 +244,26 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if custom participant panel is not present - expect(await utils.isPresent('#custom-participants-panel')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel')).toBeFalse(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is not present - expect(await utils.isPresent('#default-chat-panel')).to.be.false; + expect(await utils.isPresent('#default-chat-panel')).toBeFalse(); // Check if custom chat panel is not present await utils.waitForElement('#custom-chat-panel'); - expect(await utils.isPresent('#custom-chat-panel')).to.be.true; + expect(await utils.isPresent('#custom-chat-panel')).toBeTrue(); }); it('should inject the CUSTOM PANEL with ACTIVITIES PANEL only', async () => { @@ -284,14 +283,14 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { await utils.clickOn('#activities-panel-btn'); // Check if default activities panel is not present - expect(await utils.isPresent('#default-activities-panel')).to.be.false; + expect(await utils.isPresent('#default-activities-panel')).toBeFalse(); // Check if custom chat panel is not present element = await utils.waitForElement('#custom-activities-panel'); - expect(await utils.isPresent('#custom-activities-panel')).to.be.true; + expect(await utils.isPresent('#custom-activities-panel')).toBeTrue(); element = await utils.waitForElement('#activities-panel-title'); - expect(await element.getAttribute('innerText')).equals('CUSTOM ACTIVITIES PANEL'); + expect(await element.getAttribute('innerText')).toEqual('CUSTOM ACTIVITIES PANEL'); }); it('should inject the CUSTOM PANEL with PARTICIPANTS PANEL only and without children', async () => { @@ -311,25 +310,25 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); await utils.waitForElement('#custom-participants-panel'); - expect(await utils.isPresent('#custom-participants-panel')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel')).toBeTrue(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is not present - expect(await utils.isPresent('#default-chat-panel')).to.be.false; + expect(await utils.isPresent('#default-chat-panel')).toBeFalse(); // Check if custom chat panel is not present - expect(await utils.isPresent('#custom-chat-panel')).to.be.false; + expect(await utils.isPresent('#custom-chat-panel')).toBeFalse(); }); it('should inject the CUSTOM PANEL with PARTICIPANTS PANEL and P ITEM only', async () => { @@ -351,24 +350,24 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if custom participant panel is present await utils.waitForElement('#custom-participants-panel'); - expect(await utils.isPresent('#custom-participants-panel')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel')).toBeTrue(); // Check if custom participant panel item is present await utils.waitForElement('#custom-participants-panel-item'); - expect(await utils.isPresent('#custom-participants-panel-item')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel-item')).toBeTrue(); // Check if default participant panel item is not present - expect(await utils.isPresent('#default-participant-panel-item')).to.be.false; + expect(await utils.isPresent('#default-participant-panel-item')).toBeFalse(); }); it('should inject the CUSTOM PANEL with PARTICIPANTS PANEL and P ITEM and P ITEM ELEMENT', async () => { @@ -392,28 +391,28 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if custom participant panel is present await utils.waitForElement('#custom-participants-panel'); - expect(await utils.isPresent('#custom-participants-panel')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel')).toBeTrue(); // Check if custom participant panel item is present await utils.waitForElement('#custom-participants-panel-item'); - expect(await utils.isPresent('#custom-participants-panel-item')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel-item')).toBeTrue(); // Check if custom participant panel item element is present await utils.waitForElement('#custom-participants-panel-item-element'); - expect(await utils.isPresent('#custom-participants-panel-item-element')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel-item-element')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if default participant panel item is not present - expect(await utils.isPresent('#default-participant-panel-item')).to.be.false; + expect(await utils.isPresent('#default-participant-panel-item')).toBeFalse(); }); it('should inject an ACTIVITIES PANEL only', async () => { @@ -430,15 +429,15 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { await utils.clickOn('#activities-panel-btn'); // Check if default panel is not present - expect(await utils.isPresent('#default-activities-panel')).to.be.false; + expect(await utils.isPresent('#default-activities-panel')).toBeFalse(); // Check if custom panel is present await utils.waitForElement('#custom-activities-panel'); - expect(await utils.isPresent('#custom-activities-panel')).to.be.true; + expect(await utils.isPresent('#custom-activities-panel')).toBeTrue(); // Check if activities panel is has content await utils.waitForElement('#activities-container'); - expect(await utils.isPresent('#activities-container')).to.be.true; + expect(await utils.isPresent('#activities-container')).toBeTrue(); }); it('should inject an ADDITIONAL PANEL only', async () => { @@ -457,14 +456,14 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-additional-panel'); - expect(await utils.isPresent('#custom-additional-panel')).to.be.true; + expect(await utils.isPresent('#custom-additional-panel')).toBeTrue(); element = await utils.waitForElement('#additional-panel-title'); - expect(await element.getAttribute('innerText')).equals('NEW PANEL'); + expect(await element.getAttribute('innerText')).toEqual('NEW PANEL'); await utils.clickOn('#toolbar-additional-panel-btn'); - expect(await utils.isPresent('#custom-additional-panel')).to.be.false; + expect(await utils.isPresent('#custom-additional-panel')).toBeFalse(); }); it('should inject the CHAT PANEL only', async () => { @@ -481,28 +480,28 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { await utils.clickOn('#participants-panel-btn'); // Check if custom panel is present - expect(await utils.isPresent('#custom-panels')).to.be.false; + expect(await utils.isPresent('#custom-panels')).toBeFalse(); // Check if default panel is not present await utils.waitForElement('#default-panel'); - expect(await utils.isPresent('#default-panel')).to.be.true; + expect(await utils.isPresent('#default-panel')).toBeTrue(); // Check if default participant panel is not present await utils.waitForElement('#default-participants-panel'); - expect(await utils.isPresent('#default-participants-panel')).to.be.true; + expect(await utils.isPresent('#default-participants-panel')).toBeTrue(); // Check if custom participant panel is not present - expect(await utils.isPresent('#custom-participants-panel')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel')).toBeFalse(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is not present - expect(await utils.isPresent('#default-chat-panel')).to.be.false; + expect(await utils.isPresent('#default-chat-panel')).toBeFalse(); // Check if custom chat panel is present await utils.waitForElement('#custom-chat-panel'); - expect(await utils.isPresent('#custom-chat-panel')).to.be.true; + expect(await utils.isPresent('#custom-chat-panel')).toBeTrue(); }); it('should inject the PARTICIPANTS PANEL only', async () => { @@ -519,28 +518,28 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { await utils.clickOn('#participants-panel-btn'); // Check if custom panel is present - expect(await utils.isPresent('#custom-panels')).to.be.false; + expect(await utils.isPresent('#custom-panels')).toBeFalse(); // Check if default panel is not present await utils.waitForElement('#default-panel'); - expect(await utils.isPresent('#default-panel')).to.be.true; + expect(await utils.isPresent('#default-panel')).toBeTrue(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if custom participant panel is present await utils.waitForElement('#custom-participants-panel'); - expect(await utils.isPresent('#custom-participants-panel')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel')).toBeTrue(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is present await utils.waitForElement('#default-chat-panel'); - expect(await utils.isPresent('#default-chat-panel')).to.be.true; + expect(await utils.isPresent('#default-chat-panel')).toBeTrue(); // Check if custom chat panel is not present - expect(await utils.isPresent('#custom-chat-panel')).to.be.false; + expect(await utils.isPresent('#custom-chat-panel')).toBeFalse(); }); it('should inject the PARTICIPANTS PANEL ITEM only', async () => { @@ -557,31 +556,31 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { await utils.clickOn('#participants-panel-btn'); // Check if custom panel is present - expect(await utils.isPresent('#custom-panels')).to.be.false; + expect(await utils.isPresent('#custom-panels')).toBeFalse(); // Check if default panel is not present await utils.waitForElement('#default-panel'); - expect(await utils.isPresent('#default-panel')).to.be.true; + expect(await utils.isPresent('#default-panel')).toBeTrue(); // Check if default participant panel is not present await utils.waitForElement('#default-participants-panel'); - expect(await utils.isPresent('#default-participants-panel')).to.be.true; + expect(await utils.isPresent('#default-participants-panel')).toBeTrue(); // Check if custom participant panel is not present - expect(await utils.isPresent('#custom-participants-panel')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel')).toBeFalse(); await utils.waitForElement('#custom-participants-panel-item'); - expect(await utils.isPresent('#custom-participants-panel-item')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel-item')).toBeTrue(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is present await utils.waitForElement('#default-chat-panel'); - expect(await utils.isPresent('#default-chat-panel')).to.be.true; + expect(await utils.isPresent('#default-chat-panel')).toBeTrue(); // Check if custom chat panel is not present - expect(await utils.isPresent('#custom-chat-panel')).to.be.false; + expect(await utils.isPresent('#custom-chat-panel')).toBeFalse(); }); it('should inject the PARTICIPANTS PANEL ITEM ELEMENT only', async () => { @@ -599,27 +598,27 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if default participant panel is not present await utils.waitForElement('#default-participants-panel'); - expect(await utils.isPresent('#default-participants-panel')).to.be.true; + expect(await utils.isPresent('#default-participants-panel')).toBeTrue(); // Check if custom participant panel is not present - expect(await utils.isPresent('#custom-participants-panel')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel')).toBeFalse(); - expect(await utils.isPresent('#custom-participants-panel-item')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel-item')).toBeFalse(); - expect(await utils.isPresent('#custom-participants-panel-item')).to.be.false; + expect(await utils.isPresent('#custom-participants-panel-item')).toBeFalse(); await utils.waitForElement('#custom-participants-panel-item-element'); - expect(await utils.isPresent('#custom-participants-panel-item-element')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel-item-element')).toBeTrue(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is present await utils.waitForElement('#default-chat-panel'); - expect(await utils.isPresent('#default-chat-panel')).to.be.true; + expect(await utils.isPresent('#default-chat-panel')).toBeTrue(); // Check if custom chat panel is not present; - expect(await utils.isPresent('#custom-chat-panel')).to.be.false; + expect(await utils.isPresent('#custom-chat-panel')).toBeFalse(); }); it('should inject the CUSTOM PANEL with CHAT and PARTICIPANTS PANELS', async () => { @@ -639,27 +638,27 @@ describe('Testing PANEL STRUCTURAL DIRECTIVES', () => { // Check if custom panel is present await utils.waitForElement('#custom-panels'); - expect(await utils.isPresent('#custom-panels')).to.be.true; + expect(await utils.isPresent('#custom-panels')).toBeTrue(); // Check if default panel is not present - expect(await utils.isPresent('#default-panel')).to.be.false; + expect(await utils.isPresent('#default-panel')).toBeFalse(); // Check if default participant panel is not present - expect(await utils.isPresent('#default-participant-panel')).to.be.false; + expect(await utils.isPresent('#default-participant-panel')).toBeFalse(); // Check if custom participant panel is present await utils.waitForElement('#custom-participants-panel'); - expect(await utils.isPresent('#custom-participants-panel')).to.be.true; + expect(await utils.isPresent('#custom-participants-panel')).toBeTrue(); // Click on button for opening chat panel await utils.clickOn('#chat-panel-btn'); // Check if default chat panel is not present - expect(await utils.isPresent('#default-chat-panel')).to.be.false; + expect(await utils.isPresent('#default-chat-panel')).toBeFalse(); // Check if custom chat panel is present await utils.waitForElement('#custom-chat-panel'); - expect(await utils.isPresent('#custom-chat-panel')).to.be.true; + expect(await utils.isPresent('#custom-chat-panel')).toBeTrue(); }); }); @@ -694,16 +693,16 @@ describe('Testing LAYOUT STRUCTURAL DIRECTIVES', () => { // Check if custom layout is present await utils.waitForElement('#custom-layout'); - expect(await utils.isPresent('#custom-layout')).to.be.true; + expect(await utils.isPresent('#custom-layout')).toBeTrue(); // Check if default layout is not present - expect(await utils.isPresent('#default-layout')).to.be.false; + expect(await utils.isPresent('#default-layout')).toBeFalse(); // Check if custom stream is not present - expect(await utils.isPresent('#custom-stream')).to.be.false; + expect(await utils.isPresent('#custom-stream')).toBeFalse(); // Check if video is not present - expect(await utils.isPresent('video')).to.be.false; + expect(await utils.isPresent('video')).toBeFalse(); }); it('should inject the custom LAYOUT WITH STREAM', async () => { @@ -717,21 +716,21 @@ describe('Testing LAYOUT STRUCTURAL DIRECTIVES', () => { // Check if custom layout is present await utils.waitForElement('#custom-layout'); - expect(await utils.isPresent('#custom-layout')).to.be.true; + expect(await utils.isPresent('#custom-layout')).toBeTrue(); // Check if default layout is not present - expect(await utils.isPresent('default-layout')).to.be.false; + expect(await utils.isPresent('default-layout')).toBeFalse(); // Check if custom stream is present await utils.waitForElement('#custom-stream'); - expect(await utils.isPresent('#custom-stream')).to.be.true; + expect(await utils.isPresent('#custom-stream')).toBeTrue(); // Check if default stream is not present - expect(await utils.isPresent('default-stream')).to.be.false; + expect(await utils.isPresent('default-stream')).toBeFalse(); // Check if video is present await utils.waitForElement('video'); - expect(await utils.isPresent('video')).to.be.true; + expect(await utils.isPresent('video')).toBeTrue(); }); it('should inject the CUSTOM STREAM only', async () => { @@ -743,21 +742,21 @@ describe('Testing LAYOUT STRUCTURAL DIRECTIVES', () => { // Check if default layout is not present await utils.waitForElement('#default-layout'); - expect(await utils.isPresent('#default-layout')).to.be.true; + expect(await utils.isPresent('#default-layout')).toBeTrue(); // Check if custom stream is present await utils.waitForElement('#custom-stream'); - expect(await utils.isPresent('#custom-stream')).to.be.true; + expect(await utils.isPresent('#custom-stream')).toBeTrue(); // Check if custom layout is not present - expect(await utils.isPresent('#custom-layout')).to.be.false; + expect(await utils.isPresent('#custom-layout')).toBeFalse(); // Check if default stream is not present - expect(await utils.isPresent('default-stream')).to.be.false; + expect(await utils.isPresent('default-stream')).toBeFalse(); // Check if video is present await utils.waitForElement('video'); - expect(await utils.isPresent('video')).to.be.true; + expect(await utils.isPresent('video')).toBeTrue(); }); }); @@ -796,7 +795,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); // Check if chat button does not exist - expect(await utils.isPresent('chat-panel-btn')).to.be.false; + expect(await utils.isPresent('chat-panel-btn')).toBeFalse(); }); it('should HIDE the PARTICIPANTS PANEL BUTTON', async () => { @@ -811,7 +810,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); // Check if participants button does not exist - expect(await utils.isPresent('participants-panel-btn')).to.be.false; + expect(await utils.isPresent('participants-panel-btn')).toBeFalse(); }); it('should HIDE the ACTIVITIES PANEL BUTTON', async () => { @@ -826,7 +825,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); // Check if participants button does not exist - expect(await utils.isPresent('activities-panel-btn')).to.be.false; + expect(await utils.isPresent('activities-panel-btn')).toBeFalse(); }); it('should HIDE the DISPLAY LOGO', async () => { @@ -840,7 +839,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); - expect(await utils.isPresent('branding-logo')).to.be.false; + expect(await utils.isPresent('branding-logo')).toBeFalse(); }); it('should HIDE the DISPLAY ROOM name', async () => { @@ -854,7 +853,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); - expect(await utils.isPresent('session-name')).to.be.false; + expect(await utils.isPresent('session-name')).toBeFalse(); }); it('should HIDE the FULLSCREEN button', async () => { @@ -876,7 +875,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#more-options-menu'); // Checking if fullscreen button is not present - expect(await utils.isPresent('#fullscreen-btn')).to.be.false; + expect(await utils.isPresent('#fullscreen-btn')).toBeFalse(); }); it('should HIDE the STREAMING button', async () => { @@ -897,7 +896,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#more-options-menu'); // Checking if fullscreen button is not present - expect(await utils.isPresent('#broadcasting-btn')).to.be.false; + expect(await utils.isPresent('#broadcasting-btn')).toBeFalse(); }); it('should HIDE the LEAVE button', async () => { @@ -911,7 +910,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); - expect(await utils.isPresent('leave-btn')).to.be.false; + expect(await utils.isPresent('leave-btn')).toBeFalse(); }); it('should HIDE the SCREENSHARE button', async () => { @@ -925,7 +924,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.checkToolbarIsPresent(); - expect(await utils.isPresent('screenshare-btn')).to.be.false; + expect(await utils.isPresent('screenshare-btn')).toBeFalse(); }); it('should HIDE the AUDIO detector', async () => { @@ -940,7 +939,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#session-container'); await utils.waitForElement('#custom-stream'); - expect(await utils.isPresent('audio-wave-container')).to.be.false; + expect(await utils.isPresent('audio-wave-container')).toBeFalse(); }); it('should HIDE the PARTICIPANT NAME', async () => { @@ -955,7 +954,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#session-container'); await utils.waitForElement('#custom-stream'); - expect(await utils.isPresent('participant-name-container')).to.be.false; + expect(await utils.isPresent('participant-name-container')).toBeFalse(); }); it('should HIDE the SETTINGS button', async () => { @@ -969,7 +968,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#custom-stream'); - expect(await utils.isPresent('settings-container')).to.be.false; + expect(await utils.isPresent('settings-container')).toBeFalse(); }); it('should HIDE the participant MUTE button', async () => { @@ -1005,7 +1004,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#remote-participant-item'); - expect(await utils.isPresent('mute-btn')).to.be.false; + expect(await utils.isPresent('mute-btn')).toBeFalse(); }); it('should HIDE the RECORDING activity', async () => { @@ -1025,7 +1024,7 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('#custom-activities-panel'); - expect(await utils.isPresent('ov-recording-activity')).to.be.false; + expect(await utils.isPresent('ov-recording-activity')).toBeFalse(); }); it('should HIDE the STREAMING activity', async () => { @@ -1047,6 +1046,6 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => { await utils.waitForElement('ov-recording-activity'); - expect(await utils.isPresent('ov-broadcasting-activity')).to.be.false; + expect(await utils.isPresent('ov-broadcasting-activity')).toBeFalse(); }); }); diff --git a/openvidu-components-angular/e2e/nested-components/events.test.ts b/openvidu-components-angular/e2e/nested-components/events.test.ts index 5fd768d509..ed1ef5e4b9 100644 --- a/openvidu-components-angular/e2e/nested-components/events.test.ts +++ b/openvidu-components-angular/e2e/nested-components/events.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, By, WebDriver } from 'selenium-webdriver'; import { NestedConfig } from '../selenium.conf'; @@ -42,7 +41,7 @@ describe('Testing EVENTS', () => { // Checking if onLeaveButtonClicked has been received await utils.waitForElement('#onRoomDisconnected'); - expect(await utils.isPresent('#onRoomDisconnected')).to.be.true; + expect(await utils.isPresent('#onRoomDisconnected')).toBeTrue(); }); it('should receive the onVideoEnabledChanged event', async () => { @@ -57,7 +56,7 @@ describe('Testing EVENTS', () => { await utils.clickOn('#camera-btn'); await utils.waitForElement('#onVideoEnabledChanged'); - expect(await utils.isPresent('#onVideoEnabledChanged')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged')).toBeTrue(); }); it('should receive the onAudioEnabledChanged event', async () => { @@ -72,7 +71,7 @@ describe('Testing EVENTS', () => { await utils.clickOn('#mic-btn'); await utils.waitForElement('#onAudioEnabledChanged'); - expect(await utils.isPresent('#onAudioEnabledChanged')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged')).toBeTrue(); }); it('should receive the onScreenShareEnabledChanged event', async () => { @@ -87,7 +86,7 @@ describe('Testing EVENTS', () => { await utils.clickOn('#screenshare-btn'); await utils.waitForElement('#onScreenShareEnabledChanged'); - expect(await utils.isPresent('#onScreenShareEnabledChanged')).to.be.true; + expect(await utils.isPresent('#onScreenShareEnabledChanged')).toBeTrue(); }); it('should receive the onFullscreenEnabledChanged event', async () => { @@ -104,7 +103,7 @@ describe('Testing EVENTS', () => { await browser.sleep(1000); await utils.waitForElement('#onFullscreenEnabledChanged'); - expect(await utils.isPresent('#onFullscreenEnabledChanged')).to.be.true; + expect(await utils.isPresent('#onFullscreenEnabledChanged')).toBeTrue(); }); it('should receive the onRecordingStartRequested event', async () => { @@ -119,7 +118,7 @@ describe('Testing EVENTS', () => { await utils.toggleRecordingFromToolbar(); await utils.waitForElement('#onRecordingStartRequested'); - expect(await utils.isPresent('#onRecordingStartRequested')).to.be.true; + expect(await utils.isPresent('#onRecordingStartRequested')).toBeTrue(); }); it('should receive the onParticipantsPanelStatusChanged event', async () => { @@ -134,7 +133,7 @@ describe('Testing EVENTS', () => { await utils.togglePanel('participants'); await utils.waitForElement('#onParticipantsPanelStatusChanged'); - expect(await utils.isPresent('#onParticipantsPanelStatusChanged')).to.be.true; + expect(await utils.isPresent('#onParticipantsPanelStatusChanged')).toBeTrue(); }); it('should receive the onChatPanelStatusChanged event', async () => { @@ -149,7 +148,7 @@ describe('Testing EVENTS', () => { await utils.togglePanel('chat'); await utils.waitForElement('#onChatPanelStatusChanged'); - expect(await utils.isPresent('#onChatPanelStatusChanged')).to.be.true; + expect(await utils.isPresent('#onChatPanelStatusChanged')).toBeTrue(); }); it('should receive the onActivitiesPanelStatusChanged event', async () => { @@ -164,7 +163,7 @@ describe('Testing EVENTS', () => { await utils.togglePanel('activities'); await utils.waitForElement('#onActivitiesPanelStatusChanged'); - expect(await utils.isPresent('#onActivitiesPanelStatusChanged')).to.be.true; + expect(await utils.isPresent('#onActivitiesPanelStatusChanged')).toBeTrue(); }); it('should receive the onSettingsPanelStatusChanged event', async () => { @@ -179,6 +178,6 @@ describe('Testing EVENTS', () => { await utils.togglePanel('settings'); await utils.waitForElement('#onSettingsPanelStatusChanged'); - expect(await utils.isPresent('#onSettingsPanelStatusChanged')).to.be.true; + expect(await utils.isPresent('#onSettingsPanelStatusChanged')).toBeTrue(); }); }); diff --git a/openvidu-components-angular/e2e/tsconfig.json b/openvidu-components-angular/e2e/tsconfig.json index 284e1a88c4..94bf61e58c 100644 --- a/openvidu-components-angular/e2e/tsconfig.json +++ b/openvidu-components-angular/e2e/tsconfig.json @@ -6,7 +6,7 @@ "strict": true, "outDir": "./dist", "lib": ["es6"], - "types": [ "mocha", "node" ], + "types": [ "jasmine", "node" ], "experimentalDecorators": true, "emitDecoratorMetadata": true }, diff --git a/openvidu-components-angular/e2e/utils.po.test.ts b/openvidu-components-angular/e2e/utils.po.test.ts index 8ece4e9689..2df9b162d5 100644 --- a/openvidu-components-angular/e2e/utils.po.test.ts +++ b/openvidu-components-angular/e2e/utils.po.test.ts @@ -1,5 +1,4 @@ -import { expect } from 'chai'; -import { By, Origin, until, WebDriver, WebElement } from 'selenium-webdriver'; +import { By, until, WebDriver, WebElement } from 'selenium-webdriver'; export class OpenViduComponentsPO { private TIMEOUT = 10 * 1000; @@ -31,44 +30,44 @@ export class OpenViduComponentsPO { async checkPrejoinIsPresent(): Promise { await this.waitForElement('#prejoin-container'); - expect(await this.isPresent('#prejoin-container')).to.be.true; + expect(await this.isPresent('#prejoin-container')).toBe(true); } async checkSessionIsPresent() { await this.waitForElement('#call-container'); - expect(await this.isPresent('#call-container')).to.be.true; + expect(await this.isPresent('#call-container')).toBe(true); await this.waitForElement('#session-container'); - expect(await this.isPresent('#session-container')).to.be.true; + expect(await this.isPresent('#session-container')).toBe(true); } async checkLayoutPresent(): Promise { await this.waitForElement('#layout-container'); - expect(await this.isPresent('#layout-container')).to.be.true; + expect(await this.isPresent('#layout-container')).toBe(true); await this.waitForElement('#layout'); - expect(await this.isPresent('#layout')).to.be.true; + expect(await this.isPresent('#layout')).toBe(true); } async checkStreamIsPresent(): Promise { await this.waitForElement('.OV_stream'); - expect(await this.isPresent('.OV_stream')).to.be.true; + expect(await this.isPresent('.OV_stream')).toBe(true); } async checkVideoElementIsPresent(): Promise { await this.waitForElement('video'); - expect(await this.isPresent('video')).to.be.true; + expect(await this.isPresent('video')).toBe(true); } async checkToolbarIsPresent(): Promise { await this.waitForElement('#toolbar'); await this.waitForElement('#media-buttons-container'); - expect(await this.isPresent('#media-buttons-container')).to.be.true; + expect(await this.isPresent('#media-buttons-container')).toBe(true); } async chceckProFeatureAlertIsPresent(): Promise { await this.waitForElement('ov-pro-feature-template'); - expect(await this.isPresent('ov-pro-feature-template')).to.be.true; + expect(await this.isPresent('ov-pro-feature-template')).toBe(true); } async clickOn(selector: string): Promise { @@ -104,7 +103,7 @@ export class OpenViduComponentsPO { async toggleToolbarMoreOptions(): Promise { await this.waitForElement('#more-options-btn'); - expect(await this.isPresent('#more-options-btn')).to.be.true; + expect(await this.isPresent('#more-options-btn')).toBe(true); await this.clickOn('#more-options-btn'); await this.browser.sleep(500); await this.waitForElement('#more-options-menu'); @@ -124,7 +123,7 @@ export class OpenViduComponentsPO { await this.toggleToolbarMoreOptions(); await this.waitForElement('#recording-btn'); - expect(await this.isPresent('#recording-btn')).to.be.true; + expect(await this.isPresent('#recording-btn')).toBe(true); await this.clickOn('#recording-btn'); } @@ -133,7 +132,7 @@ export class OpenViduComponentsPO { await this.toggleToolbarMoreOptions(); await this.waitForElement('#fullscreen-btn'); - expect(await this.isPresent('#fullscreen-btn')).to.be.true; + expect(await this.isPresent('#fullscreen-btn')).toBe(true); await this.clickOn('#fullscreen-btn'); } @@ -141,7 +140,7 @@ export class OpenViduComponentsPO { switch (panelName) { case 'activities': await this.waitForElement('#activities-panel-btn'); - expect(await this.isPresent('#activities-panel-btn')).to.be.true; + expect(await this.isPresent('#activities-panel-btn')).toBe(true); await this.clickOn('#activities-panel-btn'); break; diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/api-directives.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/api-directives.test.ts index a572424fd4..95d3869753 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/api-directives.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/api-directives.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -34,7 +33,7 @@ describe('Testing API Directives', () => { await utils.checkPrejoinIsPresent(); // Checking if audio detection is not displayed - expect(await utils.isPresent('#audio-wave-container')).to.be.false; + expect(await utils.isPresent('#audio-wave-container')).toBeFalse(); const joinButton = await utils.waitForElement('#join-button'); await joinButton.click(); @@ -52,31 +51,31 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if screenshare button is not present - expect(await utils.isPresent('#screenshare-btn')).to.be.false; + expect(await utils.isPresent('#screenshare-btn')).toBeFalse(); // Checking if more options button is not present - expect(await utils.isPresent('#more-options-btn')).to.be.false; + expect(await utils.isPresent('#more-options-btn')).toBeFalse(); // Checking if participants panel button is not present - expect(await utils.isPresent('#participants-panel-btn')).to.be.false; + expect(await utils.isPresent('#participants-panel-btn')).toBeFalse(); // Checking if activities panel button is not present - expect(await utils.isPresent('#activities-panel-btn')).to.be.false; + expect(await utils.isPresent('#activities-panel-btn')).toBeFalse(); // Checking if logo is not displayed - expect(await utils.isPresent('#branding-logo')).to.be.false; + expect(await utils.isPresent('#branding-logo')).toBeFalse(); // Checking if session name is not displayed - expect(await utils.isPresent('#session-name')).to.be.false; + expect(await utils.isPresent('#session-name')).toBeFalse(); // Checking if nickname is not displayed - expect(await utils.getNumberOfElements('#participant-name-container')).equals(0); + expect(await utils.getNumberOfElements('#participant-name-container')).toEqual(0); // Checking if audio detection is not displayed - expect(await utils.isPresent('#audio-wave-container')).to.be.false; + expect(await utils.isPresent('#audio-wave-container')).toBeFalse(); // Checking if settings button is not displayed - expect(await utils.isPresent('#settings-container')).to.be.false; + expect(await utils.isPresent('#settings-container')).toBeFalse(); }); it('should change the UI LANG in prejoin page', async () => { @@ -87,7 +86,7 @@ describe('Testing API Directives', () => { await utils.waitForElement('#lang-btn-compact'); const element = await utils.waitForElement('#join-button'); - expect(await element.getText()).equal('Unirme ahora'); + expect(await element.getText()).toEqual('Unirme ahora'); }); it('should change the UI LANG in room page', async () => { @@ -99,12 +98,12 @@ describe('Testing API Directives', () => { await utils.togglePanel('settings'); await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('#default-settings-panel')).to.be.true; + expect(await utils.isPresent('#default-settings-panel')).toBeTrue(); const panelTitle = await utils.waitForElement('.panel-title'); - expect(await panelTitle.getText()).equal('Configuración'); + expect(await panelTitle.getText()).toEqual('Configuración'); const element = await utils.waitForElement('#lang-selected-name'); - expect(await element.getAttribute('innerText')).equal('Español'); + expect(await element.getAttribute('innerText')).toEqual('Español'); }); it('should override the LANG OPTIONS', async () => { @@ -114,7 +113,7 @@ describe('Testing API Directives', () => { await utils.waitForElement('#lang-btn-compact'); await utils.clickOn('#lang-btn-compact'); await browser.sleep(500); - expect(await utils.getNumberOfElements('.lang-menu-opt')).equals(2); + expect(await utils.getNumberOfElements('.lang-menu-opt')).toEqual(2); await utils.clickOn('.lang-menu-opt'); await browser.sleep(500); @@ -136,7 +135,7 @@ describe('Testing API Directives', () => { await browser.sleep(500); - expect(await utils.getNumberOfElements('.lang-menu-opt')).equals(2); + expect(await utils.getNumberOfElements('.lang-menu-opt')).toEqual(2); }); it('should show the PREJOIN page', async () => { @@ -165,7 +164,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if screenshare button is not present - expect(await utils.isPresent('#screenshare-btn')).to.be.true; + expect(await utils.isPresent('#screenshare-btn')).toBeTrue(); }); it('should show the token error WITH prejoin page', async () => { @@ -195,7 +194,7 @@ describe('Testing API Directives', () => { // Checking if token error is displayed await utils.waitForElement('#token-error'); - expect(await utils.isPresent('#token-error')).to.be.true; + expect(await utils.isPresent('#token-error')).toBeTrue(); }); it('should show the token error WITHOUT prejoin page', async () => { @@ -215,7 +214,7 @@ describe('Testing API Directives', () => { // Checking if token error is displayed await utils.waitForElement('#openvidu-dialog'); - expect(await utils.isPresent('#openvidu-dialog')).to.be.true; + expect(await utils.isPresent('#openvidu-dialog')).toBeTrue(); }); it('should run the app with VIDEO DISABLED in prejoin page', async () => { @@ -225,7 +224,7 @@ describe('Testing API Directives', () => { // Checking if video is displayed await utils.waitForElement('#video-poster'); - expect(await utils.getNumberOfElements('video')).equals(0); + expect(await utils.getNumberOfElements('video')).toEqual(0); await utils.waitForElement('#videocam_off'); @@ -234,10 +233,10 @@ describe('Testing API Directives', () => { await utils.checkSessionIsPresent(); await utils.waitForElement('#video-poster'); - expect(await utils.getNumberOfElements('video')).equals(0); + expect(await utils.getNumberOfElements('video')).toEqual(0); await utils.waitForElement('#videocam_off'); - expect(await utils.isPresent('#videocam_off')).to.be.true; + expect(await utils.isPresent('#videocam_off')).toBeTrue(); }); it('should run the app with VIDEO DISABLED and WITHOUT PREJOIN page', async () => { @@ -249,11 +248,11 @@ describe('Testing API Directives', () => { // Checking if video is displayed await utils.waitForElement('#video-poster'); - expect(await utils.getNumberOfElements('video')).equals(0); - expect(await utils.getNumberOfElements('#video-poster')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('#video-poster')).toEqual(1); await utils.waitForElement('#videocam_off'); - expect(await utils.isPresent('#videocam_off')).to.be.true; + expect(await utils.isPresent('#videocam_off')).toBeTrue(); }); it('should run the app with AUDIO DISABLED in prejoin page', async () => { @@ -263,20 +262,20 @@ describe('Testing API Directives', () => { // Checking if video is displayed await utils.checkVideoElementIsPresent(); - expect(await utils.getNumberOfElements('video')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); - expect(await utils.getNumberOfElements('audio')).equals(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await utils.waitForElement('#mic_off'); - expect(await utils.isPresent('#mic_off')).to.be.true; + expect(await utils.isPresent('#mic_off')).toBeTrue(); await utils.clickOn('#join-button'); await utils.checkSessionIsPresent(); - expect(await utils.getNumberOfElements('video')).equals(1); - expect(await utils.getNumberOfElements('audio')).equals(0); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await utils.waitForElement('#mic_off'); - expect(await utils.isPresent('#mic_off')).to.be.true; + expect(await utils.isPresent('#mic_off')).toBeTrue(); }); it('should run the app with AUDIO DISABLED and WITHOUT PREJOIN page', async () => { @@ -286,11 +285,11 @@ describe('Testing API Directives', () => { // Checking if video is displayed await utils.checkVideoElementIsPresent(); - expect(await utils.getNumberOfElements('video')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); - expect(await utils.getNumberOfElements('audio')).equals(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await utils.waitForElement('#mic_off'); - expect(await utils.isPresent('#mic_off')).to.be.true; + expect(await utils.isPresent('#mic_off')).toBeTrue(); }); it('should HIDE the SCREENSHARE button', async () => { @@ -302,7 +301,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if screenshare button is not present - expect(await utils.isPresent('#screenshare-btn')).to.be.false; + expect(await utils.isPresent('#screenshare-btn')).toBeFalse(); }); it('should HIDE the FULLSCREEN button', async () => { @@ -314,10 +313,10 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); await utils.toggleToolbarMoreOptions(); - expect(await utils.getNumberOfElements('#fullscreen-btn')).equals(0); + expect(await utils.getNumberOfElements('#fullscreen-btn')).toEqual(0); }); - it.skip('should HIDE the CAPTIONS button', async () => { + xit('should HIDE the CAPTIONS button', async () => { await browser.get(`${url}&prejoin=false&toolbarCaptionsBtn=false`); await utils.checkSessionIsPresent(); @@ -328,16 +327,16 @@ describe('Testing API Directives', () => { await utils.toggleToolbarMoreOptions(); // Checking if captions button is not present - expect(await utils.isPresent('#captions-btn')).to.be.false; + expect(await utils.isPresent('#captions-btn')).toBeFalse(); await utils.clickOn('#toolbar-settings-btn'); await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); - expect(await utils.isPresent('#captions-opt')).to.be.false; + expect(await utils.isPresent('#captions-opt')).toBeFalse(); }); it('should HIDE the TOOLBAR RECORDING button', async () => { @@ -351,7 +350,7 @@ describe('Testing API Directives', () => { await utils.toggleToolbarMoreOptions(); // Checking if recording button is not present - expect(await utils.isPresent('#recording-btn')).to.be.false; + expect(await utils.isPresent('#recording-btn')).toBeFalse(); }); it('should HIDE the TOOLBAR BROADCASTING button', async () => { @@ -365,7 +364,7 @@ describe('Testing API Directives', () => { await utils.toggleToolbarMoreOptions(); // Checking if broadcasting button is not present - expect(await utils.isPresent('#broadcasting-btn')).to.be.false; + expect(await utils.isPresent('#broadcasting-btn')).toBeFalse(); }); it('should HIDE the TOOLBAR SETTINGS button', async () => { @@ -379,7 +378,7 @@ describe('Testing API Directives', () => { // Open more options menu await utils.toggleToolbarMoreOptions(); - expect(await utils.isPresent('#toolbar-settings-btn')).to.be.false; + expect(await utils.isPresent('#toolbar-settings-btn')).toBeFalse(); }); it('should HIDE the LEAVE button', async () => { @@ -391,7 +390,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if leave button is not present - expect(await utils.getNumberOfElements('#leave-btn')).equals(0); + expect(await utils.getNumberOfElements('#leave-btn')).toEqual(0); }); it('should HIDE the ACTIVITIES PANEL button', async () => { @@ -403,7 +402,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if activities panel button is not present - expect(await utils.isPresent('#activities-panel-btn')).to.be.false; + expect(await utils.isPresent('#activities-panel-btn')).toBeFalse(); }); it('should HIDE the CHAT PANEL button', async () => { @@ -415,7 +414,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if chat panel button is not present - expect(await utils.isPresent('#chat-panel-btn')).to.be.false; + expect(await utils.isPresent('#chat-panel-btn')).toBeFalse(); }); it('should HIDE the PARTICIPANTS PANEL button', async () => { @@ -427,7 +426,7 @@ describe('Testing API Directives', () => { await utils.checkToolbarIsPresent(); // Checking if participants panel button is not present - expect(await utils.isPresent('#participants-panel-btn')).to.be.false; + expect(await utils.isPresent('#participants-panel-btn')).toBeFalse(); }); it('should HIDE the LOGO', async () => { @@ -440,10 +439,10 @@ describe('Testing API Directives', () => { // Checking if toolbar is present await utils.waitForElement('#info-container'); - expect(await utils.isPresent('#info-container')).to.be.true; + expect(await utils.isPresent('#info-container')).toBeTrue(); // Checking if logo is not displayed - expect(await utils.isPresent('#branding-logo')).to.be.false; + expect(await utils.isPresent('#branding-logo')).toBeFalse(); }); it('should HIDE the ROOM NAME', async () => { @@ -456,10 +455,10 @@ describe('Testing API Directives', () => { // Checking if toolbar is present await utils.waitForElement('#info-container'); - expect(await utils.isPresent('#info-container')).to.be.true; + expect(await utils.isPresent('#info-container')).toBeTrue(); // Checking if session name is not displayed - expect(await utils.isPresent('#session-name')).to.be.false; + expect(await utils.isPresent('#session-name')).toBeFalse(); }); it('should HIDE the PARTICIPANT NAME', async () => { @@ -474,7 +473,7 @@ describe('Testing API Directives', () => { await utils.checkStreamIsPresent(); // Checking if nickname is not present - expect(await utils.isPresent('#participant-name-container')).to.be.false; + expect(await utils.isPresent('#participant-name-container')).toBeFalse(); }); it('should HIDE the AUDIO DETECTION element', async () => { @@ -489,7 +488,7 @@ describe('Testing API Directives', () => { await utils.checkStreamIsPresent(); // Checking if audio detection is not present - expect(await utils.isPresent('#audio-wave-container')).to.be.false; + expect(await utils.isPresent('#audio-wave-container')).toBeFalse(); }); it('should HIDE the STREAM VIDEO CONTROLS button', async () => { @@ -504,7 +503,7 @@ describe('Testing API Directives', () => { await utils.checkStreamIsPresent(); // Checking if settings button is not present - expect(await utils.isPresent('.stream-video-controls')).to.be.false; + expect(await utils.isPresent('.stream-video-controls')).toBeFalse(); }); it('should HIDE the MUTE button in participants panel', async () => { @@ -522,10 +521,10 @@ describe('Testing API Directives', () => { // Checking if participatns panel is displayed await utils.waitForElement('#participants-container'); - expect(await utils.isPresent('#participants-container')).to.be.true; + expect(await utils.isPresent('#participants-container')).toBeTrue(); // Checking remote participants item - expect(await utils.isPresent('#remote-participant-item')).to.be.false; + expect(await utils.isPresent('#remote-participant-item')).toBeFalse(); // Starting new browser for adding a new participant const newTabScript = `window.open("${fixedUrl}")`; @@ -537,9 +536,9 @@ describe('Testing API Directives', () => { // 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; + expect(await utils.isPresent('#remote-participant-item')).toBeTrue(); - expect(await utils.isPresent('#mute-btn')).to.be.false; + expect(await utils.isPresent('#mute-btn')).toBeFalse(); }); it('should HIDE the RECORDING ACTIVITY in activities panel', async () => { @@ -557,13 +556,13 @@ describe('Testing API Directives', () => { // Checking if participatns panel is displayed await utils.waitForElement('#default-activities-panel'); - expect(await utils.isPresent('#default-activities-panel')).to.be.true; + expect(await utils.isPresent('#default-activities-panel')).toBeTrue(); // await browser.sleep(1000); // Checking if recording activity exists await utils.waitForElement('.activities-body-container'); - expect(await utils.isPresent('ov-recording-activity')).to.be.false; + expect(await utils.isPresent('ov-recording-activity')).toBeFalse(); }); it('should HIDE the BROADCASTING ACTIVITY in activities panel', async () => { @@ -579,12 +578,12 @@ describe('Testing API Directives', () => { // Checking if participatns panel is displayed await utils.waitForElement('#default-activities-panel'); - expect(await utils.isPresent('#default-activities-panel')).to.be.true; + expect(await utils.isPresent('#default-activities-panel')).toBeTrue(); // await browser.sleep(1000); // Checking if recording activity exists await utils.waitForElement('.activities-body-container'); - expect(await utils.isPresent('ov-broadcasting-activity')).to.be.false; + expect(await utils.isPresent('ov-broadcasting-activity')).toBeFalse(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/captions.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/captions.test.ts index ebed496aee..74ce961fd3 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/captions.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/captions.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, Key, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -43,11 +42,11 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // // Checking if button panel is present // await utils.waitForElement('#more-options-menu'); -// expect(await utils.isPresent('#more-options-menu')).to.be.true; +// expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // // Checking if captions button is present // await utils.waitForElement('#captions-btn'); -// expect(await utils.isPresent('#captions-btn')).to.be.true; +// expect(await utils.isPresent('#captions-btn')).toBeTrue(); // await utils.clickOn('#captions-btn'); // await utils.waitForElement('.captions-container'); @@ -68,11 +67,11 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // // Checking if button panel is present // await utils.waitForElement('#more-options-menu'); -// expect(await utils.isPresent('#more-options-menu')).to.be.true; +// expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // // Checking if captions button is present // await utils.waitForElement('#captions-btn'); -// expect(await utils.isPresent('#captions-btn')).to.be.true; +// expect(await utils.isPresent('#captions-btn')).toBeTrue(); // await utils.clickOn('#captions-btn'); // await utils.waitForElement('.captions-container'); @@ -82,12 +81,12 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // await browser.sleep(500); // await utils.waitForElement('.settings-container'); -// expect(await utils.isPresent('.settings-container')).to.be.true; +// expect(await utils.isPresent('.settings-container')).toBeTrue(); // await utils.waitForElement('ov-captions-settings'); // // Expect caption button is not present -// expect(await utils.isPresent('#caption-settings-btn')).to.be.false; +// expect(await utils.isPresent('#caption-settings-btn')).toBeFalse(); // }); // it('should TOGGLE the CAPTIONS container from settings panel', async () => { @@ -105,11 +104,11 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // // Checking if button panel is present // await utils.waitForElement('#more-options-menu'); -// expect(await utils.isPresent('#more-options-menu')).to.be.true; +// expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // // Checking if captions button is present // await utils.waitForElement('#captions-btn'); -// expect(await utils.isPresent('#captions-btn')).to.be.true; +// expect(await utils.isPresent('#captions-btn')).toBeTrue(); // await utils.clickOn('#captions-btn'); // await utils.waitForElement('.captions-container'); @@ -119,18 +118,18 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // await browser.sleep(500); // await utils.waitForElement('.settings-container'); -// expect(await utils.isPresent('.settings-container')).to.be.true; +// expect(await utils.isPresent('.settings-container')).toBeTrue(); // await utils.waitForElement('ov-captions-settings'); -// expect(await utils.isPresent('.captions-container')).to.be.true; +// expect(await utils.isPresent('.captions-container')).toBeTrue(); // await utils.clickOn('#captions-toggle-slide'); -// expect(await utils.isPresent('.captions-container')).to.be.false; +// expect(await utils.isPresent('.captions-container')).toBeFalse(); // await browser.sleep(200); // await utils.clickOn('#captions-toggle-slide'); -// expect(await utils.isPresent('.captions-container')).to.be.true; +// expect(await utils.isPresent('.captions-container')).toBeTrue(); // }); // it('should change the CAPTIONS language', async () => { @@ -148,11 +147,11 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // // Checking if button panel is present // await utils.waitForElement('#more-options-menu'); -// expect(await utils.isPresent('#more-options-menu')).to.be.true; +// expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // // Checking if captions button is present // await utils.waitForElement('#captions-btn'); -// expect(await utils.isPresent('#captions-btn')).to.be.true; +// expect(await utils.isPresent('#captions-btn')).toBeTrue(); // await utils.clickOn('#captions-btn'); // await utils.waitForElement('.captions-container'); @@ -162,11 +161,11 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // await browser.sleep(500); // await utils.waitForElement('.settings-container'); -// expect(await utils.isPresent('.settings-container')).to.be.true; +// expect(await utils.isPresent('.settings-container')).toBeTrue(); // await utils.waitForElement('ov-captions-settings'); -// expect(await utils.isPresent('.captions-container')).to.be.true; +// expect(await utils.isPresent('.captions-container')).toBeTrue(); // await utils.clickOn('.lang-button'); // await browser.sleep(500); @@ -175,7 +174,7 @@ const url = `${WebComponentConfig.appUrl}?OV_URL=${OPENVIDU_CALL_SERVER}`; // await utils.clickOn('.panel-close-button'); // const button = await utils.waitForElement('#caption-settings-btn'); -// expect(await button.getText()).equals('settingsEspañol'); +// expect(await button.getText()).toEqual('settingsEspañol'); // }); // }); \ No newline at end of file diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/chat.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/chat.test.ts index 4d5ff22055..22f475f481 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/chat.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/chat.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -38,7 +37,7 @@ describe('Testing CHAT features', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('.input-container'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); const input = await utils.waitForElement('#chat-input'); await input.sendKeys('Test message'); @@ -47,13 +46,13 @@ describe('Testing CHAT features', () => { await utils.waitForElement('.message'); await utils.getNumberOfElements('.message'); - expect(await utils.isPresent('.message')).to.be.true; + expect(await utils.isPresent('.message')).toBeTrue(); - expect(await utils.getNumberOfElements('.message')).equals(1); + expect(await utils.getNumberOfElements('.message')).toEqual(1); await input.sendKeys('Test message'); await utils.clickOn('#send-btn'); - expect(await utils.getNumberOfElements('.message')).equals(2); + expect(await utils.getNumberOfElements('.message')).toEqual(2); }); it('should receive a message', async () => { @@ -77,7 +76,7 @@ describe('Testing CHAT features', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('.input-container'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); const input = await utils.waitForElement('#chat-input'); await input.sendKeys('test message'); @@ -91,8 +90,8 @@ describe('Testing CHAT features', () => { await browser.sleep(1000); await utils.waitForElement('.message'); const participantName = await utils.waitForElement('.participant-name-container>p'); - expect(await utils.getNumberOfElements('.message')).equals(1); - expect(await participantName.getText()).equals(pName); + expect(await utils.getNumberOfElements('.message')).toEqual(1); + expect(await participantName.getText()).toEqual(pName); }); it('should send an url message and converts in a link', async () => { @@ -105,7 +104,7 @@ describe('Testing CHAT features', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('.input-container'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); const input = await utils.waitForElement('#chat-input'); await input.sendKeys('demos.openvidu.io'); @@ -113,6 +112,6 @@ describe('Testing CHAT features', () => { await utils.clickOn('#send-btn'); await utils.waitForElement('.chat-message a'); - expect(await utils.isPresent('.chat-message a')).to.be.true; + expect(await utils.isPresent('.chat-message a')).toBeTrue(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/events.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/events.test.ts index d97f5a2347..914b725b79 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/events.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/events.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, Key, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -32,7 +31,7 @@ describe('Testing videoconference EVENTS', () => { await browser.get(`${url}`); await utils.waitForElement('#prejoin-container'); - expect(await utils.isPresent('#prejoin-container')).to.be.true; + expect(await utils.isPresent('#prejoin-container')).toBeTrue(); // Clicking to join button await utils.waitForElement('#join-button'); @@ -40,14 +39,14 @@ describe('Testing videoconference EVENTS', () => { // Checking if onReadyToJoin has been received await utils.waitForElement('#onReadyToJoin'); - expect(await utils.isPresent('#onReadyToJoin')).to.be.true; + expect(await utils.isPresent('#onReadyToJoin')).toBeTrue(); }); it('should receive the onTokenRequested event', async () => { await browser.get(`${url}`); await utils.waitForElement('#prejoin-container'); - expect(await utils.isPresent('#prejoin-container')).to.be.true; + expect(await utils.isPresent('#prejoin-container')).toBeTrue(); // Clicking to join button await utils.waitForElement('#join-button'); @@ -55,7 +54,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onTokenRequested has been received await utils.waitForElement('#onTokenRequested'); - expect(await utils.isPresent('#onTokenRequested')).to.be.true; + expect(await utils.isPresent('#onTokenRequested')).toBeTrue(); }); it('should receive the onRoomDisconnected event', async () => { @@ -67,12 +66,12 @@ describe('Testing videoconference EVENTS', () => { // Clicking to leave button const leaveButton = await utils.waitForElement('#leave-btn'); - expect(await utils.isPresent('#leave-btn')).to.be.true; + expect(await utils.isPresent('#leave-btn')).toBeTrue(); await leaveButton.click(); // Checking if onRoomDisconnected has been received await utils.waitForElement('#onRoomDisconnected'); - expect(await utils.isPresent('#onRoomDisconnected')).to.be.true; + expect(await utils.isPresent('#onRoomDisconnected')).toBeTrue(); }); it('should receive the onVideoEnabledChanged event when clicking on the prejoin', async () => { @@ -84,7 +83,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onVideoEnabledChanged has been received await utils.waitForElement('#onVideoEnabledChanged-false'); - expect(await utils.isPresent('#onVideoEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged-false')).toBeTrue(); }); it('should receive the onVideoEnabledChanged event when clicking on the toolbar', async () => { @@ -100,11 +99,11 @@ describe('Testing videoconference EVENTS', () => { // Checking if onVideoEnabledChanged has been received await utils.waitForElement('#onVideoEnabledChanged-false'); - expect(await utils.isPresent('#onVideoEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged-false')).toBeTrue(); await utils.clickOn('#camera-btn'); await utils.waitForElement('#onVideoEnabledChanged-true'); - expect(await utils.isPresent('#onVideoEnabledChanged-true')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged-true')).toBeTrue(); }); it('should receive the onVideoEnabledChanged event when clicking on the settings panel', async () => { @@ -123,11 +122,11 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('ov-video-devices-select #camera-button'); // Checking if onVideoEnabledChanged has been received await utils.waitForElement('#onVideoEnabledChanged-false'); - expect(await utils.isPresent('#onVideoEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged-false')).toBeTrue(); await utils.clickOn('ov-video-devices-select #camera-button'); await utils.waitForElement('#onVideoEnabledChanged-true'); - expect(await utils.isPresent('#onVideoEnabledChanged-true')).to.be.true; + expect(await utils.isPresent('#onVideoEnabledChanged-true')).toBeTrue(); }); it('should receive the onVideoDeviceChanged event on prejoin', async () => { @@ -141,7 +140,7 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('#option-custom_fake_video_1'); await utils.waitForElement('#onVideoDeviceChanged'); - expect(await utils.isPresent('#onVideoDeviceChanged')).to.be.true; + expect(await utils.isPresent('#onVideoDeviceChanged')).toBeTrue(); }); it('should receive the onVideoDeviceChanged event on settings panel', async () => { @@ -164,7 +163,7 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('#option-custom_fake_video_1'); await utils.waitForElement('#onVideoDeviceChanged'); - expect(await utils.isPresent('#onVideoDeviceChanged')).to.be.true; + expect(await utils.isPresent('#onVideoDeviceChanged')).toBeTrue(); }); it('should receive the onAudioEnabledChanged event when clicking on the prejoin', async () => { @@ -176,7 +175,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onAudioEnabledChanged has been received await utils.waitForElement('#onAudioEnabledChanged-false'); - expect(await utils.isPresent('#onAudioEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged-false')).toBeTrue(); }); it('should receive the onAudioEnabledChanged event when clicking on the toolbar', async () => { @@ -192,11 +191,11 @@ describe('Testing videoconference EVENTS', () => { // Checking if onAudioEnabledChanged has been received await utils.waitForElement('#onAudioEnabledChanged-false'); - expect(await utils.isPresent('#onAudioEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged-false')).toBeTrue(); await utils.clickOn('#mic-btn'); await utils.waitForElement('#onAudioEnabledChanged-true'); - expect(await utils.isPresent('#onAudioEnabledChanged-true')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged-true')).toBeTrue(); }); it('should receive the onAudioEnabledChanged event when clicking on the settings panel', async () => { @@ -215,11 +214,11 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('ov-audio-devices-select #microphone-button'); // Checking if onAudioEnabledChanged has been received await utils.waitForElement('#onAudioEnabledChanged-false'); - expect(await utils.isPresent('#onAudioEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged-false')).toBeTrue(); await utils.clickOn('ov-audio-devices-select #microphone-button'); await utils.waitForElement('#onAudioEnabledChanged-true'); - expect(await utils.isPresent('#onAudioEnabledChanged-true')).to.be.true; + expect(await utils.isPresent('#onAudioEnabledChanged-true')).toBeTrue(); }); it('should receive the onAudioDeviceChanged event on prejoin', async () => { @@ -233,7 +232,7 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('#option-custom_fake_audio_1'); await utils.waitForElement('#onAudioDeviceChanged'); - expect(await utils.isPresent('#onAudioDeviceChanged')).to.be.true; + expect(await utils.isPresent('#onAudioDeviceChanged')).toBeTrue(); }); it('should receive the onAudioDeviceChanged event on settings panel', async () => { @@ -256,7 +255,7 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('#option-custom_fake_audio_1'); await utils.waitForElement('#onAudioDeviceChanged'); - expect(await utils.isPresent('#onAudioDeviceChanged')).to.be.true; + expect(await utils.isPresent('#onAudioDeviceChanged')).toBeTrue(); }); it('should receive the onLangChanged event on prejoin', async () => { @@ -271,7 +270,7 @@ describe('Testing videoconference EVENTS', () => { await browser.sleep(500); await utils.waitForElement('#onLangChanged-es'); - expect(await utils.isPresent('#onLangChanged-es')).to.be.true; + expect(await utils.isPresent('#onLangChanged-es')).toBeTrue(); }); it('should receive the onLangChanged event on settings panel', async () => { @@ -292,7 +291,7 @@ describe('Testing videoconference EVENTS', () => { await browser.sleep(500); await utils.waitForElement('#onLangChanged-es'); - expect(await utils.isPresent('#onLangChanged-es')).to.be.true; + expect(await utils.isPresent('#onLangChanged-es')).toBeTrue(); }); it('should receive the onScreenShareEnabledChanged event', async () => { @@ -304,12 +303,12 @@ describe('Testing videoconference EVENTS', () => { // Clicking to leave button const screenshareButton = await utils.waitForElement('#screenshare-btn'); - expect(await utils.isPresent('#screenshare-btn')).to.be.true; + expect(await utils.isPresent('#screenshare-btn')).toBeTrue(); await screenshareButton.click(); // Checking if onScreenShareEnabledChanged has been received await utils.waitForElement('#onScreenShareEnabledChanged'); - expect(await utils.isPresent('#onScreenShareEnabledChanged')).to.be.true; + expect(await utils.isPresent('#onScreenShareEnabledChanged')).toBeTrue(); }); // With headless mode, the Fullscreen API doesn't work @@ -326,13 +325,13 @@ describe('Testing videoconference EVENTS', () => { // Checking if onFullscreenEnabledChanged has been received await utils.waitForElement('#onFullscreenEnabledChanged-true'); - expect(await utils.isPresent('#onFullscreenEnabledChanged-true')).to.be.true; + expect(await utils.isPresent('#onFullscreenEnabledChanged-true')).toBeTrue(); await (await utils.waitForElement('html')).sendKeys(Key.F11); await browser.sleep(500); await utils.waitForElement('#onFullscreenEnabledChanged-false'); - expect(await utils.isPresent('#onFullscreenEnabledChanged-false')).to.be.true; + expect(await utils.isPresent('#onFullscreenEnabledChanged-false')).toBeTrue(); }); it('should receive the onChatPanelStatusChanged event', async () => { @@ -346,13 +345,13 @@ describe('Testing videoconference EVENTS', () => { // Checking if onChatPanelStatusChanged has been received await utils.waitForElement('#onChatPanelStatusChanged-true'); - expect(await utils.isPresent('#onChatPanelStatusChanged-true')).to.be.true; + expect(await utils.isPresent('#onChatPanelStatusChanged-true')).toBeTrue(); await utils.togglePanel('chat'); // Checking if onChatPanelStatusChanged has been received await utils.waitForElement('#onChatPanelStatusChanged-false'); - expect(await utils.isPresent('#onChatPanelStatusChanged-false')).to.be.true; + expect(await utils.isPresent('#onChatPanelStatusChanged-false')).toBeTrue(); }); it('should receive the onParticipantsPanelStatusChanged event', async () => { @@ -366,13 +365,13 @@ describe('Testing videoconference EVENTS', () => { // Checking if onParticipantsPanelStatusChanged has been received await utils.waitForElement('#onParticipantsPanelStatusChanged-true'); - expect(await utils.isPresent('#onParticipantsPanelStatusChanged-true')).to.be.true; + expect(await utils.isPresent('#onParticipantsPanelStatusChanged-true')).toBeTrue(); await utils.togglePanel('participants'); // Checking if onParticipantsPanelStatusChanged has been received await utils.waitForElement('#onParticipantsPanelStatusChanged-false'); - expect(await utils.isPresent('#onParticipantsPanelStatusChanged-false')).to.be.true; + expect(await utils.isPresent('#onParticipantsPanelStatusChanged-false')).toBeTrue(); }); it('should receive the onActivitiesPanelStatusChanged event', async () => { @@ -385,13 +384,13 @@ describe('Testing videoconference EVENTS', () => { // Checking if onActivitiesPanelStatusChanged has been received await utils.waitForElement('#onActivitiesPanelStatusChanged-true'); - expect(await utils.isPresent('#onActivitiesPanelStatusChanged-true')).to.be.true; + expect(await utils.isPresent('#onActivitiesPanelStatusChanged-true')).toBeTrue(); await utils.togglePanel('activities'); // Checking if onActivitiesPanelStatusChanged has been received await utils.waitForElement('#onActivitiesPanelStatusChanged-false'); - expect(await utils.isPresent('#onActivitiesPanelStatusChanged-false')).to.be.true; + expect(await utils.isPresent('#onActivitiesPanelStatusChanged-false')).toBeTrue(); }); it('should receive the onSettingsPanelStatusChanged event', async () => { @@ -404,13 +403,13 @@ describe('Testing videoconference EVENTS', () => { // Checking if onSettingsPanelStatusChanged has been received await utils.waitForElement('#onSettingsPanelStatusChanged-true'); - expect(await utils.isPresent('#onSettingsPanelStatusChanged-true')).to.be.true; + expect(await utils.isPresent('#onSettingsPanelStatusChanged-true')).toBeTrue(); await utils.togglePanel('settings'); // Checking if onSettingsPanelStatusChanged has been received await utils.waitForElement('#onSettingsPanelStatusChanged-false'); - expect(await utils.isPresent('#onSettingsPanelStatusChanged-false')).to.be.true; + expect(await utils.isPresent('#onSettingsPanelStatusChanged-false')).toBeTrue(); }); it('should receive the onRecordingStartRequested event when clicking toolbar button', async () => { @@ -424,7 +423,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onRecordingStartRequested has been received await utils.waitForElement(`#onRecordingStartRequested-${roomName}`); - expect(await utils.isPresent(`#onRecordingStartRequested-${roomName}`)).to.be.true; + expect(await utils.isPresent(`#onRecordingStartRequested-${roomName}`)).toBeTrue(); }); xit('should receive the onRecordingStopRequested event when clicking toolbar button', async () => {}); @@ -458,7 +457,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onBroadcastingStopRequested has been received await utils.waitForElement('#onBroadcastingStopRequested'); - expect(await utils.isPresent('#onBroadcastingStopRequested')).to.be.true; + expect(await utils.isPresent('#onBroadcastingStopRequested')).toBeTrue(); }); it('should receive the onRecordingStartRequested when clicking from activities panel', async () => { @@ -484,7 +483,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onRecordingStartRequested has been received await utils.waitForElement(`#onRecordingStartRequested-${roomName}`); - expect(await utils.isPresent(`#onRecordingStartRequested-${roomName}`)).to.be.true; + expect(await utils.isPresent(`#onRecordingStartRequested-${roomName}`)).toBeTrue(); }); xit('should receive the onRecordingStopRequested when clicking from activities panel', async () => {}); @@ -500,7 +499,7 @@ describe('Testing videoconference EVENTS', () => { // Clicking to activities button const activitiesButton = await utils.waitForElement('#activities-panel-btn'); - expect(await utils.isPresent('#activities-panel-btn')).to.be.true; + expect(await utils.isPresent('#activities-panel-btn')).toBeTrue(); await activitiesButton.click(); await browser.sleep(1500); @@ -512,15 +511,15 @@ describe('Testing videoconference EVENTS', () => { // Delete event element = await utils.waitForElement('#delete-recording-btn'); - expect(await utils.isPresent('#delete-recording-btn')).to.be.true; + expect(await utils.isPresent('#delete-recording-btn')).toBeTrue(); await element.click(); element = await utils.waitForElement('#delete-recording-confirm-btn'); - expect(await utils.isPresent('#delete-recording-confirm-btn')).to.be.true; + expect(await utils.isPresent('#delete-recording-confirm-btn')).toBeTrue(); await element.click(); await utils.waitForElement(`#onRecordingDeleteRequested-${roomName}-fakeRecording`); - expect(await utils.isPresent(`#onRecordingDeleteRequested-${roomName}-fakeRecording`)).to.be.true; + expect(await utils.isPresent(`#onRecordingDeleteRequested-${roomName}-fakeRecording`)).toBeTrue(); }); it('should receive the onBroadcastingStartRequested event when clicking from panel', async () => { @@ -540,7 +539,7 @@ describe('Testing videoconference EVENTS', () => { await browser.sleep(1000); const button = await utils.waitForElement('#broadcasting-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); const input = await utils.waitForElement('#broadcast-url-input'); await input.sendKeys(broadcastUrl); @@ -549,7 +548,7 @@ describe('Testing videoconference EVENTS', () => { // Checking if onBroadcastingStartRequested has been received await utils.waitForElement(`#onBroadcastingStartRequested-${roomName}-${broadcastUrl}`); - expect(await utils.isPresent(`#onBroadcastingStartRequested-${roomName}-${broadcastUrl}`)).to.be.true; + expect(await utils.isPresent(`#onBroadcastingStartRequested-${roomName}-${broadcastUrl}`)).toBeTrue(); }); xit('should receive the onBroadcastingStopRequested event when clicking from panel', async () => { @@ -565,21 +564,21 @@ describe('Testing videoconference EVENTS', () => { await utils.clickOn('#broadcasting-activity'); const button = await utils.waitForElement('#broadcasting-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); const input = await utils.waitForElement('#broadcast-url-input'); await input.sendKeys('BroadcastUrl'); await utils.clickOn('#broadcasting-btn'); - expect(await utils.isPresent('#broadcasting-tag')).to.be.true; + expect(await utils.isPresent('#broadcasting-tag')).toBeTrue(); await utils.clickOn('#stop-broadcasting-btn'); // Checking if onBroadcastingStopRequested has been received await utils.waitForElement('#onBroadcastingStopRequested'); - expect(await utils.isPresent('#onBroadcastingStopRequested')).to.be.true; - expect(await utils.isPresent('#broadcasting-tag')).to.be.false; + expect(await utils.isPresent('#onBroadcastingStopRequested')).toBeTrue(); + expect(await utils.isPresent('#broadcasting-tag')).toBeFalse(); }); xit('should receive the onBroadcastingStopRequested event when clicking from toolbar', async () => { @@ -597,8 +596,8 @@ describe('Testing videoconference EVENTS', () => { // Checking if onBroadcastingStopRequested has been received await utils.waitForElement('#onBroadcastingStopRequested'); - expect(await utils.isPresent('#onBroadcastingStopRequested')).to.be.true; - expect(await utils.isPresent('#broadcasting-tag')).to.be.false; + expect(await utils.isPresent('#onBroadcastingStopRequested')).toBeTrue(); + expect(await utils.isPresent('#broadcasting-tag')).toBeFalse(); }); it('should receive the onRoomCreated event', async () => { @@ -609,9 +608,9 @@ describe('Testing videoconference EVENTS', () => { await utils.checkToolbarIsPresent(); await utils.waitForElement('#onRoomCreated'); - expect(await utils.isPresent('#onRoomCreated')).to.be.true; + expect(await utils.isPresent('#onRoomCreated')).toBeTrue(); - expect(await utils.isPresent('#onReadyToJoin')).to.be.false; + expect(await utils.isPresent('#onReadyToJoin')).toBeFalse(); }); // * PUBLISHER EVENTS @@ -620,7 +619,7 @@ describe('Testing videoconference EVENTS', () => { const participantName = 'TEST_USER'; await browser.get(`${url}&participantName=${participantName}&prejoin=false`); await utils.waitForElement(`#${participantName}-onParticipantCreated`); - expect(await utils.isPresent(`#${participantName}-onParticipantCreated`)).to.be.true; + expect(await utils.isPresent(`#${participantName}-onParticipantCreated`)).toBeTrue(); }); // * ROOM EVENTS @@ -639,6 +638,6 @@ describe('Testing videoconference EVENTS', () => { await element.click(); await utils.waitForElement(`#roomDisconnected`); - expect(await utils.isPresent(`#roomDisconnected`)).to.be.true; + expect(await utils.isPresent(`#roomDisconnected`)).toBeTrue(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/media-devices.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/media-devices.test.ts index c7583ebbc8..f986c33155 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/media-devices.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/media-devices.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { getBrowserOptionsWithoutDevices, WebComponentConfig } from '../selenium.conf'; @@ -45,7 +44,7 @@ describe('Testing replace track with emulated devices', () => { await browser.sleep(1000); videoLabel = await browser.executeScript(script); - expect(videoLabel).to.be.equal('custom_fake_video_1'); + expect(videoLabel).toEqual('custom_fake_video_1'); await videoDevices.click(); @@ -54,7 +53,7 @@ describe('Testing replace track with emulated devices', () => { await browser.sleep(1000); videoLabel = await browser.executeScript(script); - expect(videoLabel).to.be.equal('fake_device_0'); + expect(videoLabel).toEqual('fake_device_0'); }); it('should replace the video track in videoconference page', async () => { @@ -70,10 +69,10 @@ describe('Testing replace track with emulated devices', () => { await utils.togglePanel('settings'); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.clickOn('#video-opt'); - expect(await utils.isPresent('ov-video-devices-select')).to.be.true; + expect(await utils.isPresent('ov-video-devices-select')).toBeTrue(); let videoDevices = await utils.waitForElement('#video-devices-form'); @@ -86,7 +85,7 @@ describe('Testing replace track with emulated devices', () => { let videoLabel; await browser.sleep(1000); videoLabel = await browser.executeScript(script); - expect(videoLabel).to.be.equal('custom_fake_video_1'); + expect(videoLabel).toEqual('custom_fake_video_1'); await videoDevices.click(); @@ -95,7 +94,7 @@ describe('Testing replace track with emulated devices', () => { await browser.sleep(1000); videoLabel = await browser.executeScript(script); - expect(videoLabel).to.be.equal('fake_device_0'); + expect(videoLabel).toEqual('fake_device_0'); }); // TODO: Uncommented when Livekit allows to replace the screen track @@ -112,7 +111,7 @@ describe('Testing replace track with emulated devices', () => { // await browser.sleep(500); // let screenLabel = await browser.executeScript(script); - // expect(screenLabel).not.equal('custom_fake_screen'); + // expect(screenLabel).not.toEqual('custom_fake_screen'); // await utils.clickOn('#video-settings-btn-SCREEN'); // await browser.sleep(500); @@ -123,7 +122,7 @@ describe('Testing replace track with emulated devices', () => { // await browser.sleep(1000); // screenLabel = await browser.executeScript(script); - // expect(screenLabel).to.be.equal('custom_fake_screen'); + // expect(screenLabel).to.be.toEqual('custom_fake_screen'); // }); }); @@ -154,10 +153,10 @@ describe('Testing WITHOUT MEDIA DEVICES permissions', () => { await utils.checkPrejoinIsPresent(); let button = await utils.waitForElement('#camera-button'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); button = await utils.waitForElement('#microphone-button'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); }); it('should be able to ACCESS to ROOM page', async () => { @@ -172,10 +171,10 @@ describe('Testing WITHOUT MEDIA DEVICES permissions', () => { await utils.checkToolbarIsPresent(); let button = await utils.waitForElement('#camera-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); button = await utils.waitForElement('#mic-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); }); it('should be able to ACCESS to ROOM page without prejoin', async () => { @@ -186,10 +185,10 @@ describe('Testing WITHOUT MEDIA DEVICES permissions', () => { await utils.checkToolbarIsPresent(); let button = await utils.waitForElement('#camera-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); button = await utils.waitForElement('#mic-btn'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); }); it('should the settings buttons be disabled', async () => { @@ -202,18 +201,18 @@ describe('Testing WITHOUT MEDIA DEVICES permissions', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.clickOn('#video-opt'); - expect(await utils.isPresent('ov-video-devices-select')).to.be.true; + expect(await utils.isPresent('ov-video-devices-select')).toBeTrue(); let button = await utils.waitForElement('#camera-button'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); await utils.clickOn('#audio-opt'); - expect(await utils.isPresent('ov-audio-devices-select')).to.be.true; + expect(await utils.isPresent('ov-audio-devices-select')).toBeTrue(); button = await utils.waitForElement('#microphone-button'); - expect(await button.isEnabled()).to.be.false; + expect(await button.isEnabled()).toBeFalse(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/panels.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/panels.test.ts index 0d03493d6e..cee3539d32 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/panels.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/panels.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, Key, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { getBrowserOptionsWithoutDevices, WebComponentConfig } from '../selenium.conf'; @@ -36,30 +35,30 @@ describe('Testing panels', () => { // let element; // await browser.get(`${url}`); // element = await utils.waitForElement('#pre-join-container'); - // expect(await utils.isPresent('#pre-join-container')).to.be.true; + // expect(await utils.isPresent('#pre-join-container')).toBeTrue(); // 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; + // expect(await utils.isPresent('#background-effects-btn')).toBeTrue(); + // expect(await backgroundButton.isEnabled()).toBeTrue(); // await backgroundButton.click(); // await browser.sleep(500); // await utils.waitForElement('#background-effects-container'); - // expect(await utils.isPresent('#background-effects-container')).to.be.true; + // expect(await utils.isPresent('#background-effects-container')).toBeTrue(); // element = await utils.waitForElement('#camera-button'); - // expect(await utils.isPresent('#camera-button')).to.be.true; - // expect(await element.isEnabled()).to.be.true; + // expect(await utils.isPresent('#camera-button')).toBeTrue(); + // expect(await element.isEnabled()).toBeTrue(); // await element.click(); // await browser.sleep(500); // element = await utils.waitForElement('#video-poster'); - // expect(await utils.isPresent('#video-poster')).to.be.true; + // expect(await utils.isPresent('#video-poster')).toBeTrue(); - // expect(await backgroundButton.isDisplayed()).to.be.true; - // expect(await backgroundButton.isEnabled()).to.be.false; + // expect(await backgroundButton.isDisplayed()).toBeTrue(); + // expect(await backgroundButton.isEnabled()).toBeFalse(); - // expect(await utils.isPresent('#background-effects-container')).to.be.false; + // expect(await utils.isPresent('#background-effects-container')).toBeFalse(); // }); it('should toggle CHAT panel', async () => { @@ -72,15 +71,15 @@ describe('Testing panels', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('.input-container'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); await utils.waitForElement('.messages-container'); - expect(await utils.isPresent('.messages-container')).to.be.true; + expect(await utils.isPresent('.messages-container')).toBeTrue(); await chatButton.click(); - expect(await utils.isPresent('.input-container')).to.be.false; - expect(await utils.isPresent('.messages-container')).to.be.false; + expect(await utils.isPresent('.input-container')).toBeFalse(); + expect(await utils.isPresent('.messages-container')).toBeFalse(); }); it('should toggle PARTICIPANTS panel', async () => { @@ -94,15 +93,15 @@ describe('Testing panels', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('.local-participant-container'); - expect(await utils.isPresent('.local-participant-container')).to.be.true; + expect(await utils.isPresent('.local-participant-container')).toBeTrue(); await utils.waitForElement('ov-participant-panel-item'); - expect(await utils.isPresent('ov-participant-panel-item')).to.be.true; + expect(await utils.isPresent('ov-participant-panel-item')).toBeTrue(); await participantBtn.click(); - expect(await utils.isPresent('.local-participant-container')).to.be.false; - expect(await utils.isPresent('ov-participant-panel-item')).to.be.false; + expect(await utils.isPresent('.local-participant-container')).toBeFalse(); + expect(await utils.isPresent('ov-participant-panel-item')).toBeFalse(); }); it('should toggle ACTIVITIES panel', async () => { @@ -116,14 +115,14 @@ describe('Testing panels', () => { await utils.waitForElement('.sidenav-menu'); await utils.waitForElement('#activities-container'); - expect(await utils.isPresent('#activities-container')).to.be.true; + expect(await utils.isPresent('#activities-container')).toBeTrue(); await utils.waitForElement('#recording-activity'); - expect(await utils.isPresent('#recording-activity')).to.be.true; + expect(await utils.isPresent('#recording-activity')).toBeTrue(); await activitiesBtn.click(); - expect(await utils.isPresent('#activities-container')).to.be.false; - expect(await utils.isPresent('#recording-activity')).to.be.false; + expect(await utils.isPresent('#activities-container')).toBeFalse(); + expect(await utils.isPresent('#recording-activity')).toBeFalse(); }); it('should toggle SETTINGS panel', async () => { @@ -138,7 +137,7 @@ describe('Testing panels', () => { await utils.togglePanel('settings'); element = await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('#default-settings-panel')).to.be.true; + expect(await utils.isPresent('#default-settings-panel')).toBeTrue(); }); it('should switching between PARTICIPANTS and CHAT panels', async () => { @@ -153,12 +152,12 @@ describe('Testing panels', () => { await chatButton.click(); await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('.sidenav-menu')).to.be.true; + expect(await utils.isPresent('.sidenav-menu')).toBeTrue(); await utils.waitForElement('.input-container'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); - expect(await utils.isPresent('.messages-container')).to.be.true; + expect(await utils.isPresent('.messages-container')).toBeTrue(); // Open participants panel const participantBtn = await utils.waitForElement('#participants-panel-btn'); @@ -166,27 +165,27 @@ describe('Testing panels', () => { await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('.local-participant-container')).to.be.true; + expect(await utils.isPresent('.local-participant-container')).toBeTrue(); - expect(await utils.isPresent('ov-participant-panel-item')).to.be.true; + expect(await utils.isPresent('ov-participant-panel-item')).toBeTrue(); // Switch to chat panel await chatButton.click(); await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('.input-container')).to.be.true; + expect(await utils.isPresent('.input-container')).toBeTrue(); - expect(await utils.isPresent('.messages-container')).to.be.true; + expect(await utils.isPresent('.messages-container')).toBeTrue(); - expect(await utils.isPresent('.local-participant-container')).to.be.false; + expect(await utils.isPresent('.local-participant-container')).toBeFalse(); - expect(await utils.isPresent('ov-participant-panel-item')).to.be.false; + expect(await utils.isPresent('ov-participant-panel-item')).toBeFalse(); // Close chat panel await chatButton.click(); - expect(await utils.getNumberOfElements('.input-container')).equals(0); - expect(await utils.isPresent('messages-container')).to.be.false; + expect(await utils.getNumberOfElements('.input-container')).toEqual(0); + expect(await utils.isPresent('messages-container')).toBeFalse(); }); it('should switching between sections in SETTINGS PANEL', async () => { @@ -202,24 +201,24 @@ describe('Testing panels', () => { await utils.togglePanel('settings'); await utils.waitForElement('.sidenav-menu'); - expect(await utils.isPresent('.sidenav-menu')).to.be.true; + expect(await utils.isPresent('.sidenav-menu')).toBeTrue(); // Check if general section is shown element = await utils.waitForElement('#general-opt'); await element.click(); - expect(await utils.isPresent('ov-participant-name-input')).to.be.true; + expect(await utils.isPresent('ov-participant-name-input')).toBeTrue(); // Check if video section is shown element = await utils.waitForElement('#video-opt'); await element.click(); - expect(await utils.isPresent('ov-video-devices-select')).to.be.true; + expect(await utils.isPresent('ov-video-devices-select')).toBeTrue(); // Check if audio section is shown element = await utils.waitForElement('#audio-opt'); await element.click(); - expect(await utils.isPresent('ov-audio-devices-select')).to.be.true; + expect(await utils.isPresent('ov-audio-devices-select')).toBeTrue(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/screensharing.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/screensharing.test.ts index be31e97ca3..604ea50a32 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/screensharing.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/screensharing.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -37,24 +36,24 @@ describe('Testing screenshare features', () => { await browser.sleep(500); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('video')).equals(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); - // expect(await utils.getNumberOfElements('.OV_stream.speaking')).equals(1); + // expect(await utils.getNumberOfElements('.OV_stream.speaking')).toEqual(1); await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('video')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); // toggle screenshare again await utils.clickOn('#screenshare-btn'); await browser.sleep(500); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('video')).equals(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('video')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); }); it('should show screen and muted camera', async () => { @@ -67,16 +66,16 @@ describe('Testing screenshare features', () => { // Clicking to screensharing button const screenshareButton = await utils.waitForElement('#screenshare-btn'); - expect(await screenshareButton.isDisplayed()).to.be.true; + expect(await screenshareButton.isDisplayed()).toBeTrue(); await screenshareButton.click(); await browser.sleep(500); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('video')).equals(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('video')).equals(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); }); it('should screensharing with PINNED video', async () => { @@ -85,11 +84,11 @@ describe('Testing screenshare features', () => { // Clicking to screensharing button const screenshareButton = await utils.waitForElement('#screenshare-btn'); - expect(await screenshareButton.isDisplayed()).to.be.true; + expect(await screenshareButton.isDisplayed()).toBeTrue(); await screenshareButton.click(); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); }); it('should screensharing with PINNED video and replace the existing one', async () => { @@ -102,7 +101,7 @@ describe('Testing screenshare features', () => { await utils.waitForElement('#screenshare-btn'); await utils.clickOn('#screenshare-btn'); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); // Starting new browser for adding the second participant const newTabScript = `window.open("${fixedUrl}")`; @@ -116,16 +115,16 @@ describe('Testing screenshare features', () => { await utils.waitForElement('#screenshare-btn'); await utils.clickOn('#screenshare-btn'); await browser.sleep(500); - expect(await utils.getNumberOfElements('video')).equals(4); + expect(await utils.getNumberOfElements('video')).toEqual(4); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); // Go to first tab await browser.switchTo().window(tabs[0]); await browser.sleep(500); - expect(await utils.getNumberOfElements('video')).equals(4); + expect(await utils.getNumberOfElements('video')).toEqual(4); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); }); it('should disabled a screensharing and pinned the previous one', async () => { @@ -139,7 +138,7 @@ describe('Testing screenshare features', () => { await utils.clickOn('#screenshare-btn'); await browser.sleep(500); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); // Starting new browser for adding the second participant const tabs = await utils.openTab(fixedUrl); @@ -151,21 +150,21 @@ describe('Testing screenshare features', () => { await utils.waitForElement('#screenshare-btn'); await utils.clickOn('#screenshare-btn'); await browser.sleep(500); - expect(await utils.getNumberOfElements('video')).equals(4); + expect(await utils.getNumberOfElements('video')).toEqual(4); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); // Disable screensharing await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('video')).equals(3); + expect(await utils.getNumberOfElements('video')).toEqual(3); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); // Go to first tab await browser.switchTo().window(tabs[0]); await browser.sleep(500); - expect(await utils.getNumberOfElements('video')).equals(3); + expect(await utils.getNumberOfElements('video')).toEqual(3); await utils.waitForElement('.OV_big'); - expect(await utils.getNumberOfElements('.OV_big')).equals(1); + expect(await utils.getNumberOfElements('.OV_big')).toEqual(1); }); // it('should screensharing with audio muted', async () => { @@ -182,21 +181,21 @@ describe('Testing screenshare features', () => { // // Clicking to screensharing button // const screenshareButton = await utils.waitForElement('#screenshare-btn'); - // expect(await utils.isPresent('#screenshare-btn')).to.be.true; + // expect(await utils.isPresent('#screenshare-btn')).toBeTrue(); // await screenshareButton.click(); // await utils.waitForElement('.screen-type'); - // expect(await utils.getNumberOfElements('video')).equals(2); + // expect(await utils.getNumberOfElements('video')).toEqual(2); // isAudioEnabled = await browser.executeScript(getAudioScript('screen-type')); - // expect(isAudioEnabled).to.be.false; + // expect(isAudioEnabled).toBeFalse(); // await utils.waitForElement('#status-mic'); - // expect(await utils.getNumberOfElements('#status-mic')).equals(2); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(2); // // Clicking to screensharing button // await screenshareButton.click(); - // expect(await utils.getNumberOfElements('video')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(1); // }); @@ -207,16 +206,16 @@ describe('Testing screenshare features', () => { // // Clicking to screensharing button // const screenshareButton = await utils.waitForElement('#screenshare-btn'); - // expect(await screenshareButton.isDisplayed()).to.be.true; + // expect(await screenshareButton.isDisplayed()).toBeTrue(); // await screenshareButton.click(); // await utils.waitForElement('.OV_big'); - // expect(await utils.getNumberOfElements('video')).equals(2); + // expect(await utils.getNumberOfElements('video')).toEqual(2); // const muteVideoButton = await utils.waitForElement('#camera-btn'); // await muteVideoButton.click(); - // expect(await utils.getNumberOfElements('video')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(1); // }); // it('should screenshare has audio active when camera is muted', async () => { @@ -229,33 +228,33 @@ describe('Testing screenshare features', () => { // // Clicking to screensharing button // const screenshareButton = await utils.waitForElement('#screenshare-btn'); - // expect(await utils.isPresent('#screenshare-btn')).to.be.true; + // expect(await utils.isPresent('#screenshare-btn')).toBeTrue(); // await screenshareButton.click(); // await utils.waitForElement('.OV_big'); - // expect(await utils.getNumberOfElements('video')).equals(2); - // expect(await utils.getNumberOfElements('#status-mic')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(2); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(1); // // Muting camera video // const muteVideoButton = await utils.waitForElement('#camera-btn'); // await muteVideoButton.click(); - // expect(await utils.getNumberOfElements('video')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(1); // await browser.sleep(500); - // expect(await utils.isPresent('#status-mic')).to.be.false; + // expect(await utils.isPresent('#status-mic')).toBeFalse(); // // Checking if audio is muted after join the room // isAudioEnabled = await browser.executeScript(audioEnableScript); - // expect(isAudioEnabled).to.be.true; + // expect(isAudioEnabled).toBeTrue(); // // Unmuting camera // await muteVideoButton.click(); // await browser.sleep(1000); // await utils.waitForElement('.camera-type'); - // expect(await utils.getNumberOfElements('video')).equals(2); - // expect(await utils.getNumberOfElements('#status-mic')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(2); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(1); // }); // it('should camera come back with audio muted when screensharing', async () => { @@ -274,38 +273,38 @@ describe('Testing screenshare features', () => { // await screenshareButton.click(); // await utils.waitForElement('.screen-type'); - // expect(await utils.getNumberOfElements('video')).equals(2); - // expect(await utils.getNumberOfElements('#status-mic')).equals(1); + // expect(await utils.getNumberOfElements('video')).toEqual(2); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(1); // // Mute camera // const muteVideoButton = await utils.waitForElement('#camera-btn'); // await muteVideoButton.click(); - // expect(await utils.getNumberOfElements('video')).equals(1); - // expect(await utils.isPresent('#status-mic')).to.be.false; + // expect(await utils.getNumberOfElements('video')).toEqual(1); + // expect(await utils.isPresent('#status-mic')).toBeFalse(); // // Checking if audio is muted after join the room // isAudioEnabled = await browser.executeScript(getAudioScript('screen-type')); - // expect(isAudioEnabled).to.be.true; + // expect(isAudioEnabled).toBeTrue(); // // Mute audio // const muteAudioButton = await utils.waitForElement('#mic-btn'); // await muteAudioButton.click(); // await utils.waitForElement('#status-mic'); - // expect(await utils.getNumberOfElements('#status-mic')).equals(1); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(1); // isAudioEnabled = await browser.executeScript(getAudioScript('screen-type')); - // expect(isAudioEnabled).to.be.false; + // expect(isAudioEnabled).toBeFalse(); // // Unmute camera // await muteVideoButton.click(); // await utils.waitForElement('.camera-type'); - // expect(await utils.getNumberOfElements('video')).equals(2); - // expect(await utils.getNumberOfElements('#status-mic')).equals(2); + // expect(await utils.getNumberOfElements('video')).toEqual(2); + // expect(await utils.getNumberOfElements('#status-mic')).toEqual(2); // isAudioEnabled = await browser.executeScript(getAudioScript('camera-type')); - // expect(isAudioEnabled).to.be.false; + // expect(isAudioEnabled).toBeFalse(); // }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/stream.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/stream.test.ts index 0532c8243f..33abfac251 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/stream.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/stream.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, ILocation, IRectangle, ISize, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -35,9 +34,9 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(1); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(1); }); it('should show a video element when a participant joins with audio muted', async () => { @@ -48,9 +47,9 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(0); }); it('should show a video element when a participant joins', async () => { @@ -61,9 +60,9 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); }); it('should show a video element when a participant shares its screen with VIDEO and AUDIO MUTED', async () => { @@ -74,21 +73,21 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await utils.clickOn('#screenshare-btn'); await browser.sleep(1000); await utils.waitForElement('#local-element-screen_share'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(1); //screen sharse video - expect(await utils.getNumberOfElements('audio')).equal(1); //screen share audio + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(1); //screen sharse video + expect(await utils.getNumberOfElements('audio')).toEqual(1); //screen share audio await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); }); it('should show a video element when a LOCAL participant shares its screen', async () => { @@ -99,21 +98,21 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); await utils.clickOn('#screenshare-btn'); await browser.sleep(1000); await utils.waitForElement('#local-element-screen_share'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(2); //screen share audio and local audio + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(2); //screen share audio and local audio await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); }); /* ------------ Checking video elements with two participants ------------ */ @@ -126,24 +125,24 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); const tabs = await utils.openTab(fixedUrl); await browser.switchTo().window(tabs[0]); await browser.sleep(1000); await utils.waitForElement('.OV_stream.remote'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await browser.switchTo().window(tabs[1]); await browser.sleep(1000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); }); it('should show two video elements when a two participants join with audio muted', async () => { @@ -154,24 +153,24 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(0); const tabs = await utils.openTab(fixedUrl); await browser.switchTo().window(tabs[0]); await utils.waitForElement('.OV_stream.remote'); await browser.sleep(2000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await browser.switchTo().window(tabs[1]); await browser.sleep(1000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(0); }); it('should show zero video elements when two participants join with video disabled', async () => { @@ -182,24 +181,24 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(1); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(1); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(1); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(1); const tabs = await utils.openTab(fixedUrl); await browser.switchTo().window(tabs[0]); await utils.waitForElement('.OV_stream.remote'); await browser.sleep(2000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(2); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(2); await browser.switchTo().window(tabs[1]); await browser.sleep(1000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(2); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(2); }); it('should show 3 video elements when a participant shares its screen with AUDIO and VIDEO MUTED', async () => { @@ -218,27 +217,27 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.clickOn('#screenshare-btn'); await browser.sleep(1000); await utils.waitForElement('#local-element-screen_share'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); // screen share audios await browser.switchTo().window(tabs[0]); await browser.sleep(1000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); // screen share audios await browser.switchTo().window(tabs[1]); await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); await browser.switchTo().window(tabs[0]); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(0); - expect(await utils.getNumberOfElements('audio')).equal(0); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(0); + expect(await utils.getNumberOfElements('audio')).toEqual(0); }); it('should show 3 video elements when a REMOTE participant shares its screen', async () => { @@ -257,27 +256,27 @@ describe('Checking stream elements by disabling/enabling the media', () => { await utils.clickOn('#screenshare-btn'); await browser.sleep(1000); await utils.waitForElement('#local-element-screen_share'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(3); - expect(await utils.getNumberOfElements('audio')).equal(3); // screen share audios and local audio and remote audio + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(3); + expect(await utils.getNumberOfElements('audio')).toEqual(3); // screen share audios and local audio and remote audio await browser.switchTo().window(tabs[0]); await browser.sleep(1000); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(3); - expect(await utils.getNumberOfElements('audio')).equal(3); // screen share audios and local audio and remote audio + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(3); + expect(await utils.getNumberOfElements('audio')).toEqual(3); // screen share audios and local audio and remote audio await browser.switchTo().window(tabs[1]); await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(2); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(2); await browser.switchTo().window(tabs[0]); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream')).equal(2); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(2); + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(2); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(2); }); it('should show 4 video elements when a two participants share theirs screen', async () => { @@ -294,33 +293,33 @@ describe('Checking stream elements by disabling/enabling the media', () => { await browser.switchTo().window(tabs[1]); await utils.waitForElement('.OV_stream.local'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); // screen share audios await utils.clickOn('#screenshare-btn'); await browser.sleep(500); await utils.waitForElement('#local-element-screen_share'); - expect(await utils.getNumberOfElements('.OV_stream')).equal(4); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(2); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(4); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(2); // screen share audios await browser.switchTo().window(tabs[0]); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream')).equal(4); - expect(await utils.getNumberOfElements('video')).equal(2); - expect(await utils.getNumberOfElements('audio')).equal(2); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(4); + expect(await utils.getNumberOfElements('video')).toEqual(2); + expect(await utils.getNumberOfElements('audio')).toEqual(2); // screen share audios await utils.disableScreenShare(); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); // screen share audios await browser.switchTo().window(tabs[1]); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream')).equal(3); - expect(await utils.getNumberOfElements('video')).equal(1); - expect(await utils.getNumberOfElements('audio')).equal(1); // screen share audios + expect(await utils.getNumberOfElements('.OV_stream')).toEqual(3); + expect(await utils.getNumberOfElements('video')).toEqual(1); + expect(await utils.getNumberOfElements('audio')).toEqual(1); // screen share audios }); }); @@ -352,7 +351,7 @@ describe('Testing stream features', () => { await utils.waitForElement('.OV_stream.local'); await utils.hoverOn('.OV_stream.local'); await utils.waitForElement('#pin-btn'); - expect(await utils.isPresent('#pin-btn')).to.be.true; + expect(await utils.isPresent('#pin-btn')).toBeTrue(); }); it('should show the PIN button over the REMOTE video', async () => { @@ -373,7 +372,7 @@ describe('Testing stream features', () => { await utils.waitForElement('.OV_stream.remote'); await utils.hoverOn('.OV_stream.remote'); await utils.waitForElement('#pin-btn'); - expect(await utils.isPresent('#pin-btn')).to.be.true; + expect(await utils.isPresent('#pin-btn')).toBeTrue(); }); it('should show the SILENCE button ONLY over the REMOTE video', async () => { @@ -386,7 +385,7 @@ describe('Testing stream features', () => { await utils.hoverOn('.OV_stream.local'); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream.local #silence-btn')).equals(0); + expect(await utils.getNumberOfElements('.OV_stream.local #silence-btn')).toEqual(0); // Starting new browser for adding the second participant const newTabScript = `window.open("${fixedUrl}")`; @@ -398,13 +397,13 @@ describe('Testing stream features', () => { await utils.waitForElement('.OV_stream.remote'); await utils.hoverOn('.OV_stream.remote'); await utils.waitForElement('.OV_stream.remote #silence-btn'); - expect(await utils.isPresent('.OV_stream.remote #silence-btn')).to.be.true; - expect(await utils.getNumberOfElements('.OV_stream.remote #silence-btn')).equals(1); + expect(await utils.isPresent('.OV_stream.remote #silence-btn')).toBeTrue(); + expect(await utils.getNumberOfElements('.OV_stream.remote #silence-btn')).toEqual(1); await utils.hoverOn('.OV_stream.local'); await browser.sleep(500); - expect(await utils.getNumberOfElements('.OV_stream.local #silence-btn')).equals(0); + expect(await utils.getNumberOfElements('.OV_stream.local #silence-btn')).toEqual(0); }); it('should show the MINIMIZE button ONLY over the LOCAL video', async () => { @@ -415,7 +414,7 @@ describe('Testing stream features', () => { await utils.waitForElement('.OV_stream.local'); await utils.hoverOn('.OV_stream.local'); await utils.waitForElement('#minimize-btn'); - expect(await utils.isPresent('#minimize-btn')).to.be.true; + expect(await utils.isPresent('#minimize-btn')).toBeTrue(); // Starting new browser for adding the second participant const newTabScript = `window.open("${fixedUrl}")`; @@ -426,11 +425,11 @@ describe('Testing stream features', () => { await utils.checkLayoutPresent(); await utils.waitForElement('.OV_stream.local'); await utils.hoverOn('.OV_stream.remote'); - expect(await utils.getNumberOfElements('#minimize-btn')).equals(0); + expect(await utils.getNumberOfElements('#minimize-btn')).toEqual(0); await utils.hoverOn('.OV_stream.local'); await utils.waitForElement('#minimize-btn'); - expect(await utils.isPresent('#minimize-btn')).to.be.true; + expect(await utils.isPresent('#minimize-btn')).toBeTrue(); }); it('should minimize the LOCAL video', async () => { @@ -447,10 +446,10 @@ describe('Testing stream features', () => { await browser.sleep(900); const minimizeStream = await utils.waitForElement('.OV_stream.local'); const minimizeStreamProps: IRectangle = await minimizeStream.getRect(); - expect(streamProps.height).not.equals(minimizeStreamProps.height); - expect(streamProps.width).not.equals(minimizeStreamProps.width); - expect(minimizeStreamProps.x).lessThan(100); - expect(minimizeStreamProps.y).lessThan(100); + expect(streamProps.height).not.toEqual(minimizeStreamProps.height); + expect(streamProps.width).not.toEqual(minimizeStreamProps.width); + expect(minimizeStreamProps.x).toBeLessThan(100); + expect(minimizeStreamProps.y).toBeLessThan(100); }); it('should MAXIMIZE the local video', async () => { @@ -471,8 +470,8 @@ describe('Testing stream features', () => { let stream = await utils.waitForElement('.OV_stream.local'); let streamProps: IRectangle = await stream.getRect(); - expect(streamProps.x).equals(300 + marginX); - expect(streamProps.y).equals(300); + expect(streamProps.x).toEqual(300 + marginX); + expect(streamProps.y).toEqual(300); await utils.hoverOn('.OV_stream.local'); await utils.waitForElement('#minimize-btn'); @@ -481,8 +480,8 @@ describe('Testing stream features', () => { stream = await utils.waitForElement('.OV_stream.local'); streamProps = await stream.getRect(); - expect(streamProps.x).lessThan(300 + marginX); - expect(streamProps.y).equals(1); //.OV_publisher element has 1px of padding + expect(streamProps.x).toBeLessThan(300 + marginX); + expect(streamProps.y).toEqual(1); //.OV_publisher element has 1px of padding }); it('should be able to dragg the minimized LOCAL video', async () => { @@ -503,8 +502,8 @@ describe('Testing stream features', () => { const stream = await utils.waitForElement('.OV_stream.local'); const streamProps: IRectangle = await stream.getRect(); - expect(streamProps.x).equals(300 + marginX); - expect(streamProps.y).equals(300); + expect(streamProps.x).toEqual(300 + marginX); + expect(streamProps.y).toEqual(300); }); it('should be the MINIMIZED video ALWAYS VISIBLE when toggling panels', async () => { @@ -526,8 +525,8 @@ describe('Testing stream features', () => { let stream = await utils.waitForElement('.OV_stream.local'); let streamProps: IRectangle = await stream.getRect(); - expect(streamProps.x).equals(900 + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toEqual(900 + marginX); + expect(streamProps.y).toEqual(0); // Open chat panel await utils.clickOn('#chat-panel-btn'); @@ -536,8 +535,8 @@ describe('Testing stream features', () => { streamProps = await stream.getRect(); let lastX = streamProps.x; - expect(streamProps.x).lessThan(900 + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeLessThan(900 + marginX); + expect(streamProps.y).toEqual(0); // Close chat panel await utils.clickOn('#chat-panel-btn'); @@ -546,8 +545,8 @@ describe('Testing stream features', () => { stream = await utils.waitForElement('.OV_stream.local'); streamProps = await stream.getRect(); - expect(streamProps.x).greaterThan(lastX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeGreaterThanOrEqual(lastX + marginX); + expect(streamProps.y).toEqual(0); }); it('should be the MINIMIZED video go to the right when panel closes', async () => { @@ -576,8 +575,8 @@ describe('Testing stream features', () => { let stream = await utils.waitForElement('.OV_stream.local'); let streamProps: IRectangle = await stream.getRect(); - expect(streamProps.x).equals(newX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toEqual(newX + marginX); + expect(streamProps.y).toEqual(0); // Close chat panel // There is a unstable behaviour simulating the drag and drop with selenium (the stream is not moved the first time) @@ -592,8 +591,8 @@ describe('Testing stream features', () => { streamProps = await stream.getRect(); let lastX = streamProps.x; - expect(streamProps.x).greaterThanOrEqual(newX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeGreaterThanOrEqual(newX + marginX); + expect(streamProps.y).toEqual(0); // Open chat panel await utils.clickOn('#chat-panel-btn'); @@ -602,8 +601,8 @@ describe('Testing stream features', () => { stream = await utils.waitForElement('.OV_stream.local'); streamProps = await stream.getRect(); - expect(streamProps.x).lessThan(lastX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeLessThan(lastX + marginX); + expect(streamProps.y).toEqual(0); }); it('should be the MINIMIZED video ALWAYS VISIBLE when toggling from small to bigger panel', async () => { @@ -625,8 +624,8 @@ describe('Testing stream features', () => { let stream = await utils.waitForElement('.OV_stream.local'); let streamProps: IRectangle = await stream.getRect(); - expect(streamProps.x).equals(900 + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toEqual(900 + marginX); + expect(streamProps.y).toEqual(0); // Open chat panel await utils.clickOn('#chat-panel-btn'); @@ -635,8 +634,8 @@ describe('Testing stream features', () => { streamProps = await stream.getRect(); let lastX = streamProps.x; - expect(streamProps.x).lessThan(900 + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeLessThan(900 + marginX); + expect(streamProps.y).toEqual(0); // Open settings panel await utils.togglePanel('settings'); @@ -645,8 +644,8 @@ describe('Testing stream features', () => { stream = await utils.waitForElement('.OV_stream.local'); streamProps = await stream.getRect(); - expect(streamProps.x).lessThan(lastX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeLessThan(lastX + marginX); + expect(streamProps.y).toEqual(0); lastX = streamProps.x; // Open chat panel @@ -655,11 +654,11 @@ describe('Testing stream features', () => { stream = await utils.waitForElement('.OV_stream.local'); streamProps = await stream.getRect(); - expect(streamProps.x).greaterThan(lastX + marginX); - expect(streamProps.y).equals(0); + expect(streamProps.x).toBeGreaterThanOrEqual(lastX + marginX); + expect(streamProps.y).toEqual(0); }); - it.skip('should show the audio detection elements when participant is speaking', async () => { + xit('should show the audio detection elements when participant is speaking', async () => { const roomName = 'speakingE2E'; const fixedUrl = `${url}&roomName=${roomName}&prejoin=false`; await browser.get(`${fixedUrl}&audioEnabled=false`); @@ -673,8 +672,8 @@ describe('Testing stream features', () => { await browser.switchTo().window(tabs[0]); await utils.waitForElement('.OV_stream.remote.speaking'); - expect(await utils.getNumberOfElements('.OV_stream.remote.speaking')).to.be.equal(1); - expect(await utils.getNumberOfElements('.OV_stream.speaking')).to.be.equal(1); + expect(await utils.getNumberOfElements('.OV_stream.remote.speaking')).toEqual(1); + expect(await utils.getNumberOfElements('.OV_stream.speaking')).toEqual(1); }); }); @@ -725,7 +724,7 @@ describe('Testing video is playing', () => { await browser.sleep(6000); const exceptionQuantity = await utils.getNumberOfElements('#NO_STREAM_PLAYING_EVENT'); - expect(exceptionQuantity).equals(0); + expect(exceptionQuantity).toEqual(0); }); it('should play the participant video with only video', async () => { @@ -753,6 +752,6 @@ describe('Testing video is playing', () => { await browser.sleep(6000); const exceptionQuantity = await utils.getNumberOfElements('#NO_STREAM_PLAYING_EVENT'); - expect(exceptionQuantity).equals(0); + expect(exceptionQuantity).toEqual(0); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent-e2e/toolbar.test.ts b/openvidu-components-angular/e2e/webcomponent-e2e/toolbar.test.ts index 0accf7dcc7..5013780069 100644 --- a/openvidu-components-angular/e2e/webcomponent-e2e/toolbar.test.ts +++ b/openvidu-components-angular/e2e/webcomponent-e2e/toolbar.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from '../config'; import { WebComponentConfig } from '../selenium.conf'; @@ -36,12 +35,12 @@ describe('Testing TOOLBAR features', () => { await micButton.click(); await utils.waitForElement('#mic-btn #mic_off'); - expect(await utils.isPresent('#mic-btn #mic_off')).to.be.true; + expect(await utils.isPresent('#mic-btn #mic_off')).toBeTrue(); await micButton.click(); await utils.waitForElement('#mic-btn #mic'); - expect(await utils.isPresent('#mic-btn #mic')).to.be.true; + expect(await utils.isPresent('#mic-btn #mic')).toBeTrue(); }); it('should mute and unmute the local camera', async () => { @@ -53,11 +52,11 @@ describe('Testing TOOLBAR features', () => { await cameraButton.click(); await utils.waitForElement('#camera-btn #videocam_off'); - expect(await utils.isPresent('#camera-btn #videocam_off')).to.be.true; + expect(await utils.isPresent('#camera-btn #videocam_off')).toBeTrue(); await cameraButton.click(); await utils.waitForElement('#camera-btn #videocam'); - expect(await utils.isPresent('#camera-btn #videocam')).to.be.true; + expect(await utils.isPresent('#camera-btn #videocam')).toBeTrue(); }); }); diff --git a/openvidu-components-angular/e2e/webcomponent.pro.test.ts b/openvidu-components-angular/e2e/webcomponent.pro.test.ts index a83a7d7ea0..7986b0fc3b 100644 --- a/openvidu-components-angular/e2e/webcomponent.pro.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.pro.test.ts @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { Builder, WebDriver } from 'selenium-webdriver'; import { OPENVIDU_CALL_SERVER } from './config'; import { WebComponentConfig } from './selenium.conf'; @@ -43,11 +42,11 @@ describe('Testing API Directives', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -57,14 +56,14 @@ describe('Testing API Directives', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.waitForElement('ov-captions-settings'); - expect(await utils.isPresent('.captions-container')).to.be.true; + expect(await utils.isPresent('.captions-container')).toBeTrue(); const element = await utils.waitForElement('.lang-button'); - expect(await element.getText()).equal('Españolexpand_more'); + expect(await element.getText()).toEqual('Españolexpand_more'); }); it('should override the CAPTIONS LANG OPTIONS', async () => { @@ -82,11 +81,11 @@ describe('Testing API Directives', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -96,18 +95,18 @@ describe('Testing API Directives', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.waitForElement('ov-captions-settings'); - expect(await utils.isPresent('.captions-container')).to.be.true; + expect(await utils.isPresent('.captions-container')).toBeTrue(); const element = await utils.waitForElement('.lang-button'); - expect(await element.getText()).equal('Espexpand_more'); + expect(await element.getText()).toEqual('Espexpand_more'); await element.click(); - expect(await utils.getNumberOfElements('.mat-menu-item')).equals(2); + expect(await utils.getNumberOfElements('.mat-menu-item')).toEqual(2); }); }); @@ -137,30 +136,30 @@ describe('Testing panels', () => { let element; await browser.get(`${url}`); element = await utils.waitForElement('#pre-join-container'); - expect(await utils.isPresent('#pre-join-container')).to.be.true; + expect(await utils.isPresent('#pre-join-container')).toBeTrue(); 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; + expect(await utils.isPresent('#background-effects-btn')).toBeTrue(); + expect(await backgroundButton.isEnabled()).toBeTrue(); await backgroundButton.click(); await browser.sleep(500); await utils.waitForElement('#background-effects-container'); - expect(await utils.isPresent('#background-effects-container')).to.be.true; + expect(await utils.isPresent('#background-effects-container')).toBeTrue(); element = await utils.waitForElement('#camera-button'); - expect(await utils.isPresent('#camera-button')).to.be.true; - expect(await element.isEnabled()).to.be.true; + expect(await utils.isPresent('#camera-button')).toBeTrue(); + expect(await element.isEnabled()).toBeTrue(); await element.click(); await browser.sleep(500); element = await utils.waitForElement('#video-poster'); - expect(await utils.isPresent('#video-poster')).to.be.true; + expect(await utils.isPresent('#video-poster')).toBeTrue(); - expect(await backgroundButton.isDisplayed()).to.be.true; - expect(await backgroundButton.isEnabled()).to.be.false; + expect(await backgroundButton.isDisplayed()).toBeTrue(); + expect(await backgroundButton.isEnabled()).toBeFalse(); - expect(await utils.isPresent('#background-effects-container')).to.be.false; + expect(await utils.isPresent('#background-effects-container')).toBeFalse(); }); }); @@ -200,11 +199,11 @@ describe('Testing captions features', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -225,11 +224,11 @@ describe('Testing captions features', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -239,12 +238,12 @@ describe('Testing captions features', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.waitForElement('ov-captions-settings'); // Expect caption button is not present - expect(await utils.isPresent('#caption-settings-btn')).to.be.false; + expect(await utils.isPresent('#caption-settings-btn')).toBeFalse(); }); it('should TOGGLE the CAPTIONS container from settings panel', async () => { @@ -262,11 +261,11 @@ describe('Testing captions features', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -276,18 +275,18 @@ describe('Testing captions features', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.waitForElement('ov-captions-settings'); - expect(await utils.isPresent('.captions-container')).to.be.true; + expect(await utils.isPresent('.captions-container')).toBeTrue(); await utils.clickOn('#captions-toggle-slide'); - expect(await utils.isPresent('.captions-container')).to.be.false; + expect(await utils.isPresent('.captions-container')).toBeFalse(); await browser.sleep(200); await utils.clickOn('#captions-toggle-slide'); - expect(await utils.isPresent('.captions-container')).to.be.true; + expect(await utils.isPresent('.captions-container')).toBeTrue(); }); it('should change the CAPTIONS language from settings panel', async () => { @@ -305,11 +304,11 @@ describe('Testing captions features', () => { // Checking if button panel is present await utils.waitForElement('#more-options-menu'); - expect(await utils.isPresent('#more-options-menu')).to.be.true; + expect(await utils.isPresent('#more-options-menu')).toBeTrue(); // Checking if captions button is present await utils.waitForElement('#captions-btn'); - expect(await utils.isPresent('#captions-btn')).to.be.true; + expect(await utils.isPresent('#captions-btn')).toBeTrue(); await utils.clickOn('#captions-btn'); await utils.waitForElement('.captions-container'); @@ -319,11 +318,11 @@ describe('Testing captions features', () => { await browser.sleep(500); await utils.waitForElement('.settings-container'); - expect(await utils.isPresent('.settings-container')).to.be.true; + expect(await utils.isPresent('.settings-container')).toBeTrue(); await utils.waitForElement('ov-captions-settings'); - expect(await utils.isPresent('.captions-container')).to.be.true; + expect(await utils.isPresent('.captions-container')).toBeTrue(); await utils.clickOn('.lang-button'); await browser.sleep(500); @@ -332,6 +331,6 @@ describe('Testing captions features', () => { await utils.clickOn('.panel-close-button'); const button = await utils.waitForElement('#caption-settings-btn'); - expect(await button.getText()).equals('settingsEspañol'); + expect(await button.getText()).toEqual('settingsEspañol'); }); });