diff options
Diffstat (limited to 'ecomp-sdk')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts | 48 |
1 files changed, 47 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 5afbea4b..3c3efb92 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 @@ -30,10 +30,56 @@ describe('SecurityComponent', () => { }); it('should test ngOnInit method', () => { - component.reportType === "Dashboard"; + component.reportType = "Dashboard"; component.ngOnInit(); expect(component.showSpinner).toEqual(true); + expect(component.stepNo).toEqual('2'); + + component.reportType = "test"; + component.ngOnInit(); expect(component.stepNo).toEqual('6'); }); + it('should test addUserEditAccess method', () =>{ + let reportUserId = 'test'; + let index = 1; + component.userEditAccessArr[1] = true; + component.addUserEditAccess(reportUserId, index); + + component.userEditAccessArr[1] = false; + component.addUserEditAccess(reportUserId, index); + + }); + + it('should test addRoleEditAccess method', () =>{ + let reportUserId = 'test'; + let index = 1; + component.addRoleEditAccessArr[1] = true; + component.addRoleEditAccess(reportUserId, index); + + component.addRoleEditAccessArr[1] = false; + component.addRoleEditAccess(reportUserId, index); + + }); + + it("should test addReportUser method", () => { + component.addReportUser(); + }); + + it("should test removeReportUser method", () => { + component.removeReportUser("test"); + }); + + it("should test addReportRole method", () => { + component.addReportRole(); + }); + + it("should test removeReportRole method", () => { + component.removeReportRole("test"); + }); + + it("should test saveSecurityTabData method", () => { + component.saveSecurityTabData(); + }); + }); |