import { TestBed, async } from '@angular/core/testing';\r
import { RouterTestingModule } from '@angular/router/testing';\r
import { AppComponent } from './app.component';\r
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\r
+\r
describe('AppComponent', () => {\r
beforeEach(async(() => {\r
TestBed.configureTestingModule({\r
declarations: [\r
AppComponent\r
],\r
+ schemas: [\r
+ CUSTOM_ELEMENTS_SCHEMA\r
+ ],\r
}).compileComponents();\r
}));\r
- it('should create the app', async(() => {\r
+\r
+ // Ensure creation of SO Monitoring application\r
+ it('application should be created', async(() => {\r
const fixture = TestBed.createComponent(AppComponent);\r
const app = fixture.debugElement.componentInstance;\r
expect(app).toBeTruthy();\r
}));\r
- it(`should have as title 'app'`, async(() => {\r
+\r
+\r
+ // Ensure application title is "SO Monitor"\r
+ it(`should have title 'SO Monitor'`, async(() => {\r
const fixture = TestBed.createComponent(AppComponent);\r
const app = fixture.debugElement.componentInstance;\r
- expect(app.title).toEqual('app');\r
- }));\r
- it('should render title in a h1 tag', async(() => {\r
- const fixture = TestBed.createComponent(AppComponent);\r
- fixture.detectChanges();\r
- const compiled = fixture.debugElement.nativeElement;\r
- expect(compiled.querySelector('h1').textContent).toContain('Welcome to ONAP-SO-Monitor!');\r
+ expect(app.title).toEqual('SO Monitor');\r
}));\r
});\r