blob: 42f88bf399ecffcdc816f7a29df769c1667c9294 [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://localhost:8989
18${PORTAL_URL} http://portal.api.simpledemo.openecomp.org:8989
kishore6eebdba2017-10-03 11:12:57 -050019${PORTAL_ENV} /ECOMPPORTAL
20${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
21${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
22${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
23${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
kishore5ea942b2017-10-14 22:19:45 -050024${App_First_Name} demoapp
kishore6eebdba2017-10-03 11:12:57 -050025${App_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050026${App_Email_Address} demoapp@onap.com
27${App_LoginID} demoapp
kishore6eebdba2017-10-03 11:12:57 -050028${App_Loginpwd} demo123456!
29${App_LoginPwdCheck} demo123456!
kishore5ea942b2017-10-14 22:19:45 -050030${Sta_First_Name} demosta
kishore6eebdba2017-10-03 11:12:57 -050031${Sta_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050032${Sta_Email_Address} demosta@onap.com
33${Sta_LoginID} demosta
kishore6eebdba2017-10-03 11:12:57 -050034${Sta_Loginpwd} demo123456!
35${Sta_LoginPwdCheck} demo123456!
36${Test_First_Name} portal
37${Test_Last_Name} demo
38${Test_Email_Address} portal@onap.com
39${Test_LoginID} portal
40${Test_Loginpwd} demo123456!
41${Test_LoginPwdCheck} demo123456!
42${Existing_User} portal
43${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck
44${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
45${GLOBAL_APPLICATION_ID} robot-functional
46${GLOBAL_PORTAL_ADMIN_USER} demo
47${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
48${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
49${GLOBAL_SELENIUM_BROWSER} chrome
50${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
51${GLOBAL_SELENIUM_DELAY} 0
52${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
53${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
54${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
55${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
56${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
57${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
58${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
59${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
60${GLOBAL_BUILD_NUMBER} 0
61${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
62${jira} jira
63${RESOURCE_PATH} ECOMPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050064${portal_Template} ${CURDIR}/portal.template
65
kishore328996f2017-09-08 17:15:42 -050066
67
68*** Test Cases ***
69
70Portal Health Check
71 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050072
73Login into Portal URL
74 Portal admin Login To Portal GUI
75
76Portal R1 Release
77 [Documentation] ONAP Portal R1 functionality test
78 Notification on ONAP Portal
79 Portal Application Account Management validation
80
81Portal R1 Release for AAF
82 [Documentation] ONAP Portal R1 functionality for AAF test
83 Portal AAF new fields
84
85Create Microse service onboarding
86 Portal admin Microservice Onboarding
kishore5ea942b2017-10-14 22:19:45 -050087
88
kishorebbca0cf2017-10-09 16:59:38 -050089Create 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
kishore5ea942b2017-10-14 22:19:45 -050094
kishorebbca0cf2017-10-09 16:59:38 -050095Create Widget for Application Roles
kishore5ea942b2017-10-14 22:19:45 -050096 Portal Admin Create Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -050097
kishore92d70d62017-10-11 14:51:31 -050098Delete Widget for Application Roles
kishore5ea942b2017-10-14 22:19:45 -050099 Portal Admin Delete Widget for Application Roles
100
kishorebbca0cf2017-10-09 16:59:38 -0500101Validate Functional Top Menu Get Access
102 Functional Top Menu Get Access
103
104Validate Functional Top Menu Contact Us
105 Functional Top Menu Contact Us
106
107Edit Functional Menu
108 Portal admin Edit Functional menu
109
110
111Broadbond Notification functionality
112 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
113 set global variable ${AdminBroadCastMsg}
114
115
kishore92d70d62017-10-11 14:51:31 -0500116Category Notification functionality
117 ${AdminCategoryMsg}= Portal Admin Category Notifications
kishore5ea942b2017-10-14 22:19:45 -0500118 set global variable ${AdminCategoryMsg}
119
120Create a Test user for Application Admin -Test
121 Portal admin Add Application admin User New user -Test
122
123Create a Test User for Apllication Admin
124 Portal admin Add Application admin User New user
125
126Add Application Admin for Existing User Test user
127 Portal admin Add Application Admin Exiting User -APPDEMO
128
129Create a Test user for Standared User
130 Portal admin Add Standard User New user
131
132Add Application Admin for Exisitng User
133 Portal admin Add Application Admin Exiting User
134
135Delete Application Admin for Exisitng User
136 Portal admin Delete Application Admin Existing User
137
138Add Standard User Role for Existing user
139 Portal admin Add Standard User Existing user
140
141Edit Standard User Role for Existing user
142 Portal admin Edit Standard User Existing user
143
144
145Delete Standard User Role for Existing user
146 Portal admin Delete Standard User Existing user
147
148
kishorebbca0cf2017-10-09 16:59:38 -0500149
150
151Logout from Portal GUI as Portal Admin
152 Portal admin Logout from Portal GUI
153
kishore5ea942b2017-10-14 22:19:45 -0500154Login To Portal GUI as APP Admin
155 Application admin Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500156
kishore5ea942b2017-10-14 22:19:45 -0500157
kishorebbca0cf2017-10-09 16:59:38 -0500158
kishore92d70d62017-10-11 14:51:31 -0500159##Navigate Functional Link as APP Admin
160## Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500161
kishore5ea942b2017-10-14 22:19:45 -0500162Add Standard User Role for Existing user as APP Admin
163 Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500164
kishore5ea942b2017-10-14 22:19:45 -0500165Edit Standard User Role for Existing user as APP Admin
166 Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500167
kishore5ea942b2017-10-14 22:19:45 -0500168Delete Standard User Role for Existing user as APP Admin
169 Application admin Delete Standard User Existing user
170
171#Navigate Application Link as APP Admin
172# Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500173
kishore5ea942b2017-10-14 22:19:45 -0500174Logout from Portal GUI as APP Admin
175 Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500176
177
kishore5ea942b2017-10-14 22:19:45 -0500178Login To Portal GUI as Standared User
179 Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500180
181#Navigate Application Link as Standared User
182# Standared user Navigation Application Link Tab
183
kishore92d70d62017-10-11 14:51:31 -0500184##Navigate Functional Link as Standared User
185## Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500186
kishore5ea942b2017-10-14 22:19:45 -0500187Broadcast Notifications Standared user
188 Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500189
kishore5ea942b2017-10-14 22:19:45 -0500190Category Notifications Standared user
191 Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500192
193
kishore328996f2017-09-08 17:15:42 -0500194Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500195 [Documentation] Close All Open browsers
196 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500197
198
199
200
201
202
203*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500204
205Setup Browser
206 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
207# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
208 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
209 Log Running with ${GLOBAL_SELENIUM_BROWSER}
210
211
212 Setup Browser Chrome
213 ${os}= Get Normalized Os
214 Log Normalized OS=${os}
215 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
216 Call Method ${chrome options} add_argument no-sandbox
217 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
218 Set To Dictionary ${dc} elementScrollBehavior 1
219 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
220 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
221
222Handle Proxy Warning
223 [Documentation] Handle Intermediate Warnings from Proxies
224 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
225 Return From Keyword if '${status}' != 'PASS'
226 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
227 Return From Keyword if '${status}' != 'PASS'
228 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
229 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
230 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
231 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
232
233
kishore6eebdba2017-10-03 11:12:57 -0500234Run Portal Health Check
235 [Documentation] Runs Portal Health check
236 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
237 Should Be Equal As Strings ${resp.status_code} 200
238 Should Be Equal As Strings ${resp.json()['statusCode']} 200
239Run Portal Get Request
240 [Documentation] Runs Portal Get request
241 [Arguments] ${data_path}
242 ${session}= Create Session portal ${PORTAL_URL}
243 ${uuid}= Generate UUID
244 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
245 ${resp}= Get Request portal ${data_path} headers=${headers}
246 Log Received response from portal ${resp.text}
247 [Return] ${resp}
248
249
250Portal admin Login To Portal GUI
251 [Documentation] Logs into Portal GUI
252 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500253# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500254 Start Virtual Display 1920 1080
255 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500256# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500257 Maximize Browser Window
258 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
259 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
260 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
261 # Handle Proxy Warning
262 Title Should Be Login
263 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
264 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
265 Click Link xpath=//a[@id='loginBtn']
266 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
267 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
268
269Portal admin Go To Portal HOME
270 [Documentation] Naviage to Portal Home
271 Go To ${PORTAL_HOME_URL}
272 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
273
274Portal admin User Notifications
275 [Documentation] Naviage to User notification tab
276 Click Link xpath=//a[@id='parent-item-User-Notifications']
277 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
278 Click Button xpath=//button[@id='button-openAddNewApp']
279 Click Button xpath=(//button[@id='undefined'])[1]
280 #Click Button xpath=//input[@id='datepicker-start']
281
282
283
284
285Portal admin Add Application Admin Exiting User
286 [Documentation] Naviage to Admins tab
287 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
288 Click Link xpath=//a[@title='Admins']
289 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
290 Page Should Contain Admins
291 Click Button xpath=//button[@ng-click='toggleSidebar()']
292 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500293 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500294 Click Button xpath=//button[@id='button-search-users']
295 Click Element xpath=//span[@id='result-uuid-0']
296 Click Button xpath=//button[@id='search-users-button-next']
297 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500298 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500299 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
300 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500301 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
302 Click Element xpath=//button[@id='admin-div-ok-button']
303 Click Element xpath=//button[@id='div-confirm-ok-button']
304 Get Selenium Implicit Wait
305 Click Link xpath=//a[@aria-label='Admins']
306 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500307 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500308 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500309 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
310 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500311 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500312
313
314Portal admin Delete Application Admin Existing User
315 [Documentation] Naviage to Admins tab
316 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500317 #Click Element xpath=(//span[contains(.,'demo')] )[1]
318 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500319 Click Element xpath=//button[@id='div-confirm-ok-button']
320 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
321 Click Element xpath=//button[@id='admin-div-ok-button']
322 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
323 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
324 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500325 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500326 Click Image xpath=//img[@alt='Onap Logo']
327 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500328
329
330Portal admin Add Application admin User New user
331 [Documentation] Naviage to Users tab
332 Click Link xpath=//a[@title='Users']
333 Page Should Contain Users
334 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500335 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500336 Click Button xpath=//button[@id='Create-New-User-button']
337 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
338 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
339 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
340 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
341 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
342 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
343 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
344 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500345 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
346 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
347 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500348 Set Selenium Implicit Wait 3000
349 Click Button xpath=//button[@id='new-user-save-button']
350 Set Selenium Implicit Wait 3000
351 Go To ${PORTAL_HOME_PAGE}
352 Click Link xpath=//a[@title='Users']
353 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500354 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500355 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
356 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500357 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
358 Click Image xpath=//img[@alt='Onap Logo']
359 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500360
361
362Portal admin Add Standard User New user
363 [Documentation] Naviage to Users tab
364 Click Link xpath=//a[@title='Users']
365 Page Should Contain Users
366 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500367 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500368 Click Button xpath=//button[@id='Create-New-User-button']
369 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
370 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
371 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
372 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
373 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
374 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
375 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
376 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500377 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
378 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
379 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500380 Set Selenium Implicit Wait 3000
381 Click Button xpath=//button[@id='new-user-save-button']
382 Set Selenium Implicit Wait 3000
383 Go To ${PORTAL_HOME_PAGE}
384 Click Link xpath=//a[@title='Users']
385 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500386 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500387 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
388 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500389 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
390 Click Image xpath=//img[@alt='Onap Logo']
391 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500392
393
394
395Portal admin Add Application admin User New user -Test
396 [Documentation] Naviage to Users tab
397 Click Link xpath=//a[@title='Users']
398 Page Should Contain Users
399 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500400 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500401 Click Button xpath=//button[@id='Create-New-User-button']
402 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
403 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
404 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
405 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
406 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
407 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
408 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500409 Click Button xpath=//button[@id='search-users-button-cancel']
410 Click Image xpath=//img[@alt='Onap Logo']
411 Set Selenium Implicit Wait 3000
412
413
414 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500415 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500416 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
417 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
418 #Set Selenium Implicit Wait 3000
419 #Click Button xpath=//button[@id='new-user-save-button']
420 #Set Selenium Implicit Wait 3000
421 #Go To ${PORTAL_HOME_PAGE}
422 #Click Link xpath=//a[@title='Users']
423 #Click Element xpath=//input[@id='dropdown1']
424 #Click Element xpath=//li[contains(.,'xDemo App')]
425 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500426 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
427 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500428
429
430
431Portal admin Add Application Admin Exiting User -APPDEMO
432 [Documentation] Naviage to Admins tab
433 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
434 Click Link xpath=//a[@title='Admins']
435 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
436 Page Should Contain Admins
437 Click Button xpath=//button[@ng-click='toggleSidebar()']
438 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
439 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
440 Click Button xpath=//button[@id='button-search-users']
441 Click Element xpath=//span[@id='result-uuid-0']
442 Click Button xpath=//button[@id='search-users-button-next']
443 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500444 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500445 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
446 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500447 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
448 Click Element xpath=//button[@id='admin-div-ok-button']
449 Click Element xpath=//button[@id='div-confirm-ok-button']
450 Get Selenium Implicit Wait
451 Click Link xpath=//a[@aria-label='Admins']
452 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500453 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500454 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500455 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
456 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
457 Click Image xpath=//img[@alt='Onap Logo']
458 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500459
460
461
462
463
464
465
466Portal admin Add Standard User Existing user
467 [Documentation] Naviage to Users tab
468 Click Link xpath=//a[@title='Users']
469 Page Should Contain Users
470 Click Button xpath=//button[@ng-click='toggleSidebar()']
471 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
472 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
473 Click Button xpath=//button[@id='button-search-users']
474 Click Element xpath=//span[@id='result-uuid-0']
475 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500476 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
477 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500478 #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
479 #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500480 Set Selenium Implicit Wait 3000
481 Click Button xpath=//button[@id='new-user-save-button']
482 Set Selenium Implicit Wait 3000
483 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500484 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500485 #Click Link xpath=//a[@title='Users']
486 #Page Should Contain Users
487 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500488 Go To ${PORTAL_HOME_PAGE}
489 Click Link xpath=//a[@title='Users']
490 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500491 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500492 #Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500493 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
494 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
kishore5ea942b2017-10-14 22:19:45 -0500495
kishore6eebdba2017-10-03 11:12:57 -0500496
497
498Portal admin Edit Standard User Existing user
499 [Documentation] Naviage to Users tab
500 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500501 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
502 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
503 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500504 Set Selenium Implicit Wait 3000
505 Click Button xpath=//button[@id='new-user-save-button']
506 Set Selenium Implicit Wait 3000
507 Page Should Contain Users
508 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500509 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500510 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
511 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
512
513
514 Portal admin Delete Standard User Existing user
515 [Documentation] Naviage to Users tab
516 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500517 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
518 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500519 Click Element xpath=//button[@id='div-confirm-ok-button']
520 Click Button xpath=//button[@id='new-user-save-button']
521 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
522 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore92d70d62017-10-11 14:51:31 -0500523 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal
524 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
kishore6eebdba2017-10-03 11:12:57 -0500525
526
527
528
529Functional Top Menu Get Access
530 [Documentation] Naviage to Support tab
531 Click Link xpath=//a[contains(.,'Support')]
532 Mouse Over xpath=//*[contains(text(),'Get Access')]
533 Click Link xpath=//a[contains(.,'Get Access')]
534 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
535
536
537Functional Top Menu Contact Us
538 [Documentation] Naviage to Support tab
539 Click Link xpath=//a[contains(.,'Support')]
540 Mouse Over xpath=//*[contains(text(),'Contact Us')]
541 Click Link xpath=//a[contains(.,'Contact Us')]
542 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
543 Click Image xpath=//img[@alt='Onap Logo']
544
545
546Portal admin Edit Functional menu
547 [Documentation] Naviage to Edit Functional menu tab
548 Click Link xpath=//a[@title='Edit Functional Menu']
549 Click Link xpath=.//*[@id='Manage']/div/a
550 Click Link xpath=.//*[@id='Design']/div/a
551 Click Link xpath=.//*[@id='Product_Design']/div/a
552 Open Context Menu xpath=//*[@id='Product_Design']/div/span
553 Click Link xpath=//a[@href='#add']
554 Input Text xpath=//input[@id='input-title'] ONAP Test
555 #Input Text xpath=//input[@id='input-url'] http://google.com
556 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500557 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
558 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500559 Input Text xpath=//input[@id='input-url'] http://google.com
560 Click Button xpath=//button[@id='button-save-continue']
561 #Click Button xpath=//div[@title='Select Roles']
562 Click Element xpath=//*[@id='app-select-Select Roles']
563 Click Element xpath=//input[@id='Standard-User-checkbox']
564 Click Element xpath=//button[@id='button-save-add']
565 Click Image xpath=//img[@alt='Onap Logo']
566 Set Selenium Implicit Wait 3000
567 Click Link xpath=//a[contains(.,'Manage')]
568 Mouse Over xpath=//*[contains(text(),'Design')]
569 Set Selenium Implicit Wait 3000
570 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
571 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500572 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500573 Click Link xpath=//a[@title='Edit Functional Menu']
574 Click Link xpath=.//*[@id='Manage']/div/a
575 Click Link xpath=.//*[@id='Design']/div/a
576 Click Link xpath=.//*[@id='Product_Design']/div/a
577 Open Context Menu xpath=//*[@id='ONAP_Test']
578 Click Link xpath=//a[@href='#delete']
579 Set Selenium Implicit Wait 3000
580 Click Element xpath=//button[@id='div-confirm-ok-button']
581 Click Image xpath=//img[@alt='Onap Logo']
582 Set Selenium Implicit Wait 3000
583 Click Link xpath=//a[contains(.,'Manage')]
584 Mouse Over xpath=//*[contains(text(),'Design')]
585 Set Selenium Implicit Wait 3000
586 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
587
588
589
590Portal admin Microservice Onboarding
591 [Documentation] Naviage to Edit Functional menu tab
592 Click Link xpath=//a[@title='Microservice Onboarding']
593 Click Button xpath=//button[@id='microservice-onboarding-button-add']
594 Input Text xpath=//input[@name='name'] Test Microservice
595 Input Text xpath=//*[@name='desc'] Test
596 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500597 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
598 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500599 Click Element xpath=//*[@name='desc']
600 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
601 Click Element xpath=//input[@id='microservice-details-input-security-type']
602 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
603 Click Element xpath=//li[contains(.,'Basic Authentication')]
604 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
605 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
606 Click Button xpath=//button[@id='microservice-details-save-button']
607 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
608 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
609
610
611
612Portal Admin Create Widget for All users
613 [Documentation] Naviage to Create Widget menu tab
614 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
615 Click Link xpath=//a[@title='Widget Onboarding']
616 Click Button xpath=//button[@ng-click='toggleSidebar()']
617 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500618 Input Text xpath=//*[@name='name'] ONAP-xDemo
619 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500620 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
621 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
622 Click Element xpath=//li[contains(.,'Test Microservice')]
623 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
624 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
625 Click Button xpath=//button[@id='widgets-details-save-button']
kishore92d70d62017-10-11 14:51:31 -0500626 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
627 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500628 Set Selenium Implicit Wait 3000
629 GO TO ${PORTAL_HOME_PAGE}
630
631
632Portal Admin Delete Widget for All users
633 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500634 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
635 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500636 #Click Image xpath=//img[@alt='Onap Logo']
637 Click Link xpath=//a[@title='Widget Onboarding']
638 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500639 Click Element xpath=//li[contains(.,'xDemo App')]
640 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
641 #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 -0500642 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500643 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500644 Click Element xpath=//button[@id='div-confirm-ok-button']
645 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500646 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500647 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500648 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500649 #Set Selenium Implicit Wait 3000
650
651
652Portal Admin Create Widget for Application Roles
653 [Documentation] Naviage to Create Widget menu tab
654 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip
655 Click Link xpath=//a[@title='Widget Onboarding']
656 Click Button xpath=//button[@ng-click='toggleSidebar()']
657 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500658 Input Text xpath=//*[@name='name'] ONAP-xDemo
659 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500660 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
661 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
662 Click Element xpath=//li[contains(.,'Test Microservice')]
663 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500664 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500665 Click element xpath=//*[@name='desc']
666 click element xpath=//*[@id="app-select-Select Roles"]
667 click element xpath=//*[@id="Standard-User-checkbox"]
668 Click element xpath=//*[@name='desc']
669 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
670 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
671 Click Button xpath=//button[@id='widgets-details-save-button']
672 Click Image xpath=//img[@alt='Onap Logo']
673 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500674 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500675 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 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500679 Set Selenium Implicit Wait 3000
680 GO TO ${PORTAL_HOME_PAGE}
681
682
683
684
kishore92d70d62017-10-11 14:51:31 -0500685Portal Admin Delete Widget for Application Roles
686 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
687 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500688 #Click Image xpath=//img[@alt='Onap Logo']
689 Click Link xpath=//a[@title='Widget Onboarding']
690 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500691 Click Element xpath=//li[contains(.,'xDemo App')]
692 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
693 #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 -0500694 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500695 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
696 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500697 Click Element xpath=//button[@id='div-confirm-ok-button']
698 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500699 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500700 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500701 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishorebbca0cf2017-10-09 16:59:38 -0500702 #Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500703
704
705
706Portal Admin Edit Widget
707 [Documentation] Naviage to Home tab
708 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
709 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
710 Set Browser Implicit Wait 8000
711 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
712 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
713 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
714 Input Text xpath=//input[@name='title'] ONAP_VID
715 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
716 Input Text xpath=//input[@id='widget-input-add-order'] 5
717 Click Link xpath=//a[contains(.,'Add New')]
718 Click Element xpath=//div[@id='close-button']
719 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
720 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
721 Click Element xpath=//div[@id='confirmation-button-next']
722 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
723 Click Link xpath=//a[@id='close-button']
724
725
726
727
728Portal Admin Broadcast Notifications
729 [Documentation] Portal Test Admin Broadcast Notifications
730 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
731 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
732 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
733 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
734 Click Image xpath=//img[@alt='Onap Logo']
735 Set Selenium Implicit Wait 3000
736 Click Link xpath=//*[@id="parent-item-User-Notifications"]
737 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
738 Click button xpath=//*[@id="button-openAddNewApp"]
739 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
740 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
741 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
742 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
743 click element xpath=//*[@id="button-notification-save"]
744 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
745 click element xpath=//*[@id="megamenu-notification-button"]
746 click element xpath=//*[@id="notification-history-link"]
747 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
748 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
749 log ${AdminBroadCastMsg}
750 [Return] ${AdminBroadCastMsg}
751
752Portal Admin Category Notifications
753 [Documentation] Portal Admin Broadcast Notifications
754 ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
755 ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
756 ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M
757 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
758 Click Link xpath=//a[@id='parent-item-Home']
759 Click Link xpath=//*[@id="parent-item-User-Notifications"]
760 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
761 Click button xpath=//*[@id="button-openAddNewApp"]
762 #Select Radio Button NO radio-button-no
763 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
764 #Select Radio Button //label[@class='radio'] radio-button-approles
765 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500766 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500767 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
768 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
769 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
770 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
771 click element xpath=//*[@id="button-notification-save"]
772 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
773 click element xpath=//*[@id="megamenu-notification-button"]
774 click element xpath=//*[@id="notification-history-link"]
775 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
776 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
777 log ${AdminCategoryMsg}
778 [Return] ${AdminCategoryMsg}
779
780
kishorebbca0cf2017-10-09 16:59:38 -0500781Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500782 [Documentation] Logout from Portal GUI
783 Click Element xpath=//div[@id='header-user-icon']
784 Click Button xpath=//button[contains(.,'Log out')]
785 Title Should Be Login
786
787
788
789Application admin Login To Portal GUI
790 [Documentation] Logs into Portal GUI
791 # Setup Browser Now being managed by test case
792 ##Setup Browser
793 Go To ${PORTAL_LOGIN_URL}
794 Maximize Browser Window
795 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
796 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
797 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
798 # Handle Proxy Warning
799 Title Should Be Login
800 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
801 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
802 Click Link xpath=//a[@id='loginBtn']
803 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
804 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
805
806Application Admin Navigation Application Link Tab
807 [Documentation] Logs into Portal GUI as application admin
808 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500809 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
810 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500811 Scroll Element Into View xpath=//i[@class='ion-close-round']
812 Click Element xpath=//i[@class='ion-close-round']
813 Set Selenium Implicit Wait 3000
814 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500815
816
817Application Admin Navigation Functional Menu
818 [Documentation] Logs into Portal GUI as application admin
819 Click Link xpath=//a[contains(.,'Manage')]
820 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
821 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500822 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500823 Click Element xpath=//i[@class='ion-close-round']
824 Click Element xpath=(.//span[@id='tab-Home'])[1]
825
826
827Application admin Add Standard User Existing user
828 [Documentation] Naviage to Users tab
829 Click Link xpath=//a[@title='Users']
830 Page Should Contain Users
831 Click Button xpath=//button[@ng-click='toggleSidebar()']
832 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
833 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
834 Click Button xpath=//button[@id='button-search-users']
835 Click Element xpath=//span[@id='result-uuid-0']
836 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500837 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
838 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500839 Set Selenium Implicit Wait 3000
840 Click Button xpath=//button[@id='new-user-save-button']
841 Set Selenium Implicit Wait 3000
842 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500843 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500844 #Click Link xpath=//a[@title='Users']
845 #Page Should Contain Users
846 Go To ${PORTAL_HOME_PAGE}
847 Set Selenium Implicit Wait 3000
848 Click Link xpath=//a[@title='Users']
849 Click Element 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] Standard User
853
854
855Application admin Edit 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 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
859 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
860 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500861 Set Selenium Implicit Wait 3000
862 Click Button xpath=//button[@id='new-user-save-button']
863 Set Selenium Implicit Wait 3000
864 Page Should Contain Users
865 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500866 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500867 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
868 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
869
870
871Application admin Delete Standard User Existing user
872 [Documentation] Naviage to Users tab
873 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
kishore92d70d62017-10-11 14:51:31 -0500874 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
875 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500876 Click Element xpath=//button[@id='div-confirm-ok-button']
877 Click Button xpath=//button[@id='new-user-save-button']
878 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
879 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
880 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore5ea942b2017-10-14 22:19:45 -0500881 Click Image xpath=//img[@alt='Onap Logo']
882 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500883
884
885
886Application admin Logout from Portal GUI
887 [Documentation] Logout from Portal GUI
888 Click Element xpath=//div[@id='header-user-icon']
889 Click Button xpath=//button[contains(.,'Log out')]
890 #Confirm Action
891 Title Should Be Login
892
893
894Standared user Login To Portal GUI
895 [Documentation] Logs into Portal GUI
896 # Setup Browser Now being managed by test case
897 ##Setup Browser
898 Go To ${PORTAL_LOGIN_URL}
899 Maximize Browser Window
900 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
901 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
902 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
903 # Handle Proxy Warning
904 Title Should Be Login
905 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
906 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
907 Click Link xpath=//a[@id='loginBtn']
908 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
909 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
910
911
912Standared user Navigation Application Link Tab
913 [Documentation] Logs into Portal GUI as application admin
914 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -0500915 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
916 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500917 Click Element xpath=(.//span[@id='tab-Home'])[1]
918
919
920Standared user Navigation Functional Menu
921 [Documentation] Logs into Portal GUI as application admin
922 Click Link xpath=//a[contains(.,'Manage')]
923 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
924 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
925 Page Should Contain Welcome to VID
926 Click Element xpath=(.//span[@id='tab-Home'])[1]
927
928
929
930Standared user Broadcast Notifications
931 [Documentation] Logs into Portal GUI as application admin
932 [Arguments] ${AdminBroadCastMsg}
933 Click element xpath=//*[@id='megamenu-notification-button']
934 Click element xpath=//*[@id='notification-history-link']
935 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
936 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
937 log ${AdminBroadCastMsg}
938
939
940Standared user Category Notifications
941 [Documentation] Logs into Portal GUI as application admin
942 [Arguments] ${AdminCategoryMsg}
943 #click element xpath=//*[@id='megamenu-notification-button']
944 #click element xpath=//*[@id="notification-history-link"]
945 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
946 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
947 log ${AdminCategoryMsg}
948
949
950Standared user Logout from Portal GUI
951 [Documentation] Logout from Portal GUI
952 Click Element xpath=//div[@id='header-user-icon']
953 Click Button xpath=//button[contains(.,'Log out')]
954 #Confirm Action
955 Title Should Be Login
956
957
958
959
960Tear Down
961 [Documentation] Close all browsers
962 Close All Browsers
963
964
965Enhanced Notification on ONAP Portal
966 [Documentation] Runs portal Post request
967 [Arguments] ${data_path} ${data}
kishorebbca0cf2017-10-09 16:59:38 -0500968# Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -0500969 ${session}= Create Session portal ${PORTAL_URL}
970 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
971 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
972# Log Received response from portal ${resp.text}
973 [Return] ${resp}
974
975
976
977Notification on ONAP Portal
978 [Documentation] Create Config portal
979 ${configportal}= Create Dictionary jira_id=${jira}
980 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
981 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
982 Should Be Equal As Strings ${post_resp.status_code} 200
983
984
985
986
987Portal Application Account Management
988 [Documentation] Naviage to Application Account Management tab
989 Click Link xpath=//a[@title='App Account Management']
990 Click Button xpath=//button[@id='account-onboarding-button-add']
991 Input Text xpath=//input[@name='name'] JIRA
992 Input Text xpath=//input[@name='username'] jira
993 Input Text xpath=//input[@name='password'] _pass
994 Input Text xpath=//input[@name='repassword'] _pass
995 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
996 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
997
998Portal Application Account Management validation
999 [Documentation] Naviage to user notification tab
1000 Click Link xpath=//a[@id='parent-item-User-Notifications']
1001 click element xpath=//*[@id="megamenu-notification-button"]
1002 Click element xpath=//*[@id="notification-history-link"]
1003 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1004 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1005
1006
1007Portal AAF new fields
1008 [Documentation] Naviage to user Application details tab
1009 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001010 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001011 Page Should Contain Name Space
1012 Page Should Contain Centralized
1013 Click Element xpath=//button[@id='button-notification-cancel']
1014
1015
kishorebbca0cf2017-10-09 16:59:38 -05001016