mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Added prettier
parent
3c97ceac37
commit
31f5206f01
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"singleQuote": true,
|
||||||
|
"printWidth": 140,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"semi": true,
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"useTabs": true,
|
||||||
|
"jsxSingleQuote": true,
|
||||||
|
"tabWidth": 4
|
||||||
|
}
|
|
@ -1,2 +1 @@
|
||||||
|
<router-outlet></router-outlet>
|
||||||
<router-outlet></router-outlet>
|
|
||||||
|
|
|
@ -2,30 +2,28 @@ import { TestBed, async } from '@angular/core/testing';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [
|
declarations: [AppComponent]
|
||||||
AppComponent
|
}).compileComponents();
|
||||||
],
|
}));
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should create the app', () => {
|
it('should create the app', () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
const app = fixture.componentInstance;
|
const app = fixture.componentInstance;
|
||||||
expect(app).toBeTruthy();
|
expect(app).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should have as title 'openvidu-components'`, () => {
|
it(`should have as title 'openvidu-components'`, () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
const app = fixture.componentInstance;
|
const app = fixture.componentInstance;
|
||||||
expect(app.title).toEqual('openvidu-components');
|
expect(app.title).toEqual('openvidu-components');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render title', () => {
|
it('should render title', () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const compiled = fixture.nativeElement;
|
const compiled = fixture.nativeElement;
|
||||||
expect(compiled.querySelector('.content span').textContent).toContain('openvidu-components app is running!');
|
expect(compiled.querySelector('.content span').textContent).toContain('openvidu-components app is running!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,5 +10,4 @@ export class AppComponent implements OnInit {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,33 +16,35 @@ import { ChatTestComponent } from './components/chat-test/chat-test.component';
|
||||||
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
|
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
|
||||||
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';
|
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';
|
||||||
|
|
||||||
import { OpenviduAngularModule, UserSettingsComponent, ChatComponent, ToolbarComponent, RoomComponent, LayoutComponent } from 'openvidu-angular';
|
import {
|
||||||
|
OpenviduAngularModule,
|
||||||
|
UserSettingsComponent,
|
||||||
|
ChatComponent,
|
||||||
|
ToolbarComponent,
|
||||||
|
RoomComponent,
|
||||||
|
LayoutComponent,
|
||||||
|
VideoconferenceComponent
|
||||||
|
} from 'openvidu-angular';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
DashboardComponent,
|
DashboardComponent,
|
||||||
CallComponent,
|
CallComponent,
|
||||||
ToolbarTestComponent,
|
ToolbarTestComponent,
|
||||||
ChatTestComponent,
|
ChatTestComponent,
|
||||||
LayoutTestComponent,
|
LayoutTestComponent,
|
||||||
ParticipantTestComponent
|
ParticipantTestComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
OpenviduAngularModule.forRoot(environment),
|
OpenviduAngularModule.forRoot(environment),
|
||||||
AppRoutingModule // Order is important, AppRoutingModule must be the last import for useHash working
|
AppRoutingModule // Order is important, AppRoutingModule must be the last import for useHash working
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [VideoconferenceComponent, UserSettingsComponent, ToolbarComponent, ChatComponent, RoomComponent, LayoutComponent],
|
||||||
UserSettingsComponent,
|
bootstrap: [AppComponent]
|
||||||
ToolbarComponent,
|
|
||||||
ChatComponent,
|
|
||||||
RoomComponent,
|
|
||||||
LayoutComponent
|
|
||||||
],
|
|
||||||
bootstrap: [AppComponent]
|
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule {}
|
||||||
|
|
|
@ -7,19 +7,16 @@ import { ChatTestComponent } from './components/chat-test/chat-test.component';
|
||||||
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
|
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
|
||||||
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';
|
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: DashboardComponent },
|
{ path: '', component: DashboardComponent },
|
||||||
{ path: 'call', component: CallComponent },
|
{ path: 'call', component: CallComponent },
|
||||||
{ path: 'toolbar', component: ToolbarTestComponent },
|
{ path: 'toolbar', component: ToolbarTestComponent },
|
||||||
{ path: 'chat', component: ChatTestComponent },
|
{ path: 'chat', component: ChatTestComponent },
|
||||||
{ path: 'layout', component: LayoutTestComponent },
|
{ path: 'layout', component: LayoutTestComponent },
|
||||||
{ path: 'participant', component: ParticipantTestComponent },
|
{ path: 'participant', component: ParticipantTestComponent }
|
||||||
|
|
||||||
];
|
];
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forRoot(routes, {useHash: true})],
|
imports: [RouterModule.forRoot(routes, { useHash: true })],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule { }
|
export class AppRoutingModule {}
|
||||||
|
|
|
@ -2,13 +2,11 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { RestService } from '../services/rest.service';
|
import { RestService } from '../services/rest.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-call',
|
selector: 'app-call',
|
||||||
templateUrl: './call.component.html',
|
templateUrl: './call.component.html',
|
||||||
styleUrls: ['./call.component.scss']
|
styleUrls: ['./call.component.scss']
|
||||||
})
|
})
|
||||||
|
|
||||||
export class CallComponent implements OnInit {
|
export class CallComponent implements OnInit {
|
||||||
sessionId = 'prueba-majestuosa-amable';
|
sessionId = 'prueba-majestuosa-amable';
|
||||||
tokens: { webcam: string; screen: string };
|
tokens: { webcam: string; screen: string };
|
||||||
|
|
|
@ -3,14 +3,14 @@ import { TestBed } from '@angular/core/testing';
|
||||||
import { RestService } from './rest.service';
|
import { RestService } from './rest.service';
|
||||||
|
|
||||||
describe('RestService', () => {
|
describe('RestService', () => {
|
||||||
let service: RestService;
|
let service: RestService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({});
|
TestBed.configureTestingModule({});
|
||||||
service = TestBed.inject(RestService);
|
service = TestBed.inject(RestService);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be created', () => {
|
it('should be created', () => {
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue