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