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