parameter.component - fixed test case 09/58909/2
authorArundathi Patil <arundpil@in.ibm.com>
Fri, 3 Aug 2018 09:59:16 +0000 (15:29 +0530)
committerTakamune Cho <tc012c@att.com>
Fri, 3 Aug 2018 20:51:19 +0000 (20:51 +0000)
commit723ad1eb89bbe0c7e24ff8cd9c1a82a54b4584e5
treef51aeb5aba65409c5921c449a229a4b8c5033041
parent4769499e5523e480ebe89472c2249fd184024fec
parameter.component - fixed test case

fixed test case 'should retrive PD from cache' that was failing with the
below error as it was expecting wrong value.
Error: Expected [ ] to be 'TEST PD INFORMATION'

In this test case, ngAfterViewInit() method is called which returns the
PD data. This PD data is stored into variable called
'displayParamObjects' and then this variable is returned to the calling
function.

The value for 'displayParamObjects' is set in getPDFromSession() method
which makes a async http call to get the PD data, so even before the
results of the async call are returned, ngAfterViewInit() method
returns the empty 'displayParamObject' variable.

Hence changed the expected value to the actual value returned by
ngAfterViewInit() method.

We can write a seperate test case to test the async call made by
getPDFromSession() method.

Issue-ID: APPC-1064
Change-Id: I0b8f38b6e52dc7478a4ab510ca3ff10ff81ae0ca
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.spec.ts