blob: 70fdcf0d68474c809f0892f9a47f6d38838b48e7 [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 ***
kishore4089a332017-10-18 17:02:53 -050017${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989
18${PORTAL_ENV} /ONAPPORTAL
kishore6eebdba2017-10-03 11:12:57 -050019${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
20${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
21${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
22${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
kishore5ea942b2017-10-14 22:19:45 -050023${App_First_Name} demoapp
kishore6eebdba2017-10-03 11:12:57 -050024${App_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050025${App_Email_Address} demoapp@onap.com
26${App_LoginID} demoapp
kishore6eebdba2017-10-03 11:12:57 -050027${App_Loginpwd} demo123456!
28${App_LoginPwdCheck} demo123456!
kishore5ea942b2017-10-14 22:19:45 -050029${Sta_First_Name} demosta
kishore6eebdba2017-10-03 11:12:57 -050030${Sta_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050031${Sta_Email_Address} demosta@onap.com
32${Sta_LoginID} demosta
kishore6eebdba2017-10-03 11:12:57 -050033${Sta_Loginpwd} demo123456!
34${Sta_LoginPwdCheck} demo123456!
35${Test_First_Name} portal
36${Test_Last_Name} demo
37${Test_Email_Address} portal@onap.com
38${Test_LoginID} portal
39${Test_Loginpwd} demo123456!
40${Test_LoginPwdCheck} demo123456!
41${Existing_User} portal
kishore4089a332017-10-18 17:02:53 -050042${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
kishore6eebdba2017-10-03 11:12:57 -050043${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
44${GLOBAL_APPLICATION_ID} robot-functional
45${GLOBAL_PORTAL_ADMIN_USER} demo
46${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
47${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
48${GLOBAL_SELENIUM_BROWSER} chrome
49${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
50${GLOBAL_SELENIUM_DELAY} 0
51${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
52${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
53${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
54${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
55${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
56${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
57${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
58${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
59${GLOBAL_BUILD_NUMBER} 0
60${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
61${jira} jira
kishore4089a332017-10-18 17:02:53 -050062${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050063${portal_Template} ${CURDIR}/portal.template
64
kishore328996f2017-09-08 17:15:42 -050065
66
67*** Test Cases ***
68
69Portal Health Check
70 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050071
72Login into Portal URL
73 Portal admin Login To Portal GUI
74
75Portal R1 Release
76 [Documentation] ONAP Portal R1 functionality test
77 Notification on ONAP Portal
78 Portal Application Account Management validation
79
80Portal R1 Release for AAF
81 [Documentation] ONAP Portal R1 functionality for AAF test
82 Portal AAF new fields
83
84Create Microse service onboarding
85 Portal admin Microservice Onboarding
kishore5ea942b2017-10-14 22:19:45 -050086
87
kishorebbca0cf2017-10-09 16:59:38 -050088Create Widget for all users
89 Portal Admin Create Widget for All users
90
91Delete Widget for all users
92 Portal Admin Delete Widget for All users
kishore5ea942b2017-10-14 22:19:45 -050093
kishorebbca0cf2017-10-09 16:59:38 -050094Create Widget for Application Roles
kishore5ea942b2017-10-14 22:19:45 -050095 Portal Admin Create Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -050096
kishore92d70d62017-10-11 14:51:31 -050097Delete Widget for Application Roles
kishore5ea942b2017-10-14 22:19:45 -050098 Portal Admin Delete Widget for Application Roles
99
kishorebbca0cf2017-10-09 16:59:38 -0500100Validate Functional Top Menu Get Access
101 Functional Top Menu Get Access
102
103Validate Functional Top Menu Contact Us
104 Functional Top Menu Contact Us
105
106Edit Functional Menu
107 Portal admin Edit Functional menu
108
109
110Broadbond Notification functionality
111 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
112 set global variable ${AdminBroadCastMsg}
113
114
kishore92d70d62017-10-11 14:51:31 -0500115Category Notification functionality
116 ${AdminCategoryMsg}= Portal Admin Category Notifications
kishore5ea942b2017-10-14 22:19:45 -0500117 set global variable ${AdminCategoryMsg}
118
119Create a Test user for Application Admin -Test
120 Portal admin Add Application admin User New user -Test
121
122Create a Test User for Apllication Admin
123 Portal admin Add Application admin User New user
124
125Add Application Admin for Existing User Test user
126 Portal admin Add Application Admin Exiting User -APPDEMO
127
128Create a Test user for Standared User
129 Portal admin Add Standard User New user
130
131Add Application Admin for Exisitng User
132 Portal admin Add Application Admin Exiting User
133
134Delete Application Admin for Exisitng User
135 Portal admin Delete Application Admin Existing User
136
137Add Standard User Role for Existing user
138 Portal admin Add Standard User Existing user
139
140Edit Standard User Role for Existing user
141 Portal admin Edit Standard User Existing user
142
143
144Delete Standard User Role for Existing user
145 Portal admin Delete Standard User Existing user
146
147
kishorebbca0cf2017-10-09 16:59:38 -0500148
149
150Logout from Portal GUI as Portal Admin
151 Portal admin Logout from Portal GUI
152
kishore5ea942b2017-10-14 22:19:45 -0500153Login To Portal GUI as APP Admin
154 Application admin Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500155
kishore5ea942b2017-10-14 22:19:45 -0500156
kishorebbca0cf2017-10-09 16:59:38 -0500157
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
kishore5ea942b2017-10-14 22:19:45 -0500161Add Standard User Role for Existing user as APP Admin
162 Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500163
kishore5ea942b2017-10-14 22:19:45 -0500164Edit Standard User Role for Existing user as APP Admin
165 Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500166
kishore5ea942b2017-10-14 22:19:45 -0500167Delete Standard User Role for Existing user as APP Admin
168 Application admin Delete Standard User Existing user
169
170#Navigate Application Link as APP Admin
171# Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500172
kishore5ea942b2017-10-14 22:19:45 -0500173Logout from Portal GUI as APP Admin
174 Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500175
176
kishore5ea942b2017-10-14 22:19:45 -0500177Login To Portal GUI as Standared User
178 Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500179
180#Navigate Application Link as Standared User
181# Standared user Navigation Application Link Tab
182
kishore92d70d62017-10-11 14:51:31 -0500183##Navigate Functional Link as Standared User
184## Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500185
kishore5ea942b2017-10-14 22:19:45 -0500186Broadcast Notifications Standared user
187 Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500188
kishore5ea942b2017-10-14 22:19:45 -0500189Category Notifications Standared user
190 Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500191
192
kishore328996f2017-09-08 17:15:42 -0500193Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500194 [Documentation] Close All Open browsers
195 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500196
197
198
199
200
201
202*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500203
204Setup Browser
205 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
206# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
207 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
208 Log Running with ${GLOBAL_SELENIUM_BROWSER}
209
210
211 Setup Browser Chrome
212 ${os}= Get Normalized Os
213 Log Normalized OS=${os}
214 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
215 Call Method ${chrome options} add_argument no-sandbox
216 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
217 Set To Dictionary ${dc} elementScrollBehavior 1
218 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
219 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
220
221Handle Proxy Warning
222 [Documentation] Handle Intermediate Warnings from Proxies
223 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
224 Return From Keyword if '${status}' != 'PASS'
225 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
226 Return From Keyword if '${status}' != 'PASS'
227 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
228 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
229 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
230 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
231
232
kishore6eebdba2017-10-03 11:12:57 -0500233Run Portal Health Check
234 [Documentation] Runs Portal Health check
235 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
236 Should Be Equal As Strings ${resp.status_code} 200
237 Should Be Equal As Strings ${resp.json()['statusCode']} 200
238Run Portal Get Request
239 [Documentation] Runs Portal Get request
240 [Arguments] ${data_path}
241 ${session}= Create Session portal ${PORTAL_URL}
242 ${uuid}= Generate UUID
243 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
244 ${resp}= Get Request portal ${data_path} headers=${headers}
245 Log Received response from portal ${resp.text}
246 [Return] ${resp}
247
248
249Portal admin Login To Portal GUI
250 [Documentation] Logs into Portal GUI
251 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500252# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500253 Start Virtual Display 1920 1080
254 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500255# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500256 Maximize Browser Window
257 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
258 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
259 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
260 # Handle Proxy Warning
261 Title Should Be Login
262 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
263 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
264 Click Link xpath=//a[@id='loginBtn']
265 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
266 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
267
268Portal admin Go To Portal HOME
269 [Documentation] Naviage to Portal Home
270 Go To ${PORTAL_HOME_URL}
271 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
272
273Portal admin User Notifications
274 [Documentation] Naviage to User notification tab
275 Click Link xpath=//a[@id='parent-item-User-Notifications']
276 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
277 Click Button xpath=//button[@id='button-openAddNewApp']
278 Click Button xpath=(//button[@id='undefined'])[1]
279 #Click Button xpath=//input[@id='datepicker-start']
280
281
282
283
284Portal admin Add Application Admin Exiting User
285 [Documentation] Naviage to Admins tab
286 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
287 Click Link xpath=//a[@title='Admins']
288 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
289 Page Should Contain Admins
290 Click Button xpath=//button[@ng-click='toggleSidebar()']
291 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500292 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500293 Click Button xpath=//button[@id='button-search-users']
294 Click Element xpath=//span[@id='result-uuid-0']
295 Click Button xpath=//button[@id='search-users-button-next']
296 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500297 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500298 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
299 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500300 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
301 Click Element xpath=//button[@id='admin-div-ok-button']
302 Click Element xpath=//button[@id='div-confirm-ok-button']
303 Get Selenium Implicit Wait
304 Click Link xpath=//a[@aria-label='Admins']
305 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500306 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500307 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500308 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
309 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500310 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500311
312
313Portal admin Delete Application Admin Existing User
314 [Documentation] Naviage to Admins tab
315 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500316 #Click Element xpath=(//span[contains(.,'demo')] )[1]
317 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500318 Click Element xpath=//button[@id='div-confirm-ok-button']
319 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
320 Click Element xpath=//button[@id='admin-div-ok-button']
321 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
322 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
323 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500324 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500325 Click Image xpath=//img[@alt='Onap Logo']
326 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500327
328
329Portal admin Add Application admin User New user
330 [Documentation] Naviage to Users tab
331 Click Link xpath=//a[@title='Users']
332 Page Should Contain Users
333 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500334 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500335 Click Button xpath=//button[@id='Create-New-User-button']
336 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
337 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
338 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
339 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
340 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
341 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
342 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
343 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500344 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
345 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
346 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500347 Set Selenium Implicit Wait 3000
348 Click Button xpath=//button[@id='new-user-save-button']
349 Set Selenium Implicit Wait 3000
350 Go To ${PORTAL_HOME_PAGE}
351 Click Link xpath=//a[@title='Users']
352 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500353 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500354 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
355 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500356 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
357 Click Image xpath=//img[@alt='Onap Logo']
358 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500359
360
361Portal admin Add Standard User New user
362 [Documentation] Naviage to Users tab
363 Click Link xpath=//a[@title='Users']
364 Page Should Contain Users
365 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500366 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500367 Click Button xpath=//button[@id='Create-New-User-button']
368 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
369 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
370 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
371 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
372 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
373 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
374 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
375 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500376 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
377 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
378 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500379 Set Selenium Implicit Wait 3000
380 Click Button xpath=//button[@id='new-user-save-button']
381 Set Selenium Implicit Wait 3000
382 Go To ${PORTAL_HOME_PAGE}
383 Click Link xpath=//a[@title='Users']
384 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500385 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500386 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
387 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500388 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
389 Click Image xpath=//img[@alt='Onap Logo']
390 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500391
392
393
394Portal admin Add Application admin User New user -Test
395 [Documentation] Naviage to Users tab
396 Click Link xpath=//a[@title='Users']
397 Page Should Contain Users
398 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500399 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500400 Click Button xpath=//button[@id='Create-New-User-button']
401 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
402 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
403 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
404 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
405 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
406 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
407 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500408 Click Button xpath=//button[@id='search-users-button-cancel']
409 Click Image xpath=//img[@alt='Onap Logo']
410 Set Selenium Implicit Wait 3000
411
412
413 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500414 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500415 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
416 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
417 #Set Selenium Implicit Wait 3000
418 #Click Button xpath=//button[@id='new-user-save-button']
419 #Set Selenium Implicit Wait 3000
420 #Go To ${PORTAL_HOME_PAGE}
421 #Click Link xpath=//a[@title='Users']
422 #Click Element xpath=//input[@id='dropdown1']
423 #Click Element xpath=//li[contains(.,'xDemo App')]
424 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500425 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
426 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500427
428
429
430Portal admin Add Application Admin Exiting User -APPDEMO
431 [Documentation] Naviage to Admins tab
432 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
433 Click Link xpath=//a[@title='Admins']
434 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
435 Page Should Contain Admins
436 Click Button xpath=//button[@ng-click='toggleSidebar()']
437 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
438 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
439 Click Button xpath=//button[@id='button-search-users']
440 Click Element xpath=//span[@id='result-uuid-0']
441 Click Button xpath=//button[@id='search-users-button-next']
442 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500443 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500444 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
445 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500446 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
447 Click Element xpath=//button[@id='admin-div-ok-button']
448 Click Element xpath=//button[@id='div-confirm-ok-button']
449 Get Selenium Implicit Wait
450 Click Link xpath=//a[@aria-label='Admins']
451 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500452 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500453 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500454 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
455 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
456 Click Image xpath=//img[@alt='Onap Logo']
457 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500458
459
460
461
462
463
464
465Portal admin Add Standard User Existing user
466 [Documentation] Naviage to Users tab
467 Click Link xpath=//a[@title='Users']
468 Page Should Contain Users
469 Click Button xpath=//button[@ng-click='toggleSidebar()']
470 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
471 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
472 Click Button xpath=//button[@id='button-search-users']
473 Click Element xpath=//span[@id='result-uuid-0']
474 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500475 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
476 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500477 #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
478 #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500479 Set Selenium Implicit Wait 3000
480 Click Button xpath=//button[@id='new-user-save-button']
481 Set Selenium Implicit Wait 3000
482 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500483 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500484 #Click Link xpath=//a[@title='Users']
485 #Page Should Contain Users
486 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500487 Go To ${PORTAL_HOME_PAGE}
488 Click Link xpath=//a[@title='Users']
489 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500490 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500491 #Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500492 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
493 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
kishore5ea942b2017-10-14 22:19:45 -0500494
kishore6eebdba2017-10-03 11:12:57 -0500495
496
497Portal admin Edit Standard User Existing user
498 [Documentation] Naviage to Users tab
499 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500500 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
501 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
502 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500503 Set Selenium Implicit Wait 3000
504 Click Button xpath=//button[@id='new-user-save-button']
505 Set Selenium Implicit Wait 3000
506 Page Should Contain Users
507 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500508 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500509 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
510 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
511
512
513 Portal admin Delete Standard User Existing user
514 [Documentation] Naviage to Users tab
515 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500516 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
517 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500518 Click Element xpath=//button[@id='div-confirm-ok-button']
519 Click Button xpath=//button[@id='new-user-save-button']
520 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
521 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore92d70d62017-10-11 14:51:31 -0500522 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal
523 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
kishore6eebdba2017-10-03 11:12:57 -0500524
525
526
527
528Functional Top Menu Get Access
529 [Documentation] Naviage to Support tab
530 Click Link xpath=//a[contains(.,'Support')]
531 Mouse Over xpath=//*[contains(text(),'Get Access')]
532 Click Link xpath=//a[contains(.,'Get Access')]
533 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
534
535
536Functional Top Menu Contact Us
537 [Documentation] Naviage to Support tab
538 Click Link xpath=//a[contains(.,'Support')]
539 Mouse Over xpath=//*[contains(text(),'Contact Us')]
540 Click Link xpath=//a[contains(.,'Contact Us')]
541 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
542 Click Image xpath=//img[@alt='Onap Logo']
543
544
545Portal admin Edit Functional menu
546 [Documentation] Naviage to Edit Functional menu tab
547 Click Link xpath=//a[@title='Edit Functional Menu']
548 Click Link xpath=.//*[@id='Manage']/div/a
549 Click Link xpath=.//*[@id='Design']/div/a
550 Click Link xpath=.//*[@id='Product_Design']/div/a
551 Open Context Menu xpath=//*[@id='Product_Design']/div/span
552 Click Link xpath=//a[@href='#add']
553 Input Text xpath=//input[@id='input-title'] ONAP Test
554 #Input Text xpath=//input[@id='input-url'] http://google.com
555 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500556 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
557 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500558 Input Text xpath=//input[@id='input-url'] http://google.com
559 Click Button xpath=//button[@id='button-save-continue']
560 #Click Button xpath=//div[@title='Select Roles']
561 Click Element xpath=//*[@id='app-select-Select Roles']
562 Click Element xpath=//input[@id='Standard-User-checkbox']
563 Click Element xpath=//button[@id='button-save-add']
564 Click Image xpath=//img[@alt='Onap Logo']
565 Set Selenium Implicit Wait 3000
566 Click Link xpath=//a[contains(.,'Manage')]
567 Mouse Over xpath=//*[contains(text(),'Design')]
568 Set Selenium Implicit Wait 3000
569 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
570 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500571 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500572 Click Link xpath=//a[@title='Edit Functional Menu']
573 Click Link xpath=.//*[@id='Manage']/div/a
574 Click Link xpath=.//*[@id='Design']/div/a
575 Click Link xpath=.//*[@id='Product_Design']/div/a
576 Open Context Menu xpath=//*[@id='ONAP_Test']
577 Click Link xpath=//a[@href='#delete']
578 Set Selenium Implicit Wait 3000
579 Click Element xpath=//button[@id='div-confirm-ok-button']
580 Click Image xpath=//img[@alt='Onap Logo']
581 Set Selenium Implicit Wait 3000
582 Click Link xpath=//a[contains(.,'Manage')]
583 Mouse Over xpath=//*[contains(text(),'Design')]
584 Set Selenium Implicit Wait 3000
585 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
586
587
588
589Portal admin Microservice Onboarding
590 [Documentation] Naviage to Edit Functional menu tab
591 Click Link xpath=//a[@title='Microservice Onboarding']
592 Click Button xpath=//button[@id='microservice-onboarding-button-add']
593 Input Text xpath=//input[@name='name'] Test Microservice
594 Input Text xpath=//*[@name='desc'] Test
595 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500596 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
597 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500598 Click Element xpath=//*[@name='desc']
599 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
600 Click Element xpath=//input[@id='microservice-details-input-security-type']
601 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
602 Click Element xpath=//li[contains(.,'Basic Authentication')]
603 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
604 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
605 Click Button xpath=//button[@id='microservice-details-save-button']
606 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
607 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
608
609
610
611Portal Admin Create Widget for All users
612 [Documentation] Naviage to Create Widget menu tab
613 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
614 Click Link xpath=//a[@title='Widget Onboarding']
615 Click Button xpath=//button[@ng-click='toggleSidebar()']
616 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500617 Input Text xpath=//*[@name='name'] ONAP-xDemo
618 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500619 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
620 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
621 Click Element xpath=//li[contains(.,'Test Microservice')]
622 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
623 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
624 Click Button xpath=//button[@id='widgets-details-save-button']
kishore92d70d62017-10-11 14:51:31 -0500625 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
626 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500627 Set Selenium Implicit Wait 3000
628 GO TO ${PORTAL_HOME_PAGE}
629
630
631Portal Admin Delete Widget for All users
632 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500633 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
634 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500635 #Click Image xpath=//img[@alt='Onap Logo']
636 Click Link xpath=//a[@title='Widget Onboarding']
637 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500638 Click Element xpath=//li[contains(.,'xDemo App')]
639 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
640 #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 -0500641 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500642 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500643 Click Element xpath=//button[@id='div-confirm-ok-button']
644 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500645 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500646 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500647 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500648 #Set Selenium Implicit Wait 3000
649
650
651Portal Admin Create Widget for Application Roles
652 [Documentation] Naviage to Create Widget menu tab
653 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
654 Click Link xpath=//a[@title='Widget Onboarding']
655 Click Button xpath=//button[@ng-click='toggleSidebar()']
656 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500657 Input Text xpath=//*[@name='name'] ONAP-xDemo
658 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500659 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
660 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
661 Click Element xpath=//li[contains(.,'Test Microservice')]
662 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500663 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500664 Click element xpath=//*[@name='desc']
665 click element xpath=//*[@id="app-select-Select Roles"]
666 click element xpath=//*[@id="Standard-User-checkbox"]
667 Click element xpath=//*[@name='desc']
668 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
669 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
670 Click Button xpath=//button[@id='widgets-details-save-button']
671 Click Image xpath=//img[@alt='Onap Logo']
672 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500673 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500674 Click Link xpath=//a[@title='Widget Onboarding']
675 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500676 Click Element xpath=//li[contains(.,'xDemo App')]
677 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500678 Set Selenium Implicit Wait 3000
679 GO TO ${PORTAL_HOME_PAGE}
680
681
682
683
kishore92d70d62017-10-11 14:51:31 -0500684Portal Admin Delete Widget for Application Roles
685 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
686 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500687 #Click Image xpath=//img[@alt='Onap Logo']
688 Click Link xpath=//a[@title='Widget Onboarding']
689 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500690 Click Element xpath=//li[contains(.,'xDemo App')]
691 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
692 #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 -0500693 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500694 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
695 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500696 Click Element xpath=//button[@id='div-confirm-ok-button']
697 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500698 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500699 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500700 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishorebbca0cf2017-10-09 16:59:38 -0500701 #Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500702
703
704
705Portal Admin Edit Widget
706 [Documentation] Naviage to Home tab
707 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
708 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
709 Set Browser Implicit Wait 8000
710 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
711 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
712 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
713 Input Text xpath=//input[@name='title'] ONAP_VID
714 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
715 Input Text xpath=//input[@id='widget-input-add-order'] 5
716 Click Link xpath=//a[contains(.,'Add New')]
717 Click Element xpath=//div[@id='close-button']
718 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
719 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
720 Click Element xpath=//div[@id='confirmation-button-next']
721 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
722 Click Link xpath=//a[@id='close-button']
723
724
725
726
727Portal Admin Broadcast Notifications
728 [Documentation] Portal Test Admin Broadcast Notifications
729 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
730 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
731 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
732 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
733 Click Image xpath=//img[@alt='Onap Logo']
734 Set Selenium Implicit Wait 3000
735 Click Link xpath=//*[@id="parent-item-User-Notifications"]
736 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
737 Click button xpath=//*[@id="button-openAddNewApp"]
738 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
739 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
740 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
741 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
742 click element xpath=//*[@id="button-notification-save"]
743 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
744 click element xpath=//*[@id="megamenu-notification-button"]
745 click element xpath=//*[@id="notification-history-link"]
746 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
747 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
748 log ${AdminBroadCastMsg}
749 [Return] ${AdminBroadCastMsg}
750
751Portal Admin Category Notifications
752 [Documentation] Portal Admin Broadcast Notifications
753 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
754 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
755 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
756 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
757 Click Link xpath=//a[@id='parent-item-Home']
758 Click Link xpath=//*[@id="parent-item-User-Notifications"]
759 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
760 Click button xpath=//*[@id="button-openAddNewApp"]
761 #Select Radio Button NO radio-button-no
762 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
763 #Select Radio Button //label[@class='radio'] radio-button-approles
764 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500765 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500766 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
767 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
768 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
769 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
770 click element xpath=//*[@id="button-notification-save"]
771 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
772 click element xpath=//*[@id="megamenu-notification-button"]
773 click element xpath=//*[@id="notification-history-link"]
774 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
775 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
776 log ${AdminCategoryMsg}
777 [Return] ${AdminCategoryMsg}
778
779
kishorebbca0cf2017-10-09 16:59:38 -0500780Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500781 [Documentation] Logout from Portal GUI
782 Click Element xpath=//div[@id='header-user-icon']
783 Click Button xpath=//button[contains(.,'Log out')]
784 Title Should Be Login
785
786
787
788Application admin Login To Portal GUI
789 [Documentation] Logs into Portal GUI
790 # Setup Browser Now being managed by test case
791 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500792# Go To ${PORTAL_LOGIN_URL}
793# Maximize Browser Window
794# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
795# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
796# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500797 # Handle Proxy Warning
798 Title Should Be Login
799 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
800 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
801 Click Link xpath=//a[@id='loginBtn']
802 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
803 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
804
805Application Admin Navigation Application Link Tab
806 [Documentation] Logs into Portal GUI as application admin
807 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500808 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
809 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500810 Scroll Element Into View xpath=//i[@class='ion-close-round']
811 Click Element xpath=//i[@class='ion-close-round']
812 Set Selenium Implicit Wait 3000
813 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500814
815
816Application Admin Navigation Functional Menu
817 [Documentation] Logs into Portal GUI as application admin
818 Click Link xpath=//a[contains(.,'Manage')]
819 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
820 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500821 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500822 Click Element xpath=//i[@class='ion-close-round']
823 Click Element xpath=(.//span[@id='tab-Home'])[1]
824
825
826Application admin Add Standard User Existing user
827 [Documentation] Naviage to Users tab
828 Click Link xpath=//a[@title='Users']
829 Page Should Contain Users
830 Click Button xpath=//button[@ng-click='toggleSidebar()']
831 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
832 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
833 Click Button xpath=//button[@id='button-search-users']
834 Click Element xpath=//span[@id='result-uuid-0']
835 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500836 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
837 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500838 Set Selenium Implicit Wait 3000
839 Click Button xpath=//button[@id='new-user-save-button']
840 Set Selenium Implicit Wait 3000
841 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500842 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500843 #Click Link xpath=//a[@title='Users']
844 #Page Should Contain Users
845 Go To ${PORTAL_HOME_PAGE}
846 Set Selenium Implicit Wait 3000
847 Click Link xpath=//a[@title='Users']
848 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500849 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500850 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
851 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
852
853
854Application admin Edit Standard User Existing user
855 [Documentation] Naviage to Users tab
856 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500857 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
858 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
859 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500860 Set Selenium Implicit Wait 3000
861 Click Button xpath=//button[@id='new-user-save-button']
862 Set Selenium Implicit Wait 3000
863 Page Should Contain Users
864 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500865 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500866 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
867 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
868
869
870Application admin Delete Standard User Existing user
871 [Documentation] Naviage to Users tab
872 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500873 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
874 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500875 Click Element xpath=//button[@id='div-confirm-ok-button']
876 Click Button xpath=//button[@id='new-user-save-button']
877 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
878 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
879 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore72d3adf2017-10-19 11:05:22 -0500880 #Click Image xpath=//img[@alt='Onap Logo']
881 #Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500882
883
884
885Application admin Logout from Portal GUI
886 [Documentation] Logout from Portal GUI
887 Click Element xpath=//div[@id='header-user-icon']
kishore72d3adf2017-10-19 11:05:22 -0500888 #Set Selenium Implicit Wait 3000
kishore82eb79a2017-10-31 08:04:25 -0500889 Click Button xpath=//button[contains(text(),'Log out')]
kishore72d3adf2017-10-19 11:05:22 -0500890 #Set Selenium Implicit Wait 3000
kishore4089a332017-10-18 17:02:53 -0500891 Title Should Be Login
892
893
894
kishore6eebdba2017-10-03 11:12:57 -0500895
896
897Standared user Login To Portal GUI
898 [Documentation] Logs into Portal GUI
899 # Setup Browser Now being managed by test case
900 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500901# Go To ${PORTAL_LOGIN_URL}
902# Maximize Browser Window
903# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
904# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
905# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500906 # Handle Proxy Warning
907 Title Should Be Login
908 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
909 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
910 Click Link xpath=//a[@id='loginBtn']
911 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
912 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
913
914
915Standared user Navigation Application Link Tab
916 [Documentation] Logs into Portal GUI as application admin
917 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -0500918 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
919 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500920 Click Element xpath=(.//span[@id='tab-Home'])[1]
921
922
923Standared user Navigation Functional Menu
924 [Documentation] Logs into Portal GUI as application admin
925 Click Link xpath=//a[contains(.,'Manage')]
926 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
927 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
928 Page Should Contain Welcome to VID
929 Click Element xpath=(.//span[@id='tab-Home'])[1]
930
931
932
933Standared user Broadcast Notifications
934 [Documentation] Logs into Portal GUI as application admin
935 [Arguments] ${AdminBroadCastMsg}
936 Click element xpath=//*[@id='megamenu-notification-button']
937 Click element xpath=//*[@id='notification-history-link']
938 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
939 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
940 log ${AdminBroadCastMsg}
941
942
943Standared user Category Notifications
944 [Documentation] Logs into Portal GUI as application admin
945 [Arguments] ${AdminCategoryMsg}
946 #click element xpath=//*[@id='megamenu-notification-button']
947 #click element xpath=//*[@id="notification-history-link"]
948 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
949 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
950 log ${AdminCategoryMsg}
951
952
953Standared user Logout from Portal GUI
954 [Documentation] Logout from Portal GUI
955 Click Element xpath=//div[@id='header-user-icon']
956 Click Button xpath=//button[contains(.,'Log out')]
957 #Confirm Action
958 Title Should Be Login
959
960
961
962
963Tear Down
964 [Documentation] Close all browsers
965 Close All Browsers
966
967
968Enhanced Notification on ONAP Portal
969 [Documentation] Runs portal Post request
970 [Arguments] ${data_path} ${data}
kishorebbca0cf2017-10-09 16:59:38 -0500971# Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -0500972 ${session}= Create Session portal ${PORTAL_URL}
973 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
974 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
975# Log Received response from portal ${resp.text}
976 [Return] ${resp}
977
978
979
980Notification on ONAP Portal
981 [Documentation] Create Config portal
982 ${configportal}= Create Dictionary jira_id=${jira}
983 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
984 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
985 Should Be Equal As Strings ${post_resp.status_code} 200
986
987
988
989
990Portal Application Account Management
991 [Documentation] Naviage to Application Account Management tab
992 Click Link xpath=//a[@title='App Account Management']
993 Click Button xpath=//button[@id='account-onboarding-button-add']
994 Input Text xpath=//input[@name='name'] JIRA
995 Input Text xpath=//input[@name='username'] jira
996 Input Text xpath=//input[@name='password'] _pass
997 Input Text xpath=//input[@name='repassword'] _pass
998 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
999 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1000
1001Portal Application Account Management validation
1002 [Documentation] Naviage to user notification tab
1003 Click Link xpath=//a[@id='parent-item-User-Notifications']
1004 click element xpath=//*[@id="megamenu-notification-button"]
1005 Click element xpath=//*[@id="notification-history-link"]
1006 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1007 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1008
1009
1010Portal AAF new fields
1011 [Documentation] Naviage to user Application details tab
1012 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001013 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001014 Page Should Contain Name Space
1015 Page Should Contain Centralized
1016 Click Element xpath=//button[@id='button-notification-cancel']
1017
1018
kishorebbca0cf2017-10-09 16:59:38 -05001019