blob: 391866b761ca9d2957d6b4ed5885dd0fa35bd3e4 [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
kishore92d70d62017-10-11 14:51:31 -050098Delete Widget for Application Roles
99 Portal Admin Delete Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -0500100
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
kishore92d70d62017-10-11 14:51:31 -0500106
107#Create a Test User for Apllication Admin
108# Portal admin Add Application admin User New user
kishore328996f2017-09-08 17:15:42 -0500109
kishore92d70d62017-10-11 14:51:31 -0500110#Add Application Admin for Existing User Test user
kishorebbca0cf2017-10-09 16:59:38 -0500111# Portal admin Add Application Admin Exiting User -APPDEMO
kishore328996f2017-09-08 17:15:42 -0500112
kishorebbca0cf2017-10-09 16:59:38 -0500113#Add Application Admin for Exisitng User
114# Portal admin Add Application Admin Exiting User
115
116#Delete Application Admin for Exisitng User
117# Portal admin Delete Application Admin Existing User
kishore328996f2017-09-08 17:15:42 -0500118
kishorebbca0cf2017-10-09 16:59:38 -0500119#Add Standard User Role for Existing user
120# Portal admin Add Standard User Existing user
121
122#Edit Standard User Role for Existing user
123# Portal admin Edit Standard User Existing user
124
125
126#Delete Standard User Role for Existing user
127# Portal admin Delete Standard User Existing user
kishore328996f2017-09-08 17:15:42 -0500128
kishorebbca0cf2017-10-09 16:59:38 -0500129Validate Functional Top Menu Get Access
130 Functional Top Menu Get Access
131
132Validate Functional Top Menu Contact Us
133 Functional Top Menu Contact Us
134
135Edit Functional Menu
136 Portal admin Edit Functional menu
137
138
139Broadbond Notification functionality
140 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
141 set global variable ${AdminBroadCastMsg}
142
143
kishore92d70d62017-10-11 14:51:31 -0500144Category Notification functionality
145 ${AdminCategoryMsg}= Portal Admin Category Notifications
146 set global variable ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500147
148
149Logout from Portal GUI as Portal Admin
150 Portal admin Logout from Portal GUI
151
152#Login To Portal GUI as APP Admin
153# Application admin Login To Portal GUI
154
155#Navigate Application Link as APP Admin
156# Application Admin Navigation Application Link Tab
157
kishore92d70d62017-10-11 14:51:31 -0500158##Navigate Functional Link as APP Admin
159## Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500160
161#Add Standard User Role for Existing user as APP Admin
162# Application admin Add Standard User Existing user
163
164#Edit Standard User Role for Existing user as APP Admin
165# Application admin Edit Standard User Existing user
166
167#Delete Standard User Role for Existing user as APP Admin
168# Application admin Delete Standard User Existing user
169
170#Logout from Portal GUI as APP Admin
171# Application admin Logout from Portal GUI
172
173
174#Login To Portal GUI as Standared User
175# Standared user Login To Portal GUI
176
177#Navigate Application Link as Standared User
178# Standared user Navigation Application Link Tab
179
kishore92d70d62017-10-11 14:51:31 -0500180##Navigate Functional Link as Standared User
181## Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500182
183#Broadcast Notifications Standared user
184# Standared user Broadcast Notifications ${AdminBroadCastMsg}
185
186#Category Notifications Standared user
187# Standared user Category Notifications ${AdminCategoryMsg}
188
189
kishore328996f2017-09-08 17:15:42 -0500190Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500191 [Documentation] Close All Open browsers
192 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500193
194
195
196
197
198
199*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500200
201Setup Browser
202 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
203# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
204 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
205 Log Running with ${GLOBAL_SELENIUM_BROWSER}
206
207
208 Setup Browser Chrome
209 ${os}= Get Normalized Os
210 Log Normalized OS=${os}
211 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
212 Call Method ${chrome options} add_argument no-sandbox
213 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
214 Set To Dictionary ${dc} elementScrollBehavior 1
215 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
216 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
217
218Handle Proxy Warning
219 [Documentation] Handle Intermediate Warnings from Proxies
220 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
221 Return From Keyword if '${status}' != 'PASS'
222 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
223 Return From Keyword if '${status}' != 'PASS'
224 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
225 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
226 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
227 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
228
229
kishore6eebdba2017-10-03 11:12:57 -0500230Run Portal Health Check
231 [Documentation] Runs Portal Health check
232 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
233 Should Be Equal As Strings ${resp.status_code} 200
234 Should Be Equal As Strings ${resp.json()['statusCode']} 200
235Run Portal Get Request
236 [Documentation] Runs Portal Get request
237 [Arguments] ${data_path}
238 ${session}= Create Session portal ${PORTAL_URL}
239 ${uuid}= Generate UUID
240 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
241 ${resp}= Get Request portal ${data_path} headers=${headers}
242 Log Received response from portal ${resp.text}
243 [Return] ${resp}
244
245
246Portal admin Login To Portal GUI
247 [Documentation] Logs into Portal GUI
248 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500249# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500250 Start Virtual Display 1920 1080
251 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500252# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500253 Maximize Browser Window
254 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
255 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
256 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
257 # Handle Proxy Warning
258 Title Should Be Login
259 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
260 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
261 Click Link xpath=//a[@id='loginBtn']
262 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
263 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
264
265Portal admin Go To Portal HOME
266 [Documentation] Naviage to Portal Home
267 Go To ${PORTAL_HOME_URL}
268 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
269
270Portal admin User Notifications
271 [Documentation] Naviage to User notification tab
272 Click Link xpath=//a[@id='parent-item-User-Notifications']
273 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
274 Click Button xpath=//button[@id='button-openAddNewApp']
275 Click Button xpath=(//button[@id='undefined'])[1]
276 #Click Button xpath=//input[@id='datepicker-start']
277
278
279
280
281Portal admin Add Application Admin Exiting User
282 [Documentation] Naviage to Admins tab
283 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
284 Click Link xpath=//a[@title='Admins']
285 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
286 Page Should Contain Admins
287 Click Button xpath=//button[@ng-click='toggleSidebar()']
288 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500289 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500290 Click Button xpath=//button[@id='button-search-users']
291 Click Element xpath=//span[@id='result-uuid-0']
292 Click Button xpath=//button[@id='search-users-button-next']
293 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500294 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore6eebdba2017-10-03 11:12:57 -0500295
kishore92d70d62017-10-11 14:51:31 -0500296 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
297 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500298 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
299 Click Element xpath=//button[@id='admin-div-ok-button']
300 Click Element xpath=//button[@id='div-confirm-ok-button']
301 Get Selenium Implicit Wait
302 Click Link xpath=//a[@aria-label='Admins']
303 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500304 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500305 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
306 Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500307 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500308
309
310Portal admin Delete Application Admin Existing User
311 [Documentation] Naviage to Admins tab
312 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500313 #Click Element xpath=(//span[contains(.,'demo')] )[1]
314 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500315 Click Element xpath=//button[@id='div-confirm-ok-button']
316 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
317 Click Element xpath=//button[@id='admin-div-ok-button']
318 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
319 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
320 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500321 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore6eebdba2017-10-03 11:12:57 -0500322
323
324Portal admin Add Application admin User New user
325 [Documentation] Naviage to Users tab
326 Click Link xpath=//a[@title='Users']
327 Page Should Contain Users
328 Click Button xpath=//button[@ng-click='toggleSidebar()']
329 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
330 Click Button xpath=//button[@id='Create-New-User-button']
331 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
332 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
333 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
334 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
335 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
336 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
337 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
338 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500339 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
340 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
341 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500342 Set Selenium Implicit Wait 3000
343 Click Button xpath=//button[@id='new-user-save-button']
344 Set Selenium Implicit Wait 3000
345 Go To ${PORTAL_HOME_PAGE}
346 Click Link xpath=//a[@title='Users']
347 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500348 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500349 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
350 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
351 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${App_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500352
353
354Portal admin Add Standard User New user
355 [Documentation] Naviage to Users tab
356 Click Link xpath=//a[@title='Users']
357 Page Should Contain Users
358 Click Button xpath=//button[@ng-click='toggleSidebar()']
359 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
360 Click Button xpath=//button[@id='Create-New-User-button']
361 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
362 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
363 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
364 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
365 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
366 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
367 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
368 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500369 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
370 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
371 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500372 Set Selenium Implicit Wait 3000
373 Click Button xpath=//button[@id='new-user-save-button']
374 Set Selenium Implicit Wait 3000
375 Go To ${PORTAL_HOME_PAGE}
376 Click Link xpath=//a[@title='Users']
377 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500378 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500379 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
380 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
381 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500382
383
384
385Portal admin Add Application admin User New user -Test
386 [Documentation] Naviage to Users tab
387 Click Link xpath=//a[@title='Users']
388 Page Should Contain Users
389 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishorebbca0cf2017-10-09 16:59:38 -0500390 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500391 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
392 Click Button xpath=//button[@id='Create-New-User-button']
393 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
394 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
395 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
396 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
397 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
398 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
399 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
400 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500401 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
402 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
403 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500404 Set Selenium Implicit Wait 3000
405 Click Button xpath=//button[@id='new-user-save-button']
406 Set Selenium Implicit Wait 3000
407 Go To ${PORTAL_HOME_PAGE}
408 Click Link xpath=//a[@title='Users']
409 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500410 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500411 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
412 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
413 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500414
415
416
417Portal admin Add Application Admin Exiting User -APPDEMO
418 [Documentation] Naviage to Admins tab
419 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
420 Click Link xpath=//a[@title='Admins']
421 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
422 Page Should Contain Admins
423 Click Button xpath=//button[@ng-click='toggleSidebar()']
424 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
425 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
426 Click Button xpath=//button[@id='button-search-users']
427 Click Element xpath=//span[@id='result-uuid-0']
428 Click Button xpath=//button[@id='search-users-button-next']
429 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500430 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore6eebdba2017-10-03 11:12:57 -0500431
kishore92d70d62017-10-11 14:51:31 -0500432 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
433 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500434 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
435 Click Element xpath=//button[@id='admin-div-ok-button']
436 Click Element xpath=//button[@id='div-confirm-ok-button']
437 Get Selenium Implicit Wait
438 Click Link xpath=//a[@aria-label='Admins']
439 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500440 Click Element xpath=//li[contains(.,'xDemo App' )]
kishorebbca0cf2017-10-09 16:59:38 -0500441
kishore6eebdba2017-10-03 11:12:57 -0500442 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
443 Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
444
445
446
447
448
449
450
451Portal admin Add Standard User Existing user
452 [Documentation] Naviage to Users tab
453 Click Link xpath=//a[@title='Users']
454 Page Should Contain Users
455 Click Button xpath=//button[@ng-click='toggleSidebar()']
456 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
457 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
458 Click Button xpath=//button[@id='button-search-users']
459 Click Element xpath=//span[@id='result-uuid-0']
460 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500461 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
462 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500463 #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
464 #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
465
466 Set Selenium Implicit Wait 3000
467 Click Button xpath=//button[@id='new-user-save-button']
468 Set Selenium Implicit Wait 3000
469 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500470 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500471 #Click Link xpath=//a[@title='Users']
472 #Page Should Contain Users
473 #Focus xpath=//input[@name='dropdown1']
474
475 Go To ${PORTAL_HOME_PAGE}
476 Click Link xpath=//a[@title='Users']
477 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500478 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500479 #Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500480 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
481 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
482
483
484Portal admin Edit Standard User Existing user
485 [Documentation] Naviage to Users tab
486 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500487 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
488 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
489 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500490 Set Selenium Implicit Wait 3000
491 Click Button xpath=//button[@id='new-user-save-button']
492 Set Selenium Implicit Wait 3000
493 Page Should Contain Users
494 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500495 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500496 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
497 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
498
499
500 Portal admin Delete Standard User Existing user
501 [Documentation] Naviage to Users tab
502 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500503 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
504 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500505 Click Element xpath=//button[@id='div-confirm-ok-button']
506 Click Button xpath=//button[@id='new-user-save-button']
507 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
508 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore92d70d62017-10-11 14:51:31 -0500509 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal
510 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
kishore6eebdba2017-10-03 11:12:57 -0500511
512
513
514
515Functional Top Menu Get Access
516 [Documentation] Naviage to Support tab
517 Click Link xpath=//a[contains(.,'Support')]
518 Mouse Over xpath=//*[contains(text(),'Get Access')]
519 Click Link xpath=//a[contains(.,'Get Access')]
520 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
521
522
523Functional Top Menu Contact Us
524 [Documentation] Naviage to Support tab
525 Click Link xpath=//a[contains(.,'Support')]
526 Mouse Over xpath=//*[contains(text(),'Contact Us')]
527 Click Link xpath=//a[contains(.,'Contact Us')]
528 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
529 Click Image xpath=//img[@alt='Onap Logo']
530
531
532Portal admin Edit Functional menu
533 [Documentation] Naviage to Edit Functional menu tab
534 Click Link xpath=//a[@title='Edit Functional Menu']
535 Click Link xpath=.//*[@id='Manage']/div/a
536 Click Link xpath=.//*[@id='Design']/div/a
537 Click Link xpath=.//*[@id='Product_Design']/div/a
538 Open Context Menu xpath=//*[@id='Product_Design']/div/span
539 Click Link xpath=//a[@href='#add']
540 Input Text xpath=//input[@id='input-title'] ONAP Test
541 #Input Text xpath=//input[@id='input-url'] http://google.com
542 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500543 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
544 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500545 Input Text xpath=//input[@id='input-url'] http://google.com
546 Click Button xpath=//button[@id='button-save-continue']
547 #Click Button xpath=//div[@title='Select Roles']
548 Click Element xpath=//*[@id='app-select-Select Roles']
549 Click Element xpath=//input[@id='Standard-User-checkbox']
550 Click Element xpath=//button[@id='button-save-add']
551 Click Image xpath=//img[@alt='Onap Logo']
552 Set Selenium Implicit Wait 3000
553 Click Link xpath=//a[contains(.,'Manage')]
554 Mouse Over xpath=//*[contains(text(),'Design')]
555 Set Selenium Implicit Wait 3000
556 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
557 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500558 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500559 Click Link xpath=//a[@title='Edit Functional Menu']
560 Click Link xpath=.//*[@id='Manage']/div/a
561 Click Link xpath=.//*[@id='Design']/div/a
562 Click Link xpath=.//*[@id='Product_Design']/div/a
563 Open Context Menu xpath=//*[@id='ONAP_Test']
564 Click Link xpath=//a[@href='#delete']
565 Set Selenium Implicit Wait 3000
566 Click Element xpath=//button[@id='div-confirm-ok-button']
567 Click Image xpath=//img[@alt='Onap Logo']
568 Set Selenium Implicit Wait 3000
569 Click Link xpath=//a[contains(.,'Manage')]
570 Mouse Over xpath=//*[contains(text(),'Design')]
571 Set Selenium Implicit Wait 3000
572 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
573
574
575
576Portal admin Microservice Onboarding
577 [Documentation] Naviage to Edit Functional menu tab
578 Click Link xpath=//a[@title='Microservice Onboarding']
579 Click Button xpath=//button[@id='microservice-onboarding-button-add']
580 Input Text xpath=//input[@name='name'] Test Microservice
581 Input Text xpath=//*[@name='desc'] Test
582 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500583 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
584 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500585 Click Element xpath=//*[@name='desc']
586 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
587 Click Element xpath=//input[@id='microservice-details-input-security-type']
588 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
589 Click Element xpath=//li[contains(.,'Basic Authentication')]
590 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
591 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
592 Click Button xpath=//button[@id='microservice-details-save-button']
593 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
594 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
595
596
597
598Portal Admin Create Widget for All users
599 [Documentation] Naviage to Create Widget menu tab
600 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
601 Click Link xpath=//a[@title='Widget Onboarding']
602 Click Button xpath=//button[@ng-click='toggleSidebar()']
603 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500604 Input Text xpath=//*[@name='name'] ONAP-xDemo
605 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500606 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
607 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
608 Click Element xpath=//li[contains(.,'Test Microservice')]
609 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
610 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
611 Click Button xpath=//button[@id='widgets-details-save-button']
kishore92d70d62017-10-11 14:51:31 -0500612 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
613 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500614 Set Selenium Implicit Wait 3000
615 GO TO ${PORTAL_HOME_PAGE}
616
617
618Portal Admin Delete Widget for All users
619 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500620 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
621 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500622 #Click Image xpath=//img[@alt='Onap Logo']
623 Click Link xpath=//a[@title='Widget Onboarding']
624 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500625 Click Element xpath=//li[contains(.,'xDemo App')]
626 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
627 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500628 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500629 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500630 Click Element xpath=//button[@id='div-confirm-ok-button']
631 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500632 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500633 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500634 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500635 #Set Selenium Implicit Wait 3000
636
637
638Portal Admin Create Widget for Application Roles
639 [Documentation] Naviage to Create Widget menu tab
640 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
641 Click Link xpath=//a[@title='Widget Onboarding']
642 Click Button xpath=//button[@ng-click='toggleSidebar()']
643 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500644 Input Text xpath=//*[@name='name'] ONAP-xDemo
645 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500646 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
647 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
648 Click Element xpath=//li[contains(.,'Test Microservice')]
649 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500650 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500651 Click element xpath=//*[@name='desc']
652 click element xpath=//*[@id="app-select-Select Roles"]
653 click element xpath=//*[@id="Standard-User-checkbox"]
654 Click element xpath=//*[@name='desc']
655 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
656 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
657 Click Button xpath=//button[@id='widgets-details-save-button']
658 Click Image xpath=//img[@alt='Onap Logo']
659 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500660 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500661 Click Link xpath=//a[@title='Widget Onboarding']
662 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500663 Click Element xpath=//li[contains(.,'xDemo App')]
664 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500665 Set Selenium Implicit Wait 3000
666 GO TO ${PORTAL_HOME_PAGE}
667
668
669
670
kishore92d70d62017-10-11 14:51:31 -0500671Portal Admin Delete Widget for Application Roles
672 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
673 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500674 #Click Image xpath=//img[@alt='Onap Logo']
675 Click Link xpath=//a[@title='Widget Onboarding']
676 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500677 Click Element xpath=//li[contains(.,'xDemo App')]
678 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
679 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500680 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500681 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
682 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500683 Click Element xpath=//button[@id='div-confirm-ok-button']
684 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500685 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500686 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500687 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishorebbca0cf2017-10-09 16:59:38 -0500688 #Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500689
690
691
692Portal Admin Edit Widget
693 [Documentation] Naviage to Home tab
694 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
695 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
696 Set Browser Implicit Wait 8000
697 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
698 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
699 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
700 Input Text xpath=//input[@name='title'] ONAP_VID
701 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
702 Input Text xpath=//input[@id='widget-input-add-order'] 5
703 Click Link xpath=//a[contains(.,'Add New')]
704 Click Element xpath=//div[@id='close-button']
705 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
706 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
707 Click Element xpath=//div[@id='confirmation-button-next']
708 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
709 Click Link xpath=//a[@id='close-button']
710
711
712
713
714Portal Admin Broadcast Notifications
715 [Documentation] Portal Test Admin Broadcast Notifications
716 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
717 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
718 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
719 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
720 Click Image xpath=//img[@alt='Onap Logo']
721 Set Selenium Implicit Wait 3000
722 Click Link xpath=//*[@id="parent-item-User-Notifications"]
723 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
724 Click button xpath=//*[@id="button-openAddNewApp"]
725 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
726 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
727 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
728 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
729 click element xpath=//*[@id="button-notification-save"]
730 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
731 click element xpath=//*[@id="megamenu-notification-button"]
732 click element xpath=//*[@id="notification-history-link"]
733 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
734 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
735 log ${AdminBroadCastMsg}
736 [Return] ${AdminBroadCastMsg}
737
738Portal Admin Category Notifications
739 [Documentation] Portal Admin Broadcast Notifications
740 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
741 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
742 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
743 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
744 Click Link xpath=//a[@id='parent-item-Home']
745 Click Link xpath=//*[@id="parent-item-User-Notifications"]
746 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
747 Click button xpath=//*[@id="button-openAddNewApp"]
748 #Select Radio Button NO radio-button-no
749 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
750 #Select Radio Button //label[@class='radio'] radio-button-approles
751 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500752 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500753 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
754 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
755 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
756 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
757 click element xpath=//*[@id="button-notification-save"]
758 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
759 click element xpath=//*[@id="megamenu-notification-button"]
760 click element xpath=//*[@id="notification-history-link"]
761 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
762 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
763 log ${AdminCategoryMsg}
764 [Return] ${AdminCategoryMsg}
765
766
kishorebbca0cf2017-10-09 16:59:38 -0500767Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500768 [Documentation] Logout from Portal GUI
769 Click Element xpath=//div[@id='header-user-icon']
770 Click Button xpath=//button[contains(.,'Log out')]
771 Title Should Be Login
772
773
774
775Application admin Login To Portal GUI
776 [Documentation] Logs into Portal GUI
777 # Setup Browser Now being managed by test case
778 ##Setup Browser
779 Go To ${PORTAL_LOGIN_URL}
780 Maximize Browser Window
781 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
782 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
783 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
784 # Handle Proxy Warning
785 Title Should Be Login
786 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
787 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
788 Click Link xpath=//a[@id='loginBtn']
789 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
790 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
791
792Application Admin Navigation Application Link Tab
793 [Documentation] Logs into Portal GUI as application admin
794 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500795 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
796 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500797 Click Element xpath=//i[@class='ion-close-round']
798 Click Element xpath=(.//span[@id='tab-Home'])[1]
799
800
801Application Admin Navigation Functional Menu
802 [Documentation] Logs into Portal GUI as application admin
803 Click Link xpath=//a[contains(.,'Manage')]
804 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
805 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500806 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500807 Click Element xpath=//i[@class='ion-close-round']
808 Click Element xpath=(.//span[@id='tab-Home'])[1]
809
810
811Application admin Add Standard User Existing user
812 [Documentation] Naviage to Users tab
813 Click Link xpath=//a[@title='Users']
814 Page Should Contain Users
815 Click Button xpath=//button[@ng-click='toggleSidebar()']
816 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
817 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
818 Click Button xpath=//button[@id='button-search-users']
819 Click Element xpath=//span[@id='result-uuid-0']
820 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500821 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
822 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500823 Set Selenium Implicit Wait 3000
824 Click Button xpath=//button[@id='new-user-save-button']
825 Set Selenium Implicit Wait 3000
826 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500827 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500828 #Click Link xpath=//a[@title='Users']
829 #Page Should Contain Users
830 Go To ${PORTAL_HOME_PAGE}
831 Set Selenium Implicit Wait 3000
832 Click Link xpath=//a[@title='Users']
833 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500834 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500835 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
836 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
837
838
839Application admin Edit Standard User Existing user
840 [Documentation] Naviage to Users tab
841 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500842 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
843 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
844 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500845 Set Selenium Implicit Wait 3000
846 Click Button xpath=//button[@id='new-user-save-button']
847 Set Selenium Implicit Wait 3000
848 Page Should Contain Users
849 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500850 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500851 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
852 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
853
854
855Application admin Delete Standard User Existing user
856 [Documentation] Naviage to Users tab
857 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500858 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
859 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500860 Click Element xpath=//button[@id='div-confirm-ok-button']
861 Click Button xpath=//button[@id='new-user-save-button']
862 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
863 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
864 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
865
866
867
868Application admin Logout from Portal GUI
869 [Documentation] Logout from Portal GUI
870 Click Element xpath=//div[@id='header-user-icon']
871 Click Button xpath=//button[contains(.,'Log out')]
872 #Confirm Action
873 Title Should Be Login
874
875
876Standared user Login To Portal GUI
877 [Documentation] Logs into Portal GUI
878 # Setup Browser Now being managed by test case
879 ##Setup Browser
880 Go To ${PORTAL_LOGIN_URL}
881 Maximize Browser Window
882 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
883 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
884 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
885 # Handle Proxy Warning
886 Title Should Be Login
887 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
888 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
889 Click Link xpath=//a[@id='loginBtn']
890 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
891 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
892
893
894Standared user Navigation Application Link Tab
895 [Documentation] Logs into Portal GUI as application admin
896 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -0500897 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
898 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500899 Click Element xpath=(.//span[@id='tab-Home'])[1]
900
901
902Standared user Navigation Functional Menu
903 [Documentation] Logs into Portal GUI as application admin
904 Click Link xpath=//a[contains(.,'Manage')]
905 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
906 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
907 Page Should Contain Welcome to VID
908 Click Element xpath=(.//span[@id='tab-Home'])[1]
909
910
911
912Standared user Broadcast Notifications
913 [Documentation] Logs into Portal GUI as application admin
914 [Arguments] ${AdminBroadCastMsg}
915 Click element xpath=//*[@id='megamenu-notification-button']
916 Click element xpath=//*[@id='notification-history-link']
917 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
918 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
919 log ${AdminBroadCastMsg}
920
921
922Standared user Category Notifications
923 [Documentation] Logs into Portal GUI as application admin
924 [Arguments] ${AdminCategoryMsg}
925 #click element xpath=//*[@id='megamenu-notification-button']
926 #click element xpath=//*[@id="notification-history-link"]
927 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
928 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
929 log ${AdminCategoryMsg}
930
931
932Standared user Logout from Portal GUI
933 [Documentation] Logout from Portal GUI
934 Click Element xpath=//div[@id='header-user-icon']
935 Click Button xpath=//button[contains(.,'Log out')]
936 #Confirm Action
937 Title Should Be Login
938
939
940
941
942Tear Down
943 [Documentation] Close all browsers
944 Close All Browsers
945
946
947Enhanced Notification on ONAP Portal
948 [Documentation] Runs portal Post request
949 [Arguments] ${data_path} ${data}
kishorebbca0cf2017-10-09 16:59:38 -0500950# Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -0500951 ${session}= Create Session portal ${PORTAL_URL}
952 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
953 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
954# Log Received response from portal ${resp.text}
955 [Return] ${resp}
956
957
958
959Notification on ONAP Portal
960 [Documentation] Create Config portal
961 ${configportal}= Create Dictionary jira_id=${jira}
962 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
963 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
964 Should Be Equal As Strings ${post_resp.status_code} 200
965
966
967
968
969Portal Application Account Management
970 [Documentation] Naviage to Application Account Management tab
971 Click Link xpath=//a[@title='App Account Management']
972 Click Button xpath=//button[@id='account-onboarding-button-add']
973 Input Text xpath=//input[@name='name'] JIRA
974 Input Text xpath=//input[@name='username'] jira
975 Input Text xpath=//input[@name='password'] _pass
976 Input Text xpath=//input[@name='repassword'] _pass
977 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
978 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
979
980Portal Application Account Management validation
981 [Documentation] Naviage to user notification tab
982 Click Link xpath=//a[@id='parent-item-User-Notifications']
983 click element xpath=//*[@id="megamenu-notification-button"]
984 Click element xpath=//*[@id="notification-history-link"]
985 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
986 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
987
988
989Portal AAF new fields
990 [Documentation] Naviage to user Application details tab
991 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -0500992 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500993 Page Should Contain Name Space
994 Page Should Contain Centralized
995 Click Element xpath=//button[@id='button-notification-cancel']
996
997
kishorebbca0cf2017-10-09 16:59:38 -0500998