From c91968d0c8658c73d3eeed25466b287fae5b81aa Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 13 Aug 2019 09:13:52 +0530 Subject: Test Component spec Added test case to test setValuesOnFileUploadFailure method Issue-ID: APPC-1632 Change-Id: I213b0008ca542da922c040f083e419881a712668 Signed-off-by: Arundathi Patil --- src/app/test/test.component.spec.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/app/test') diff --git a/src/app/test/test.component.spec.ts b/src/app/test/test.component.spec.ts index 752ff55..b18e67a 100644 --- a/src/app/test/test.component.spec.ts +++ b/src/app/test/test.component.spec.ts @@ -420,7 +420,7 @@ describe( 'TestComponent', () => { }); it('getUrlEndPoint Should return value', () => { - expect(component.getUrlEndPoint('configmodify')).toEqual('config-modify'); + expect(component.getUrlEndPoint('configmodify')).toEqual('Config-Modify'); expect(component.getUrlEndPoint('configbackup')).toEqual('config-backup'); expect(component.getUrlEndPoint('configrestore')).toEqual('config-restore'); expect(component.getUrlEndPoint('healthcheck')).toEqual('health-check'); @@ -440,4 +440,30 @@ describe( 'TestComponent', () => { expect(component.getUrlEndPoint('detachvolume')).toEqual('detach-volume'); }); }); + + fdescribe('Test setValuesOnFileUploadFailure Method', () => { + fit('Should have setValuesOnFileUploadFailure method', () => { + expect(component.setValuesOnFileUploadFailure).toBeDefined(); + }); + + fit('getUrlEndPoint setValuesOnFileUploadFailure set value', () => { + component.setValuesOnFileUploadFailure(); + expect(component.flag).toEqual(1); + expect(component.oldListName1).toEqual(''); + expect(component.vmJson).toEqual({}); + expect(component.vnfcJson).toEqual({}); + expect(component.subPayload).toEqual({}); + expect(component.vmPayload).toEqual([]); + expect(component.payload).toEqual({}); + expect(component.action).toEqual(''); + expect(component.actionIdentifiers).toEqual({}); + expect(component.apiRequest).toEqual(''); + expect(component.apiResponse).toEqual(''); + expect(component.enableCounterDiv).toEqual(false); + expect(component.enableAbort).toEqual(false); + expect(component.enableTestButton).toEqual(false); + expect(component.enableDownload).toEqual(false); + + }); + }); }) -- cgit 1.2.3-korg