From 92fd9cd6345c4af9b9beb25e4757ad6f1f0730b2 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Fri, 14 Oct 2022 13:52:35 +0200 Subject: [PATCH] openvidu-components: Added e2e test case --- .../e2e/webcomponent.test.ts | 30 +++++++++++++++++++ .../avatar-profile.component.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index e14a743c..f19d7a23 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -1213,6 +1213,36 @@ describe('Testing panels', () => { await browser.quit(); }); + it('should toggle BACKGROUND panel on prejoin page when VIDEO is MUTED', async () => { + let element; + await browser.get(`${url}`); + element = await browser.wait(until.elementLocated(By.id('pre-join-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + + const backgroundButton = await browser.findElement(By.id('background-effects-btn')); + expect(await backgroundButton.isDisplayed()).to.be.true; + expect(await backgroundButton.isEnabled()).to.be.true; + await backgroundButton.click(); + + element = await browser.wait(until.elementLocated(By.id('background-effects-container')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + + element = await browser.wait(until.elementLocated(By.id('camera-button')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + expect(await element.isEnabled()).to.be.true; + await element.click(); + + element = await browser.wait(until.elementLocated(By.id('video-poster')), TIMEOUT); + expect(await element.isDisplayed()).to.be.true; + + expect(await backgroundButton.isDisplayed()).to.be.true; + expect(await backgroundButton.isEnabled()).to.be.false; + + element = await browser.findElements(By.id('background-effects-container')); + expect(element.length).equals(0); + + }); + it('should toggle CHAT panel', async () => { let element; await browser.get(`${url}?prejoin=false`); diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/avatar-profile/avatar-profile.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/avatar-profile/avatar-profile.component.ts index cfbfc952..facfa7be 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/avatar-profile/avatar-profile.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/avatar-profile/avatar-profile.component.ts @@ -7,7 +7,7 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'ov-avatar-profile', template: ` -
+
{{ letter }}