From: Arundathi Patil Date: Wed, 12 Sep 2018 11:08:03 +0000 (+0530) Subject: aboutus.component: Added test case X-Git-Tag: 1.4.0~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8bee05ce9dc7c038041afa97fa74fd831fc7c4f0;p=appc%2Fcdt.git 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 --- 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(); + })); });