diff options
author | 2019-04-29 14:14:58 +0800 | |
---|---|---|
committer | 2019-04-29 14:14:58 +0800 | |
commit | c4c381d400abc54a0deb14ee828c51aed6d16873 (patch) | |
tree | 043bb32228ab78b11eb16e70fcc89ed368d72b94 /components/datalake-handler/admin/src/app/app.component.spec.ts | |
parent | c0cc89e2acb5f702f03e932dcd6a75ba8aba4618 (diff) |
First commit of front-end admin UI
1. framework of front-end
Issue-ID: DCAEGEN2-1188
Change-Id: Ib42e20f87f3f4fa5f0aee65c88b1efbfe1523b93
Signed-off-by: Ekko Chang <ekko.chang@qct.io>
Diffstat (limited to 'components/datalake-handler/admin/src/app/app.component.spec.ts')
-rw-r--r-- | components/datalake-handler/admin/src/app/app.component.spec.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/components/datalake-handler/admin/src/app/app.component.spec.ts b/components/datalake-handler/admin/src/app/app.component.spec.ts new file mode 100644 index 00000000..631c2c55 --- /dev/null +++ b/components/datalake-handler/admin/src/app/app.component.spec.ts @@ -0,0 +1,35 @@ +import { TestBed, async } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'admin'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('admin'); + }); + + it('should render title in a h1 tag', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to admin!'); + }); +}); |