summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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');
+ });
+
});