openvidu-components: Added e2e test case

pull/748/head
Carlos Santos 2022-10-14 13:52:35 +02:00
parent fd99fb27f9
commit 92fd9cd634
2 changed files with 31 additions and 1 deletions

View File

@ -1213,6 +1213,36 @@ describe('Testing panels', () => {
await browser.quit(); 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 () => { it('should toggle CHAT panel', async () => {
let element; let element;
await browser.get(`${url}?prejoin=false`); await browser.get(`${url}?prejoin=false`);

View File

@ -7,7 +7,7 @@ import { Component, Input } from '@angular/core';
@Component({ @Component({
selector: 'ov-avatar-profile', selector: 'ov-avatar-profile',
template: ` template: `
<div class="poster"> <div class="poster" id="video-poster">
<div class="initial" [ngStyle]="{ 'background-color': color }"> <div class="initial" [ngStyle]="{ 'background-color': color }">
<span id="poster-text">{{ letter }}</span> <span id="poster-text">{{ letter }}</span>
</div> </div>