blob: c45ef52fd38dbdd559333db8b09095ffdf63d8f7 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
kaihlavi5fe4afa2019-08-12 15:55:52 +03002Documentation CSIT cases for basic ONAP functionalities
3Library ExtendedSelenium2Library
4Library OperatingSystem
5Library RequestsLibrary
6Library ONAPLibrary.Utilities
7Library ONAPLibrary.Templating
8Library DateTime
9Library Collections
10Library String
11Library XvfbRobot
Gary Wu9abb61c2018-09-27 10:38:50 -070012
13*** Variables ***
kaihlavi5fe4afa2019-08-12 15:55:52 +030014${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989
Gary Wu9abb61c2018-09-27 10:38:50 -070015${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
kaihlavi5fe4afa2019-08-12 15:55:52 +030020${App_First_Name} demoapp
Gary Wu9abb61c2018-09-27 10:38:50 -070021${App_Last_Name} demo
22${App_Email_Address} demoapp@onap.com
kaihlavi5fe4afa2019-08-12 15:55:52 +030023${App_LoginID} demoapp
Gary Wu9abb61c2018-09-27 10:38:50 -070024${App_Loginpwd} demo123456!
25${App_LoginPwdCheck} demo123456!
kaihlavi5fe4afa2019-08-12 15:55:52 +030026${Sta_First_Name} demosta
Gary Wu9abb61c2018-09-27 10:38:50 -070027${Sta_Last_Name} demo
28${Sta_Email_Address} demosta@onap.com
29${Sta_LoginID} demosta
30${Sta_Loginpwd} demo123456!
31${Sta_LoginPwdCheck} demo123456!
kaihlavi5fe4afa2019-08-12 15:55:52 +030032${Test_First_Name} portal
Gary Wu9abb61c2018-09-27 10:38:50 -070033${Test_Last_Name} demo
34${Test_Email_Address} portal@onap.com
kaihlavi5fe4afa2019-08-12 15:55:52 +030035${Test_LoginID} portal
Gary Wu9abb61c2018-09-27 10:38:50 -070036${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
kaihlavi5fe4afa2019-08-12 15:55:52 +030043${GLOBAL_PORTAL_ADMIN_USER} demo
44${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
Gary Wu9abb61c2018-09-27 10:38:50 -070045${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
62${jira} jira
63${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
DR695H1a207a42019-06-20 17:20:56 -040064${portal_Template} portal.template
Gary Wu9abb61c2018-09-27 10:38:50 -070065
66${Result} FALSE
67${td_id} 0
68${download_link_id} 0
69
70*** Test Cases ***
71
kaihlavi5fe4afa2019-08-12 15:55:52 +030072Portal Health Check
Gary Wu9abb61c2018-09-27 10:38:50 -070073 Run Portal Health Check
kaihlavi5fe4afa2019-08-12 15:55:52 +030074
75#Login into Portal URL
76# Portal admin Login To Portal GUI
77
Gary Wu9abb61c2018-09-27 10:38:50 -070078## Portal R1 Release
79# # [Documentation] ONAP Portal R1 functionality test
80# # Notification on ONAP Portal
81# # Portal Application Account Management validation
82
83#Portal Change REST URL Of X-DemoApp
kaihlavi5fe4afa2019-08-12 15:55:52 +030084# [Documentation] Portal Change REST URL Of X-DemoApp
Gary Wu9abb61c2018-09-27 10:38:50 -070085# Portal Change REST URL
kaihlavi5fe4afa2019-08-12 15:55:52 +030086
Gary Wu9abb61c2018-09-27 10:38:50 -070087#Portal R1 Release for AAF
kaihlavi5fe4afa2019-08-12 15:55:52 +030088# [Documentation] ONAP Portal R1 functionality for AAF test
89# Portal AAF new fields
90
91#Create Microservice onboarding
92# Portal admin Microservice Onboarding
93
94###Delete Microservice
95# ##Portal admin Microservice Delete
96
Gary Wu9abb61c2018-09-27 10:38:50 -070097#Create Widget for all users
kaihlavi5fe4afa2019-08-12 15:55:52 +030098# Portal Admin Create Widget for All users
Gary Wu9abb61c2018-09-27 10:38:50 -070099
100#Delete Widget for all users
kaihlavi5fe4afa2019-08-12 15:55:52 +0300101# Portal Admin Delete Widget for All users
102
Gary Wu9abb61c2018-09-27 10:38:50 -0700103#Create Widget for Application Roles
kaihlavi5fe4afa2019-08-12 15:55:52 +0300104# Portal Admin Create Widget for Application Roles
105
Gary Wu9abb61c2018-09-27 10:38:50 -0700106##Delete Widget for Application Roles
kaihlavi5fe4afa2019-08-12 15:55:52 +0300107# #Portal Admin Delete Widget for Application Roles
Gary Wu9abb61c2018-09-27 10:38:50 -0700108
109##EP Admin widget download
kaihlavi5fe4afa2019-08-12 15:55:52 +0300110# #Admin widget download
Gary Wu9abb61c2018-09-27 10:38:50 -0700111
kaihlavi5fe4afa2019-08-12 15:55:52 +0300112#EP Admin widget layout reset
113# Reset widget layout option
114
115#Validate Functional Top Menu Get Access
116# Functional Top Menu Get Access
117
118#Validate Functional Top Menu Contact Us
119# Functional Top Menu Contact Us
120
121#Edit Functional Menu
122# Portal admin Edit Functional menu
123
124#Broadcast Notification functionality
125# ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
126# set global variable ${AdminBroadCastMsg}
127
128#Category Notification functionality
129# ${AdminCategoryMsg}= Portal Admin Category Notifications
130# set global variable ${AdminCategoryMsg}
131
Gary Wu9abb61c2018-09-27 10:38:50 -0700132#Create a Test user for Application Admin -Test
kaihlavi5fe4afa2019-08-12 15:55:52 +0300133# Portal admin Add Application admin User New user -Test
134
135#Create a Test User for Application Admin
136# Portal admin Add Application admin User New user
137
138#Add Application Admin for Existing User Test user
139# Portal admin Add Application Admin Existing User -APPDEMO
140
141#Create a Test user for Standard User
142# Portal admin Add Standard User New user
143
144#Add Application Admin for Existing User
145# Portal admin Add Application Admin Existing User
146
147#Delete Application Admin for Exisitng User
148# Portal admin Delete Application Admin Existing User
149
150#Add Standard User Role for Existing user
151# Portal admin Add Standard User Existing user
152
Gary Wu9abb61c2018-09-27 10:38:50 -0700153#Edit Standard User Role for Existing user
kaihlavi5fe4afa2019-08-12 15:55:52 +0300154# Portal admin Edit Standard User Existing user
155
156#Delete Standard User Role for Existing user
157# Portal admin Delete Standard User Existing user
Gary Wu9abb61c2018-09-27 10:38:50 -0700158
159##Add Account new account from App Account Management
kaihlavi5fe4afa2019-08-12 15:55:52 +0300160# #Portal admin Add New Account
161
Gary Wu9abb61c2018-09-27 10:38:50 -0700162##Delete Account new account from App Account Management
kaihlavi5fe4afa2019-08-12 15:55:52 +0300163# #Portal admin Delete Account
Gary Wu9abb61c2018-09-27 10:38:50 -0700164
165##EP Create Portal Admin
kaihlavi5fe4afa2019-08-12 15:55:52 +0300166# #Add Portal Admin
Gary Wu9abb61c2018-09-27 10:38:50 -0700167
168##EP Portal Admin delete
kaihlavi5fe4afa2019-08-12 15:55:52 +0300169# #Delete Portal Admin
170
Gary Wu9abb61c2018-09-27 10:38:50 -0700171#Logout from Portal GUI as Portal Admin
172# Portal admin Logout from Portal GUI
173
kaihlavi5fe4afa2019-08-12 15:55:52 +0300174## Application Admin user Test cases
175
176#Login To Portal GUI as APP Admin
177# Application admin Login To Portal GUI
178
179##Navigate Functional Link as APP Admin
180 ##Application Admin Navigation Functional Menu
181
Gary Wu9abb61c2018-09-27 10:38:50 -0700182#Add Standard User Role for Existing user as APP Admin
kaihlavi5fe4afa2019-08-12 15:55:52 +0300183# Application admin Add Standard User Existing user
184
Gary Wu9abb61c2018-09-27 10:38:50 -0700185#Edit Standard User Role for Existing user as APP Admin
kaihlavi5fe4afa2019-08-12 15:55:52 +0300186# Application admin Edit Standard User Existing user
Gary Wu9abb61c2018-09-27 10:38:50 -0700187
kaihlavi5fe4afa2019-08-12 15:55:52 +0300188#Delete Standard User Role for Existing user as APP Admin
189# Application admin Delete Standard User Existing user
190
191##Navigate Application Link as APP Admin
192# #Application Admin Navigation Application Link Tab
193
194#Logout from Portal GUI as APP Admin
195# Application admin Logout from Portal GUI
196
Gary Wu9abb61c2018-09-27 10:38:50 -0700197##Standard User Test cases
Gary Wu9abb61c2018-09-27 10:38:50 -0700198
kaihlavi5fe4afa2019-08-12 15:55:52 +0300199#Login To Portal GUI as Standard User
200# Standard user Login To Portal GUI
Gary Wu9abb61c2018-09-27 10:38:50 -0700201
kaihlavi5fe4afa2019-08-12 15:55:52 +0300202##Navigate Application Link as Standard User
203# #Standard user Navigation Application Link Tab
204
205##Navigate Functional Link as Standard User
206# #Standard user Navigation Functional Menu
207
208##Broadcast Notifications Standard user
209# #Standard user Broadcast Notifications ${AdminBroadCastMsg}
210
211##Category Notifications Standard user
212# #Standard user Category Notifications ${AdminCategoryMsg}
213
214#Logout from Portal GUI as Standard User
215# Standard User Logout from Portal GUI
216
217Teardown
218 [Documentation] Close All Open browsers
219 Close All Browsers
220
Gary Wu9abb61c2018-09-27 10:38:50 -0700221*** Keywords ***
222
223Setup Browser
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}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300228
229Setup Browser Chrome
Gary Wu9abb61c2018-09-27 10:38:50 -0700230 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
231 Call Method ${chrome options} add_argument no-sandbox
232 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
233 Set To Dictionary ${dc} elementScrollBehavior 1
kaihlavi5fe4afa2019-08-12 15:55:52 +0300234 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
235 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
Gary Wu9abb61c2018-09-27 10:38:50 -0700236
kaihlavi5fe4afa2019-08-12 15:55:52 +0300237Handle Proxy Warning
Gary Wu9abb61c2018-09-27 10:38:50 -0700238 [Documentation] Handle Intermediate Warnings from Proxies
kaihlavi5fe4afa2019-08-12 15:55:52 +0300239 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
Gary Wu9abb61c2018-09-27 10:38:50 -0700240 Return From Keyword if '${status}' != 'PASS'
kaihlavi5fe4afa2019-08-12 15:55:52 +0300241 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
Gary Wu9abb61c2018-09-27 10:38:50 -0700242 Return From Keyword if '${status}' != 'PASS'
243 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
244 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
245 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
246 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
247
Gary Wu9abb61c2018-09-27 10:38:50 -0700248Run Portal Health Check
249 [Documentation] Runs Portal Health check
kaihlavi5fe4afa2019-08-12 15:55:52 +0300250 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
251 Should Be Equal As Strings ${resp.status_code} 200
252 Should Be Equal As Strings ${resp.json()['statusCode']} 200
Gary Wu9abb61c2018-09-27 10:38:50 -0700253
254Run Portal Get Request
255 [Documentation] Runs Portal Get request
256 [Arguments] ${data_path}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300257 ${session}= Create Session portal ${PORTAL_URL}
DR695Hda5f3232019-06-17 13:20:10 -0400258 ${uuid}= Generate UUID4
Gary Wu9abb61c2018-09-27 10:38:50 -0700259 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300260 ${resp}= Get Request portal ${data_path} headers=${headers}
Gary Wu9abb61c2018-09-27 10:38:50 -0700261 Log Received response from portal ${resp.text}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300262 [Return] ${resp}
Gary Wu9abb61c2018-09-27 10:38:50 -0700263
264Portal admin Login To Portal GUI
265 [Documentation] Logs into Portal GUI
266 ## Setup Browser Now being managed by test case
267# Setup Browser
kaihlavi5fe4afa2019-08-12 15:55:52 +0300268 Start Virtual Display 1920 1080
269 Open Browser ${PORTAL_LOGIN_URL} chrome
Gary Wu9abb61c2018-09-27 10:38:50 -0700270# Go To ${PORTAL_LOGIN_URL}
271 Maximize Browser Window
272 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
273 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
274 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
275 # Handle Proxy Warning
276 Title Should Be Login
277 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
278 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
279 Click Link xpath=//a[@id='loginBtn']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300280 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
281 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
282 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
Gary Wu9abb61c2018-09-27 10:38:50 -0700283
284Portal admin Go To Portal HOME
kaihlavi5fe4afa2019-08-12 15:55:52 +0300285 [Documentation] Navigate to Portal Home
Gary Wu9abb61c2018-09-27 10:38:50 -0700286 Go To ${PORTAL_HOME_URL}
287 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300288
289Portal admin User Notifications
290 [Documentation] Navigate to User notification tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700291 Click Link xpath=//a[@id='parent-item-User-Notifications']
292 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
293 Click Button xpath=//button[@id='button-openAddNewApp']
294 Click Button xpath=(//button[@id='undefined'])[1]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300295 #Click Button xpath=//input[@id='datepicker-start']
296
297Portal admin Add Application Admin Existing User
298 [Documentation] Navigate to Admins tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700299 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
300 Click Link xpath=//a[@title='Admins']
301 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
302 Page Should Contain Admins
kaihlavi5fe4afa2019-08-12 15:55:52 +0300303 Click Button xpath=//button[@ng-click='toggleSidebar()']
Gary Wu9abb61c2018-09-27 10:38:50 -0700304 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300305 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
Gary Wu9abb61c2018-09-27 10:38:50 -0700306 Click Button xpath=//button[@id='button-search-users']
307 Click Element xpath=//span[@id='result-uuid-0']
308 Click Button xpath=//button[@id='search-users-button-next']
309 Click Button xpath=//input[@value='Select application']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300310 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
Gary Wu9abb61c2018-09-27 10:38:50 -0700311 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300312# Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
Gary Wu9abb61c2018-09-27 10:38:50 -0700313# Click Element xpath=(//li[contains(.,'Default' )])[2]
314 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
315 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
316 Click Element xpath=//button[@id='admin-div-ok-button']
317 Click Element xpath=//button[@id='div-confirm-ok-button']
318 Get Selenium Implicit Wait
319 Click Link xpath=//a[@aria-label='Admins']
320 Click Element xpath=//input[@id='dropdown1']
321# Click Element xpath=//li[contains(.,'Default' )]
322 Click Element xpath=//li[contains(.,'xDemo App' )]
323 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300324 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
Gary Wu9abb61c2018-09-27 10:38:50 -0700325 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300326 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
327
328Portal admin Delete Application Admin Existing User
329 [Documentation] Navigate to Admins tab
330 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Gary Wu9abb61c2018-09-27 10:38:50 -0700331 Click Link xpath=//a[@title='Admins']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300332 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Gary Wu9abb61c2018-09-27 10:38:50 -0700333 Page Should Contain Admins
kaihlavi5fe4afa2019-08-12 15:55:52 +0300334 Click Button xpath=//button[@ng-click='toggleSidebar()']
335 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
336 Click Element xpath=(//span[contains(.,'portal')] )[1]
337 #Click Element xpath=(//span[contains(.,'demo')] )[1]
Gary Wu9abb61c2018-09-27 10:38:50 -0700338 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
339# Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
340 Click Element xpath=//button[@id='div-confirm-ok-button']
341 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
342 Click Element xpath=//button[@id='admin-div-ok-button']
343 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
344 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
345 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kaihlavi5fe4afa2019-08-12 15:55:52 +0300346 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
347 Click Image xpath=//img[@alt='Onap Logo']
Gary Wu9abb61c2018-09-27 10:38:50 -0700348 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300349
Gary Wu9abb61c2018-09-27 10:38:50 -0700350Portal admin Add Application admin User New user
kaihlavi5fe4afa2019-08-12 15:55:52 +0300351 [Documentation] Navigate to Users tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700352 Click Link xpath=//a[@title='Users']
353 Page Should Contain Users
kaihlavi5fe4afa2019-08-12 15:55:52 +0300354 Click Button xpath=//button[@ng-click='toggleSidebar()']
Gary Wu9abb61c2018-09-27 10:38:50 -0700355 Click Button xpath=//button[@id='users-button-add']
356 Click Button xpath=//button[@id='Create-New-User-button']
357 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
358 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
359 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
360 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
361 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
362 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
363 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300364
Gary Wu9abb61c2018-09-27 10:38:50 -0700365 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
366
367 #log ${Result}
368 #${type_result}= Evaluate type(${Result})
369 #log ${type_result}
370
371 Run Keyword if '${Result}'== 0 AdminUser does not exist already
372 ... ELSE Goto Home Image
373 Set Selenium Implicit Wait 3000
374
375Goto Home Image
376 Click Image xpath=//img[@alt='Onap Logo']
377
kaihlavi5fe4afa2019-08-12 15:55:52 +0300378AdminUser does not exist already
Gary Wu9abb61c2018-09-27 10:38:50 -0700379 Click Button xpath=//button[@id='next-button']
380 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
381 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
382 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
383 Set Selenium Implicit Wait 3000
384 Click Button xpath=//button[@id='new-user-save-button']
385 Set Selenium Implicit Wait 3000
386 Go To ${PORTAL_HOME_PAGE}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300387 Click Link xpath=//a[@title='Users']
388 Click Element xpath=//input[@id='dropdown1']
389 Click Element xpath=//li[contains(.,'xDemo App')]
390 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
Gary Wu9abb61c2018-09-27 10:38:50 -0700391 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
392 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300393 Click Image xpath=//img[@alt='Onap Logo']
Gary Wu9abb61c2018-09-27 10:38:50 -0700394 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300395
Gary Wu9abb61c2018-09-27 10:38:50 -0700396Portal admin Add Standard User New user
kaihlavi5fe4afa2019-08-12 15:55:52 +0300397 [Documentation] Navigate to Users tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700398 Click Link xpath=//a[@title='Users']
399 Page Should Contain Users
kaihlavi5fe4afa2019-08-12 15:55:52 +0300400 Click Button xpath=//button[@ng-click='toggleSidebar()']
Gary Wu9abb61c2018-09-27 10:38:50 -0700401 Click Button xpath=//button[@id='users-button-add']
402 Click Button xpath=//button[@id='Create-New-User-button']
403 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
404 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
405 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
406 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
407 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
408 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
409 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300410
Gary Wu9abb61c2018-09-27 10:38:50 -0700411 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
412
413 #log ${Result}
414 #${type_result}= Evaluate type(${Result})
415 #log ${type_result}
416
417 Run Keyword if '${Result}'== 0 StaUser does not exist already
418 ... ELSE Goto Home Image
419 Set Selenium Implicit Wait 3000
420
kaihlavi5fe4afa2019-08-12 15:55:52 +0300421StaUser does not exist already
Gary Wu9abb61c2018-09-27 10:38:50 -0700422 Click Button xpath=//button[@id='next-button']
423 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
424 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
425 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
426 Set Selenium Implicit Wait 3000
427 Click Button xpath=//button[@id='new-user-save-button']
428 Set Selenium Implicit Wait 3000
429 Go To ${PORTAL_HOME_PAGE}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300430 Click Link xpath=//a[@title='Users']
431 Click Element xpath=//input[@id='dropdown1']
432 Click Element xpath=//li[contains(.,'xDemo App')]
433 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
Gary Wu9abb61c2018-09-27 10:38:50 -0700434 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
435 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300436 Click Image xpath=//img[@alt='Onap Logo']
Gary Wu9abb61c2018-09-27 10:38:50 -0700437 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300438
Gary Wu9abb61c2018-09-27 10:38:50 -0700439Portal admin Add Application admin User New user -Test
kaihlavi5fe4afa2019-08-12 15:55:52 +0300440 [Documentation] Navigate to Users tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700441 Click Link xpath=//a[@title='Users']
442 Page Should Contain Users
kaihlavi5fe4afa2019-08-12 15:55:52 +0300443 Click Button xpath=//button[@ng-click='toggleSidebar()']
444 Click Button xpath=//button[@id='users-button-add']
Gary Wu9abb61c2018-09-27 10:38:50 -0700445 Click Button xpath=//button[@id='Create-New-User-button']
446 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
447 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
448 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
449 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
450 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
451 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
452 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300453 Click Button xpath=//button[@id='search-users-button-cancel']
454 Click Image xpath=//img[@alt='Onap Logo']
Gary Wu9abb61c2018-09-27 10:38:50 -0700455 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300456
Gary Wu9abb61c2018-09-27 10:38:50 -0700457 #Click Button xpath=//button[@id='next-button']
458 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
459 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
460 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
461 #Set Selenium Implicit Wait 3000
462 #Click Button xpath=//button[@id='new-user-save-button']
463 #Set Selenium Implicit Wait 3000
464 #Go To ${PORTAL_HOME_PAGE}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300465 #Click Link xpath=//a[@title='Users']
466 #Click Element xpath=//input[@id='dropdown1']
467 #Click Element xpath=//li[contains(.,'xDemo App')]
468 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
Gary Wu9abb61c2018-09-27 10:38:50 -0700469 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300470 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
471
472Portal admin Add Application Admin Existing User -APPDEMO
473 [Documentation] Navigate to Admins tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700474 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
475 Click Link xpath=//a[@title='Admins']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300476 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Gary Wu9abb61c2018-09-27 10:38:50 -0700477 Page Should Contain Admins
kaihlavi5fe4afa2019-08-12 15:55:52 +0300478 Click Button xpath=//button[@ng-click='toggleSidebar()']
Gary Wu9abb61c2018-09-27 10:38:50 -0700479 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300480 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
Gary Wu9abb61c2018-09-27 10:38:50 -0700481 Click Button xpath=//button[@id='button-search-users']
482 Click Element xpath=//span[@id='result-uuid-0']
483 Click Button xpath=//button[@id='search-users-button-next']
484 Click Button xpath=//input[@value='Select application']
485 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
486 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
487 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
488 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
489 Click Element xpath=//button[@id='admin-div-ok-button']
490 Click Element xpath=//button[@id='div-confirm-ok-button']
491 Get Selenium Implicit Wait
492 Click Link xpath=//a[@aria-label='Admins']
493 Click Element xpath=//input[@id='dropdown1']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300494 Click Element xpath=//li[contains(.,'xDemo App' )]
Gary Wu9abb61c2018-09-27 10:38:50 -0700495 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
496 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300497 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
498 Click Image xpath=//img[@alt='Onap Logo']
499 Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -0700500
kaihlavi5fe4afa2019-08-12 15:55:52 +0300501Portal admin Add Standard User Existing user
502 [Documentation] Navigate to Users tab
503 Click Link xpath=//a[@title='Users']
504 Page Should Contain Users
505 Click Button xpath=//button[@ng-click='toggleSidebar()']
506 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
507 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
508 Click Button xpath=//button[@id='button-search-users']
509 Click Element xpath=//span[@id='result-uuid-0']
510 Click Button xpath=//button[@id='next-button']
511# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
512# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
513 Click Element xpath=//div[@id='app-select-Select roles1']
514 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='Standard-User-checkbox']
515 Set Selenium Implicit Wait 3000
516 Click Button xpath=//button[@id='new-user-save-button']
517 Set Selenium Implicit Wait 3000
518# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
519# Select From List xpath=//input[@value='Select application'] xDemo App
520# Click Link xpath=//a[@title='Users']
521# Page Should Contain Users
522# Focus xpath=//input[@name='dropdown1']
523 Go To ${PORTAL_HOME_PAGE}
524# Click Link xpath=//a[@title='Users']
525# Click Element xpath=//input[@id='dropdown1']
526# Click Element xpath=//li[contains(.,'Default')]
527# Click Element xpath=//li[contains(.,'XDemo App')]
528# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
529# Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
530# Set Selenium Implicit Wait 3000
531
532Portal admin Edit Standard User Existing user
533 [Documentation] Navigate to Users tab
534 Click Link xpath=//a[@title='Users']
535 Click Element xpath=//input[@id='dropdown1']
536# Click Element xpath=//li[contains(.,'Default')]
537# Set Selenium Implicit Wait 3000
538 Click Element xpath=//li[contains(.,'xDemo App')]
539# Set Selenium Implicit Wait 3000
540 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
541 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
542 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
543# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
544# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
545# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
546 Click Element xpath=//*[@id='app-select-Standard User1']
547 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
548 Set Selenium Implicit Wait 3000
549 Click Button xpath=//button[@id='new-user-save-button']
550 Set Selenium Implicit Wait 3000
551
552 Page Should Contain Users
553 Click Button xpath=//button[@ng-click='toggleSidebar()']
554 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
555 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
556 Click Button xpath=//button[@id='button-search-users']
557 Click Element xpath=//span[@id='result-uuid-0']
558 Click Button xpath=//button[@id='next-button']
559 Click Element xpath=//div[@id='app-select-Select roles1']
560 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
561 Set Selenium Implicit Wait 3000
562# Click Element xpath=//*[@id='app-select-Standard User1']
563# Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
564 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
565 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
566 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
567 Set Selenium Implicit Wait 3000
568 Click Button xpath=//button[@id='new-user-save-button']
569 Set Selenium Implicit Wait 3000
570 Page Should Contain Users
571 #Click Button xpath=//input[@id='dropdown1']
572 #Click Element xpath=//li[contains(.,'xDemo App')]
573 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
574 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
575 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
576 Set Selenium Implicit Wait 3000
577
578Portal admin Delete Standard User Existing user
579 [Documentation] Navigate to Users tab
580 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
581# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
582# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
583 Set Selenium Implicit Wait 9000
584 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
585 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
586# Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
587# Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
588 Click Element xpath=//button[@id='div-confirm-ok-button']
589 Click Button xpath=//button[@id='new-user-save-button']
590 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
591 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
592 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
593 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
594 Set Selenium Implicit Wait 3000
595
596Functional Top Menu Get Access
597 [Documentation] Navigate to Support tab
598 Go To ${PORTAL_HOME_URL}
Gary Wu9abb61c2018-09-27 10:38:50 -0700599 Click Link xpath=//a[contains(.,'Support')]
600 Mouse Over xpath=//*[contains(text(),'Get Access')]
601 Click Link xpath=//a[contains(.,'Get Access')]
602 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
kaihlavi5fe4afa2019-08-12 15:55:52 +0300603 Set Selenium Implicit Wait 3000
604
605Functional Top Menu Contact Us
606 [Documentation] Navigate to Support tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700607 Click Link xpath=//a[contains(.,'Support')]
608 Mouse Over xpath=//*[contains(text(),'Contact Us')]
609 Click Link xpath=//a[contains(.,'Contact Us')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300610 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
611 Click Image xpath=//img[@alt='Onap Logo']
612 Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -0700613
kaihlavi5fe4afa2019-08-12 15:55:52 +0300614Portal admin Edit Functional menu
615 [Documentation] Navigate to Edit Functional menu tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700616 Click Link xpath=//a[@title='Edit Functional Menu']
617 Click Link xpath=.//*[@id='Manage']/div/a
618 Click Link xpath=.//*[@id='Design']/div/a
619 Click Link xpath=.//*[@id='Product_Design']/div/a
620 Open Context Menu xpath=//*[@id='Product_Design']/div/span
621 Click Link xpath=//a[@href='#add']
622 Input Text xpath=//input[@id='input-title'] ONAP Test
623 #Input Text xpath=//input[@id='input-url'] http://google.com
624 Click Element xpath=//input[@id='select-app']
625 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
626 Click Element xpath=//li[contains(.,'xDemo App')]
627 Input Text xpath=//input[@id='input-url'] http://google.com
628 Click Button xpath=//button[@id='button-save-continue']
629 #Click Button xpath=//div[@title='Select Roles']
630 Click Element xpath=//*[@id='app-select-Select Roles']
631 Click Element xpath=//input[@id='Standard-User-checkbox']
632 Click Element xpath=//button[@id='button-save-add']
633 Click Image xpath=//img[@alt='Onap Logo']
634 Set Selenium Implicit Wait 3000
635 Click Link xpath=//a[contains(.,'Manage')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300636 Mouse Over xpath=//*[contains(text(),'Design')]
637 Set Selenium Implicit Wait 3000
638 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
639 Set Selenium Implicit Wait 3000
640 Click Image xpath=//img[@alt='Onap Logo']
641 Click Link xpath=//a[@title='Edit Functional Menu']
Gary Wu9abb61c2018-09-27 10:38:50 -0700642 Click Link xpath=.//*[@id='Manage']/div/a
643 Click Link xpath=.//*[@id='Design']/div/a
644 Click Link xpath=.//*[@id='Product_Design']/div/a
645 Open Context Menu xpath=//*[@id='ONAP_Test']
646 Click Link xpath=//a[@href='#delete']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300647 Set Selenium Implicit Wait 3000
648 Click Element xpath=//button[@id='div-confirm-ok-button']
649 Click Image xpath=//img[@alt='Onap Logo']
Gary Wu9abb61c2018-09-27 10:38:50 -0700650 Set Selenium Implicit Wait 3000
651 Click Link xpath=//a[contains(.,'Manage')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300652 Mouse Over xpath=//*[contains(text(),'Design')]
653 Set Selenium Implicit Wait 3000
654 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
655 Set Selenium Implicit Wait 3000
656 Click Image xpath=//img[@alt='Onap Logo']
657 Set Selenium Implicit Wait 3000
658
Gary Wu9abb61c2018-09-27 10:38:50 -0700659Portal admin Microservice Onboarding
kaihlavi5fe4afa2019-08-12 15:55:52 +0300660 [Documentation] Navigate to Edit Functional menu tab
661 Click Link xpath=//a[@title='Microservice Onboarding']
662 Click Button xpath=//button[@id='microservice-onboarding-button-add']
663 Input Text xpath=//input[@name='name'] Test Microservice
664 Input Text xpath=//*[@name='desc'] Test
665 Click Element xpath=//input[@id='microservice-details-input-app']
666 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
667 Click Element xpath=//li[contains(.,'xDemo App')]
668 Click Element xpath=//*[@name='desc']
669 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
670 Click Element xpath=//input[@id='microservice-details-input-security-type']
671 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
672 Click Element xpath=//li[contains(.,'Basic Authentication')]
673 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
674 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
675 Click Button xpath=//button[@id='microservice-details-save-button']
676 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
677 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
678 Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -0700679
680Portal admin Microservice Delete
kaihlavi5fe4afa2019-08-12 15:55:52 +0300681 [Documentation] Navigate to Edit Functional menu tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700682 Click Link xpath=//a[@title='Microservice Onboarding']
683 Click Button xpath=//button[@id='microservice-onboarding-button-add']
684 Input Text xpath=//input[@name='name'] TestMS
685 Input Text xpath=//*[@name='desc'] TestMS
686 Click Element xpath=//input[@id='microservice-details-input-app']
687 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
688 Click Element xpath=//li[contains(.,'xDemo App')]
689 Click Element xpath=//*[@name='desc']
690 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
691 Click Element xpath=//input[@id='microservice-details-input-security-type']
692 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
693 Click Element xpath=//li[contains(.,'Basic Authentication')]
694 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
695 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
696 Click Button xpath=//button[@id='microservice-details-save-button']
697 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
698 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
699 Click Button xpath=//button[@id="div-confirm-ok-button"]
700 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300701
702Portal Admin Create Widget for All users
Gary Wu9abb61c2018-09-27 10:38:50 -0700703 [Documentation] Navigate to Create Widget menu tab
704 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kaihlavi5fe4afa2019-08-12 15:55:52 +0300705 Wait Until Page Contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Gary Wu9abb61c2018-09-27 10:38:50 -0700706 Click Link xpath=//a[@title='Widget Onboarding']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300707 Click Button xpath=//button[@ng-click='toggleSidebar()']
Gary Wu9abb61c2018-09-27 10:38:50 -0700708 Click Button xpath=//button[@id='widget-onboarding-button-add']
709 Input Text xpath=//*[@name='name'] ONAP-xDemo
710 Input Text xpath=//*[@name='desc'] ONAP xDemo
711 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
712 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
713 Click Element xpath=//li[contains(.,'News Microservice')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300714 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
Gary Wu9abb61c2018-09-27 10:38:50 -0700715 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
716 Click Button xpath=//button[@id='widgets-details-save-button']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300717 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Gary Wu9abb61c2018-09-27 10:38:50 -0700718 Page Should Contain ONAP-xDemo
719 Set Selenium Implicit Wait 3000
720 GO TO ${PORTAL_HOME_PAGE}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300721
722Portal Admin Delete Widget for All users
723 [Documentation] Navigate to delete Widget menu tab
724 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
725 #Page Should Contain ONAP-xDemo
726 #Click Image xpath=//img[@alt='Onap Logo']
727 Click Link xpath=//a[@title='Widget Onboarding']
Gary Wu9abb61c2018-09-27 10:38:50 -0700728 Click Element xpath=//input[@id='dropdown1']
729 Click Element xpath=//li[contains(.,'xDemo App')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300730 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
731 Click Button xpath=//button[@ng-click='toggleSidebar()']
732 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
733 Click Element xpath=//button[@id='div-confirm-ok-button']
734 Set Selenium Implicit Wait 3000
735 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
736 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
737 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
738 #Set Selenium Implicit Wait 3000
739
740Portal Admin Create Widget for Application Roles
741 [Documentation] Navigate to Create Widget menu tab
742 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
743 Click Link xpath=//a[@title='Widget Onboarding']
744 Click Button xpath=//button[@ng-click='toggleSidebar()']
745 Click Button xpath=//button[@id='widget-onboarding-button-add']
746 Input Text xpath=//*[@name='name'] ONAP-xDemo
747 Input Text xpath=//*[@name='desc'] ONAP xDemo
748 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
749 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
750 Click Element xpath=//li[contains(.,'News Microservice')]
751 Click Element xpath=//*[@id="app-select-Select Applications"]
752 Click Element xpath=//*[@id="xDemo-App-checkbox"]
753 Click Element xpath=//*[@name='desc']
754 Click Element xpath=//*[@id="app-select-Select Roles0"]
755 Click Element xpath=//*[@id="Standard-User-checkbox"]
756 Click Element xpath=//*[@name='desc']
757 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
758 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
759 Click Button xpath=//button[@id='widgets-details-save-button']
760 Click Image xpath=//img[@alt='Onap Logo']
761 Set Selenium Implicit Wait 3000
762 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
763 Click Link xpath=//a[@title='Widget Onboarding']
764 Click Element xpath=//input[@id='dropdown1']
Gary Wu9abb61c2018-09-27 10:38:50 -0700765 Click Element xpath=//li[contains(.,'xDemo App')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300766 Page Should Contain ONAP-xDemo
767 Set Selenium Implicit Wait 3000
768 GO TO ${PORTAL_HOME_PAGE}
769
770Portal Admin Delete Widget for Application Roles
771 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
772 #Page Should Contain ONAP-xDemo
773 #Click Image xpath=//img[@alt='Onap Logo']
774 Click Link xpath=//a[@title='Widget Onboarding']
775 Click Element xpath=//input[@id='dropdown1']
776 Click Element xpath=//li[contains(.,'xDemo App')]
777 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
778 Click Button xpath=//button[@ng-click='toggleSidebar()']
779 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
780 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
781 Click Element xpath=//button[@id='div-confirm-ok-button']
782 Set Selenium Implicit Wait 3000
783 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
784 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
785 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
786 Set Selenium Implicit Wait 3000
787
Gary Wu9abb61c2018-09-27 10:38:50 -0700788Portal Admin Edit Widget
kaihlavi5fe4afa2019-08-12 15:55:52 +0300789 [Documentation] Navigate to Home tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700790 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
791 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
792 Set Browser Implicit Wait 8000
793 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
kaihlavi5fe4afa2019-08-12 15:55:52 +0300794 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
Gary Wu9abb61c2018-09-27 10:38:50 -0700795 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
796 Input Text xpath=//input[@name='title'] ONAP_VID
797 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
798 Input Text xpath=//input[@id='widget-input-add-order'] 5
799 Click Link xpath=//a[contains(.,'Add New')]
800 Click Element xpath=//div[@id='close-button']
801 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
802 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
803 Click Element xpath=//div[@id='confirmation-button-next']
804 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
805 Click Link xpath=//a[@id='close-button']
Gary Wu9abb61c2018-09-27 10:38:50 -0700806 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +0300807
808Portal Admin Broadcast Notifications
809 [Documentation] Portal Test Admin Broadcast Notifications
810 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
811 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
Gary Wu9abb61c2018-09-27 10:38:50 -0700812 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kaihlavi5fe4afa2019-08-12 15:55:52 +0300813 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
814 Go To ${PORTAL_HOME_URL}
815 Click Image xpath=//img[@alt='Onap Logo']
816 Set Selenium Implicit Wait 3000
817 Click Link xpath=//*[@id="parent-item-User-Notifications"]
Gary Wu9abb61c2018-09-27 10:38:50 -0700818 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
819 Click button xpath=//*[@id="button-openAddNewApp"]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300820 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
821 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
822 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
823 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
824 Click Element xpath=//*[@id="button-notification-save"]
825 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
826 Click Element xpath=//*[@id="megamenu-notification-button"]
827 Click Element xpath=//*[@id="notification-history-link"]
828# Notification bug, Uncomment the code when PORTAL-232 is fixed
829 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
830 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
831 Set Selenium Implicit Wait 3000
832 Log ${AdminBroadCastMsg}
833 [Return] ${AdminBroadCastMsg}
834
835Portal Admin Category Notifications
836 [Documentation] Portal Admin Broadcast Notifications
837 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
838 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
839# ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
840 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
841 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
842 Click Link xpath=//a[@id='parent-item-Home']
843 Click Link xpath=//*[@id="parent-item-User-Notifications"]
844 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
845 Click button xpath=//*[@id="button-openAddNewApp"]
Gary Wu9abb61c2018-09-27 10:38:50 -0700846 #Select Radio Button NO radio-button-no
847 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
848 #Select Radio Button //label[@class='radio'] radio-button-approles
849 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300850 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
851 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
852 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
853 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
854 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
855 Click Element xpath=//*[@id="button-notification-save"]
856 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
857 Click Element xpath=//*[@id="megamenu-notification-button"]
858 Click Element xpath=//*[@id="notification-history-link"]
Gary Wu9abb61c2018-09-27 10:38:50 -0700859# Notification bug, Uncomment the code when PORTAL-232 is fixed
kaihlavi5fe4afa2019-08-12 15:55:52 +0300860 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
Gary Wu9abb61c2018-09-27 10:38:50 -0700861 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
kaihlavi5fe4afa2019-08-12 15:55:52 +0300862 Set Selenium Implicit Wait 3000
863 Log ${AdminCategoryMsg}
864 [Return] ${AdminCategoryMsg}
865
Gary Wu9abb61c2018-09-27 10:38:50 -0700866Portal admin Logout from Portal GUI
867 [Documentation] Logout from Portal GUI
868 Click Element xpath=//div[@id='header-user-icon']
869 Click Button xpath=//button[contains(.,'Log out')]
870 Title Should Be Login
kaihlavi5fe4afa2019-08-12 15:55:52 +0300871
Gary Wu9abb61c2018-09-27 10:38:50 -0700872Application admin Login To Portal GUI
873 [Documentation] Logs into Portal GUI
874 # Setup Browser Now being managed by test case
875 ##Setup Browser
876# Go To ${PORTAL_LOGIN_URL}
877# Maximize Browser Window
878# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
879# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
880# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
881 # Handle Proxy Warning
882 Title Should Be Login
883 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
884 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
885 Click Link xpath=//a[@id='loginBtn']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300886 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
887 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
888
889Application Admin Navigation Application Link Tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700890 [Documentation] Logs into Portal GUI as application admin
891 Click Link xpath=//a[@id='parent-item-Home']
892 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
893 Page Should Contain ONAP Portal
kaihlavi5fe4afa2019-08-12 15:55:52 +0300894 Scroll Element Into View xpath=//i[@class='ion-close-round']
Gary Wu9abb61c2018-09-27 10:38:50 -0700895 Click Element xpath=//i[@class='ion-close-round']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300896 Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -0700897 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300898
899Application Admin Navigation Functional Menu
Gary Wu9abb61c2018-09-27 10:38:50 -0700900 [Documentation] Logs into Portal GUI as application admin
901 Click Link xpath=//a[contains(.,'Manage')]
902 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300903 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
Gary Wu9abb61c2018-09-27 10:38:50 -0700904 Page Should Contain ONAP Portal
905 Click Element xpath=//i[@class='ion-close-round']
906 Click Element xpath=(.//span[@id='tab-Home'])[1]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300907
Gary Wu9abb61c2018-09-27 10:38:50 -0700908Application admin Add Standard User Existing user
kaihlavi5fe4afa2019-08-12 15:55:52 +0300909 [Documentation] Navigate to Users tab
910 Click Link xpath=//a[@title='Users']
911 Page Should Contain Users
912 Click Button xpath=//button[@ng-click='toggleSidebar()']
913 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
914 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
915 Click Button xpath=//button[@id='button-search-users']
916 Click Element xpath=//span[@id='result-uuid-0']
917 Click Button xpath=//button[@id='next-button']
918 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
919 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
920 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
921 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
922 # Set Selenium Implicit Wait 3000
923 Click Button xpath=//button[@id='new-user-save-button']
924 Set Selenium Implicit Wait 3000
925 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
926 #Select From List xpath=//input[@value='Select application'] xDemo App
927 #Click Link xpath=//a[@title='Users']
928 #Page Should Contain Users
929 Go To ${PORTAL_HOME_PAGE}
930 Set Selenium Implicit Wait 3000
931 Click Link xpath=//a[@title='Users']
932 Click Element xpath=//input[@id='dropdown1']
933 #Click Element xpath=//li[contains(.,'Default')]
934 Click Element xpath=//li[contains(.,'xDemo App')]
935 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
936 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
937 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
938
Gary Wu9abb61c2018-09-27 10:38:50 -0700939Application admin Edit Standard User Existing user
kaihlavi5fe4afa2019-08-12 15:55:52 +0300940 [Documentation] Navigate to Users tab
941 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
942 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
943 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
944 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
945 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
946 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
947 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
948 Set Selenium Implicit Wait 3000
949 Click Button xpath=//button[@id='new-user-save-button']
950 Set Selenium Implicit Wait 3000
951 Page Should Contain Users
952 #Click Button xpath=//input[@id='dropdown1']
953 #Click Element xpath=//li[contains(.,'xDemo App')]
954 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
955 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
956 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
957
958Application admin Delete Standard User Existing user
959 [Documentation] Navigate to Users tab
960 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
961# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
962# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
963 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
964 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
965 Click Element xpath=//button[@id='div-confirm-ok-button']
966 Click Button xpath=//button[@id='new-user-save-button']
967# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
968# Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
969 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
970 #Click Image xpath=//img[@alt='Onap Logo']
971 Set Selenium Implicit Wait 3000
972
Gary Wu9abb61c2018-09-27 10:38:50 -0700973Application admin Logout from Portal GUI
974 [Documentation] Logout from Portal GUI
975 Click Element xpath=//div[@id='header-user-icon']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300976 #Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -0700977 Click Button xpath=//button[contains(text(),'Log out')]
kaihlavi5fe4afa2019-08-12 15:55:52 +0300978 #Set Selenium Implicit Wait 3000
979 Title Should Be Login
980
981Standard user Login To Portal GUI
Gary Wu9abb61c2018-09-27 10:38:50 -0700982 [Documentation] Logs into Portal GUI
983 # Setup Browser Now being managed by test case
984 ##Setup Browser
985# Go To ${PORTAL_LOGIN_URL}
986# Maximize Browser Window
987# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
988# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
989# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
990 # Handle Proxy Warning
991 Title Should Be Login
992 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
993 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
994 Click Link xpath=//a[@id='loginBtn']
kaihlavi5fe4afa2019-08-12 15:55:52 +0300995 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
996 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
997
998Standard user Navigation Application Link Tab
Gary Wu9abb61c2018-09-27 10:38:50 -0700999 [Documentation] Logs into Portal GUI as application admin
1000 #Portal admin Go To Portal HOME
1001 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
kaihlavi5fe4afa2019-08-12 15:55:52 +03001002 Page Should Contain ONAP Portal
Gary Wu9abb61c2018-09-27 10:38:50 -07001003 Click Element xpath=(.//span[@id='tab-Home'])[1]
1004 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +03001005
1006Standard user Navigation Functional Menu
Gary Wu9abb61c2018-09-27 10:38:50 -07001007 [Documentation] Logs into Portal GUI as application admin
1008 Click Link xpath=//a[contains(.,'Manage')]
1009 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
kaihlavi5fe4afa2019-08-12 15:55:52 +03001010 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
Gary Wu9abb61c2018-09-27 10:38:50 -07001011 Page Should Contain Welcome to VID
kaihlavi5fe4afa2019-08-12 15:55:52 +03001012 Click Element xpath=(.//span[@id='tab-Home'])[1]
1013 Set Selenium Implicit Wait 3000
1014
1015Standard user Broadcast Notifications
1016 [Documentation] Logs into Portal GUI as application admin
Gary Wu9abb61c2018-09-27 10:38:50 -07001017 [Arguments] ${AdminBroadCastMsg}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001018 Click Element xpath=//*[@id='megamenu-notification-button']
1019 Click Element xpath=//*[@id='notification-history-link']
1020 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1021 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
1022 Log ${AdminBroadCastMsg}
1023
1024Standard user Category Notifications
1025 [Documentation] Logs into Portal GUI as application admin
Gary Wu9abb61c2018-09-27 10:38:50 -07001026 [Arguments] ${AdminCategoryMsg}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001027 #Click Element xpath=//*[@id='megamenu-notification-button']
1028 #Click Element xpath=//*[@id="notification-history-link"]
1029 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1030 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1031 Log ${AdminCategoryMsg}
1032
1033Standard user Logout from Portal GUI
Gary Wu9abb61c2018-09-27 10:38:50 -07001034 [Documentation] Logout from Portal GUI
1035 Click Element xpath=//div[@id='header-user-icon']
1036 Click Button xpath=//button[contains(.,'Log out')]
kaihlavi5fe4afa2019-08-12 15:55:52 +03001037 #Confirm Action
1038 Title Should Be Login
1039
Gary Wu9abb61c2018-09-27 10:38:50 -07001040Portal admin Add New Account
1041 Click Link //*[@id="parent-item-App-Account-Management"]
1042 Click Button xpath=//button[@ng-click='toggleSidebar()']
1043 Set Selenium Implicit Wait 3000
1044 Click Button //*[@id="account-onboarding-button-add"]
1045 Set Selenium Implicit Wait 3000
1046 Input Text //*[@id="account-details-input-name"] ${AppAccountName}
1047 Input Text //*[@id="account-details-input-username"] ${AppUserName}
1048 Input Text //*[@id="account-details-input-password"] ${AppPassword}
1049 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
1050 # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
1051 # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
1052 #account-details-next-button
1053 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
kaihlavi5fe4afa2019-08-12 15:55:52 +03001054
Gary Wu9abb61c2018-09-27 10:38:50 -07001055Portal admin Delete Account
1056 Click Link //*[@id="parent-item-App-Account-Management"]
1057 Click Button xpath=//button[@ng-click='toggleSidebar()']
1058 Set Selenium Implicit Wait 3000
1059 Click Button //*[@id="account-onboarding-button-add"]
1060 Set Selenium Implicit Wait 3000
kaihlavi5fe4afa2019-08-12 15:55:52 +03001061
Gary Wu9abb61c2018-09-27 10:38:50 -07001062Tear Down
1063 [Documentation] Close all browsers
1064 Close All Browsers
kaihlavi5fe4afa2019-08-12 15:55:52 +03001065
Gary Wu9abb61c2018-09-27 10:38:50 -07001066Enhanced Notification on ONAP Portal
1067 [Documentation] Runs portal Post request
1068 [Arguments] ${data_path} ${data}
1069 # Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
1070 ${session}= Create Session portal ${PORTAL_URL}
1071 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1072 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
1073 # Log Received response from portal ${resp.text}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001074 [Return] ${resp}
1075
Gary Wu9abb61c2018-09-27 10:38:50 -07001076Notification on ONAP Portal
1077 [Documentation] Create Config portal
1078 ${configportal}= Create Dictionary jira_id=${jira}
DR695H1a207a42019-06-20 17:20:56 -04001079 Create Environment portal ${CURDIR}
1080 ${output} = Apply Template portal ${portal_Template} ${configportal}
Gary Wu9abb61c2018-09-27 10:38:50 -07001081 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1082 Should Be Equal As Strings ${post_resp.status_code} 200
kaihlavi5fe4afa2019-08-12 15:55:52 +03001083
Gary Wu9abb61c2018-09-27 10:38:50 -07001084Portal Application Account Management
kaihlavi5fe4afa2019-08-12 15:55:52 +03001085 [Documentation] Navigate to Application Account Management tab
1086 Click Link xpath=//a[@title='App Account Management']
1087 Click Button xpath=//button[@id='account-onboarding-button-add']
1088 Input Text xpath=//input[@name='name'] JIRA
1089 Input Text xpath=//input[@name='username'] jira
1090 Input Text xpath=//input[@name='password'] _pass
1091 Input Text xpath=//input[@name='repassword'] _pass
1092 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1093 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1094
Gary Wu9abb61c2018-09-27 10:38:50 -07001095Portal Application Account Management validation
kaihlavi5fe4afa2019-08-12 15:55:52 +03001096 [Documentation] Navigate to user notification tab
1097 Click Link xpath=//a[@id='parent-item-User-Notifications']
1098 Click Element xpath=//*[@id="megamenu-notification-button"]
1099 Click Element xpath=//*[@id="notification-history-link"]
1100 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1101 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1102
Gary Wu9abb61c2018-09-27 10:38:50 -07001103Portal AAF new fields
kaihlavi5fe4afa2019-08-12 15:55:52 +03001104 [Documentation] Navigate to user Application details tab
Gary Wu9abb61c2018-09-27 10:38:50 -07001105 Click Link xpath=//a[@title='Application Onboarding']
1106 Click Element xpath=//td[contains(.,'xDemo App')]
1107 Page Should Contain Name Space
1108 Page Should Contain Centralized
kaihlavi5fe4afa2019-08-12 15:55:52 +03001109 Click Element xpath=//button[@id='button-notification-cancel']
1110 Set Selenium Implicit Wait 3000
Gary Wu9abb61c2018-09-27 10:38:50 -07001111
1112Portal Change REST URL
kaihlavi5fe4afa2019-08-12 15:55:52 +03001113 [Documentation] Navigate to user Application details tab
Gary Wu9abb61c2018-09-27 10:38:50 -07001114 Click Link xpath=//a[@title='Application Onboarding']
1115 Click Element xpath=//td[contains(.,'xDemo App')]
1116 Input Text xpath=//input[@name='restUrl'] ${PORTAL_XDEMPAPP_REST_URL}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001117 Click Element xpath=//button[@id='button-save-app']
1118 Set Selenium Implicit Wait 6000
1119 Go To ${PORTAL_HOME_PAGE}
Gary Wu9abb61c2018-09-27 10:38:50 -07001120 Wait Until Element Is Visible xpath=//a[@title='Application Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001121
1122Admin widget download
Gary Wu9abb61c2018-09-27 10:38:50 -07001123 Go To ${PORTAL_HOME_URL}
kaihlavi5fe4afa2019-08-12 15:55:52 +03001124 Wait Until Page Contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1125 Click Link xpath=//a[@title='Widget Onboarding']
1126 Wait Until Page Contains Element xpath=//table[@class='ng-scope']
Gary Wu9abb61c2018-09-27 10:38:50 -07001127 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
kaihlavi5fe4afa2019-08-12 15:55:52 +03001128 Log ${td_id}
Gary Wu9abb61c2018-09-27 10:38:50 -07001129 ${test}= Get Substring ${td_id} -1
kaihlavi5fe4afa2019-08-12 15:55:52 +03001130 Log ${test}
Gary Wu9abb61c2018-09-27 10:38:50 -07001131 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
kaihlavi5fe4afa2019-08-12 15:55:52 +03001132 Click Element xpath=//*[@id=${download_link_id}]
Gary Wu9abb61c2018-09-27 10:38:50 -07001133
1134Reset widget layout option
1135 Go To ${PORTAL_HOME_URL}
1136 Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1137 Execute Javascript document.getElementById('widgets').scrollTo(0,1400)
1138 Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1139 Execute Javascript document.getElementById('widgets').scrollTo(0,1800)
kaihlavi5fe4afa2019-08-12 15:55:52 +03001140 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
Gary Wu9abb61c2018-09-27 10:38:50 -07001141 Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight);
1142 Execute Javascript document.getElementById('dashboardDefaultPreference').click()
1143 Execute Javascript document.getElementById('div-confirm-ok-button').click()
1144
1145Add Portal Admin
1146 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1147 Scroll Element Into View xpath=//button[@id='portal-admin-button-add']
1148 Click Button xpath=//button[@id='portal-admin-button-add']
1149 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
1150 Click Button xpath=//button[@id='button-search-users']
1151 Wait Until Page Contains Element xpath=//span[@id='result-uuid-0'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1152 Click Element xpath=//span[@id='result-uuid-0']
1153 Click Button xpath=//button[@id='pa-search-users-button-save']
1154 Click Button xpath=//button[@id='admin-div-ok-button']
Gary Wu9abb61c2018-09-27 10:38:50 -07001155
1156Delete Portal Admin
kaihlavi5fe4afa2019-08-12 15:55:52 +03001157 Wait Until Page Does Not Contain Element xpath=//*[@class='b2b-modal-header']
Gary Wu9abb61c2018-09-27 10:38:50 -07001158 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1159 Click Element xpath=//td[contains(.,'portal')]/following::span[@id='1-button-portal-admin-remove']
kaihlavi5fe4afa2019-08-12 15:55:52 +03001160 Click Button xpath=//*[@id='div-confirm-ok-button']