Skip to content

Commit

Permalink
openvidu-components: Added e2e test for checking video sound button
Browse files Browse the repository at this point in the history
Checking if sound button is not present for local participants
  • Loading branch information
CSantosM committed Apr 21, 2023
1 parent 35a6e82 commit f7b0f8e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions openvidu-components-angular/e2e/webcomponent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,43 @@ describe('Testing videoconference EVENTS', () => {
});
});

describe('Testing stream video menu features', () => {
let browser: WebDriver;
let utils: OpenViduComponentsPO;
async function createChromeBrowser(): Promise<WebDriver> {
return await new Builder()
.forBrowser(WebComponentConfig.browserName)
.withCapabilities(WebComponentConfig.browserCapabilities)
.setChromeOptions(WebComponentConfig.browserOptions)
.usingServer(WebComponentConfig.seleniumAddress)
.build();
}

beforeEach(async () => {
browser = await createChromeBrowser();
utils = new OpenViduComponentsPO(browser);
});

afterEach(async () => {
await browser.quit();
});

it('should not show the Mute sound button for local participant', async () => {
await browser.get(`${url}&prejoin=false`);

await utils.checkLayoutPresent();

await utils.waitForElement('#stream-menu-btn');
await utils.clickOn('#stream-menu-btn');

await browser.sleep(500);

// Checking if mute sound button is not present
expect(await utils.isPresent('#sound-btn')).to.be.false;
});
});


describe('Testing screenshare features', () => {
let browser: WebDriver;
let utils: OpenViduComponentsPO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</div>

<div *ngIf="!isMinimal && showSettingsButton" id="settings-container" class="videoButtons">
<button mat-icon-button (click)="toggleVideoMenu($event)" matTooltip="{{ 'STREAM.SETTINGS' | translate }}" matTooltipPosition="above" aria-label="Video settings menu">
<button mat-icon-button (click)="toggleVideoMenu($event)" matTooltip="{{ 'STREAM.SETTINGS' | translate }}" matTooltipPosition="above" aria-label="Video settings menu" id="stream-menu-btn">
<mat-icon>more_vert</mat-icon>
</button>
<span [matMenuTriggerFor]="menu"></span>
Expand All @@ -60,7 +60,7 @@
<span *ngIf="videoSizeIcon === videoSizeIconEnum.NORMAL">{{ 'STREAM.ZOOM_OUT' | translate }}</span>
<span *ngIf="videoSizeIcon === videoSizeIconEnum.BIG">{{ 'STREAM.ZOOM_IN' | translate }}</span>
</button>
<button mat-menu-item id="volumeButton" *ngIf="!this._stream.local" (click)="toggleMuteForcibly()">
<button mat-menu-item id="sound-btn" *ngIf="!this._stream.local" (click)="toggleMuteForcibly()">
<mat-icon *ngIf="!_stream.participant.isMutedForcibly">volume_up</mat-icon>
<span *ngIf="!_stream.participant.isMutedForcibly">{{ 'STREAM.MUTE_SOUND' | translate }}</span>

Expand Down

0 comments on commit f7b0f8e

Please sign in to comment.