aboutus.component: Added test case 75/66075/2
authorArundathi Patil <arundpil@in.ibm.com>
Wed, 12 Sep 2018 11:08:03 +0000 (16:38 +0530)
committerTakamune Cho <tc012c@att.com>
Sun, 16 Sep 2018 11:15:29 +0000 (11:15 +0000)
Wrote test case to test tlPlus and tlMinus functions to call setTraceVl
function of utility service based on the trace value stored in local
storage.

Issue-ID: APPC-1064
Change-Id: Ie93e48bb6ee6df35bbd175e15fda56060ac3c539
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/app/about-us/aboutus.component.spec.ts

index 4df0316..29f9784 100644 (file)
@@ -107,4 +107,18 @@ describe('ContacUsComponent', () => {
         component.tlMinus();
         expect(spy1).toHaveBeenCalled();
     }));
+
+    it('should test tlPlus function to call setTracelvl ', inject([UtilityService], (utilService: UtilityService) => {
+        let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+        component.tlPlus();
+        expect(spy1).toHaveBeenCalled();
+    }));
+
+    it('should test tlMinus function to call setTracelvl', inject([UtilityService], (utilService: UtilityService) => {
+        let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+        let trv = 4;
+        localStorage["Tracelvl"] = trv;
+        component.tlMinus();
+        expect(spy1).toHaveBeenCalled();
+    }));
 });