From 8bee05ce9dc7c038041afa97fa74fd831fc7c4f0 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Wed, 12 Sep 2018 16:38:03 +0530 Subject: aboutus.component: Added test case 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 --- src/app/about-us/aboutus.component.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/about-us/aboutus.component.spec.ts b/src/app/about-us/aboutus.component.spec.ts index 4df0316..29f9784 100644 --- a/src/app/about-us/aboutus.component.spec.ts +++ b/src/app/about-us/aboutus.component.spec.ts @@ -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(); + })); }); -- cgit 1.2.3-korg