summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-03-04 14:52:56 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-04 14:52:56 +0000
commit61ca7f21cd9f251804e61fb2c62b2dc8cec8369a (patch)
tree4cfffe7d9ef1ccca2ac3cde63d2c3d047ef942c9
parent4ace5de27e8015f3d33d0792e1880e837ebad35e (diff)
parente98380ef12a873b13c23b43a7c688a117550c042 (diff)
Merge "added test case for security component"
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.spec.ts48
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();
+ });
+
});