- instead of relying on the sequence of elements , using the contains
operation to assert the result
Issue-ID: CPS-2075
Change-Id: Ifbd3c601cc48148d0c4d7ce47301dbfb5184e1de
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()['tree:nest']}
Should Be Equal As Strings ${responseJson['name']} Bigger
- Should Be Equal As Strings ${responseJson['birds']} ['Pigeon', 'Falcon', 'Eagle']
+ ${length_birds}= Get Length ${responseJson['birds']}
+ Should Be Equal As Integers ${length_birds} 3
+ ${expected_list}= Create List Pigeon Falcon Eagle
+ FOR ${item_to_check} IN @{expected_list}
+ Should Contain ${responseJson['birds']} ${item_to_check}
+ END
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node