Skip to content

Commit

Permalink
Refactored structure, imports and aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Oct 9, 2024
1 parent dfcf8b3 commit db47da6
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 44 deletions.
5 changes: 0 additions & 5 deletions backend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ export const LIVEKIT_URL_PRIVATE = process.env.LIVEKIT_URL_PRIVATE || LIVEKIT_UR
export const LIVEKIT_API_KEY = process.env.LIVEKIT_API_KEY || 'devkey';
export const LIVEKIT_API_SECRET = process.env.LIVEKIT_API_SECRET || 'secret';

// export const LIVEKIT_URL = process.env.LIVEKIT_URL || 'wss://call.openvidu.io';
// export const LIVEKIT_URL_PRIVATE = process.env.LIVEKIT_URL_PRIVATE || LIVEKIT_URL;
// export const LIVEKIT_API_KEY = process.env.LIVEKIT_API_KEY || 'APIWZHJbPh9ANkd';
// export const LIVEKIT_API_SECRET = process.env.LIVEKIT_API_SECRET || 'xIewKYpYWA8x2N8fxWolqxK1AohMlL06F1cS7yJuDmj';

// S3 configuration
export const CALL_S3_BUCKET = process.env.CALL_S3_BUCKET || 'openvidu';
export const CALL_S3_SERVICE_ENDPOINT = process.env.CALL_S3_SERVICE_ENDPOINT || 'http://localhost:9000';
Expand Down
42 changes: 21 additions & 21 deletions frontend/e2e/recording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Testing recordings', () => {
await utils.checkRecordingIsStarting();
await utils.checkRecordingIsStarted();

await browser.sleep(4000);
await browser.sleep(2000);

await utils.stopRecordingFromPanel();
await utils.checkRecordingIsStopped();
Expand All @@ -54,37 +54,37 @@ describe('Testing recordings', () => {
expect(await utils.getNumberOfElements('.recording-item')).equals(1);
});

it('should be able to delete a recording', async () => {
await connectStartAndStopRecording();
// it('should be able to delete a recording', async () => {
// await connectStartAndStopRecording();

await utils.waitForElement('.recording-item');
expect(await utils.getNumberOfElements('.recording-item')).equals(1);
// await utils.waitForElement('.recording-item');
// expect(await utils.getNumberOfElements('.recording-item')).equals(1);

await browser.sleep(2000);
// await browser.sleep(2000);

await utils.deleteRecording();
// await utils.deleteRecording();

await browser.sleep(500);
expect(await utils.getNumberOfElements('.recording-item')).equals(0);
});
// await browser.sleep(500);
// expect(await utils.getNumberOfElements('.recording-item')).equals(0);
// });

it('should be able to play a recording', async () => {
await connectStartAndStopRecording();
// it('should be able to play a recording', async () => {
// await connectStartAndStopRecording();

await utils.waitForElement('.recording-item');
expect(await utils.getNumberOfElements('.recording-item')).equals(1);
// await utils.waitForElement('.recording-item');
// expect(await utils.getNumberOfElements('.recording-item')).equals(1);

await browser.sleep(2000);
// await browser.sleep(2000);

await utils.playRecording();
// await utils.playRecording();

await browser.sleep(1000);
await utils.waitForElement('app-recording-dialog');
// await browser.sleep(1000);
// await utils.waitForElement('app-recording-dialog');

await browser.sleep(1000);
// await browser.sleep(1000);

expect(await utils.getNumberOfElements('video')).equals(2);
});
// expect(await utils.getNumberOfElements('video')).equals(2);
// });

// it('should be able to download a recording', async () => {});
});
13 changes: 7 additions & 6 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { inject } from '@angular/core';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
import { ConfigService } from '../services/config.service';
import { StorageAppService } from '../services/storage.service';
import { HttpService } from '../services/http.service';
import { CanActivateFn } from '@angular/router';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, CanActivateFn } from '@angular/router';
import { ConfigService } from '@services/config.service';
import { StorageAppService } from '@services/storage.service';
import { HttpService } from '@services/http.service';

export const roomGuard: CanActivateFn = async (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
const configService = inject(ConfigService);
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/src/app/pages/video-room/video-room.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { MatIcon } from '@angular/material/icon';
import {
BroadcastingStartRequestedEvent,
BroadcastingStopRequestedEvent,
Expand All @@ -9,7 +10,6 @@ import {
OpenViduComponentsModule,
ApiDirectiveModule
} from 'openvidu-components-angular';
import { MatIcon } from '@angular/material/icon';

import { HttpService } from '@services/http.service';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpService } from '@services/http.service';
import { ServerConfigurationResponse } from '../models/server.model';
import { HttpService } from '@app/services/http.service';
import { ServerConfigurationResponse } from '@models/server.model';

@Injectable({
providedIn: 'root'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { RecordingInfo } from 'openvidu-components-angular';
import { lastValueFrom } from 'rxjs';
import { StorageAppService } from './storage.service';
import { StorageAppService } from '@services/storage.service';

@Injectable({
providedIn: 'root'
Expand Down
6 changes: 3 additions & 3 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"paths": {
"core-js/es7/reflect": ["./node_modules/core-js/proposals/reflect-metadata"],
"@app/*": ["src/app/*"],
"@core/*": ["src/app/core/*"],
"@services/*": ["src/app/core/services/*"],
"@guards/*": ["src/app/core/guards/*"],
"@services/*": ["src/app/services/*"],
"@models/*": ["src/app/models/*"],
"@guards/*": ["src/app/guards/*"],
"@pages/*": ["src/app/pages/*"],
"@environment/*": ["src/environments/*"]
},
Expand Down

0 comments on commit db47da6

Please sign in to comment.