Merge "Allow HV-VES tests to be run locally"
[integration/csit.git] / tests / appc / cdt / cdt.robot
1 *** Settings ***
2 | Resource | common.robot
3
4 *** Test Cases ***
5 # Based on Robot test cases created by Dawn Zelinski (dz2438@att.com).
6 | Verify Home page and links
7 # Access Home page - All tests files use this as starting point
8 | | RefreshMainURL
9 # Verify the links
10 | | Page should contain link | Home
11 | | Page should contain link | MY VNFs
12 | | Page should contain link | Test
13 | | Page should contain link | Admin
14 | | Page should contain link | About us
15 | | Page Should Not Contain | ${USER_ID}
16 # Verify MY VNFs link will will ask for user entry
17 | | Click Link | MY VNFs
18 | | Wait Until Element Is Visible | id=userId | ${LONGTIME}
19 | | Input Text | id=userId | ${USERID}
20 | | Click Button | Submit
21 | | Page Should Contain | ${USER_ID}
22 | Verify Logout of user id
23 # Access Home page - All tests files use this as starting point
24 | | RefreshMainURL
25 | | Page Should Contain | ${USER_ID}
26 # Log out of user id and then see if My Vnfs asks for user entry
27 | | Click Element | id=more-button
28 # Line below also works.
29 #| | Click Element | xpath=(//*[@class='android-more-button mdl-button mdl-js-button mdl-button--primary'])
30 # Now Logout
31 | | Wait Until Element Is Visible | xpath=(//*[@class='mdl-menu__item mdl-js-ripple-effect']) | ${LONGTIME}
32 | | Click Element | xpath=(//*[@class='mdl-menu__item mdl-js-ripple-effect'])
33 | | Page Should Not Contain | ${USER_ID}
34 # Verify MY VNFs link will will ask for user entry
35 | | Click Link | MY VNFs
36 | | Wait Until Element Is Visible | id=userId | ${LONGTIME}
37 | | Input Text | id=userId | ${USERID}
38 | | Click Button | Submit
39 | | Page Should Contain | ${USER_ID}
40
41 | Test Uploading an existing VNF Reference file that was previously downloaded
42 # Access Home page - All tests files use this as starting point
43 | | RefreshMainURL
44 | | Click Link | MY VNFs
45 # Verify button element is ready before clicking it.
46 | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME}
47 #| | Click Button | Create New VNF Type or VNFC Type
48 | | Click Button | Create New VNF Type
49 #| | Page Should Contain | Enter VNF type and VNFC to proceed
50 | | Page Should Contain | Enter VNF Type
51 | | Page Should Contain Element | id=vnfType
52 # Proceed without entering any new information
53 #| | Click Button | Proceed anyway
54 | | Click Button | Proceed To Upload
55 | | Page Should Contain Element | id=cmbAction
56 | | Click Button | Upload Reference File
57 | | Choose File | id=inputFile |  ${CURDIR}/data/reference_AllAction_HealthCheckAnsible_0.0.1V.json
58 | | Sleep | ${SHORTTIME}
59 # Verify the screen is populated with the HealthCheck (action), dawnMay17 (VNF Type and ANSIBLE (device protocol)
60 | | ${theVNFType} | Get Value | id=txtVnfType
61 | | ${theAction} | Get Selected List Value | id=cmbAction
62 | | ${theProtocol} | Get Selected List Value | id=txtDeviceProtocol
63 | | Should Be Equal As Strings | ${theVNFType} | csit
64 | | Should Be Equal As Strings | ${theAction} | HealthCheck
65 | | Should Be Equal As Strings | ${theProtocol} | ANSIBLE
66
67 | Test Creation of VNF
68 # Access Home page - All tests files use this as starting point
69 | | RefreshMainURL
70 | | Click Link | MY VNFs
71 # Verify button element is ready before clicking it.
72 | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME}
73 #| | Click Button | Create New VNF Type or VNFC Type
74 | | Click Button | Create New VNF Type
75 #| | Page Should Contain | Enter VNF type and VNFC to proceed
76 | | Page Should Contain | Enter VNF Type
77 | | Page Should Contain Element | id=vnfType
78 # Create a date to use in VNF Type to make it unique
79 | | ${THEDATE}  | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True
80 | | Input Text | id=vnfType | csit${THEDATE}
81 | | Click Button | Next
82 | | Page Should Contain Element | id=cmbAction
83 # Verify 19 selections available
84 | | Select From List By Index | id=cmbAction | 19
85 # Select HealthCheck and ANSIBLE and verify it gets created
86 | | Select From List By Value | id=cmbAction | HealthCheck
87 | | Select From List By Value | id=txtDeviceProtocol | ANSIBLE
88 | | Click Button | saveToAppc
89 | | Sleep | ${SHORTTIME}
90 #| | Wait Until Page Contains | successfully uploaded the Reference Data | ${LONGTIME}
91 | | Click Link | MY VNFs
92 | | Page Should Contain | csit${THEDATE}
93
94 | Test Creation of VNF with multiple VNFCs
95 # This test is based on the 1806 Releases,
96 # APPC-C Design Tool User Guide for Self-Service Onboarding (section 5.1)
97 # Access Home page - All tests files use this as starting point
98 | | RefreshMainURL
99 | | Click Link | MY VNFs
100 # Verify button element is ready before clicking it.
101 | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME}
102 #| | Click Button | Create New VNF Type or VNFC Type
103 | | Click Button | Create New VNF Type
104 | | Wait Until Page Contains Element | id=vnfType | ${LONGTIME}
105 # Create a date to use in VNF Type to make it unique
106 | | ${THEDATE}  | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True
107 | | Input Text | id=vnfType | csit${THEDATE}
108 | | Click Button | Next
109 | | Wait Until Page Contains Element | id=cmbAction | ${LONGTIME}
110 # Populate the action and protocol
111 | | Select From List By Value | id=cmbAction | Configure
112 | | Select From List By Value | id=txtDeviceProtocol | NETCONF-XML
113 # Populate the other VNF descriptors
114 | | Select From List By Value | name=template | Y
115 | | Input Text | name=loginUserName | ${USER_ID}
116 | | Input Text | name=portNumber | 777
117 # Describe the first VNFC Type and enter the number of VMs for this VNFC Type
118 | | Input Text | name=samplevnfcType | VNFC_type_A
119 | | Input Text | name=samplevnfcFunctionCode | aaa
120 | | Select From List By Value | name=sampleIpaddress | Y
121 | | Select From List By Value | name=sampleGroupNotation | first-vnfc-name
122 | | Input Text | name=sampleGroupValue | pair
123 | | Input Text | name=txtNumber23 | 2
124 | | Click Button | Add VM Information
125 | | Wait Until Page Contains | VM Number: 2 | ${LONGTIME}
126 # Clear information about the first VNFC
127 | | Click Button | Clear VNFC Info
128 # Describe the second VNFC Type and enter the number of VMs for this VNFC Type
129 | | Input Text | name=samplevnfcType | VNFC_type_B
130 | | Input Text | name=samplevnfcFunctionCode | bbb
131 | | Select From List By Value | name=sampleIpaddress | Y
132 | | Select From List By Value | name=sampleGroupNotation | first-vnfc-name
133 | | Input Text | name=sampleGroupValue | pair
134 | | Input Text | name=txtNumber23 | 2
135 | | Click Button | Add VM Information
136 | | Wait Until Page Contains | VM Number: 4 | ${LONGTIME}
137 | | Click Button | saveToAppc
138 | | Sleep | ${SHORTTIME}
139 #| | Wait Until Page Contains | successfully uploaded the Reference Data | ${LONGTIME}
140 | | Click Link | MY VNFs
141 | | Wait Until Page Contains | ARTIFACT NAME | ${LONGTIME}
142 | | Page Should Contain | csit${THEDATE}
143
144 | Test Creation of VNF with VNFC box checked
145 # This test is based on the 1806 Releases,
146 # APPC-C Design Tool User Guide for Self-Service Onboarding (section 5.1)
147 # Access Home page - All tests files use this as starting point
148 | | RefreshMainURL
149 | | Click Link | MY VNFs
150 # Verify button element is ready before clicking it.
151 | | Wait Until Page Contains Element | xpath=(//*[@class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary']) | ${LONGTIME}
152 #| | Click Button | Create New VNF Type or VNFC Type
153 | | Click Button | Create New VNF Type
154 | | Wait Until Page Contains Element | id=vnfType | ${LONGTIME}
155 # Create a date to use in VNF Type to make it unique
156 | | ${THEDATE}  | Get Current Date | result_format=%m%d%H%M%S | exclude_millis=True
157 | | Input Text | id=vnfType | csit${THEDATE}
158 # Check the box indicating VNFC templates
159 | | Select Checkbox | id=vnfcRequired
160 #| | Input Text | id=vnfcType | csitVNFC
161 | | Click Button | Next
162 | | Wait Until Page Contains Element | id=cmbAction | ${LONGTIME}
163 # Populate the action and protocol
164 | | Select From List By Value | id=cmbAction | Configure
165 | | Select From List By Value | id=txtDeviceProtocol | NETCONF-XML
166 # Populate the other VNF descriptors
167 | | Select From List By Value | name=template | Y
168 | | Input Text | name=loginUserName | ${USER_ID}
169 | | Input Text | name=portNumber | 777
170 # Describe the first VNFC Type and enter the number of VMs for this VNFC Type
171 | | Input Text | name=samplevnfcType | csitVNFC
172 | | Input Text | name=samplevnfcFunctionCode | aaa
173 | | Select From List By Value | name=sampleIpaddress | Y
174 | | Select From List By Value | name=sampleGroupNotation | first-vnfc-name
175 | | Input Text | name=sampleGroupValue | pair
176 | | Input Text | name=txtNumber23 | 2
177 | | Click Button | Add VM Information
178 | | Wait Until Page Contains | VM Number: 2 | ${LONGTIME}
179 # Clear information about the first VNFC
180 | | Click Button | Clear VNFC Info
181 # Describe the second VNFC Type and enter the number of VMs for this VNFC Type
182 | | Input Text | name=samplevnfcType | csitVNFC
183 | | Input Text | name=samplevnfcFunctionCode | bbb
184 | | Select From List By Value | name=sampleIpaddress | Y
185 | | Select From List By Value | name=sampleGroupNotation | first-vnfc-name
186 | | Input Text | name=sampleGroupValue | pair
187 | | Input Text | name=txtNumber23 | 2
188 | | Click Button | Add VM Information
189 | | Wait Until Page Contains | VM Number: 4 | ${LONGTIME}
190 | | Click Button | saveToAppc
191 | | Sleep | ${SHORTTIME}
192 | | Click Link | MY VNFs
193 | | Wait Until Page Contains | ARTIFACT NAME | ${LONGTIME}
194 | | Page Should Contain | csit${THEDATE}
195