mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Added recordingActivity directive e2e test
parent
8aba9d0610
commit
682a51d11a
|
@ -985,6 +985,26 @@ describe('Testing ATTRIBUTE DIRECTIVES', () => {
|
||||||
|
|
||||||
expect(await utils.isPresent('mute-btn')).to.be.false;
|
expect(await utils.isPresent('mute-btn')).to.be.false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should HIDE the RECORDING activity', async () => {
|
||||||
|
await browser.get(`${url}`);
|
||||||
|
|
||||||
|
await utils.clickOn('#ovActivitiesPanel-checkbox');
|
||||||
|
|
||||||
|
await utils.clickOn('#recordingActivity-checkbox');
|
||||||
|
|
||||||
|
await utils.clickOn('#apply-btn');
|
||||||
|
|
||||||
|
await utils.checkToolbarIsPresent();
|
||||||
|
|
||||||
|
await utils.clickOn('#activities-panel-btn');
|
||||||
|
|
||||||
|
await browser.sleep(500);
|
||||||
|
|
||||||
|
await utils.waitForElement('#custom-activities-panel');
|
||||||
|
|
||||||
|
expect(await utils.isPresent('ov-recording-activity')).to.be.false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Testing EVENTS', () => {
|
describe('Testing EVENTS', () => {
|
||||||
|
|
|
@ -134,7 +134,7 @@ $(document).ready(() => {
|
||||||
appendElement('onSessionCreated');
|
appendElement('onSessionCreated');
|
||||||
|
|
||||||
// You can see the session documentation here
|
// You can see the session documentation here
|
||||||
// https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/session.html
|
// https://docs.openvidu.io/en/stable/api/openvidu-browser/classes/Session.html
|
||||||
|
|
||||||
session.on('connectionCreated', (e) => {
|
session.on('connectionCreated', (e) => {
|
||||||
var user = JSON.parse(e.connection.data).clientData;
|
var user = JSON.parse(e.connection.data).clientData;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<hr *ngIf="showDirectives"/>
|
<hr *ngIf="showDirectives" />
|
||||||
|
|
||||||
<section *ngIf="showDirectives">
|
<section *ngIf="showDirectives">
|
||||||
<div>
|
<div>
|
||||||
|
@ -67,7 +67,6 @@
|
||||||
<div id="events"></div>
|
<div id="events"></div>
|
||||||
|
|
||||||
<ov-videoconference *ngIf="!showDirectives" [tokens]="tokens" [prejoin]="false">
|
<ov-videoconference *ngIf="!showDirectives" [tokens]="tokens" [prejoin]="false">
|
||||||
|
|
||||||
<!-- TOOLBAR -->
|
<!-- TOOLBAR -->
|
||||||
<ng-template [ngIf]="ovToolbarSelected">
|
<ng-template [ngIf]="ovToolbarSelected">
|
||||||
<ov-toolbar
|
<ov-toolbar
|
||||||
|
@ -141,7 +140,6 @@
|
||||||
<!-- PANELS -->
|
<!-- PANELS -->
|
||||||
<ng-template [ngIf]="ovPanelSelected">
|
<ng-template [ngIf]="ovPanelSelected">
|
||||||
<ov-panel *ovPanel id="custom-panels">
|
<ov-panel *ovPanel id="custom-panels">
|
||||||
|
|
||||||
<ng-template [ngIf]="ovAdditionalPanelsSelected">
|
<ng-template [ngIf]="ovAdditionalPanelsSelected">
|
||||||
<div *ovAdditionalPanels id="custom-additional-panel">
|
<div *ovAdditionalPanels id="custom-additional-panel">
|
||||||
<h1 id="additional-panel-title">NEW PANEL</h1>
|
<h1 id="additional-panel-title">NEW PANEL</h1>
|
||||||
|
@ -199,7 +197,7 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template [ngIf]="!ovPanelSelected && ovActivitiesPanelSelected">
|
<ng-template [ngIf]="!ovPanelSelected && ovActivitiesPanelSelected">
|
||||||
<ov-activities-panel *ovActivitiesPanel id="custom-activities-panel"></ov-activities-panel>
|
<ov-activities-panel *ovActivitiesPanel [recordingActivity]="recordingActivity" id="custom-activities-panel"></ov-activities-panel>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template [ngIf]="!ovPanelSelected && ovParticipantsPanelSelected">
|
<ng-template [ngIf]="!ovPanelSelected && ovParticipantsPanelSelected">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { Subscription, throwError as observableThrowError } from 'rxjs';
|
|
||||||
import { catchError } from 'rxjs/operators';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { PanelService } from 'openvidu-angular';
|
import { PanelService } from 'openvidu-angular';
|
||||||
|
import { Subscription, throwError as observableThrowError } from 'rxjs';
|
||||||
|
import { catchError } from 'rxjs/operators';
|
||||||
|
|
||||||
interface TemplateDirectives {
|
interface TemplateDirectives {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -48,7 +48,8 @@ export enum AttributeDirective {
|
||||||
STREAM_PARTICIPANT_NAME = 'displayParticipantName',
|
STREAM_PARTICIPANT_NAME = 'displayParticipantName',
|
||||||
STREAM_AUDIO_DETECTION = 'displayAudioDetection',
|
STREAM_AUDIO_DETECTION = 'displayAudioDetection',
|
||||||
STREAM_SETTINGS = 'settingsButton',
|
STREAM_SETTINGS = 'settingsButton',
|
||||||
PARTICIPANT_ITEM_MUTE = 'muteButton'
|
PARTICIPANT_ITEM_MUTE = 'muteButton',
|
||||||
|
RECORDING_ACTIVITY = 'recordingActivity'
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -113,6 +114,10 @@ export class TestingComponent implements OnInit {
|
||||||
{
|
{
|
||||||
component: StructuralDirectives.PARTICIPANTS_PANEL_ITEM,
|
component: StructuralDirectives.PARTICIPANTS_PANEL_ITEM,
|
||||||
directives: [AttributeDirective.PARTICIPANT_ITEM_MUTE]
|
directives: [AttributeDirective.PARTICIPANT_ITEM_MUTE]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: StructuralDirectives.ACTIVITIES_PANEL,
|
||||||
|
directives: [AttributeDirective.RECORDING_ACTIVITY]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -148,6 +153,8 @@ export class TestingComponent implements OnInit {
|
||||||
|
|
||||||
subscription: Subscription;
|
subscription: Subscription;
|
||||||
|
|
||||||
|
recordingActivity = true;
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient, private route: ActivatedRoute, private panelService: PanelService) {}
|
constructor(private httpClient: HttpClient, private route: ActivatedRoute, private panelService: PanelService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -272,6 +279,9 @@ export class TestingComponent implements OnInit {
|
||||||
case AttributeDirective.PARTICIPANT_ITEM_MUTE:
|
case AttributeDirective.PARTICIPANT_ITEM_MUTE:
|
||||||
this.participantItemMuteBtn = value;
|
this.participantItemMuteBtn = value;
|
||||||
break;
|
break;
|
||||||
|
case AttributeDirective.RECORDING_ACTIVITY:
|
||||||
|
this.recordingActivity = value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue