docker for cucumber BDD
[sdc.git] / cucumber-js-test-apis-ci / features / ComponentData.feature
1 Feature: Component - Test Component Composition and Questionnaire Data
2
3   Background: Init
4     Given I want to create a VLM
5
6   Scenario: Test Component Composition and Questionnaire Data After Same Heat Reupload
7     When I want to create a VSP with onboarding type "NetworkPackage"
8     Then I want to make sure this Item has status "Draft"
9
10     When I want to upload a NetworkPackage for this VSP from path "resources/uploads/vMME_Ericsson_small_v2.zip"
11     And I want to process the NetworkPackage file for this VSP
12
13     When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components"
14     Then I want to copy to property "componentId" from response data path "results[0].id"
15     Then I want to check property "listCount" for value 4
16     Then I want to check property "results[0].id" exists
17
18     #Verify composition data for first component
19     When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components/{componentId}"
20     Then I want to check property "data.name" exists
21     Then I want to check property "data.displayName" exists
22     Then I want to copy to property "firstCompDisplayName" from response data path "data.displayName"
23     #Ensure composition data does not have vfcCode and nfcFunction since they are moved to questionnaire
24     Then I want to check property "data.vfcCode" does not exist
25     Then I want to check property "data.nfcFunction" does not exist
26
27     When I want to get the questionnaire for this component
28     #Ensure questionnaire data has nfcNamingCode in "general" and populated with value of component displayName
29     Then I want to check value of "general.nfcNamingCode" in the questionnaire data with value of property "firstCompDisplayName"
30
31     #Update questionnaire nfcNamingCode and nfcFunction in "general"
32     And I want to update this questionnaire with value "general/nfcNamingCode" for property "test_update_naming_code"
33     And I want to update this questionnaire with value "general/nfcFunction" for property "test_function"
34     And I want to update this questionnaire
35
36     #Retrive questionnaire and verify nfcNamingCode and nfcFunction in "general" has updated value
37     When I want to get the questionnaire for this component
38     Then I want to check this questionnaire has value "general/nfcNamingCode" for property "test_update_naming_code"
39     Then I want to check this questionnaire has value "general/nfcFunction" for property "test_function"
40
41     #Reupload the same Heat
42     When I want to upload a NetworkPackage for this VSP from path "resources/uploads/vMME_Ericsson_small_v2.zip"
43     And I want to process the NetworkPackage file for this VSP
44
45     When I want to get path "/vendor-software-products/{item.id}/versions/{item.versionId}/components"
46     #Find component id for which nfcNamingCode and nfcFunction were set in previous HEAT based on component display name
47     Then I want to set componentId for component name in property "firstCompDisplayName"
48
49     #Retrive questionnaire and verify nfcNamingCode and nfcFunction in "general" has retained values that were before heat upload
50     When I want to get the questionnaire for this component
51     Then I want to check this questionnaire has value "general/nfcNamingCode" for property "test_update_naming_code"
52     Then I want to check this questionnaire has value "general/nfcFunction" for property "test_function"