summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-02-27 15:13:20 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-27 15:13:20 +0000
commita1a42fc7f0512940a0dcf5fe16dbeb5f90829e76 (patch)
treedec1664075528523979ed39e740ed848c4dfa0c9 /ecomp-sdk/epsdk-app-overlay/src/main/webapp
parent7a96de55ae49a6a1e98877ae04f5e424c7488d60 (diff)
parent275f2f69553abcf91d9329184da8a254b9930e1f (diff)
Merge "wrote test cases for security component"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts
index b7f186b9..5afbea4b 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts
@@ -1,6 +1,10 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SecurityComponent } from './security.component';
+import { FormsModule } from '@angular/forms';
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { componentRefresh } from '@angular/core/src/render3/instructions';
describe('SecurityComponent', () => {
let component: SecurityComponent;
@@ -8,7 +12,9 @@ describe('SecurityComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ SecurityComponent ]
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ declarations: [ SecurityComponent ],
+ imports: [FormsModule, HttpClientTestingModule]
})
.compileComponents();
}));
@@ -22,4 +28,12 @@ describe('SecurityComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should test ngOnInit method', () => {
+ component.reportType === "Dashboard";
+ component.ngOnInit();
+ expect(component.showSpinner).toEqual(true);
+ expect(component.stepNo).toEqual('6');
+ });
+
});