2 Documentation This is RobotFrame work script
3 Library ExtendedSelenium2Library
4 Library OperatingSystem
5 Library RequestsLibrary
6 Library ONAPLibrary.Utilities
7 Library ONAPLibrary.Templating
14 ${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989
15 ${PORTAL_ENV} /ONAPPORTAL
16 ${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
17 ${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
18 ${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
19 ${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
20 ${App_First_Name} demoapp
22 ${App_Email_Address} demoapp@onap.com
23 ${App_LoginID} demoapp
24 ${App_Loginpwd} demo123456!
25 ${App_LoginPwdCheck} demo123456!
26 ${Sta_First_Name} demosta
28 ${Sta_Email_Address} demosta@onap.com
29 ${Sta_LoginID} demosta
30 ${Sta_Loginpwd} demo123456!
31 ${Sta_LoginPwdCheck} demo123456!
32 ${Test_First_Name} portal
33 ${Test_Last_Name} demo
34 ${Test_Email_Address} portal@onap.com
35 ${Test_LoginID} portal
36 ${Test_Loginpwd} demo123456!
37 ${Test_LoginPwdCheck} demo123456!
38 ${Existing_User} portal
39 ${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
40 ${PORTAL_XDEMPAPP_REST_URL} http://portal-sdk:8080/ONAPPORTALSDK/api/v2
41 ${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
42 ${GLOBAL_APPLICATION_ID} robot-functional
43 ${GLOBAL_PORTAL_ADMIN_USER} demo
44 ${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
45 ${AppAccountName} testApp
46 ${AppUserName} testApp
47 ${AppPassword} testApp123!
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} 45
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
63 ${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
64 ${portal_Template} portal.template
73 Run Portal Health Check
75 #Login into Portal URL
76 # Portal admin Login To Portal GUI
79 # # [Documentation] ONAP Portal R1 functionality test
80 # # Notification on ONAP Portal
81 # # Portal Application Account Management validation
83 #Portal Change REST URL Of X-DemoApp
84 # [Documentation] Portal Change REST URL Of X-DemoApp
85 # Portal Change REST URL
87 #Portal R1 Release for AAF
88 # [Documentation] ONAP Portal R1 functionality for AAF test
89 # Portal AAF new fields
91 #Create Microse service onboarding
92 # Portal admin Microservice Onboarding
94 ###Delete Microse service
95 # ##Portal admin Microservice Delete
97 #Create Widget for all users
98 # Portal Admin Create Widget for All users
100 #Delete Widget for all users
101 # Portal Admin Delete Widget for All users
103 #Create Widget for Application Roles
104 # Portal Admin Create Widget for Application Roles
106 ##Delete Widget for Application Roles
107 # #Portal Admin Delete Widget for Application Roles
109 ##EP Admin widget download
110 # #Admin widget download
112 #EP Admin widget layout reset
113 # Reset widget layout option
115 #Validate Functional Top Menu Get Access
116 # Functional Top Menu Get Access
118 #Validate Functional Top Menu Contact Us
119 # Functional Top Menu Contact Us
121 #Edit Functional Menu
122 # Portal admin Edit Functional menu
124 #Broadbond Notification functionality
125 # ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
126 # set global variable ${AdminBroadCastMsg}
128 #Category Notification functionality
129 # ${AdminCategoryMsg}= Portal Admin Category Notifications
130 # set global variable ${AdminCategoryMsg}
132 #Create a Test user for Application Admin -Test
133 # Portal admin Add Application admin User New user -Test
135 #Create a Test User for Apllication Admin
136 # Portal admin Add Application admin User New user
138 #Add Application Admin for Existing User Test user
139 # Portal admin Add Application Admin Exiting User -APPDEMO
141 #Create a Test user for Standared User
142 # Portal admin Add Standard User New user
144 #Add Application Admin for Exisitng User
145 # Portal admin Add Application Admin Exiting User
147 #Delete Application Admin for Exisitng User
148 # Portal admin Delete Application Admin Existing User
150 #Add Standard User Role for Existing user
151 # Portal admin Add Standard User Existing user
153 #Edit Standard User Role for Existing user
154 # Portal admin Edit Standard User Existing user
156 #Delete Standard User Role for Existing user
157 # Portal admin Delete Standard User Existing user
159 ##Add Account new account from App Account Management
160 # #Portal admin Add New Account
162 ##Delete Account new account from App Account Management
163 # #Portal admin Delete Account
165 ##EP Create Portal Admin
168 ##EP Portal Admin delete
169 # #Delete Portal Admin
171 #Logout from Portal GUI as Portal Admin
172 # Portal admin Logout from Portal GUI
174 ## Application Admin user Test cases
176 #Login To Portal GUI as APP Admin
177 # Application admin Login To Portal GUI
179 ##Navigate Functional Link as APP Admin
180 ##Application Admin Navigation Functional Menu
182 #Add Standard User Role for Existing user as APP Admin
183 # Application admin Add Standard User Existing user
185 #Edit Standard User Role for Existing user as APP Admin
186 # Application admin Edit Standard User Existing user
188 #Delete Standard User Role for Existing user as APP Admin
189 # Application admin Delete Standard User Existing user
191 ##Navigate Application Link as APP Admin
192 # #Application Admin Navigation Application Link Tab
194 #Logout from Portal GUI as APP Admin
195 # Application admin Logout from Portal GUI
197 ##Standard User Test cases
199 #Login To Portal GUI as Standared User
200 # Standared user Login To Portal GUI
202 ##Navigate Application Link as Standared User
203 # #Standared user Navigation Application Link Tab
205 ##Navigate Functional Link as Standared User
206 # #Standared user Navigation Functional Menu
208 ##Broadcast Notifications Standared user
209 # #Standared user Broadcast Notifications ${AdminBroadCastMsg}
211 ##Category Notifications Standared user
212 # #Standared user Category Notifications ${AdminCategoryMsg}
214 #Logout from Portal GUI as Standared User
215 # Standared User Logout from Portal GUI
218 [Documentation] Close All Open browsers
224 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
225 # Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
226 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
227 Log Running with ${GLOBAL_SELENIUM_BROWSER}
231 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
232 Call Method ${chrome options} add_argument no-sandbox
233 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
234 Set To Dictionary ${dc} elementScrollBehavior 1
235 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
236 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
239 [Documentation] Handle Intermediate Warnings from Proxies
240 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
241 Return From Keyword if '${status}' != 'PASS'
242 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
243 Return From Keyword if '${status}' != 'PASS'
244 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
245 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
246 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
247 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
250 Run Portal Health Check
251 [Documentation] Runs Portal Health check
252 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
253 Should Be Equal As Strings ${resp.status_code} 200
254 Should Be Equal As Strings ${resp.json()['statusCode']} 200
256 Run Portal Get Request
257 [Documentation] Runs Portal Get request
258 [Arguments] ${data_path}
259 ${session}= Create Session portal ${PORTAL_URL}
260 ${uuid}= Generate UUID4
261 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
262 ${resp}= Get Request portal ${data_path} headers=${headers}
263 Log Received response from portal ${resp.text}
267 Portal admin Login To Portal GUI
268 [Documentation] Logs into Portal GUI
269 ## Setup Browser Now being managed by test case
271 Start Virtual Display 1920 1080
272 Open Browser ${PORTAL_LOGIN_URL} chrome
273 # Go To ${PORTAL_LOGIN_URL}
274 Maximize Browser Window
275 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
276 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
277 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
278 # Handle Proxy Warning
279 Title Should Be Login
280 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
281 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
282 Click Link xpath=//a[@id='loginBtn']
283 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
284 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
285 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
287 Portal admin Go To Portal HOME
288 [Documentation] Naviage to Portal Home
289 Go To ${PORTAL_HOME_URL}
290 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
292 Portal admin User Notifications
293 [Documentation] Naviage to User notification tab
294 Click Link xpath=//a[@id='parent-item-User-Notifications']
295 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
296 Click Button xpath=//button[@id='button-openAddNewApp']
297 Click Button xpath=(//button[@id='undefined'])[1]
298 #Click Button xpath=//input[@id='datepicker-start']
300 Portal admin Add Application Admin Exiting User
301 [Documentation] Naviage to Admins tab
302 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
303 Click Link xpath=//a[@title='Admins']
304 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
305 Page Should Contain Admins
306 Click Button xpath=//button[@ng-click='toggleSidebar()']
307 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
308 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
309 Click Button xpath=//button[@id='button-search-users']
310 Click Element xpath=//span[@id='result-uuid-0']
311 Click Button xpath=//button[@id='search-users-button-next']
312 Click Button xpath=//input[@value='Select application']
313 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
314 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
315 # Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
316 # Click Element xpath=(//li[contains(.,'Default' )])[2]
317 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
318 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
319 Click Element xpath=//button[@id='admin-div-ok-button']
320 Click Element xpath=//button[@id='div-confirm-ok-button']
321 Get Selenium Implicit Wait
322 Click Link xpath=//a[@aria-label='Admins']
323 Click Element xpath=//input[@id='dropdown1']
324 # Click Element xpath=//li[contains(.,'Default' )]
325 Click Element xpath=//li[contains(.,'xDemo App' )]
326 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
327 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
328 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
329 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
332 Portal admin Delete Application Admin Existing User
333 [Documentation] Naviage to Admins tab
334 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
335 Click Link xpath=//a[@title='Admins']
336 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
337 Page Should Contain Admins
338 Click Button xpath=//button[@ng-click='toggleSidebar()']
339 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
340 Click Element xpath=(//span[contains(.,'portal')] )[1]
341 #Click Element xpath=(//span[contains(.,'demo')] )[1]
342 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
343 # Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
344 Click Element xpath=//button[@id='div-confirm-ok-button']
345 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
346 Click Element xpath=//button[@id='admin-div-ok-button']
347 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
348 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
349 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
350 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
351 Click Image xpath=//img[@alt='Onap Logo']
352 Set Selenium Implicit Wait 3000
355 Portal admin Add Application admin User New user
356 [Documentation] Naviage to Users tab
357 Click Link xpath=//a[@title='Users']
358 Page Should Contain Users
359 Click Button xpath=//button[@ng-click='toggleSidebar()']
360 Click Button xpath=//button[@id='users-button-add']
361 Click Button xpath=//button[@id='Create-New-User-button']
362 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
363 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
364 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
365 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
366 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
367 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
368 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
370 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
373 #${type_result}= Evaluate type(${Result})
376 Run Keyword if '${Result}'== 0 AdminUser does not exist already
377 ... ELSE Goto Home Image
378 Set Selenium Implicit Wait 3000
381 Click Image xpath=//img[@alt='Onap Logo']
383 AdminUser does not exist already
384 Click Button xpath=//button[@id='next-button']
385 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
386 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
387 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
388 Set Selenium Implicit Wait 3000
389 Click Button xpath=//button[@id='new-user-save-button']
390 Set Selenium Implicit Wait 3000
391 Go To ${PORTAL_HOME_PAGE}
392 Click Link xpath=//a[@title='Users']
393 Click Element xpath=//input[@id='dropdown1']
394 Click Element xpath=//li[contains(.,'xDemo App')]
395 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
396 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
397 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
398 Click Image xpath=//img[@alt='Onap Logo']
399 Set Selenium Implicit Wait 3000
402 Portal admin Add Standard User New user
403 [Documentation] Naviage to Users tab
404 Click Link xpath=//a[@title='Users']
405 Page Should Contain Users
406 Click Button xpath=//button[@ng-click='toggleSidebar()']
407 Click Button xpath=//button[@id='users-button-add']
408 Click Button xpath=//button[@id='Create-New-User-button']
409 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
410 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
411 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
412 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
413 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
414 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
415 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
417 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
420 #${type_result}= Evaluate type(${Result})
423 Run Keyword if '${Result}'== 0 StaUser does not exist already
424 ... ELSE Goto Home Image
425 Set Selenium Implicit Wait 3000
427 StaUser does not exist already
428 Click Button xpath=//button[@id='next-button']
429 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
430 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
431 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
432 Set Selenium Implicit Wait 3000
433 Click Button xpath=//button[@id='new-user-save-button']
434 Set Selenium Implicit Wait 3000
435 Go To ${PORTAL_HOME_PAGE}
436 Click Link xpath=//a[@title='Users']
437 Click Element xpath=//input[@id='dropdown1']
438 Click Element xpath=//li[contains(.,'xDemo App')]
439 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
440 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
441 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
442 Click Image xpath=//img[@alt='Onap Logo']
443 Set Selenium Implicit Wait 3000
447 Portal admin Add Application admin User New user -Test
448 [Documentation] Naviage to Users tab
449 Click Link xpath=//a[@title='Users']
450 Page Should Contain Users
451 Click Button xpath=//button[@ng-click='toggleSidebar()']
452 Click Button xpath=//button[@id='users-button-add']
453 Click Button xpath=//button[@id='Create-New-User-button']
454 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
455 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
456 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
457 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
458 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
459 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
460 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
461 Click Button xpath=//button[@id='search-users-button-cancel']
462 Click Image xpath=//img[@alt='Onap Logo']
463 Set Selenium Implicit Wait 3000
466 #Click Button xpath=//button[@id='next-button']
467 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
468 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
469 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
470 #Set Selenium Implicit Wait 3000
471 #Click Button xpath=//button[@id='new-user-save-button']
472 #Set Selenium Implicit Wait 3000
473 #Go To ${PORTAL_HOME_PAGE}
474 #Click Link xpath=//a[@title='Users']
475 #Click Element xpath=//input[@id='dropdown1']
476 #Click Element xpath=//li[contains(.,'xDemo App')]
477 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
478 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
479 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
481 Portal admin Add Application Admin Exiting User -APPDEMO
482 [Documentation] Naviage to Admins tab
483 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
484 Click Link xpath=//a[@title='Admins']
485 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
486 Page Should Contain Admins
487 Click Button xpath=//button[@ng-click='toggleSidebar()']
488 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
489 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
490 Click Button xpath=//button[@id='button-search-users']
491 Click Element xpath=//span[@id='result-uuid-0']
492 Click Button xpath=//button[@id='search-users-button-next']
493 Click Button xpath=//input[@value='Select application']
494 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
495 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
496 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
497 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
498 Click Element xpath=//button[@id='admin-div-ok-button']
499 Click Element xpath=//button[@id='div-confirm-ok-button']
500 Get Selenium Implicit Wait
501 Click Link xpath=//a[@aria-label='Admins']
502 Click Element xpath=//input[@id='dropdown1']
503 Click Element xpath=//li[contains(.,'xDemo App' )]
504 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
505 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
506 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
507 Click Image xpath=//img[@alt='Onap Logo']
508 Set Selenium Implicit Wait 3000
510 Portal admin Add Standard User Existing user
511 [Documentation] Naviage to Users tab
512 Click Link xpath=//a[@title='Users']
513 Page Should Contain Users
514 Click Button xpath=//button[@ng-click='toggleSidebar()']
515 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
516 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
517 Click Button xpath=//button[@id='button-search-users']
518 Click Element xpath=//span[@id='result-uuid-0']
519 Click Button xpath=//button[@id='next-button']
520 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
521 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
522 Click Element xpath=//div[@id='app-select-Select roles1']
523 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='Standard-User-checkbox']
524 Set Selenium Implicit Wait 3000
525 Click Button xpath=//button[@id='new-user-save-button']
526 Set Selenium Implicit Wait 3000
527 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
528 #Select From List xpath=//input[@value='Select application'] xDemo App
529 #Click Link xpath=//a[@title='Users']
530 #Page Should Contain Users
531 #Focus xpath=//input[@name='dropdown1']
532 Go To ${PORTAL_HOME_PAGE}
533 #Click Link xpath=//a[@title='Users']
534 #Click Element xpath=//input[@id='dropdown1']
535 # Click Element xpath=//li[contains(.,'Default')]
536 #Click Element xpath=//li[contains(.,'XDemo App')]
537 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
538 #Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
539 #Set Selenium Implicit Wait 3000
541 Portal admin Edit Standard User Existing user
542 [Documentation] Naviage to Users tab
543 Click Link xpath=//a[@title='Users']
544 Click Element xpath=//input[@id='dropdown1']
545 # Click Element xpath=//li[contains(.,'Default')]
546 # Set Selenium Implicit Wait 3000
547 Click Element xpath=//li[contains(.,'xDemo App')]
548 # Set Selenium Implicit Wait 3000
549 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
550 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
551 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
552 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
553 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
554 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
555 Click Element xpath=//*[@id='app-select-Standard User1']
556 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
557 Set Selenium Implicit Wait 3000
558 Click Button xpath=//button[@id='new-user-save-button']
559 Set Selenium Implicit Wait 3000
561 Page Should Contain Users
562 Click Button xpath=//button[@ng-click='toggleSidebar()']
563 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
564 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
565 Click Button xpath=//button[@id='button-search-users']
566 Click Element xpath=//span[@id='result-uuid-0']
567 Click Button xpath=//button[@id='next-button']
568 Click Element xpath=//div[@id='app-select-Select roles1']
569 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
570 Set Selenium Implicit Wait 3000
571 # Click Element xpath=//*[@id='app-select-Standard User1']
572 # Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
573 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
574 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
575 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
576 Set Selenium Implicit Wait 3000
577 Click Button xpath=//button[@id='new-user-save-button']
578 Set Selenium Implicit Wait 3000
579 Page Should Contain Users
580 #Click Button xpath=//input[@id='dropdown1']
581 #Click Element xpath=//li[contains(.,'xDemo App')]
582 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
583 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
584 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
585 Set Selenium Implicit Wait 3000
587 Portal admin Delete Standard User Existing user
588 [Documentation] Naviage to Users tab
589 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
590 # Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
591 # Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
592 Set Selenium Implicit Wait 9000
593 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
594 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
595 # Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
596 # Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
597 Click Element xpath=//button[@id='div-confirm-ok-button']
598 Click Button xpath=//button[@id='new-user-save-button']
599 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
600 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
601 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
602 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
603 Set Selenium Implicit Wait 3000
606 Functional Top Menu Get Access
607 [Documentation] Naviage to Support tab
608 Go To ${PORTAL_HOME_URL}
609 Click Link xpath=//a[contains(.,'Support')]
610 Mouse Over xpath=//*[contains(text(),'Get Access')]
611 Click Link xpath=//a[contains(.,'Get Access')]
612 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
613 Set Selenium Implicit Wait 3000
615 Functional Top Menu Contact Us
616 [Documentation] Naviage to Support tab
617 Click Link xpath=//a[contains(.,'Support')]
618 Mouse Over xpath=//*[contains(text(),'Contact Us')]
619 Click Link xpath=//a[contains(.,'Contact Us')]
620 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
621 Click Image xpath=//img[@alt='Onap Logo']
622 Set Selenium Implicit Wait 3000
624 Portal admin Edit Functional menu
625 [Documentation] Naviage to Edit Functional menu tab
626 Click Link xpath=//a[@title='Edit Functional Menu']
627 Click Link xpath=.//*[@id='Manage']/div/a
628 Click Link xpath=.//*[@id='Design']/div/a
629 Click Link xpath=.//*[@id='Product_Design']/div/a
630 Open Context Menu xpath=//*[@id='Product_Design']/div/span
631 Click Link xpath=//a[@href='#add']
632 Input Text xpath=//input[@id='input-title'] ONAP Test
633 #Input Text xpath=//input[@id='input-url'] http://google.com
634 Click Element xpath=//input[@id='select-app']
635 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
636 Click Element xpath=//li[contains(.,'xDemo App')]
637 Input Text xpath=//input[@id='input-url'] http://google.com
638 Click Button xpath=//button[@id='button-save-continue']
639 #Click Button xpath=//div[@title='Select Roles']
640 Click Element xpath=//*[@id='app-select-Select Roles']
641 Click Element xpath=//input[@id='Standard-User-checkbox']
642 Click Element xpath=//button[@id='button-save-add']
643 Click Image xpath=//img[@alt='Onap Logo']
644 Set Selenium Implicit Wait 3000
645 Click Link xpath=//a[contains(.,'Manage')]
646 Mouse Over xpath=//*[contains(text(),'Design')]
647 Set Selenium Implicit Wait 3000
648 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
649 Set Selenium Implicit Wait 3000
650 Click Image xpath=//img[@alt='Onap Logo']
651 Click Link xpath=//a[@title='Edit Functional Menu']
652 Click Link xpath=.//*[@id='Manage']/div/a
653 Click Link xpath=.//*[@id='Design']/div/a
654 Click Link xpath=.//*[@id='Product_Design']/div/a
655 Open Context Menu xpath=//*[@id='ONAP_Test']
656 Click Link xpath=//a[@href='#delete']
657 Set Selenium Implicit Wait 3000
658 Click Element xpath=//button[@id='div-confirm-ok-button']
659 Click Image xpath=//img[@alt='Onap Logo']
660 Set Selenium Implicit Wait 3000
661 Click Link xpath=//a[contains(.,'Manage')]
662 Mouse Over xpath=//*[contains(text(),'Design')]
663 Set Selenium Implicit Wait 3000
664 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
665 Set Selenium Implicit Wait 3000
666 Click Image xpath=//img[@alt='Onap Logo']
667 Set Selenium Implicit Wait 3000
669 Portal admin Microservice Onboarding
670 [Documentation] Naviage to Edit Functional menu tab
671 Click Link xpath=//a[@title='Microservice Onboarding']
672 Click Button xpath=//button[@id='microservice-onboarding-button-add']
673 Input Text xpath=//input[@name='name'] Test Microservice
674 Input Text xpath=//*[@name='desc'] Test
675 Click Element xpath=//input[@id='microservice-details-input-app']
676 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
677 Click Element xpath=//li[contains(.,'xDemo App')]
678 Click Element xpath=//*[@name='desc']
679 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
680 Click Element xpath=//input[@id='microservice-details-input-security-type']
681 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
682 Click Element xpath=//li[contains(.,'Basic Authentication')]
683 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
684 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
685 Click Button xpath=//button[@id='microservice-details-save-button']
686 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
687 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
688 Set Selenium Implicit Wait 3000
690 Portal admin Microservice Delete
691 [Documentation] Naviage to Edit Functional menu tab
692 Click Link xpath=//a[@title='Microservice Onboarding']
693 Click Button xpath=//button[@id='microservice-onboarding-button-add']
694 Input Text xpath=//input[@name='name'] TestMS
695 Input Text xpath=//*[@name='desc'] TestMS
696 Click Element xpath=//input[@id='microservice-details-input-app']
697 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
698 Click Element xpath=//li[contains(.,'xDemo App')]
699 Click Element xpath=//*[@name='desc']
700 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
701 Click Element xpath=//input[@id='microservice-details-input-security-type']
702 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
703 Click Element xpath=//li[contains(.,'Basic Authentication')]
704 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
705 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
706 Click Button xpath=//button[@id='microservice-details-save-button']
707 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
708 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
709 Click Button xpath=//button[@id="div-confirm-ok-button"]
710 Set Selenium Implicit Wait 3000
712 Portal Admin Create Widget for All users
713 [Documentation] Navigate to Create Widget menu tab
714 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
715 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
716 Click Link xpath=//a[@title='Widget Onboarding']
717 Click Button xpath=//button[@ng-click='toggleSidebar()']
718 Click Button xpath=//button[@id='widget-onboarding-button-add']
719 Input Text xpath=//*[@name='name'] ONAP-xDemo
720 Input Text xpath=//*[@name='desc'] ONAP xDemo
721 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
722 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
723 Click Element xpath=//li[contains(.,'News Microservice')]
724 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
725 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
726 Click Button xpath=//button[@id='widgets-details-save-button']
727 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
728 Page Should Contain ONAP-xDemo
729 Set Selenium Implicit Wait 3000
730 GO TO ${PORTAL_HOME_PAGE}
733 Portal Admin Delete Widget for All users
734 [Documentation] Naviage to delete Widget menu tab
735 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
736 #Page Should Contain ONAP-xDemo
737 #Click Image xpath=//img[@alt='Onap Logo']
738 Click Link xpath=//a[@title='Widget Onboarding']
739 Click Element xpath=//input[@id='dropdown1']
740 Click Element xpath=//li[contains(.,'xDemo App')]
741 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
742 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
743 Click Button xpath=//button[@ng-click='toggleSidebar()']
744 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
745 Click Element xpath=//button[@id='div-confirm-ok-button']
746 Set Selenium Implicit Wait 3000
747 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
748 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
749 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
750 #Set Selenium Implicit Wait 3000
752 Portal Admin Create Widget for Application Roles
753 [Documentation] Naviage to Create Widget menu tab
754 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
755 Click Link xpath=//a[@title='Widget Onboarding']
756 Click Button xpath=//button[@ng-click='toggleSidebar()']
757 Click Button xpath=//button[@id='widget-onboarding-button-add']
758 Input Text xpath=//*[@name='name'] ONAP-xDemo
759 Input Text xpath=//*[@name='desc'] ONAP xDemo
760 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
761 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
762 Click Element xpath=//li[contains(.,'News Microservice')]
763 Click element xpath=//*[@id="app-select-Select Applications"]
764 click element xpath=//*[@id="xDemo-App-checkbox"]
765 Click element xpath=//*[@name='desc']
766 click element xpath=//*[@id="app-select-Select Roles0"]
767 click element xpath=//*[@id="Standard-User-checkbox"]
768 Click element xpath=//*[@name='desc']
769 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
770 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
771 Click Button xpath=//button[@id='widgets-details-save-button']
772 Click Image xpath=//img[@alt='Onap Logo']
773 Set Selenium Implicit Wait 3000
774 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
775 Click Link xpath=//a[@title='Widget Onboarding']
776 Click Element xpath=//input[@id='dropdown1']
777 Click Element xpath=//li[contains(.,'xDemo App')]
778 Page Should Contain ONAP-xDemo
779 Set Selenium Implicit Wait 3000
780 GO TO ${PORTAL_HOME_PAGE}
782 Portal Admin Delete Widget for Application Roles
783 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
784 #Page Should Contain ONAP-xDemo
785 #Click Image xpath=//img[@alt='Onap Logo']
786 Click Link xpath=//a[@title='Widget Onboarding']
787 Click Element xpath=//input[@id='dropdown1']
788 Click Element xpath=//li[contains(.,'xDemo App')]
789 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
790 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
791 Click Button xpath=//button[@ng-click='toggleSidebar()']
792 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
793 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
794 Click Element xpath=//button[@id='div-confirm-ok-button']
795 Set Selenium Implicit Wait 3000
796 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
797 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
798 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
799 Set Selenium Implicit Wait 3000
803 Portal Admin Edit Widget
804 [Documentation] Naviage to Home tab
805 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
806 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
807 Set Browser Implicit Wait 8000
808 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
809 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
810 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
811 Input Text xpath=//input[@name='title'] ONAP_VID
812 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
813 Input Text xpath=//input[@id='widget-input-add-order'] 5
814 Click Link xpath=//a[contains(.,'Add New')]
815 Click Element xpath=//div[@id='close-button']
816 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
817 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
818 Click Element xpath=//div[@id='confirmation-button-next']
819 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
820 Click Link xpath=//a[@id='close-button']
821 Set Selenium Implicit Wait 3000
823 Portal Admin Broadcast Notifications
824 [Documentation] Portal Test Admin Broadcast Notifications
825 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
826 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
827 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
828 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
829 Go To ${PORTAL_HOME_URL}
830 Click Image xpath=//img[@alt='Onap Logo']
831 Set Selenium Implicit Wait 3000
832 Click Link xpath=//*[@id="parent-item-User-Notifications"]
833 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
834 Click button xpath=//*[@id="button-openAddNewApp"]
835 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
836 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
837 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
838 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
839 click element xpath=//*[@id="button-notification-save"]
840 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
841 click element xpath=//*[@id="megamenu-notification-button"]
842 click element xpath=//*[@id="notification-history-link"]
843 # Notification bug, Uncomment the code when PORTAL-232 is fixed
844 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
845 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
846 Set Selenium Implicit Wait 3000
847 log ${AdminBroadCastMsg}
848 [Return] ${AdminBroadCastMsg}
850 Portal Admin Category Notifications
851 [Documentation] Portal Admin Broadcast Notifications
852 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
853 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
854 # ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
855 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
856 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
857 Click Link xpath=//a[@id='parent-item-Home']
858 Click Link xpath=//*[@id="parent-item-User-Notifications"]
859 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
860 Click button xpath=//*[@id="button-openAddNewApp"]
861 #Select Radio Button NO radio-button-no
862 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
863 #Select Radio Button //label[@class='radio'] radio-button-approles
864 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
865 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
866 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
867 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
868 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
869 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
870 click element xpath=//*[@id="button-notification-save"]
871 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
872 click element xpath=//*[@id="megamenu-notification-button"]
873 click element xpath=//*[@id="notification-history-link"]
874 # Notification bug, Uncomment the code when PORTAL-232 is fixed
875 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
876 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
877 Set Selenium Implicit Wait 3000
878 log ${AdminCategoryMsg}
879 [Return] ${AdminCategoryMsg}
881 Portal admin Logout from Portal GUI
882 [Documentation] Logout from Portal GUI
883 Click Element xpath=//div[@id='header-user-icon']
884 Click Button xpath=//button[contains(.,'Log out')]
885 Title Should Be Login
887 Application admin Login To Portal GUI
888 [Documentation] Logs into Portal GUI
889 # Setup Browser Now being managed by test case
891 # Go To ${PORTAL_LOGIN_URL}
892 # Maximize Browser Window
893 # Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
894 # Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
895 # Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
896 # Handle Proxy Warning
897 Title Should Be Login
898 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
899 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
900 Click Link xpath=//a[@id='loginBtn']
901 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
902 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
904 Application Admin Navigation Application Link Tab
905 [Documentation] Logs into Portal GUI as application admin
906 Click Link xpath=//a[@id='parent-item-Home']
907 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
908 Page Should Contain ONAP Portal
909 Scroll Element Into View xpath=//i[@class='ion-close-round']
910 Click Element xpath=//i[@class='ion-close-round']
911 Set Selenium Implicit Wait 3000
912 #Click Element xpath=(.//span[@id='tab-Home'])[1]
915 Application Admin Navigation Functional Menu
916 [Documentation] Logs into Portal GUI as application admin
917 Click Link xpath=//a[contains(.,'Manage')]
918 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
919 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
920 Page Should Contain ONAP Portal
921 Click Element xpath=//i[@class='ion-close-round']
922 Click Element xpath=(.//span[@id='tab-Home'])[1]
925 Application admin Add Standard User Existing user
926 [Documentation] Naviage to Users tab
927 Click Link xpath=//a[@title='Users']
928 Page Should Contain Users
929 Click Button xpath=//button[@ng-click='toggleSidebar()']
930 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
931 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
932 Click Button xpath=//button[@id='button-search-users']
933 Click Element xpath=//span[@id='result-uuid-0']
934 Click Button xpath=//button[@id='next-button']
935 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
936 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
937 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
938 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
939 # Set Selenium Implicit Wait 3000
940 Click Button xpath=//button[@id='new-user-save-button']
941 Set Selenium Implicit Wait 3000
942 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
943 #Select From List xpath=//input[@value='Select application'] xDemo App
944 #Click Link xpath=//a[@title='Users']
945 #Page Should Contain Users
946 Go To ${PORTAL_HOME_PAGE}
947 Set Selenium Implicit Wait 3000
948 Click Link xpath=//a[@title='Users']
949 Click Element xpath=//input[@id='dropdown1']
950 #Click Element xpath=//li[contains(.,'Default')]
951 Click Element xpath=//li[contains(.,'xDemo App')]
952 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
953 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
954 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
956 Application admin Edit Standard User Existing user
957 [Documentation] Naviage to Users tab
958 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
959 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
960 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
961 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
962 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
963 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
964 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
965 Set Selenium Implicit Wait 3000
966 Click Button xpath=//button[@id='new-user-save-button']
967 Set Selenium Implicit Wait 3000
968 Page Should Contain Users
969 #Click Button xpath=//input[@id='dropdown1']
970 #Click Element xpath=//li[contains(.,'xDemo App')]
971 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
972 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
973 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
975 Application admin Delete Standard User Existing user
976 [Documentation] Naviage to Users tab
977 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
978 # Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
979 # Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
980 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
981 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
982 Click Element xpath=//button[@id='div-confirm-ok-button']
983 Click Button xpath=//button[@id='new-user-save-button']
984 # Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
985 # Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
986 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
987 #Click Image xpath=//img[@alt='Onap Logo']
988 Set Selenium Implicit Wait 3000
990 Application admin Logout from Portal GUI
991 [Documentation] Logout from Portal GUI
992 Click Element xpath=//div[@id='header-user-icon']
993 #Set Selenium Implicit Wait 3000
994 Click Button xpath=//button[contains(text(),'Log out')]
995 #Set Selenium Implicit Wait 3000
996 Title Should Be Login
998 Standared user Login To Portal GUI
999 [Documentation] Logs into Portal GUI
1000 # Setup Browser Now being managed by test case
1002 # Go To ${PORTAL_LOGIN_URL}
1003 # Maximize Browser Window
1004 # Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
1005 # Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
1006 # Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
1007 # Handle Proxy Warning
1008 Title Should Be Login
1009 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
1010 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
1011 Click Link xpath=//a[@id='loginBtn']
1012 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1013 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
1015 Standared user Navigation Application Link Tab
1016 [Documentation] Logs into Portal GUI as application admin
1017 #Portal admin Go To Portal HOME
1018 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
1019 Page Should Contain ONAP Portal
1020 Click Element xpath=(.//span[@id='tab-Home'])[1]
1021 Set Selenium Implicit Wait 3000
1023 Standared user Navigation Functional Menu
1024 [Documentation] Logs into Portal GUI as application admin
1025 Click Link xpath=//a[contains(.,'Manage')]
1026 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
1027 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
1028 Page Should Contain Welcome to VID
1029 Click Element xpath=(.//span[@id='tab-Home'])[1]
1030 Set Selenium Implicit Wait 3000
1033 Standared user Broadcast Notifications
1034 [Documentation] Logs into Portal GUI as application admin
1035 [Arguments] ${AdminBroadCastMsg}
1036 Click element xpath=//*[@id='megamenu-notification-button']
1037 Click element xpath=//*[@id='notification-history-link']
1038 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1039 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
1040 log ${AdminBroadCastMsg}
1043 Standared user Category Notifications
1044 [Documentation] Logs into Portal GUI as application admin
1045 [Arguments] ${AdminCategoryMsg}
1046 #click element xpath=//*[@id='megamenu-notification-button']
1047 #click element xpath=//*[@id="notification-history-link"]
1048 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1049 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1050 log ${AdminCategoryMsg}
1052 Standared user Logout from Portal GUI
1053 [Documentation] Logout from Portal GUI
1054 Click Element xpath=//div[@id='header-user-icon']
1055 Click Button xpath=//button[contains(.,'Log out')]
1057 Title Should Be Login
1059 Portal admin Add New Account
1060 Click Link //*[@id="parent-item-App-Account-Management"]
1061 Click Button xpath=//button[@ng-click='toggleSidebar()']
1062 Set Selenium Implicit Wait 3000
1063 Click Button //*[@id="account-onboarding-button-add"]
1064 Set Selenium Implicit Wait 3000
1065 Input Text //*[@id="account-details-input-name"] ${AppAccountName}
1066 Input Text //*[@id="account-details-input-username"] ${AppUserName}
1067 Input Text //*[@id="account-details-input-password"] ${AppPassword}
1068 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
1069 # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
1070 # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
1071 #account-details-next-button
1072 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
1074 Portal admin Delete Account
1075 Click Link //*[@id="parent-item-App-Account-Management"]
1076 Click Button xpath=//button[@ng-click='toggleSidebar()']
1077 Set Selenium Implicit Wait 3000
1078 Click Button //*[@id="account-onboarding-button-add"]
1079 Set Selenium Implicit Wait 3000
1082 [Documentation] Close all browsers
1085 Enhanced Notification on ONAP Portal
1086 [Documentation] Runs portal Post request
1087 [Arguments] ${data_path} ${data}
1088 # Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
1089 ${session}= Create Session portal ${PORTAL_URL}
1090 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1091 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
1092 # Log Received response from portal ${resp.text}
1095 Notification on ONAP Portal
1096 [Documentation] Create Config portal
1097 ${configportal}= Create Dictionary jira_id=${jira}
1098 Create Environment portal ${CURDIR}
1099 ${output} = Apply Template portal ${portal_Template} ${configportal}
1100 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1101 Should Be Equal As Strings ${post_resp.status_code} 200
1103 Portal Application Account Management
1104 [Documentation] Naviage to Application Account Management tab
1105 Click Link xpath=//a[@title='App Account Management']
1106 Click Button xpath=//button[@id='account-onboarding-button-add']
1107 Input Text xpath=//input[@name='name'] JIRA
1108 Input Text xpath=//input[@name='username'] jira
1109 Input Text xpath=//input[@name='password'] _pass
1110 Input Text xpath=//input[@name='repassword'] _pass
1111 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1112 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1114 Portal Application Account Management validation
1115 [Documentation] Naviage to user notification tab
1116 Click Link xpath=//a[@id='parent-item-User-Notifications']
1117 click element xpath=//*[@id="megamenu-notification-button"]
1118 Click element xpath=//*[@id="notification-history-link"]
1119 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1120 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1123 Portal AAF new fields
1124 [Documentation] Naviage to user Application details tab
1125 Click Link xpath=//a[@title='Application Onboarding']
1126 Click Element xpath=//td[contains(.,'xDemo App')]
1127 Page Should Contain Name Space
1128 Page Should Contain Centralized
1129 Click Element xpath=//button[@id='button-notification-cancel']
1130 Set Selenium Implicit Wait 3000
1132 Portal Change REST URL
1133 [Documentation] Naviage to user Application details tab
1134 Click Link xpath=//a[@title='Application Onboarding']
1135 Click Element xpath=//td[contains(.,'xDemo App')]
1136 Input Text xpath=//input[@name='restUrl'] ${PORTAL_XDEMPAPP_REST_URL}
1137 Click Element xpath=//button[@id='button-save-app']
1138 Set Selenium Implicit Wait 6000
1139 Go To ${PORTAL_HOME_PAGE}
1140 Wait Until Element Is Visible xpath=//a[@title='Application Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1142 Admin widget download
1143 Go To ${PORTAL_HOME_URL}
1144 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1145 click Link xpath=//a[@title='Widget Onboarding']
1146 Wait until page contains Element xpath=//table[@class='ng-scope']
1147 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
1149 ${test}= Get Substring ${td_id} -1
1151 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
1152 click Element xpath=//*[@id=${download_link_id}]
1154 Reset widget layout option
1155 Go To ${PORTAL_HOME_URL}
1156 Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1157 Execute Javascript document.getElementById('widgets').scrollTo(0,1400)
1158 Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1159 Execute Javascript document.getElementById('widgets').scrollTo(0,1800)
1160 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
1161 Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight);
1162 Execute Javascript document.getElementById('dashboardDefaultPreference').click()
1163 Execute Javascript document.getElementById('div-confirm-ok-button').click()
1166 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1167 Scroll Element Into View xpath=//button[@id='portal-admin-button-add']
1168 Click Button xpath=//button[@id='portal-admin-button-add']
1169 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
1170 Click Button xpath=//button[@id='button-search-users']
1171 Wait Until Page Contains Element xpath=//span[@id='result-uuid-0'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1172 Click Element xpath=//span[@id='result-uuid-0']
1173 Click Button xpath=//button[@id='pa-search-users-button-save']
1174 Click Button xpath=//button[@id='admin-div-ok-button']
1178 Wait Until Page Does Not Contain Element xpath=//*[@class='b2b-modal-header']
1179 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1180 Click Element xpath=//td[contains(.,'portal')]/following::span[@id='1-button-portal-admin-remove']
1181 Click Button xpath=//*[@id='div-confirm-ok-button']