2 Documentation The main interface for interacting with Portal. It handles low level stuff like managing the selenium request library and Portal required steps
3 Library ExtendedSelenium2Library
4 Library RequestsClientCert
5 Library RequestsLibrary
6 Library ONAPLibrary.Utilities
8 Resource ../global_properties.robot
9 Resource ../browser_setup.robot
12 ${PORTAL_ENV} /ECOMPPORTAL
13 ${PORTAL_LOGIN_URL} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/login.htm
14 ${PORTAL_HOME_PAGE} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/applicationsHome
15 ${PORTAL_MICRO_ENDPOINT} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/commonWidgets
16 ${PORTAL_HOME_URL} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/applicationsHome
17 ${App_First_Name} appdemo
19 ${App_Email_Address} appdemo@onap.com
20 ${App_LoginID} appdemo
21 ${App_Loginpwd} demo123456!
22 ${App_LoginPwdCheck} demo123456!
23 ${Sta_First_Name} stademo
25 ${Sta_Email_Address} stademo@onap.com
26 ${Sta_LoginID} stademo
27 ${Sta_Loginpwd} demo123456!
28 ${Sta_LoginPwdCheck} demo123456!
29 ${Existing_User} portal
30 ${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck
31 #${Application} 'Virtual Infrastructure Deployment'
32 #${Application_tab} 'select-app-Virtual-Infrastructure-Deployment'
33 #${Application_dropdown} 'div-app-name-dropdown-Virtual-Infrastructure-Deployment'
34 #${Application_dropdown_select} 'div-app-name-Virtual-Infrastructure-Deployment'
35 ${APPC_LOGIN_URL} http://104.130.74.99:8282/apidoc/explorer/index.html
36 ${PORTAL_ASSETS_DIRECTORY} C:\\Users\\kk707x\\Downloads
40 Run Portal Health Check
41 [Documentation] Runs Portal Health check
42 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
43 Should Be Equal As Strings ${resp.status_code} 200
44 Should Be Equal As Strings ${resp.json()['statusCode']} 200
46 Run Portal Get Request
47 [Documentation] Runs Portal Get request
48 [Arguments] ${data_path}
49 ${session}= Create Session portal ${GLOBAL_PORTAL_URL}
50 ${uuid}= Generate UUID4
51 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
52 ${resp}= Get Request portal ${data_path} headers=${headers}
53 Log Received response from portal ${resp.text}
56 Portal admin Login To Portal GUI
57 [Documentation] Logs into Portal GUI
58 # Setup Browser Now being managed by test case
60 Go To ${PORTAL_LOGIN_URL}
61 Maximize Browser Window
62 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
63 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
64 Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
65 # Handle Proxy Warning
67 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
68 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
69 Click Link xpath=//a[@id='loginBtn']
70 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
71 Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
73 Portal admin Go To Portal HOME
74 [Documentation] Navigate to Portal Home
75 Go To ${PORTAL_HOME_URL}
76 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
78 Portal admin User Notifications
79 [Documentation] Navigate to User notification tab
80 Click Link xpath=//a[@id='parent-item-User-Notifications']
81 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
82 Click Button xpath=//button[@id='button-openAddNewApp']
83 Click Button xpath=(//button[@id='undefined'])[1]
84 #Click Button xpath=//input[@id='datepicker-start']
86 Portal admin Add Application Admin New User
87 [Documentation] Navigate to Admins tab
88 Click Link xpath=//a[@title='Admins']
89 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
90 Page Should Contain Admins
91 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
92 Click Button xpath=//button[@id='Create-New-User-button']
93 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${First_Name}
94 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Last_Name}
95 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Email_Address}
96 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${LoginID}
97 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Loginpwd}
98 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${LoginPwdCheck}
99 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
100 Click Button xpath=//button[@id='search-users-button-next']
101 Click Button xpath=//input[@value='Select application']
102 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1]
103 #Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1]
104 Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment')])[2]
105 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
106 Click Element xpath=//button[@id='admin-div-ok-button']
107 Click Element xpath=//button[@id='div-confirm-ok-button']
108 Click Link xpath=//a[@aria-label='Admins']
109 Click Button xpath=//input[@id='dropdown1']
110 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
111 Input Text xpath=//input[@id='input-table-search'] ${First_Name}
112 Element Text Should Be xpath=(//span[contains(.,'Test')] )[1] ${First_Name}
114 Portal admin Add Application Admin Existing User
115 [Documentation] Navigate to Admins tab
116 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
117 Click Link xpath=//a[@title='Admins']
118 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
119 Page Should Contain Admins
120 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
121 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
122 Click Button xpath=//button[@id='button-search-users']
123 Click Element xpath=//span[@id='result-uuid-0']
124 Click Button xpath=//button[@id='search-users-button-next']
125 Click Button xpath=//input[@value='Select application']
126 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1]
128 Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2]
129 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment
130 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
131 Click Element xpath=//button[@id='admin-div-ok-button']
132 Click Element xpath=//button[@id='div-confirm-ok-button']
133 Get Selenium Implicit Wait
134 Click Link xpath=//a[@aria-label='Admins']
135 Click Element xpath=//input[@id='dropdown1']
136 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )]
137 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
138 Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
140 Portal admin Delete Application Admin Existing User
141 [Documentation] Navigate to Admins tab
142 Click Element xpath=(//span[contains(.,'portal')] )[1]
143 Click Element xpath=//*[@id='select-app-Virtual-Infrastructure-Deployment']/following::i[@id='i-delete-application']
144 Click Element xpath=//button[@id='div-confirm-ok-button']
145 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
146 Click Element xpath=//button[@id='admin-div-ok-button']
147 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
148 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
149 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
151 Portal admin Add Application admin User New user
152 [Documentation] Navigate to Users tab
153 Click Link xpath=//a[@title='Users']
154 Page Should Contain Users
155 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
156 Click Button xpath=//button[@id='Create-New-User-button']
157 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
158 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
159 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
160 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
161 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
162 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
163 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
164 Click Button xpath=//button[@id='next-button']
165 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
166 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
167 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
168 Set Selenium Implicit Wait 3000
169 Click Button xpath=//button[@id='new-user-save-button']
170 Set Selenium Implicit Wait 3000
171 Go To ${PORTAL_HOME_PAGE}
172 Click Link xpath=//a[@title='Users']
173 Click Element xpath=//input[@id='dropdown1']
174 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
175 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
176 Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${App_First_Name}
178 Portal admin Add Standard User New user
179 [Documentation] Navigate to Users tab
180 Click Link xpath=//a[@title='Users']
181 Page Should Contain Users
182 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
183 Click Button xpath=//button[@id='Create-New-User-button']
184 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
185 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
186 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
187 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
188 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
189 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
190 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
191 Click Button xpath=//button[@id='next-button']
192 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
193 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
194 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
195 Set Selenium Implicit Wait 3000
196 Click Button xpath=//button[@id='new-user-save-button']
197 Set Selenium Implicit Wait 3000
198 Go To ${PORTAL_HOME_PAGE}
199 Click Link xpath=//a[@title='Users']
200 Click Element xpath=//input[@id='dropdown1']
201 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
202 Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
203 Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
205 Portal admin Add Application Admin Existing User -APPDEMO
206 [Documentation] Navigate to Admins tab
207 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
208 Click Link xpath=//a[@title='Admins']
209 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
210 Page Should Contain Admins
211 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
212 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
213 Click Button xpath=//button[@id='button-search-users']
214 Click Element xpath=//span[@id='result-uuid-0']
215 Click Button xpath=//button[@id='search-users-button-next']
216 Click Button xpath=//input[@value='Select application']
217 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1]
219 Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2]
220 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment
221 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
222 Click Element xpath=//button[@id='admin-div-ok-button']
223 Click Element xpath=//button[@id='div-confirm-ok-button']
224 Get Selenium Implicit Wait
225 Click Link xpath=//a[@aria-label='Admins']
226 Click Element xpath=//input[@id='dropdown1']
227 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )]
228 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
229 Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
231 Portal admin Add Standard User Existing user
232 [Documentation] Navigate to Users tab
233 Click Link xpath=//a[@title='Users']
234 Page Should Contain Users
235 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
236 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
237 Click Button xpath=//button[@id='button-search-users']
238 Click Element xpath=//span[@id='result-uuid-0']
239 Click Button xpath=//button[@id='next-button']
240 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
241 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
242 #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
243 #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
245 Set Selenium Implicit Wait 3000
246 Click Button xpath=//button[@id='new-user-save-button']
247 Set Selenium Implicit Wait 3000
248 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
249 #Select From List xpath=//input[@value='Select application'] Virtual Infrastructure Deployment
250 #Click Link xpath=//a[@title='Users']
251 #Page Should Contain Users
252 #Focus xpath=//input[@name='dropdown1']
254 Go To ${PORTAL_HOME_PAGE}
255 Click Link xpath=//a[@title='Users']
256 Click Element xpath=//input[@id='dropdown1']
257 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
258 #Click Element xpath=//li[contains(.,'XDemo App')]
259 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
260 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
262 Portal admin Edit Standard User Existing user
263 [Documentation] Navigate to Users tab
264 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
265 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
266 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
267 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox']
268 Set Selenium Implicit Wait 3000
269 Click Button xpath=//button[@id='new-user-save-button']
270 Set Selenium Implicit Wait 3000
271 Page Should Contain Users
272 #Click Button xpath=//input[@id='dropdown1']
273 #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
274 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
275 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
277 Portal admin Delete Standard User Existing user
278 [Documentation] Navigate to Users tab
279 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
280 Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1]
281 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1]
282 Click Element xpath=//button[@id='div-confirm-ok-button']
283 Click Button xpath=//button[@id='new-user-save-button']
284 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
285 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
286 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal
288 Functional Top Menu Get Access
289 [Documentation] Navigate to Support tab
290 Click Link xpath=//a[contains(.,'Support')]
291 Mouse Over xpath=//*[contains(text(),'Get Access')]
292 Click Link xpath=//a[contains(.,'Get Access')]
293 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
295 Functional Top Menu Contact Us
296 [Documentation] Navigate to Support tab
297 Click Link xpath=//a[contains(.,'Support')]
298 Mouse Over xpath=//*[contains(text(),'Contact Us')]
299 Click Link xpath=//a[contains(.,'Contact Us')]
300 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
301 Click Image xpath=//img[@alt='Onap Logo']
303 Portal admin Edit Functional menu
304 [Documentation] Navigate to Edit Functional menu tab
305 Click Link xpath=//a[@title='Edit Functional Menu']
306 Click Link xpath=.//*[@id='Manage']/div/a
307 Click Link xpath=.//*[@id='Design']/div/a
308 Click Link xpath=.//*[@id='Product_Design']/div/a
309 Open Context Menu xpath=//*[@id='Product_Design']/div/span
310 Click Link xpath=//a[@href='#add']
311 Input Text xpath=//input[@id='input-title'] ONAP Test
312 #Input Text xpath=//input[@id='input-url'] http://google.com
313 Click Element xpath=//input[@id='select-app']
314 Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
315 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
316 Input Text xpath=//input[@id='input-url'] http://google.com
317 Click Button xpath=//button[@id='button-save-continue']
318 #Click Button xpath=//div[@title='Select Roles']
319 Click Element xpath=//*[@id='app-select-Select Roles']
320 Click Element xpath=//input[@id='Standard-User-checkbox']
321 Click Element xpath=//button[@id='button-save-add']
322 Click Image xpath=//img[@alt='Onap Logo']
323 Set Selenium Implicit Wait 3000
324 Click Link xpath=//a[contains(.,'Manage')]
325 Mouse Over xpath=//*[contains(text(),'Design')]
326 Set Selenium Implicit Wait 3000
327 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
328 Set Selenium Implicit Wait 3000
329 Click Link xpath=//a[@title='Edit Functional Menu']
330 Click Link xpath=.//*[@id='Manage']/div/a
331 Click Link xpath=.//*[@id='Design']/div/a
332 Click Link xpath=.//*[@id='Product_Design']/div/a
333 Open Context Menu xpath=//*[@id='ONAP_Test']
334 Click Link xpath=//a[@href='#delete']
335 Set Selenium Implicit Wait 3000
336 Click Element xpath=//button[@id='div-confirm-ok-button']
337 Click Image xpath=//img[@alt='Onap Logo']
338 Set Selenium Implicit Wait 3000
339 Click Link xpath=//a[contains(.,'Manage')]
340 Mouse Over xpath=//*[contains(text(),'Design')]
341 Set Selenium Implicit Wait 3000
342 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
344 Portal admin Microservice Onboarding
345 [Documentation] Navigate to Edit Functional menu tab
346 Click Link xpath=//a[@title='Microservice Onboarding']
347 Click Button xpath=//button[@id='microservice-onboarding-button-add']
348 Input Text xpath=//input[@name='name'] Test Microservice
349 Input Text xpath=//*[@name='desc'] Test
350 Click Element xpath=//input[@id='microservice-details-input-app']
351 Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
352 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
353 Click Element xpath=//*[@name='desc']
354 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
355 Click Element xpath=//input[@id='microservice-details-input-security-type']
356 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
357 Click Element xpath=//li[contains(.,'Basic Authentication')]
358 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
359 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
360 Click Button xpath=//button[@id='microservice-details-save-button']
361 #Table Column Should Contain xpath=//*[@table-data='serviceList'] 0 Test Microservice
362 Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
364 Portal Admin Create Widget for All users
365 [Documentation] Navigate to Create Widget menu tab
366 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}\\widget_news.zip
367 Click Link xpath=//a[@title='Widget Onboarding']
368 Click Button xpath=//button[@id='widget-onboarding-button-add']
369 Input Text xpath=//*[@name='name'] ONAP-VID
370 Input Text xpath=//*[@name='desc'] ONAP VID
371 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
372 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
373 Click Element xpath=//li[contains(.,'Test Microservice')]
374 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
375 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
376 Click Button xpath=//button[@id='widgets-details-save-button']
377 Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
378 Page Should Contain ONAP-VID
379 Set Selenium Implicit Wait 3000
380 GO TO ${PORTAL_HOME_PAGE}
382 Portal Admin Delete Widget for All users
383 [Documentation] Navigate to delete Widget menu tab
384 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
385 #Page Should Contain ONAP-VID
386 #Click Image xpath=//img[@alt='Onap Logo']
387 Click Link xpath=//a[@title='Widget Onboarding']
388 Click Element xpath=//input[@id='dropdown1']
389 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
390 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
391 Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
392 Click Element xpath=//button[@id='div-confirm-ok-button']
393 Set Selenium Implicit Wait 3000
394 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID
395 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
396 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID
397 #Set Selenium Implicit Wait 3000
399 Portal Admin Create Widget for Application Roles
400 [Documentation] Navigate to Create Widget menu tab
401 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}\\widget_news.zip
402 Click Link xpath=//a[@title='Widget Onboarding']
403 Click Button xpath=//button[@id='widget-onboarding-button-add']
404 Input Text xpath=//*[@name='name'] ONAP-VID
405 Input Text xpath=//*[@name='desc'] ONAP VID
406 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
407 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
408 Click Element xpath=//li[contains(.,'Test Microservice')]
409 Click Element xpath=//*[@id="app-select-Select Applications"]
410 Click Element xpath=//*[@id="Virtual-Infrastructure-Deployment-checkbox"]
411 Click Element xpath=//*[@name='desc']
412 Click Element xpath=//*[@id="app-select-Select Roles"]
413 Click Element xpath=//*[@id="Standard-User-checkbox"]
414 Click Element xpath=//*[@name='desc']
415 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
416 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
417 Click Button xpath=//button[@id='widgets-details-save-button']
418 Click Image xpath=//img[@alt='Onap Logo']
419 Set Selenium Implicit Wait 3000
420 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
421 Click Link xpath=//a[@title='Widget Onboarding']
422 Click Element xpath=//input[@id='dropdown1']
423 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
424 Page Should Contain ONAP-VID
425 Set Selenium Implicit Wait 3000
426 GO TO ${PORTAL_HOME_PAGE}
428 Portal Admin Delete Widget for Application Roles
429 [Documentation] Navigate to delete Widget menu tab
430 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
431 #Page Should Contain ONAP-VID
432 #Click Image xpath=//img[@alt='Onap Logo']
433 Click Link xpath=//a[@title='Widget Onboarding']
434 Click Element xpath=//input[@id='dropdown1']
435 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
436 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
437 Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
438 Click Element xpath=//button[@id='div-confirm-ok-button']
439 Set Selenium Implicit Wait 3000
440 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID
441 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
442 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID
443 #Set Selenium Implicit Wait 3000
445 Portal Admin Edit Widget
446 [Documentation] Navigate to Home tab
447 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
448 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
449 Set Browser Implicit Wait 8000
450 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
451 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
452 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
453 Input Text xpath=//input[@name='title'] ONAP_VID
454 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
455 Input Text xpath=//input[@id='widget-input-add-order'] 5
456 Click Link xpath=//a[contains(.,'Add New')]
457 Click Element xpath=//div[@id='close-button']
458 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
459 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
460 Click Element xpath=//div[@id='confirmation-button-next']
461 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
462 Click Link xpath=//a[@id='close-button']
464 Portal Admin Broadcast Notifications
465 [Documentation] Portal Test Admin Broadcast Notifications
466 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
467 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
468 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
469 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
470 Click Image xpath=//img[@alt='Onap Logo']
471 Set Selenium Implicit Wait 3000
472 Click Link xpath=//*[@id="parent-item-User-Notifications"]
473 Wait Until Element Is Visible xpath=//*[@id="button-openAddNewApp"] timeout=10
474 Click button xpath=//*[@id="button-openAddNewApp"]
475 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
476 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
477 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
478 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
479 Click Element xpath=//*[@id="button-notification-save"]
480 Wait Until Element Is Visible xpath=//*[@id="button-openAddNewApp"] timeout=10
481 Click Element xpath=//*[@id="megamenu-notification-button"]
482 Click Element xpath=//*[@id="notification-history-link"]
483 Wait Until Element Is Visible xpath=//*[@id="notification-history-table"] timeout=10
484 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
485 Log ${AdminBroadCastMsg}
486 [Return] ${AdminBroadCastMsg}
488 Portal Admin Category Notifications
489 [Documentation] Portal Admin Broadcast Notifications
490 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
491 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
492 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
493 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
494 Click Link xpath=//a[@id='parent-item-Home']
495 Click Link xpath=//*[@id="parent-item-User-Notifications"]
496 Wait Until Element Is Visible xpath=//*[@id="button-openAddNewApp"] timeout=10
497 Click button xpath=//*[@id="button-openAddNewApp"]
498 #Select Radio Button NO radio-button-no
499 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
500 #Select Radio Button //label[@class='radio'] radio-button-approles
501 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
502 Click Element xpath=//*[contains(text(),'Virtual Infrastructure Deployment')]/preceding::input[@ng-model='member.isSelected'][1]
503 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
504 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
505 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
506 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
507 Click Element xpath=//*[@id="button-notification-save"]
508 Wait Until Element Is Visible xpath=//*[@id="button-openAddNewApp"] timeout=10
509 Click Element xpath=//*[@id="megamenu-notification-button"]
510 Click Element xpath=//*[@id="notification-history-link"]
511 Wait Until Element Is Visible xpath=//*[@id="notification-history-table"] timeout=10
512 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
513 Log ${AdminCategoryMsg}
514 [Return] ${AdminCategoryMsg}
516 Portal admin Logout from Portal GUI
517 [Documentation] Logout from Portal GUI
518 Click Element xpath=//div[@id='header-user-icon']
519 Click Button xpath=//button[contains(.,'Log out')]
520 Title Should Be Login
522 Application admin Login To Portal GUI
523 [Documentation] Logs into Portal GUI
524 # Setup Browser Now being managed by test case
526 Go To ${PORTAL_LOGIN_URL}
527 Maximize Browser Window
528 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
529 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
530 Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
531 # Handle Proxy Warning
532 Title Should Be Login
533 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_APP_ADMIN_USER}
534 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_APP_ADMIN_PWD}
535 Click Link xpath=//a[@id='loginBtn']
536 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
537 Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
539 Application Admin Navigation Application Link Tab
540 [Documentation] Logs into Portal GUI as application admin
541 Click Link xpath=//a[@id='parent-item-Home']
542 Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1]
543 Page Should Contain Welcome to VID
544 Click Element xpath=//i[@class='ion-close-round']
545 Click Element xpath=(.//span[@id='tab-Home'])[1]
547 Application Admin Navigation Functional Menu
548 [Documentation] Logs into Portal GUI as application admin
549 Click Link xpath=//a[contains(.,'Manage')]
550 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
551 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
552 Page Should Contain Welcome to VID
553 Click Element xpath=//i[@class='ion-close-round']
554 Click Element xpath=(.//span[@id='tab-Home'])[1]
556 Application admin Add Standard User Existing user
557 [Documentation] Navigate to Users tab
558 Click Link xpath=//a[@title='Users']
559 Page Should Contain Users
560 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
561 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
562 Click Button xpath=//button[@id='button-search-users']
563 Click Element xpath=//span[@id='result-uuid-0']
564 Click Button xpath=//button[@id='next-button']
565 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
566 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
567 Set Selenium Implicit Wait 3000
568 Click Button xpath=//button[@id='new-user-save-button']
569 Set Selenium Implicit Wait 3000
570 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
571 #Select From List xpath=//input[@value='Select application'] Virtual Infrastructure Deployment
572 #Click Link xpath=//a[@title='Users']
573 #Page Should Contain Users
574 Go To ${PORTAL_HOME_PAGE}
575 Set Selenium Implicit Wait 3000
576 Click Link xpath=//a[@title='Users']
577 Click Element xpath=//input[@id='dropdown1']
578 Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
579 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
580 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
582 Application admin Edit Standard User Existing user
583 [Documentation] Navigate to Users tab
584 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
585 Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment']
586 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox']
587 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox']
588 Set Selenium Implicit Wait 3000
589 Click Button xpath=//button[@id='new-user-save-button']
590 Set Selenium Implicit Wait 3000
591 Page Should Contain Users
592 #Click Button xpath=//input[@id='dropdown1']
593 #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')]
594 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
595 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
597 Application admin Delete Standard User Existing user
598 [Documentation] Navigate to Users tab
599 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
600 Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1]
601 Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1]
602 Click Element xpath=//button[@id='div-confirm-ok-button']
603 Click Button xpath=//button[@id='new-user-save-button']
604 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
605 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
606 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
608 Application admin Logout from Portal GUI
609 [Documentation] Logout from Portal GUI
610 Click Element xpath=//div[@id='header-user-icon']
611 Click Button xpath=//button[contains(.,'Log out')]
613 Title Should Be Login
615 Standard user Login To Portal GUI
616 [Documentation] Logs into Portal GUI
617 # Setup Browser Now being managed by test case
619 Go To ${PORTAL_LOGIN_URL}
620 Maximize Browser Window
621 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
622 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
623 Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
624 # Handle Proxy Warning
625 Title Should Be Login
626 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_STA_USER_USER}
627 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_STA_USER_PWD}
628 Click Link xpath=//a[@id='loginBtn']
629 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
630 Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV}
632 Standard user Navigation Application Link Tab
633 [Documentation] Logs into Portal GUI as application admin
634 #Portal admin Go To Portal HOME
635 Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1]
636 Page Should Contain Welcome to VID
637 Click Element xpath=(.//span[@id='tab-Home'])[1]
639 Standard user Navigation Functional Menu
640 [Documentation] Logs into Portal GUI as application admin
641 Click Link xpath=//a[contains(.,'Manage')]
642 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
643 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
644 Page Should Contain Welcome to VID
645 Click Element xpath=(.//span[@id='tab-Home'])[1]
647 Standard user Broadcast Notifications
648 [Documentation] Logs into Portal GUI as application admin
649 [Arguments] ${AdminBroadCastMsg}
650 Click Element xpath=//*[@id='megamenu-notification-button']
651 Click Element xpath=//*[@id='notification-history-link']
652 Wait Until Element Is Visible xpath=//*[@id='app-title'] timeout=10
653 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
654 Log ${AdminBroadCastMsg}
656 Standard user Category Notifications
657 [Documentation] Logs into Portal GUI as application admin
658 [Arguments] ${AdminCategoryMsg}
659 #Click Element xpath=//*[@id='megamenu-notification-button']
660 #Click Element xpath=//*[@id="notification-history-link"]
661 Wait Until Element Is Visible xpath=//*[@id='app-title'] timeout=10
662 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
663 Log ${AdminCategoryMsg}
665 Standard user Logout from Portal GUI
666 [Documentation] Logout from Portal GUI
667 Click Element xpath=//div[@id='header-user-icon']
668 Click Button xpath=//button[contains(.,'Log out')]
670 Title Should Be Login
673 [Documentation] Close all browsers