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;
|
||||
});
|
||||
|
||||
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', () => {
|
||||
|
|
|
@ -134,7 +134,7 @@ $(document).ready(() => {
|
|||
appendElement('onSessionCreated');
|
||||
|
||||
// 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) => {
|
||||
var user = JSON.parse(e.connection.data).clientData;
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
</span>
|
||||
</div>
|
||||
</section>
|
||||
<hr *ngIf="showDirectives"/>
|
||||
<hr *ngIf="showDirectives" />
|
||||
|
||||
<section *ngIf="showDirectives">
|
||||
<section *ngIf="showDirectives">
|
||||
<div>
|
||||
<h2>Attribute directives</h2>
|
||||
</div>
|
||||
|
@ -67,7 +67,6 @@
|
|||
<div id="events"></div>
|
||||
|
||||
<ov-videoconference *ngIf="!showDirectives" [tokens]="tokens" [prejoin]="false">
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<ng-template [ngIf]="ovToolbarSelected">
|
||||
<ov-toolbar
|
||||
|
@ -141,7 +140,6 @@
|
|||
<!-- PANELS -->
|
||||
<ng-template [ngIf]="ovPanelSelected">
|
||||
<ov-panel *ovPanel id="custom-panels">
|
||||
|
||||
<ng-template [ngIf]="ovAdditionalPanelsSelected">
|
||||
<div *ovAdditionalPanels id="custom-additional-panel">
|
||||
<h1 id="additional-panel-title">NEW PANEL</h1>
|
||||
|
@ -199,7 +197,7 @@
|
|||
</ng-template>
|
||||
|
||||
<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 [ngIf]="!ovPanelSelected && ovParticipantsPanelSelected">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
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 { PanelService } from 'openvidu-angular';
|
||||
import { Subscription, throwError as observableThrowError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
interface TemplateDirectives {
|
||||
name: string;
|
||||
|
@ -48,7 +48,8 @@ export enum AttributeDirective {
|
|||
STREAM_PARTICIPANT_NAME = 'displayParticipantName',
|
||||
STREAM_AUDIO_DETECTION = 'displayAudioDetection',
|
||||
STREAM_SETTINGS = 'settingsButton',
|
||||
PARTICIPANT_ITEM_MUTE = 'muteButton'
|
||||
PARTICIPANT_ITEM_MUTE = 'muteButton',
|
||||
RECORDING_ACTIVITY = 'recordingActivity'
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
@ -113,6 +114,10 @@ export class TestingComponent implements OnInit {
|
|||
{
|
||||
component: StructuralDirectives.PARTICIPANTS_PANEL_ITEM,
|
||||
directives: [AttributeDirective.PARTICIPANT_ITEM_MUTE]
|
||||
},
|
||||
{
|
||||
component: StructuralDirectives.ACTIVITIES_PANEL,
|
||||
directives: [AttributeDirective.RECORDING_ACTIVITY]
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -148,6 +153,8 @@ export class TestingComponent implements OnInit {
|
|||
|
||||
subscription: Subscription;
|
||||
|
||||
recordingActivity = true;
|
||||
|
||||
constructor(private httpClient: HttpClient, private route: ActivatedRoute, private panelService: PanelService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -272,6 +279,9 @@ export class TestingComponent implements OnInit {
|
|||
case AttributeDirective.PARTICIPANT_ITEM_MUTE:
|
||||
this.participantItemMuteBtn = value;
|
||||
break;
|
||||
case AttributeDirective.RECORDING_ACTIVITY:
|
||||
this.recordingActivity = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue