From 085d659363935f02f13cf3a12317d7f939f3f221 Mon Sep 17 00:00:00 2001 From: csantosm <4a.santos@gmail.com> Date: Wed, 6 Jul 2022 00:37:28 +0200 Subject: [PATCH] openvidu-components: Updated e2e tests --- .../e2e/webcomponent.test.ts | 37 +++++++++++++++++++ .../videoconference.component.css | 4 +- .../videoconference.component.html | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index 4bf9d826..3758144b 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -578,6 +578,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -599,6 +602,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -620,6 +626,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -641,6 +650,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -662,6 +674,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -688,6 +703,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -709,6 +727,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -730,6 +751,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -751,6 +775,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -796,6 +823,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -842,6 +872,9 @@ describe('Testing videoconference EVENTS', () => { let element; await browser.get(`${url}?prejoin=false`); + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('session-container')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; @@ -877,6 +910,10 @@ describe('Testing videoconference EVENTS', () => { it('should receive the onSessionCreated event', async () => { let element; await browser.get(`${url}?prejoin=false`); + + element = await browser.wait(until.elementLocated(By.id('call-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + element = await browser.wait(until.elementLocated(By.id('onSessionCreated')), TIMEOUT); expect(await element.isDisplayed()).to.be.true; element = await browser.findElements(By.id('onJoinButtonClicked')); diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.css b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.css index 3ad40991..70042ae7 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.css +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.css @@ -1,7 +1,7 @@ -#call-container, #session-container { +#call-container, #vc-container { height: 100%; } -#session-container { +#vc-container { background-color: var(--ov-primary-color); } diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html index c0ba4c90..a7981693 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html @@ -14,7 +14,7 @@ {{ errorMessage }} -