blob: 14f64d5f5bca980481bf29c9e2c57fc3cdac3e06 [file] [log] [blame]
kishore328996f2017-09-08 17:15:42 -05001*** Settings ***
2Documentation This is RobotFrame work script
3Library ExtendedSelenium2Library
4Library OperatingSystem
kishore6eebdba2017-10-03 11:12:57 -05005Library eteutils/RequestsClientCert.py
6Library RequestsLibrary
7Library eteutils/UUID.py
8Library DateTime
9Library Collections
10Library eteutils/OSUtils.py
11Library eteutils/StringTemplater.py
12Library XvfbRobot
kishore6eebdba2017-10-03 11:12:57 -050013Resource json_templater.robot
kishore328996f2017-09-08 17:15:42 -050014
15
16*** Variables ***
kishore6eebdba2017-10-03 11:12:57 -050017#${PORTAL_URL} http://%{HOST_IP}:8989
18#${PORTAL_URL} http://localhost:8989
19${PORTAL_URL} http://portal.api.simpledemo.openecomp.org:8989
kishore6eebdba2017-10-03 11:12:57 -050020${PORTAL_ENV} /ECOMPPORTAL
21${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
22${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
23${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
24${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
25${App_First_Name} appdemo
26${App_Last_Name} demo
27${App_Email_Address} appdemo@onap.com
kishorebbca0cf2017-10-09 16:59:38 -050028${App_LoginID} appdemo
kishore6eebdba2017-10-03 11:12:57 -050029${App_Loginpwd} demo123456!
30${App_LoginPwdCheck} demo123456!
31${Sta_First_Name} stademo
32${Sta_Last_Name} demo
33${Sta_Email_Address} stademo@onap.com
34${Sta_LoginID} stademo
35${Sta_Loginpwd} demo123456!
36${Sta_LoginPwdCheck} demo123456!
37${Test_First_Name} portal
38${Test_Last_Name} demo
39${Test_Email_Address} portal@onap.com
40${Test_LoginID} portal
41${Test_Loginpwd} demo123456!
42${Test_LoginPwdCheck} demo123456!
43${Existing_User} portal
44${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck
45${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
46${GLOBAL_APPLICATION_ID} robot-functional
47${GLOBAL_PORTAL_ADMIN_USER} demo
48${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
49${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
50${GLOBAL_SELENIUM_BROWSER} chrome
51${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
52${GLOBAL_SELENIUM_DELAY} 0
53${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
54${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
55${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
56${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
57${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
58${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
59${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
60${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
61${GLOBAL_BUILD_NUMBER} 0
62${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
63${jira} jira
64${RESOURCE_PATH} ECOMPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050065${portal_Template} ${CURDIR}/portal.template
66
kishore328996f2017-09-08 17:15:42 -050067
68
69*** Test Cases ***
70
71Portal Health Check
72 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050073
74Login into Portal URL
75 Portal admin Login To Portal GUI
76
77Portal R1 Release
78 [Documentation] ONAP Portal R1 functionality test
79 Notification on ONAP Portal
80 Portal Application Account Management validation
81
82Portal R1 Release for AAF
83 [Documentation] ONAP Portal R1 functionality for AAF test
84 Portal AAF new fields
85
86Create Microse service onboarding
87 Portal admin Microservice Onboarding
88
89Create Widget for all users
90 Portal Admin Create Widget for All users
91
92Delete Widget for all users
93 Portal Admin Delete Widget for All users
94
95Create Widget for Application Roles
96 Portal Admin Create Widget for Application Roles
97
98#Delete Widget for Application Roles
99# Portal Admin Delete Widget for Application Roles
100
101#Create a Test user for Application Admin
102# Portal admin Add Application admin User New user -Test
kishore6eebdba2017-10-03 11:12:57 -0500103
kishorebbca0cf2017-10-09 16:59:38 -0500104#Create a Test user for Standared User
105# Portal admin Add Standard User New user
kishore328996f2017-09-08 17:15:42 -0500106
kishorebbca0cf2017-10-09 16:59:38 -0500107#Create a Test user for Existing User
108# Portal admin Add Application Admin Exiting User -APPDEMO
kishore328996f2017-09-08 17:15:42 -0500109
kishorebbca0cf2017-10-09 16:59:38 -0500110#Add Application Admin for Exisitng User
111# Portal admin Add Application Admin Exiting User
112
113#Delete Application Admin for Exisitng User
114# Portal admin Delete Application Admin Existing User
kishore328996f2017-09-08 17:15:42 -0500115
kishorebbca0cf2017-10-09 16:59:38 -0500116#Add Standard User Role for Existing user
117# Portal admin Add Standard User Existing user
118
119#Edit Standard User Role for Existing user
120# Portal admin Edit Standard User Existing user
121
122
123#Delete Standard User Role for Existing user
124# Portal admin Delete Standard User Existing user
kishore328996f2017-09-08 17:15:42 -0500125
kishorebbca0cf2017-10-09 16:59:38 -0500126Validate Functional Top Menu Get Access
127 Functional Top Menu Get Access
128
129Validate Functional Top Menu Contact Us
130 Functional Top Menu Contact Us
131
132Edit Functional Menu
133 Portal admin Edit Functional menu
134
135
136Broadbond Notification functionality
137 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
138 set global variable ${AdminBroadCastMsg}
139
140
141#Category Notification functionality
142# ${AdminCategoryMsg}= Portal Admin Category Notifications
143# set global variable ${AdminCategoryMsg}
144
145
146Logout from Portal GUI as Portal Admin
147 Portal admin Logout from Portal GUI
148
149#Login To Portal GUI as APP Admin
150# Application admin Login To Portal GUI
151
152#Navigate Application Link as APP Admin
153# Application Admin Navigation Application Link Tab
154
155#Navigate Functional Link as APP Admin
156# Application Admin Navigation Functional Menu
157
158#Add Standard User Role for Existing user as APP Admin
159# Application admin Add Standard User Existing user
160
161#Edit Standard User Role for Existing user as APP Admin
162# Application admin Edit Standard User Existing user
163
164#Delete Standard User Role for Existing user as APP Admin
165# Application admin Delete Standard User Existing user
166
167#Logout from Portal GUI as APP Admin
168# Application admin Logout from Portal GUI
169
170
171#Login To Portal GUI as Standared User
172# Standared user Login To Portal GUI
173
174#Navigate Application Link as Standared User
175# Standared user Navigation Application Link Tab
176
177#Navigate Functional Link as Standared User
178# Standared user Navigation Functional Menu
179
180#Broadcast Notifications Standared user
181# Standared user Broadcast Notifications ${AdminBroadCastMsg}
182
183#Category Notifications Standared user
184# Standared user Category Notifications ${AdminCategoryMsg}
185
186
kishore328996f2017-09-08 17:15:42 -0500187Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500188 [Documentation] Close All Open browsers
189 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500190
191
192
193
194
195
196*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500197
198Setup Browser
199 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
200# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
201 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
202 Log Running with ${GLOBAL_SELENIUM_BROWSER}
203
204
205 Setup Browser Chrome
206 ${os}= Get Normalized Os
207 Log Normalized OS=${os}
208 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
209 Call Method ${chrome options} add_argument no-sandbox
210 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
211 Set To Dictionary ${dc} elementScrollBehavior 1
212 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
213 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
214
215Handle Proxy Warning
216 [Documentation] Handle Intermediate Warnings from Proxies
217 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
218 Return From Keyword if '${status}' != 'PASS'
219 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
220 Return From Keyword if '${status}' != 'PASS'
221 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
222 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
223 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
224 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
225
226
kishore6eebdba2017-10-03 11:12:57 -0500227Run Portal Health Check
228 [Documentation] Runs Portal Health check
229 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
230 Should Be Equal As Strings ${resp.status_code} 200
231 Should Be Equal As Strings ${resp.json()['statusCode']} 200
232Run Portal Get Request
233 [Documentation] Runs Portal Get request
234 [Arguments] ${data_path}
235 ${session}= Create Session portal ${PORTAL_URL}
236 ${uuid}= Generate UUID
237 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
238 ${resp}= Get Request portal ${data_path} headers=${headers}
239 Log Received response from portal ${resp.text}
240 [Return] ${resp}
241
242
243Portal admin Login To Portal GUI
244 [Documentation] Logs into Portal GUI
245 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500246# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500247 Start Virtual Display 1920 1080
248 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500249# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500250 Maximize Browser Window
251 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
252 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
253 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
254 # Handle Proxy Warning
255 Title Should Be Login
256 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
257 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
258 Click Link xpath=//a[@id='loginBtn']
259 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
260 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
261
262Portal admin Go To Portal HOME
263 [Documentation] Naviage to Portal Home
264 Go To ${PORTAL_HOME_URL}
265 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
266
267Portal admin User Notifications
268 [Documentation] Naviage to User notification tab
269 Click Link xpath=//a[@id='parent-item-User-Notifications']
270 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
271 Click Button xpath=//button[@id='button-openAddNewApp']
272 Click Button xpath=(//button[@id='undefined'])[1]
273 #Click Button xpath=//input[@id='datepicker-start']
274
275
276
277
278Portal admin Add Application Admin Exiting User
279 [Documentation] Naviage to Admins tab
280 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
281 Click Link xpath=//a[@title='Admins']
282 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
283 Page Should Contain Admins
284 Click Button xpath=//button[@ng-click='toggleSidebar()']
285 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500286 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500287 Click Button xpath=//button[@id='button-search-users']
288 Click Element xpath=//span[@id='result-uuid-0']
289 Click Button xpath=//button[@id='search-users-button-next']
290 Click Button xpath=//input[@value='Select application']
kishorebbca0cf2017-10-09 16:59:38 -0500291 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'DMaaP Bus Ctrl' )])[1]
kishore6eebdba2017-10-03 11:12:57 -0500292
kishorebbca0cf2017-10-09 16:59:38 -0500293 Click Element xpath=(//li[contains(.,'DMaaP Bus Ctrl' )])[2]
294 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'DMaaP Bus Ctrl')])[1] DMaaP Bus Ctrl
kishore6eebdba2017-10-03 11:12:57 -0500295 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
296 Click Element xpath=//button[@id='admin-div-ok-button']
297 Click Element xpath=//button[@id='div-confirm-ok-button']
298 Get Selenium Implicit Wait
299 Click Link xpath=//a[@aria-label='Admins']
300 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500301 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl' )]
kishore6eebdba2017-10-03 11:12:57 -0500302 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
303 Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
304
305
306Portal admin Delete Application Admin Existing User
307 [Documentation] Naviage to Admins tab
308 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishorebbca0cf2017-10-09 16:59:38 -0500309 Click Element xpath=//*[@id='select-app-DMaaP-Bus-Ctrl']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500310 Click Element xpath=//button[@id='div-confirm-ok-button']
311 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
312 Click Element xpath=//button[@id='admin-div-ok-button']
313 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
314 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
315 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
316
317
318Portal admin Add Application admin User New user
319 [Documentation] Naviage to Users tab
320 Click Link xpath=//a[@title='Users']
321 Page Should Contain Users
322 Click Button xpath=//button[@ng-click='toggleSidebar()']
323 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
324 Click Button xpath=//button[@id='Create-New-User-button']
325 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
326 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
327 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
328 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
329 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
330 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
331 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
332 Click Button xpath=//button[@id='next-button']
kishorebbca0cf2017-10-09 16:59:38 -0500333 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
334 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
335 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500336 Set Selenium Implicit Wait 3000
337 Click Button xpath=//button[@id='new-user-save-button']
338 Set Selenium Implicit Wait 3000
339 Go To ${PORTAL_HOME_PAGE}
340 Click Link xpath=//a[@title='Users']
341 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500342 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
343 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
344 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
345 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${App_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500346
347
348Portal admin Add Standard User New user
349 [Documentation] Naviage to Users tab
350 Click Link xpath=//a[@title='Users']
351 Page Should Contain Users
352 Click Button xpath=//button[@ng-click='toggleSidebar()']
353 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
354 Click Button xpath=//button[@id='Create-New-User-button']
355 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
356 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
357 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
358 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
359 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
360 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
361 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
362 Click Button xpath=//button[@id='next-button']
kishorebbca0cf2017-10-09 16:59:38 -0500363 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
364 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
365 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500366 Set Selenium Implicit Wait 3000
367 Click Button xpath=//button[@id='new-user-save-button']
368 Set Selenium Implicit Wait 3000
369 Go To ${PORTAL_HOME_PAGE}
370 Click Link xpath=//a[@title='Users']
371 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500372 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
373 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
374 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
375 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500376
377
378
379Portal admin Add Application admin User New user -Test
380 [Documentation] Naviage to Users tab
381 Click Link xpath=//a[@title='Users']
382 Page Should Contain Users
383 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishorebbca0cf2017-10-09 16:59:38 -0500384 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500385 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
386 Click Button xpath=//button[@id='Create-New-User-button']
387 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
388 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
389 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
390 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
391 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
392 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
393 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
394 Click Button xpath=//button[@id='next-button']
kishorebbca0cf2017-10-09 16:59:38 -0500395 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
396 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
397 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500398 Set Selenium Implicit Wait 3000
399 Click Button xpath=//button[@id='new-user-save-button']
400 Set Selenium Implicit Wait 3000
401 Go To ${PORTAL_HOME_PAGE}
402 Click Link xpath=//a[@title='Users']
403 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500404 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
405 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
406 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
407 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500408
409
410
411Portal admin Add Application Admin Exiting User -APPDEMO
412 [Documentation] Naviage to Admins tab
413 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
414 Click Link xpath=//a[@title='Admins']
415 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
416 Page Should Contain Admins
417 Click Button xpath=//button[@ng-click='toggleSidebar()']
418 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
419 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
420 Click Button xpath=//button[@id='button-search-users']
421 Click Element xpath=//span[@id='result-uuid-0']
422 Click Button xpath=//button[@id='search-users-button-next']
423 Click Button xpath=//input[@value='Select application']
kishorebbca0cf2017-10-09 16:59:38 -0500424 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'DMaaP Bus Ctrl' )])[1]
kishore6eebdba2017-10-03 11:12:57 -0500425
kishorebbca0cf2017-10-09 16:59:38 -0500426 Click Element xpath=(//li[contains(.,'DMaaP Bus Ctrl' )])[2]
427 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'DMaaP Bus Ctrl')])[1] DMaaP Bus Ctrl
kishore6eebdba2017-10-03 11:12:57 -0500428 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
429 Click Element xpath=//button[@id='admin-div-ok-button']
430 Click Element xpath=//button[@id='div-confirm-ok-button']
431 Get Selenium Implicit Wait
432 Click Link xpath=//a[@aria-label='Admins']
433 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500434 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl' )]
435
kishore6eebdba2017-10-03 11:12:57 -0500436 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
437 Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
438
439
440
441
442
443
444
445Portal admin Add Standard User Existing user
446 [Documentation] Naviage to Users tab
447 Click Link xpath=//a[@title='Users']
448 Page Should Contain Users
449 Click Button xpath=//button[@ng-click='toggleSidebar()']
450 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
451 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
452 Click Button xpath=//button[@id='button-search-users']
453 Click Element xpath=//span[@id='result-uuid-0']
454 Click Button xpath=//button[@id='next-button']
kishorebbca0cf2017-10-09 16:59:38 -0500455 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
456 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500457 #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
458 #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
459
460 Set Selenium Implicit Wait 3000
461 Click Button xpath=//button[@id='new-user-save-button']
462 Set Selenium Implicit Wait 3000
463 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishorebbca0cf2017-10-09 16:59:38 -0500464 #Select From List xpath=//input[@value='Select application'] DMaaP Bus Ctrl
kishore6eebdba2017-10-03 11:12:57 -0500465 #Click Link xpath=//a[@title='Users']
466 #Page Should Contain Users
467 #Focus xpath=//input[@name='dropdown1']
468
469 Go To ${PORTAL_HOME_PAGE}
470 Click Link xpath=//a[@title='Users']
471 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500472 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
473 #Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500474 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
475 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
476
477
478Portal admin Edit Standard User Existing user
479 [Documentation] Naviage to Users tab
480 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishorebbca0cf2017-10-09 16:59:38 -0500481 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
482 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
483 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500484 Set Selenium Implicit Wait 3000
485 Click Button xpath=//button[@id='new-user-save-button']
486 Set Selenium Implicit Wait 3000
487 Page Should Contain Users
488 #Click Button xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500489 #Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500490 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
491 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
492
493
494 Portal admin Delete Standard User Existing user
495 [Documentation] Naviage to Users tab
496 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishorebbca0cf2017-10-09 16:59:38 -0500497 Scroll Element Into View xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::*[@id='app-item-delete'][1]
498 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500499 Click Element xpath=//button[@id='div-confirm-ok-button']
500 Click Button xpath=//button[@id='new-user-save-button']
501 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
502 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
503 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal
504
505
506
507
508Functional Top Menu Get Access
509 [Documentation] Naviage to Support tab
510 Click Link xpath=//a[contains(.,'Support')]
511 Mouse Over xpath=//*[contains(text(),'Get Access')]
512 Click Link xpath=//a[contains(.,'Get Access')]
513 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
514
515
516Functional Top Menu Contact Us
517 [Documentation] Naviage to Support tab
518 Click Link xpath=//a[contains(.,'Support')]
519 Mouse Over xpath=//*[contains(text(),'Contact Us')]
520 Click Link xpath=//a[contains(.,'Contact Us')]
521 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
522 Click Image xpath=//img[@alt='Onap Logo']
523
524
525Portal admin Edit Functional menu
526 [Documentation] Naviage to Edit Functional menu tab
527 Click Link xpath=//a[@title='Edit Functional Menu']
528 Click Link xpath=.//*[@id='Manage']/div/a
529 Click Link xpath=.//*[@id='Design']/div/a
530 Click Link xpath=.//*[@id='Product_Design']/div/a
531 Open Context Menu xpath=//*[@id='Product_Design']/div/span
532 Click Link xpath=//a[@href='#add']
533 Input Text xpath=//input[@id='input-title'] ONAP Test
534 #Input Text xpath=//input[@id='input-url'] http://google.com
535 Click Element xpath=//input[@id='select-app']
kishorebbca0cf2017-10-09 16:59:38 -0500536 Scroll Element Into View xpath=//li[contains(.,'DMaaP Bus Ctrl')]
537 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500538 Input Text xpath=//input[@id='input-url'] http://google.com
539 Click Button xpath=//button[@id='button-save-continue']
540 #Click Button xpath=//div[@title='Select Roles']
541 Click Element xpath=//*[@id='app-select-Select Roles']
542 Click Element xpath=//input[@id='Standard-User-checkbox']
543 Click Element xpath=//button[@id='button-save-add']
544 Click Image xpath=//img[@alt='Onap Logo']
545 Set Selenium Implicit Wait 3000
546 Click Link xpath=//a[contains(.,'Manage')]
547 Mouse Over xpath=//*[contains(text(),'Design')]
548 Set Selenium Implicit Wait 3000
549 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
550 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500551 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500552 Click Link xpath=//a[@title='Edit Functional Menu']
553 Click Link xpath=.//*[@id='Manage']/div/a
554 Click Link xpath=.//*[@id='Design']/div/a
555 Click Link xpath=.//*[@id='Product_Design']/div/a
556 Open Context Menu xpath=//*[@id='ONAP_Test']
557 Click Link xpath=//a[@href='#delete']
558 Set Selenium Implicit Wait 3000
559 Click Element xpath=//button[@id='div-confirm-ok-button']
560 Click Image xpath=//img[@alt='Onap Logo']
561 Set Selenium Implicit Wait 3000
562 Click Link xpath=//a[contains(.,'Manage')]
563 Mouse Over xpath=//*[contains(text(),'Design')]
564 Set Selenium Implicit Wait 3000
565 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
566
567
568
569Portal admin Microservice Onboarding
570 [Documentation] Naviage to Edit Functional menu tab
571 Click Link xpath=//a[@title='Microservice Onboarding']
572 Click Button xpath=//button[@id='microservice-onboarding-button-add']
573 Input Text xpath=//input[@name='name'] Test Microservice
574 Input Text xpath=//*[@name='desc'] Test
575 Click Element xpath=//input[@id='microservice-details-input-app']
kishorebbca0cf2017-10-09 16:59:38 -0500576 Scroll Element Into View xpath=//li[contains(.,'DMaaP Bus Ctrl')]
577 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500578 Click Element xpath=//*[@name='desc']
579 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
580 Click Element xpath=//input[@id='microservice-details-input-security-type']
581 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
582 Click Element xpath=//li[contains(.,'Basic Authentication')]
583 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
584 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
585 Click Button xpath=//button[@id='microservice-details-save-button']
586 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
587 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
588
589
590
591Portal Admin Create Widget for All users
592 [Documentation] Naviage to Create Widget menu tab
593 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
594 Click Link xpath=//a[@title='Widget Onboarding']
595 Click Button xpath=//button[@ng-click='toggleSidebar()']
596 Click Button xpath=//button[@id='widget-onboarding-button-add']
597 Input Text xpath=//*[@name='name'] ONAP-VID
598 Input Text xpath=//*[@name='desc'] ONAP VID
599 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
600 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
601 Click Element xpath=//li[contains(.,'Test Microservice')]
602 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
603 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
604 Click Button xpath=//button[@id='widgets-details-save-button']
605 Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
606 Page Should Contain ONAP-VID
607 Set Selenium Implicit Wait 3000
608 GO TO ${PORTAL_HOME_PAGE}
609
610
611Portal Admin Delete Widget for All users
612 [Documentation] Naviage to delete Widget menu tab
613 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
614 #Page Should Contain ONAP-VID
615 #Click Image xpath=//img[@alt='Onap Logo']
616 Click Link xpath=//a[@title='Widget Onboarding']
617 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500618 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500619 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/followi
620 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500621 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore6eebdba2017-10-03 11:12:57 -0500622 Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
623 Click Element xpath=//button[@id='div-confirm-ok-button']
624 Set Selenium Implicit Wait 3000
625 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID
626 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
627 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID
628 #Set Selenium Implicit Wait 3000
629
630
631Portal Admin Create Widget for Application Roles
632 [Documentation] Naviage to Create Widget menu tab
633 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
634 Click Link xpath=//a[@title='Widget Onboarding']
635 Click Button xpath=//button[@ng-click='toggleSidebar()']
636 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishorebbca0cf2017-10-09 16:59:38 -0500637 Input Text xpath=//*[@name='name'] ONAP-DMaaP
638 Input Text xpath=//*[@name='desc'] ONAP DMaaP
kishore6eebdba2017-10-03 11:12:57 -0500639 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
640 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
641 Click Element xpath=//li[contains(.,'Test Microservice')]
642 Click element xpath=//*[@id="app-select-Select Applications"]
kishorebbca0cf2017-10-09 16:59:38 -0500643 click element xpath=//*[@id="DMaaP-Bus-Ctrl-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500644 Click element xpath=//*[@name='desc']
645 click element xpath=//*[@id="app-select-Select Roles"]
646 click element xpath=//*[@id="Standard-User-checkbox"]
647 Click element xpath=//*[@name='desc']
648 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
649 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
650 Click Button xpath=//button[@id='widgets-details-save-button']
651 Click Image xpath=//img[@alt='Onap Logo']
652 Set Selenium Implicit Wait 3000
653 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
654 Click Link xpath=//a[@title='Widget Onboarding']
655 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500656 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
657 Page Should Contain ONAP-DMaaP
kishore6eebdba2017-10-03 11:12:57 -0500658 Set Selenium Implicit Wait 3000
659 GO TO ${PORTAL_HOME_PAGE}
660
661
662
663
664 Portal Admin Delete Widget for Application Roles
kishore6eebdba2017-10-03 11:12:57 -0500665 #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
666 #Page Should Contain ONAP-VID
667 #Click Image xpath=//img[@alt='Onap Logo']
668 Click Link xpath=//a[@title='Widget Onboarding']
669 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500670 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
671 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/followi
kishore6eebdba2017-10-03 11:12:57 -0500672 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500673 Click Button xpath=//button[@ng-click='toggleSidebar()']
674 Click Element xpath=(.//*[contains(text(),'ONAP-DMaaP')]/following::div[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500675 Click Element xpath=//button[@id='div-confirm-ok-button']
676 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500677 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-DMaaP
kishore6eebdba2017-10-03 11:12:57 -0500678 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
679 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID
kishorebbca0cf2017-10-09 16:59:38 -0500680 #Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500681
682
683
684Portal Admin Edit Widget
685 [Documentation] Naviage to Home tab
686 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
687 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
688 Set Browser Implicit Wait 8000
689 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
690 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
691 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
692 Input Text xpath=//input[@name='title'] ONAP_VID
693 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
694 Input Text xpath=//input[@id='widget-input-add-order'] 5
695 Click Link xpath=//a[contains(.,'Add New')]
696 Click Element xpath=//div[@id='close-button']
697 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
698 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
699 Click Element xpath=//div[@id='confirmation-button-next']
700 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
701 Click Link xpath=//a[@id='close-button']
702
703
704
705
706Portal Admin Broadcast Notifications
707 [Documentation] Portal Test Admin Broadcast Notifications
708 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
709 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
710 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
711 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
712 Click Image xpath=//img[@alt='Onap Logo']
713 Set Selenium Implicit Wait 3000
714 Click Link xpath=//*[@id="parent-item-User-Notifications"]
715 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
716 Click button xpath=//*[@id="button-openAddNewApp"]
717 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
718 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
719 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
720 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
721 click element xpath=//*[@id="button-notification-save"]
722 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
723 click element xpath=//*[@id="megamenu-notification-button"]
724 click element xpath=//*[@id="notification-history-link"]
725 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
726 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
727 log ${AdminBroadCastMsg}
728 [Return] ${AdminBroadCastMsg}
729
730Portal Admin Category Notifications
731 [Documentation] Portal Admin Broadcast Notifications
732 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
733 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
734 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
735 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
736 Click Link xpath=//a[@id='parent-item-Home']
737 Click Link xpath=//*[@id="parent-item-User-Notifications"]
738 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
739 Click button xpath=//*[@id="button-openAddNewApp"]
740 #Select Radio Button NO radio-button-no
741 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
742 #Select Radio Button //label[@class='radio'] radio-button-approles
743 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishorebbca0cf2017-10-09 16:59:38 -0500744 Click Element xpath=//*[contains(text(),'DMaaP Bus Ctrl')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500745 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
746 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
747 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
748 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
749 click element xpath=//*[@id="button-notification-save"]
750 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
751 click element xpath=//*[@id="megamenu-notification-button"]
752 click element xpath=//*[@id="notification-history-link"]
753 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
754 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
755 log ${AdminCategoryMsg}
756 [Return] ${AdminCategoryMsg}
757
758
kishorebbca0cf2017-10-09 16:59:38 -0500759Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500760 [Documentation] Logout from Portal GUI
761 Click Element xpath=//div[@id='header-user-icon']
762 Click Button xpath=//button[contains(.,'Log out')]
763 Title Should Be Login
764
765
766
767Application admin Login To Portal GUI
768 [Documentation] Logs into Portal GUI
769 # Setup Browser Now being managed by test case
770 ##Setup Browser
771 Go To ${PORTAL_LOGIN_URL}
772 Maximize Browser Window
773 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
774 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
775 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
776 # Handle Proxy Warning
777 Title Should Be Login
778 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
779 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
780 Click Link xpath=//a[@id='loginBtn']
781 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
782 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
783
784Application Admin Navigation Application Link Tab
785 [Documentation] Logs into Portal GUI as application admin
786 Click Link xpath=//a[@id='parent-item-Home']
787 Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1]
788 Page Should Contain Welcome to VID
789 Click Element xpath=//i[@class='ion-close-round']
790 Click Element xpath=(.//span[@id='tab-Home'])[1]
791
792
793Application Admin Navigation Functional Menu
794 [Documentation] Logs into Portal GUI as application admin
795 Click Link xpath=//a[contains(.,'Manage')]
796 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
797 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
798 Page Should Contain Welcome to VID
799 Click Element xpath=//i[@class='ion-close-round']
800 Click Element xpath=(.//span[@id='tab-Home'])[1]
801
802
803Application admin Add Standard User Existing user
804 [Documentation] Naviage to Users tab
805 Click Link xpath=//a[@title='Users']
806 Page Should Contain Users
807 Click Button xpath=//button[@ng-click='toggleSidebar()']
808 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
809 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
810 Click Button xpath=//button[@id='button-search-users']
811 Click Element xpath=//span[@id='result-uuid-0']
812 Click Button xpath=//button[@id='next-button']
kishorebbca0cf2017-10-09 16:59:38 -0500813 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
814 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500815 Set Selenium Implicit Wait 3000
816 Click Button xpath=//button[@id='new-user-save-button']
817 Set Selenium Implicit Wait 3000
818 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishorebbca0cf2017-10-09 16:59:38 -0500819 #Select From List xpath=//input[@value='Select application'] DMaaP Bus Ctrl
kishore6eebdba2017-10-03 11:12:57 -0500820 #Click Link xpath=//a[@title='Users']
821 #Page Should Contain Users
822 Go To ${PORTAL_HOME_PAGE}
823 Set Selenium Implicit Wait 3000
824 Click Link xpath=//a[@title='Users']
825 Click Element xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500826 Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500827 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
828 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
829
830
831Application admin Edit Standard User Existing user
832 [Documentation] Naviage to Users tab
833 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishorebbca0cf2017-10-09 16:59:38 -0500834 Click Element xpath=//*[@id='div-app-name-dropdown-DMaaP-Bus-Ctrl']
835 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='Standard-User-checkbox']
836 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500837 Set Selenium Implicit Wait 3000
838 Click Button xpath=//button[@id='new-user-save-button']
839 Set Selenium Implicit Wait 3000
840 Page Should Contain Users
841 #Click Button xpath=//input[@id='dropdown1']
kishorebbca0cf2017-10-09 16:59:38 -0500842 #Click Element xpath=//li[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500843 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
844 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
845
846
847Application admin Delete Standard User Existing user
848 [Documentation] Naviage to Users tab
849 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishorebbca0cf2017-10-09 16:59:38 -0500850 Scroll Element Into View xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::*[@id='app-item-delete'][1]
851 Click Element xpath=//*[@id='div-app-name-DMaaP-Bus-Ctrl']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500852 Click Element xpath=//button[@id='div-confirm-ok-button']
853 Click Button xpath=//button[@id='new-user-save-button']
854 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
855 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
856 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
857
858
859
860Application admin Logout from Portal GUI
861 [Documentation] Logout from Portal GUI
862 Click Element xpath=//div[@id='header-user-icon']
863 Click Button xpath=//button[contains(.,'Log out')]
864 #Confirm Action
865 Title Should Be Login
866
867
868Standared user Login To Portal GUI
869 [Documentation] Logs into Portal GUI
870 # Setup Browser Now being managed by test case
871 ##Setup Browser
872 Go To ${PORTAL_LOGIN_URL}
873 Maximize Browser Window
874 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
875 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
876 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
877 # Handle Proxy Warning
878 Title Should Be Login
879 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
880 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
881 Click Link xpath=//a[@id='loginBtn']
882 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
883 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
884
885
886Standared user Navigation Application Link Tab
887 [Documentation] Logs into Portal GUI as application admin
888 #Portal admin Go To Portal HOME
889 Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1]
890 Page Should Contain Welcome to VID
891 Click Element xpath=(.//span[@id='tab-Home'])[1]
892
893
894Standared user Navigation Functional Menu
895 [Documentation] Logs into Portal GUI as application admin
896 Click Link xpath=//a[contains(.,'Manage')]
897 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
898 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
899 Page Should Contain Welcome to VID
900 Click Element xpath=(.//span[@id='tab-Home'])[1]
901
902
903
904Standared user Broadcast Notifications
905 [Documentation] Logs into Portal GUI as application admin
906 [Arguments] ${AdminBroadCastMsg}
907 Click element xpath=//*[@id='megamenu-notification-button']
908 Click element xpath=//*[@id='notification-history-link']
909 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
910 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
911 log ${AdminBroadCastMsg}
912
913
914Standared user Category Notifications
915 [Documentation] Logs into Portal GUI as application admin
916 [Arguments] ${AdminCategoryMsg}
917 #click element xpath=//*[@id='megamenu-notification-button']
918 #click element xpath=//*[@id="notification-history-link"]
919 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
920 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
921 log ${AdminCategoryMsg}
922
923
924Standared user Logout from Portal GUI
925 [Documentation] Logout from Portal GUI
926 Click Element xpath=//div[@id='header-user-icon']
927 Click Button xpath=//button[contains(.,'Log out')]
928 #Confirm Action
929 Title Should Be Login
930
931
932
933
934Tear Down
935 [Documentation] Close all browsers
936 Close All Browsers
937
938
939Enhanced Notification on ONAP Portal
940 [Documentation] Runs portal Post request
941 [Arguments] ${data_path} ${data}
kishorebbca0cf2017-10-09 16:59:38 -0500942# Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -0500943 ${session}= Create Session portal ${PORTAL_URL}
944 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
945 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
946# Log Received response from portal ${resp.text}
947 [Return] ${resp}
948
949
950
951Notification on ONAP Portal
952 [Documentation] Create Config portal
953 ${configportal}= Create Dictionary jira_id=${jira}
954 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
955 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
956 Should Be Equal As Strings ${post_resp.status_code} 200
957
958
959
960
961Portal Application Account Management
962 [Documentation] Naviage to Application Account Management tab
963 Click Link xpath=//a[@title='App Account Management']
964 Click Button xpath=//button[@id='account-onboarding-button-add']
965 Input Text xpath=//input[@name='name'] JIRA
966 Input Text xpath=//input[@name='username'] jira
967 Input Text xpath=//input[@name='password'] _pass
968 Input Text xpath=//input[@name='repassword'] _pass
969 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
970 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
971
972Portal Application Account Management validation
973 [Documentation] Naviage to user notification tab
974 Click Link xpath=//a[@id='parent-item-User-Notifications']
975 click element xpath=//*[@id="megamenu-notification-button"]
976 Click element xpath=//*[@id="notification-history-link"]
977 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
978 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
979
980
981Portal AAF new fields
982 [Documentation] Naviage to user Application details tab
983 Click Link xpath=//a[@title='Application Onboarding']
kishorebbca0cf2017-10-09 16:59:38 -0500984 Click Element xpath=//td[contains(.,'DMaaP Bus Ctrl')]
kishore6eebdba2017-10-03 11:12:57 -0500985 Page Should Contain Name Space
986 Page Should Contain Centralized
987 Click Element xpath=//button[@id='button-notification-cancel']
988
989
kishorebbca0cf2017-10-09 16:59:38 -0500990