diff options
Diffstat (limited to 'frontend/src/app')
| -rw-r--r-- | frontend/src/app/app-routing.module.ts | 10 | ||||
| -rw-r--r-- | frontend/src/app/app.component.css | 0 | ||||
| -rw-r--r-- | frontend/src/app/app.component.html | 1 | ||||
| -rw-r--r-- | frontend/src/app/app.component.spec.ts | 35 | ||||
| -rw-r--r-- | frontend/src/app/app.component.ts | 10 | ||||
| -rw-r--r-- | frontend/src/app/app.module.ts | 18 | ||||
| -rw-r--r-- | frontend/src/app/auth.service.spec.ts | 16 | ||||
| -rw-r--r-- | frontend/src/app/auth.service.ts | 9 | 
8 files changed, 99 insertions, 0 deletions
| diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts new file mode 100644 index 00000000..02972627 --- /dev/null +++ b/frontend/src/app/app-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ +  imports: [RouterModule.forRoot(routes)], +  exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/frontend/src/app/app.component.css b/frontend/src/app/app.component.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/frontend/src/app/app.component.css diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html new file mode 100644 index 00000000..90c6b646 --- /dev/null +++ b/frontend/src/app/app.component.html @@ -0,0 +1 @@ +<router-outlet></router-outlet>
\ No newline at end of file diff --git a/frontend/src/app/app.component.spec.ts b/frontend/src/app/app.component.spec.ts new file mode 100644 index 00000000..74b5b3eb --- /dev/null +++ b/frontend/src/app/app.component.spec.ts @@ -0,0 +1,35 @@ +import { TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { +  beforeEach(async () => { +    await TestBed.configureTestingModule({ +      imports: [ +        RouterTestingModule +      ], +      declarations: [ +        AppComponent +      ], +    }).compileComponents(); +  }); + +  it('should create the app', () => { +    const fixture = TestBed.createComponent(AppComponent); +    const app = fixture.componentInstance; +    expect(app).toBeTruthy(); +  }); + +  it(`should have as title 'frontend'`, () => { +    const fixture = TestBed.createComponent(AppComponent); +    const app = fixture.componentInstance; +    expect(app.title).toEqual('frontend'); +  }); + +  it('should render title', () => { +    const fixture = TestBed.createComponent(AppComponent); +    fixture.detectChanges(); +    const compiled = fixture.nativeElement as HTMLElement; +    expect(compiled.querySelector('.content span')?.textContent).toContain('frontend app is running!'); +  }); +}); diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts new file mode 100644 index 00000000..9d6b2f11 --- /dev/null +++ b/frontend/src/app/app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ +  selector: 'app-root', +  templateUrl: './app.component.html', +  styleUrls: ['./app.component.css'] +}) +export class AppComponent { +  title = 'frontend'; +} diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts new file mode 100644 index 00000000..b1c6c96a --- /dev/null +++ b/frontend/src/app/app.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; + +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent } from './app.component'; + +@NgModule({ +  declarations: [ +    AppComponent +  ], +  imports: [ +    BrowserModule, +    AppRoutingModule +  ], +  providers: [], +  bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/frontend/src/app/auth.service.spec.ts b/frontend/src/app/auth.service.spec.ts new file mode 100644 index 00000000..f1251cac --- /dev/null +++ b/frontend/src/app/auth.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { AuthService } from './auth.service'; + +describe('AuthService', () => { +  let service: AuthService; + +  beforeEach(() => { +    TestBed.configureTestingModule({}); +    service = TestBed.inject(AuthService); +  }); + +  it('should be created', () => { +    expect(service).toBeTruthy(); +  }); +}); diff --git a/frontend/src/app/auth.service.ts b/frontend/src/app/auth.service.ts new file mode 100644 index 00000000..af27fdec --- /dev/null +++ b/frontend/src/app/auth.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ +  providedIn: 'root' +}) +export class AuthService { + +  constructor() { } +} | 
