aboutsummaryrefslogtreecommitdiffstats
path: root/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts')
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts22
1 files changed, 13 insertions, 9 deletions
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts
index 076be174fb..cb5f53b7d4 100644
--- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/app.component.spec.ts
@@ -23,6 +23,8 @@ SPDX-License-Identifier: Apache-2.0
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -32,22 +34,24 @@ describe('AppComponent', () => {
declarations: [
AppComponent
],
+ schemas: [
+ CUSTOM_ELEMENTS_SCHEMA
+ ],
}).compileComponents();
}));
- it('should create the app', async(() => {
+
+ // Ensure creation of SO Monitoring application
+ it('application should be created', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
- it(`should have as title 'app'`, async(() => {
+
+
+ // Ensure application title is "SO Monitor"
+ it(`should have title 'SO Monitor'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
- expect(app.title).toEqual('app');
- }));
- it('should render title in a h1 tag', async(() => {
- const fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
- const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('h1').textContent).toContain('Welcome to ONAP-SO-Monitor!');
+ expect(app.title).toEqual('SO Monitor');
}));
});