blob: 90aa107883bbbd954f44a322709eac86b6bdd380 [file] [log] [blame]
kishore328996f2017-09-08 17:15:42 -05001*** Settings ***
2Documentation This is RobotFrame work script
3Library ExtendedSelenium2Library
4Library OperatingSystem
kishore6eebdba2017-10-03 11:12:57 -05005Library eteutils/RequestsClientCert.py
6Library RequestsLibrary
7Library eteutils/UUID.py
8Library DateTime
9Library Collections
10Library eteutils/OSUtils.py
11Library eteutils/StringTemplater.py
12Library XvfbRobot
kishore6eebdba2017-10-03 11:12:57 -050013Resource json_templater.robot
kishore328996f2017-09-08 17:15:42 -050014
15
16*** Variables ***
kishore4089a332017-10-18 17:02:53 -050017${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989
18${PORTAL_ENV} /ONAPPORTAL
kishore6eebdba2017-10-03 11:12:57 -050019${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
20${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
21${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
22${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
kishore5ea942b2017-10-14 22:19:45 -050023${App_First_Name} demoapp
kishore6eebdba2017-10-03 11:12:57 -050024${App_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050025${App_Email_Address} demoapp@onap.com
26${App_LoginID} demoapp
kishore6eebdba2017-10-03 11:12:57 -050027${App_Loginpwd} demo123456!
28${App_LoginPwdCheck} demo123456!
kishore5ea942b2017-10-14 22:19:45 -050029${Sta_First_Name} demosta
kishore6eebdba2017-10-03 11:12:57 -050030${Sta_Last_Name} demo
kishore5ea942b2017-10-14 22:19:45 -050031${Sta_Email_Address} demosta@onap.com
32${Sta_LoginID} demosta
kishore6eebdba2017-10-03 11:12:57 -050033${Sta_Loginpwd} demo123456!
34${Sta_LoginPwdCheck} demo123456!
35${Test_First_Name} portal
36${Test_Last_Name} demo
37${Test_Email_Address} portal@onap.com
38${Test_LoginID} portal
39${Test_Loginpwd} demo123456!
40${Test_LoginPwdCheck} demo123456!
41${Existing_User} portal
kishore4089a332017-10-18 17:02:53 -050042${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
kishore6eebdba2017-10-03 11:12:57 -050043${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
44${GLOBAL_APPLICATION_ID} robot-functional
45${GLOBAL_PORTAL_ADMIN_USER} demo
46${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
47${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
48${GLOBAL_SELENIUM_BROWSER} chrome
49${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
50${GLOBAL_SELENIUM_DELAY} 0
51${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
52${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
53${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
54${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
55${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
56${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
57${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
58${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
59${GLOBAL_BUILD_NUMBER} 0
60${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
61${jira} jira
kishore4089a332017-10-18 17:02:53 -050062${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050063${portal_Template} ${CURDIR}/portal.template
64
CHINTAMANI68e98362018-04-10 18:56:38 -040065${Result} FALSE
kishore328996f2017-09-08 17:15:42 -050066
67
68*** Test Cases ***
69
70Portal Health Check
71 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050072
73Login into Portal URL
74 Portal admin Login To Portal GUI
75
CHINTAMANI68e98362018-04-10 18:56:38 -040076# Portal R1 Release
77 # [Documentation] ONAP Portal R1 functionality test
78 # Notification on ONAP Portal
79 # Portal Application Account Management validation
kishorebbca0cf2017-10-09 16:59:38 -050080
81Portal R1 Release for AAF
82 [Documentation] ONAP Portal R1 functionality for AAF test
83 Portal AAF new fields
84
CHINTAMANI68e98362018-04-10 18:56:38 -040085#Create Microse service onboarding
86 #Portal admin Microservice Onboarding
kishore5ea942b2017-10-14 22:19:45 -050087
CHINTAMANI68e98362018-04-10 18:56:38 -040088#Delete Microse service
89 #Portal admin Microservice Delete
kishore5ea942b2017-10-14 22:19:45 -050090
CHINTAMANI68e98362018-04-10 18:56:38 -040091#Create Widget for all users
92 #Portal Admin Create Widget for All users
kishore5ea942b2017-10-14 22:19:45 -050093
CHINTAMANI68e98362018-04-10 18:56:38 -040094# Delete Widget for all users
95 # Portal Admin Delete Widget for All users
96
97#Create Widget for Application Roles
98 #Portal Admin Create Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -050099
CHINTAMANI68e98362018-04-10 18:56:38 -0400100#Delete Widget for Application Roles
101 #Portal Admin Delete Widget for Application Roles
102
103#Validate Functional Top Menu Get Access
104 #Functional Top Menu Get Access
kishorebbca0cf2017-10-09 16:59:38 -0500105
CHINTAMANI68e98362018-04-10 18:56:38 -0400106#Validate Functional Top Menu Contact Us
107 #Functional Top Menu Contact Us
108
109#Edit Functional Menu
110 #Portal admin Edit Functional menu
kishorebbca0cf2017-10-09 16:59:38 -0500111
112
CHINTAMANI68e98362018-04-10 18:56:38 -0400113# Broadbond Notification functionality
114 # ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
115 # set global variable ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500116
CHINTAMANI68e98362018-04-10 18:56:38 -0400117# Category Notification functionality
118 # ${AdminCategoryMsg}= Portal Admin Category Notifications
119 # set global variable ${AdminCategoryMsg}
120
121#Create a Test user for Application Admin -Test
122 #Portal admin Add Application admin User New user -Test
kishore5ea942b2017-10-14 22:19:45 -0500123
CHINTAMANI68e98362018-04-10 18:56:38 -0400124#Create a Test User for Apllication Admin
125 #Portal admin Add Application admin User New user
kishore5ea942b2017-10-14 22:19:45 -0500126
CHINTAMANI68e98362018-04-10 18:56:38 -0400127#Add Application Admin for Existing User Test user
128 #Portal admin Add Application Admin Exiting User -APPDEMO
kishore5ea942b2017-10-14 22:19:45 -0500129
CHINTAMANI68e98362018-04-10 18:56:38 -0400130#Create a Test user for Standared User
131 #Portal admin Add Standard User New user
kishore5ea942b2017-10-14 22:19:45 -0500132
CHINTAMANI68e98362018-04-10 18:56:38 -0400133#Add Application Admin for Exisitng User
134 #Portal admin Add Application Admin Exiting User
kishore5ea942b2017-10-14 22:19:45 -0500135
CHINTAMANI68e98362018-04-10 18:56:38 -0400136#Delete Application Admin for Exisitng User
137 #Portal admin Delete Application Admin Existing User
kishore5ea942b2017-10-14 22:19:45 -0500138
CHINTAMANI68e98362018-04-10 18:56:38 -0400139# Add Standard User Role for Existing user
140 # Portal admin Add Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500141
CHINTAMANI68e98362018-04-10 18:56:38 -0400142# Edit Standard User Role for Existing user
143 # Portal admin Edit Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500144
145
CHINTAMANI68e98362018-04-10 18:56:38 -0400146#Delete Standard User Role for Existing user
147 #Portal admin Delete Standard User Existing user
148
kishorebbca0cf2017-10-09 16:59:38 -0500149Logout from Portal GUI as Portal Admin
150 Portal admin Logout from Portal GUI
kishore5ea942b2017-10-14 22:19:45 -0500151
CHINTAMANI68e98362018-04-10 18:56:38 -0400152# Application Admin user Test cases
153
154#Login To Portal GUI as APP Admin
155 #Application admin Login To Portal GUI
156
kishore92d70d62017-10-11 14:51:31 -0500157##Navigate Functional Link as APP Admin
158## Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500159
CHINTAMANI68e98362018-04-10 18:56:38 -0400160# Add Standard User Role for Existing user as APP Admin
161 # Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500162
CHINTAMANI68e98362018-04-10 18:56:38 -0400163# Edit Standard User Role for Existing user as APP Admin
164 # Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500165
CHINTAMANI68e98362018-04-10 18:56:38 -0400166# Delete Standard User Role for Existing user as APP Admin
167 # Application admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500168
CHINTAMANI68e98362018-04-10 18:56:38 -0400169# #Navigate Application Link as APP Admin
170# # Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500171
CHINTAMANI68e98362018-04-10 18:56:38 -0400172#Logout from Portal GUI as APP Admin
173 #Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500174
CHINTAMANI68e98362018-04-10 18:56:38 -0400175#Standard User Test cases
kishorebbca0cf2017-10-09 16:59:38 -0500176
CHINTAMANI68e98362018-04-10 18:56:38 -0400177#Login To Portal GUI as Standared User
178 #Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500179
180#Navigate Application Link as Standared User
181# Standared user Navigation Application Link Tab
182
kishore92d70d62017-10-11 14:51:31 -0500183##Navigate Functional Link as Standared User
184## Standared user Navigation Functional Menu
CHINTAMANI68e98362018-04-10 18:56:38 -0400185
kishorebbca0cf2017-10-09 16:59:38 -0500186
CHINTAMANI68e98362018-04-10 18:56:38 -0400187# Broadcast Notifications Standared user
188 # Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500189
CHINTAMANI68e98362018-04-10 18:56:38 -0400190# Category Notifications Standared user
191 # Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500192
193
kishore328996f2017-09-08 17:15:42 -0500194Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500195 [Documentation] Close All Open browsers
196 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500197
kishore328996f2017-09-08 17:15:42 -0500198*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500199
200Setup Browser
201 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
202# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
203 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
204 Log Running with ${GLOBAL_SELENIUM_BROWSER}
205
206
207 Setup Browser Chrome
208 ${os}= Get Normalized Os
209 Log Normalized OS=${os}
210 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
211 Call Method ${chrome options} add_argument no-sandbox
212 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
213 Set To Dictionary ${dc} elementScrollBehavior 1
214 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
215 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
216
217Handle Proxy Warning
218 [Documentation] Handle Intermediate Warnings from Proxies
219 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
220 Return From Keyword if '${status}' != 'PASS'
221 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
222 Return From Keyword if '${status}' != 'PASS'
223 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
224 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
225 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
226 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
227
228
kishore6eebdba2017-10-03 11:12:57 -0500229Run Portal Health Check
230 [Documentation] Runs Portal Health check
231 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
232 Should Be Equal As Strings ${resp.status_code} 200
233 Should Be Equal As Strings ${resp.json()['statusCode']} 200
234Run Portal Get Request
235 [Documentation] Runs Portal Get request
236 [Arguments] ${data_path}
237 ${session}= Create Session portal ${PORTAL_URL}
238 ${uuid}= Generate UUID
239 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
240 ${resp}= Get Request portal ${data_path} headers=${headers}
241 Log Received response from portal ${resp.text}
242 [Return] ${resp}
243
244
245Portal admin Login To Portal GUI
246 [Documentation] Logs into Portal GUI
247 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500248# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500249 Start Virtual Display 1920 1080
250 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500251# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500252 Maximize Browser Window
253 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
254 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
255 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
256 # Handle Proxy Warning
257 Title Should Be Login
258 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
259 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
260 Click Link xpath=//a[@id='loginBtn']
261 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
262 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
263
264Portal admin Go To Portal HOME
265 [Documentation] Naviage to Portal Home
266 Go To ${PORTAL_HOME_URL}
267 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
268
269Portal admin User Notifications
270 [Documentation] Naviage to User notification tab
271 Click Link xpath=//a[@id='parent-item-User-Notifications']
272 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
273 Click Button xpath=//button[@id='button-openAddNewApp']
274 Click Button xpath=(//button[@id='undefined'])[1]
275 #Click Button xpath=//input[@id='datepicker-start']
276
277
278
279
280Portal admin Add Application Admin Exiting User
281 [Documentation] Naviage to Admins tab
282 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
283 Click Link xpath=//a[@title='Admins']
284 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
285 Page Should Contain Admins
286 Click Button xpath=//button[@ng-click='toggleSidebar()']
287 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500288 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500289 Click Button xpath=//button[@id='button-search-users']
290 Click Element xpath=//span[@id='result-uuid-0']
291 Click Button xpath=//button[@id='search-users-button-next']
292 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500293 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500294 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400295# Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
296# Click Element xpath=(//li[contains(.,'Default' )])[2]
kishore92d70d62017-10-11 14:51:31 -0500297 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500298 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
299 Click Element xpath=//button[@id='admin-div-ok-button']
300 Click Element xpath=//button[@id='div-confirm-ok-button']
301 Get Selenium Implicit Wait
302 Click Link xpath=//a[@aria-label='Admins']
303 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400304# Click Element xpath=//li[contains(.,'Default' )]
kishore92d70d62017-10-11 14:51:31 -0500305 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500306 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500307 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
308 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500309 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500310
311
312Portal admin Delete Application Admin Existing User
313 [Documentation] Naviage to Admins tab
CHINTAMANI68e98362018-04-10 18:56:38 -0400314 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
315 Click Link xpath=//a[@title='Admins']
316 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
317 Page Should Contain Admins
318 Click Button xpath=//button[@ng-click='toggleSidebar()']
319 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500320 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500321 #Click Element xpath=(//span[contains(.,'demo')] )[1]
322 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
CHINTAMANI68e98362018-04-10 18:56:38 -0400323# Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500324 Click Element xpath=//button[@id='div-confirm-ok-button']
325 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
326 Click Element xpath=//button[@id='admin-div-ok-button']
327 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
328 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
329 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500330 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500331 Click Image xpath=//img[@alt='Onap Logo']
332 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500333
334
335Portal admin Add Application admin User New user
336 [Documentation] Naviage to Users tab
337 Click Link xpath=//a[@title='Users']
338 Page Should Contain Users
339 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500340 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500341 Click Button xpath=//button[@id='Create-New-User-button']
342 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
343 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
344 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
345 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
346 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
347 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
348 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400349
350 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
351
352 #log ${Result}
353 #${type_result}= Evaluate type(${Result})
354 #log ${type_result}
355
356 Run Keyword if '${Result}'== 0 AdminUser does not exist already
357 ... ELSE Goto Home Image
358 Set Selenium Implicit Wait 3000
359
360Goto Home Image
361 Click Image xpath=//img[@alt='Onap Logo']
362
363AdminUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500364 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500365 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
366 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
367 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500368 Set Selenium Implicit Wait 3000
369 Click Button xpath=//button[@id='new-user-save-button']
370 Set Selenium Implicit Wait 3000
371 Go To ${PORTAL_HOME_PAGE}
372 Click Link xpath=//a[@title='Users']
373 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500374 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500375 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
376 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500377 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
378 Click Image xpath=//img[@alt='Onap Logo']
379 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500380
381
382Portal admin Add Standard User New user
383 [Documentation] Naviage to Users tab
384 Click Link xpath=//a[@title='Users']
385 Page Should Contain Users
386 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500387 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500388 Click Button xpath=//button[@id='Create-New-User-button']
389 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
390 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
391 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
392 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
393 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
394 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
395 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400396
397 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
398
399 #log ${Result}
400 #${type_result}= Evaluate type(${Result})
401 #log ${type_result}
402
403 Run Keyword if '${Result}'== 0 StaUser does not exist already
404 ... ELSE Goto Home Image
405 Set Selenium Implicit Wait 3000
406
407StaUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500408 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500409 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
410 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
411 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500412 Set Selenium Implicit Wait 3000
413 Click Button xpath=//button[@id='new-user-save-button']
414 Set Selenium Implicit Wait 3000
415 Go To ${PORTAL_HOME_PAGE}
416 Click Link xpath=//a[@title='Users']
417 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500418 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500419 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
420 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500421 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
422 Click Image xpath=//img[@alt='Onap Logo']
423 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500424
425
426
427Portal admin Add Application admin User New user -Test
428 [Documentation] Naviage to Users tab
429 Click Link xpath=//a[@title='Users']
430 Page Should Contain Users
431 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500432 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500433 Click Button xpath=//button[@id='Create-New-User-button']
434 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
435 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
436 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
437 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
438 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
439 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
440 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500441 Click Button xpath=//button[@id='search-users-button-cancel']
442 Click Image xpath=//img[@alt='Onap Logo']
443 Set Selenium Implicit Wait 3000
444
445
446 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500447 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500448 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
449 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
450 #Set Selenium Implicit Wait 3000
451 #Click Button xpath=//button[@id='new-user-save-button']
452 #Set Selenium Implicit Wait 3000
453 #Go To ${PORTAL_HOME_PAGE}
454 #Click Link xpath=//a[@title='Users']
455 #Click Element xpath=//input[@id='dropdown1']
456 #Click Element xpath=//li[contains(.,'xDemo App')]
457 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500458 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
459 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500460
461
462
463Portal admin Add Application Admin Exiting User -APPDEMO
464 [Documentation] Naviage to Admins tab
465 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
466 Click Link xpath=//a[@title='Admins']
467 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
468 Page Should Contain Admins
469 Click Button xpath=//button[@ng-click='toggleSidebar()']
470 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
471 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
472 Click Button xpath=//button[@id='button-search-users']
473 Click Element xpath=//span[@id='result-uuid-0']
474 Click Button xpath=//button[@id='search-users-button-next']
475 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500476 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500477 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
478 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500479 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
480 Click Element xpath=//button[@id='admin-div-ok-button']
481 Click Element xpath=//button[@id='div-confirm-ok-button']
482 Get Selenium Implicit Wait
483 Click Link xpath=//a[@aria-label='Admins']
484 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500485 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500486 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500487 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
488 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
489 Click Image xpath=//img[@alt='Onap Logo']
490 Set Selenium Implicit Wait 3000
CHINTAMANI68e98362018-04-10 18:56:38 -0400491
kishore6eebdba2017-10-03 11:12:57 -0500492Portal admin Add Standard User Existing user
493 [Documentation] Naviage to Users tab
494 Click Link xpath=//a[@title='Users']
495 Page Should Contain Users
496 Click Button xpath=//button[@ng-click='toggleSidebar()']
497 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
498 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
499 Click Button xpath=//button[@id='button-search-users']
500 Click Element xpath=//span[@id='result-uuid-0']
501 Click Button xpath=//button[@id='next-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400502# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
503# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
504 Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
505 Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500506 Set Selenium Implicit Wait 3000
507 Click Button xpath=//button[@id='new-user-save-button']
508 Set Selenium Implicit Wait 3000
509 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500510 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500511 #Click Link xpath=//a[@title='Users']
512 #Page Should Contain Users
513 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500514 Go To ${PORTAL_HOME_PAGE}
515 Click Link xpath=//a[@title='Users']
516 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400517# Click Element xpath=//li[contains(.,'Default')]
518 Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500519 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400520 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
521 Set Selenium Implicit Wait 3000
522
kishore6eebdba2017-10-03 11:12:57 -0500523Portal admin Edit Standard User Existing user
524 [Documentation] Naviage to Users tab
525 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400526# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
527# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
528# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore92d70d62017-10-11 14:51:31 -0500529 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
530 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANI68e98362018-04-10 18:56:38 -0400531 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Portal-Notification-Admin-checkbox']
532# Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
533# Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
534# Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500535 Set Selenium Implicit Wait 3000
536 Click Button xpath=//button[@id='new-user-save-button']
537 Set Selenium Implicit Wait 3000
538 Page Should Contain Users
539 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500540 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500541 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
542 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
CHINTAMANI68e98362018-04-10 18:56:38 -0400543 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500544
545 Portal admin Delete Standard User Existing user
546 [Documentation] Naviage to Users tab
547 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400548# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
549# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500550 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
551 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
CHINTAMANI68e98362018-04-10 18:56:38 -0400552# Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
553# Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500554 Click Element xpath=//button[@id='div-confirm-ok-button']
555 Click Button xpath=//button[@id='new-user-save-button']
556 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400557 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
558 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
559 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
560 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500561
562Functional Top Menu Get Access
563 [Documentation] Naviage to Support tab
564 Click Link xpath=//a[contains(.,'Support')]
565 Mouse Over xpath=//*[contains(text(),'Get Access')]
566 Click Link xpath=//a[contains(.,'Get Access')]
567 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400568 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500569
570Functional Top Menu Contact Us
571 [Documentation] Naviage to Support tab
572 Click Link xpath=//a[contains(.,'Support')]
573 Mouse Over xpath=//*[contains(text(),'Contact Us')]
574 Click Link xpath=//a[contains(.,'Contact Us')]
575 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
576 Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400577 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500578
579Portal admin Edit Functional menu
580 [Documentation] Naviage to Edit Functional menu tab
581 Click Link xpath=//a[@title='Edit Functional Menu']
582 Click Link xpath=.//*[@id='Manage']/div/a
583 Click Link xpath=.//*[@id='Design']/div/a
584 Click Link xpath=.//*[@id='Product_Design']/div/a
585 Open Context Menu xpath=//*[@id='Product_Design']/div/span
586 Click Link xpath=//a[@href='#add']
587 Input Text xpath=//input[@id='input-title'] ONAP Test
588 #Input Text xpath=//input[@id='input-url'] http://google.com
589 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500590 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
591 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500592 Input Text xpath=//input[@id='input-url'] http://google.com
593 Click Button xpath=//button[@id='button-save-continue']
594 #Click Button xpath=//div[@title='Select Roles']
595 Click Element xpath=//*[@id='app-select-Select Roles']
596 Click Element xpath=//input[@id='Standard-User-checkbox']
597 Click Element xpath=//button[@id='button-save-add']
598 Click Image xpath=//img[@alt='Onap Logo']
599 Set Selenium Implicit Wait 3000
600 Click Link xpath=//a[contains(.,'Manage')]
601 Mouse Over xpath=//*[contains(text(),'Design')]
602 Set Selenium Implicit Wait 3000
603 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
604 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500605 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500606 Click Link xpath=//a[@title='Edit Functional Menu']
607 Click Link xpath=.//*[@id='Manage']/div/a
608 Click Link xpath=.//*[@id='Design']/div/a
609 Click Link xpath=.//*[@id='Product_Design']/div/a
610 Open Context Menu xpath=//*[@id='ONAP_Test']
611 Click Link xpath=//a[@href='#delete']
612 Set Selenium Implicit Wait 3000
613 Click Element xpath=//button[@id='div-confirm-ok-button']
614 Click Image xpath=//img[@alt='Onap Logo']
615 Set Selenium Implicit Wait 3000
616 Click Link xpath=//a[contains(.,'Manage')]
617 Mouse Over xpath=//*[contains(text(),'Design')]
618 Set Selenium Implicit Wait 3000
619 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
CHINTAMANI68e98362018-04-10 18:56:38 -0400620 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500621
622
623Portal admin Microservice Onboarding
624 [Documentation] Naviage to Edit Functional menu tab
625 Click Link xpath=//a[@title='Microservice Onboarding']
626 Click Button xpath=//button[@id='microservice-onboarding-button-add']
627 Input Text xpath=//input[@name='name'] Test Microservice
628 Input Text xpath=//*[@name='desc'] Test
629 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500630 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
631 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500632 Click Element xpath=//*[@name='desc']
633 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
634 Click Element xpath=//input[@id='microservice-details-input-security-type']
635 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
636 Click Element xpath=//li[contains(.,'Basic Authentication')]
637 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
638 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
639 Click Button xpath=//button[@id='microservice-details-save-button']
640 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
641 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
CHINTAMANI68e98362018-04-10 18:56:38 -0400642 Set Selenium Implicit Wait 3000
643
644Portal admin Microservice Delete
645 [Documentation] Naviage to Edit Functional menu tab
646 Click Link xpath=//a[@title='Microservice Onboarding']
647 Click Button xpath=//button[@id='microservice-onboarding-button-add']
648 Input Text xpath=//input[@name='name'] TestMS
649 Input Text xpath=//*[@name='desc'] TestMS
650 Click Element xpath=//input[@id='microservice-details-input-app']
651 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
652 Click Element xpath=//li[contains(.,'xDemo App')]
653 Click Element xpath=//*[@name='desc']
654 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
655 Click Element xpath=//input[@id='microservice-details-input-security-type']
656 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
657 Click Element xpath=//li[contains(.,'Basic Authentication')]
658 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
659 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
660 Click Button xpath=//button[@id='microservice-details-save-button']
661 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 TestMS
662 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
663 Click Button xpath=//button[@id="div-confirm-ok-button"]
664 Set Selenium Implicit Wait 3000
665
kishore6eebdba2017-10-03 11:12:57 -0500666Portal Admin Create Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400667 [Documentation] Navigate to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600668 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kishore6eebdba2017-10-03 11:12:57 -0500669 Click Link xpath=//a[@title='Widget Onboarding']
670 Click Button xpath=//button[@ng-click='toggleSidebar()']
671 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500672 Input Text xpath=//*[@name='name'] ONAP-xDemo
673 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500674 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
675 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
676 Click Element xpath=//li[contains(.,'Test Microservice')]
677 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
678 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
679 Click Button xpath=//button[@id='widgets-details-save-button']
kishore92d70d62017-10-11 14:51:31 -0500680 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
681 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500682 Set Selenium Implicit Wait 3000
683 GO TO ${PORTAL_HOME_PAGE}
684
685
686Portal Admin Delete Widget for All users
687 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500688 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
689 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500690 #Click Image xpath=//img[@alt='Onap Logo']
691 Click Link xpath=//a[@title='Widget Onboarding']
692 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500693 Click Element xpath=//li[contains(.,'xDemo App')]
694 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
695 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500696 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500697 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500698 Click Element xpath=//button[@id='div-confirm-ok-button']
699 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500700 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500701 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500702 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500703 #Set Selenium Implicit Wait 3000
704
kishore6eebdba2017-10-03 11:12:57 -0500705Portal Admin Create Widget for Application Roles
706 [Documentation] Naviage to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600707 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kishore6eebdba2017-10-03 11:12:57 -0500708 Click Link xpath=//a[@title='Widget Onboarding']
709 Click Button xpath=//button[@ng-click='toggleSidebar()']
710 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500711 Input Text xpath=//*[@name='name'] ONAP-xDemo
712 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500713 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
714 Scroll Element Into View xpath=//li[contains(.,'Test Microservice')]
715 Click Element xpath=//li[contains(.,'Test Microservice')]
716 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500717 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500718 Click element xpath=//*[@name='desc']
719 click element xpath=//*[@id="app-select-Select Roles"]
720 click element xpath=//*[@id="Standard-User-checkbox"]
721 Click element xpath=//*[@name='desc']
722 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
723 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
724 Click Button xpath=//button[@id='widgets-details-save-button']
725 Click Image xpath=//img[@alt='Onap Logo']
726 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500727 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500728 Click Link xpath=//a[@title='Widget Onboarding']
729 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500730 Click Element xpath=//li[contains(.,'xDemo App')]
731 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500732 Set Selenium Implicit Wait 3000
733 GO TO ${PORTAL_HOME_PAGE}
CHINTAMANI68e98362018-04-10 18:56:38 -0400734
kishore92d70d62017-10-11 14:51:31 -0500735Portal Admin Delete Widget for Application Roles
736 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
737 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500738 #Click Image xpath=//img[@alt='Onap Logo']
739 Click Link xpath=//a[@title='Widget Onboarding']
740 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500741 Click Element xpath=//li[contains(.,'xDemo App')]
742 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
743 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishorebbca0cf2017-10-09 16:59:38 -0500744 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500745 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
746 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500747 Click Element xpath=//button[@id='div-confirm-ok-button']
748 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500749 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500750 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500751 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
CHINTAMANI68e98362018-04-10 18:56:38 -0400752 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500753
754
755
756Portal Admin Edit Widget
757 [Documentation] Naviage to Home tab
758 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
759 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
760 Set Browser Implicit Wait 8000
761 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
762 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
763 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
764 Input Text xpath=//input[@name='title'] ONAP_VID
765 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
766 Input Text xpath=//input[@id='widget-input-add-order'] 5
767 Click Link xpath=//a[contains(.,'Add New')]
768 Click Element xpath=//div[@id='close-button']
769 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
770 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
771 Click Element xpath=//div[@id='confirmation-button-next']
772 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
773 Click Link xpath=//a[@id='close-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400774 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500775
776Portal Admin Broadcast Notifications
777 [Documentation] Portal Test Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400778
779 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
780 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
781 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500782 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
783 Click Image xpath=//img[@alt='Onap Logo']
784 Set Selenium Implicit Wait 3000
785 Click Link xpath=//*[@id="parent-item-User-Notifications"]
786 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
787 Click button xpath=//*[@id="button-openAddNewApp"]
788 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
789 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
790 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
791 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
792 click element xpath=//*[@id="button-notification-save"]
793 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
794 click element xpath=//*[@id="megamenu-notification-button"]
795 click element xpath=//*[@id="notification-history-link"]
796 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
CHINTAMANI68e98362018-04-10 18:56:38 -0400797 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
798 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500799 log ${AdminBroadCastMsg}
800 [Return] ${AdminBroadCastMsg}
801
802Portal Admin Category Notifications
803 [Documentation] Portal Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400804 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
805 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
806# ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
807 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500808 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
809 Click Link xpath=//a[@id='parent-item-Home']
810 Click Link xpath=//*[@id="parent-item-User-Notifications"]
811 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
812 Click button xpath=//*[@id="button-openAddNewApp"]
813 #Select Radio Button NO radio-button-no
814 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
815 #Select Radio Button //label[@class='radio'] radio-button-approles
816 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500817 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500818 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
819 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
820 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
821 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
822 click element xpath=//*[@id="button-notification-save"]
823 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
824 click element xpath=//*[@id="megamenu-notification-button"]
825 click element xpath=//*[@id="notification-history-link"]
826 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
CHINTAMANI68e98362018-04-10 18:56:38 -0400827 Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
828 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500829 log ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400830 [Return] ${AdminCategoryMsg}
kishore6eebdba2017-10-03 11:12:57 -0500831
832
kishorebbca0cf2017-10-09 16:59:38 -0500833Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500834 [Documentation] Logout from Portal GUI
835 Click Element xpath=//div[@id='header-user-icon']
836 Click Button xpath=//button[contains(.,'Log out')]
837 Title Should Be Login
838
839
840
841Application admin Login To Portal GUI
842 [Documentation] Logs into Portal GUI
843 # Setup Browser Now being managed by test case
844 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500845# Go To ${PORTAL_LOGIN_URL}
846# Maximize Browser Window
847# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
848# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
849# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500850 # Handle Proxy Warning
851 Title Should Be Login
852 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
853 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
854 Click Link xpath=//a[@id='loginBtn']
855 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
856 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
857
858Application Admin Navigation Application Link Tab
859 [Documentation] Logs into Portal GUI as application admin
860 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500861 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
862 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500863 Scroll Element Into View xpath=//i[@class='ion-close-round']
864 Click Element xpath=//i[@class='ion-close-round']
865 Set Selenium Implicit Wait 3000
866 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500867
868
869Application Admin Navigation Functional Menu
870 [Documentation] Logs into Portal GUI as application admin
871 Click Link xpath=//a[contains(.,'Manage')]
872 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
873 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500874 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500875 Click Element xpath=//i[@class='ion-close-round']
876 Click Element xpath=(.//span[@id='tab-Home'])[1]
877
878
879Application admin Add Standard User Existing user
880 [Documentation] Naviage to Users tab
881 Click Link xpath=//a[@title='Users']
882 Page Should Contain Users
883 Click Button xpath=//button[@ng-click='toggleSidebar()']
884 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
885 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
886 Click Button xpath=//button[@id='button-search-users']
887 Click Element xpath=//span[@id='result-uuid-0']
888 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500889 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
CHINTAMANI68e98362018-04-10 18:56:38 -0400890 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500891 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500892 Set Selenium Implicit Wait 3000
893 Click Button xpath=//button[@id='new-user-save-button']
894 Set Selenium Implicit Wait 3000
895 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500896 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500897 #Click Link xpath=//a[@title='Users']
898 #Page Should Contain Users
899 Go To ${PORTAL_HOME_PAGE}
900 Set Selenium Implicit Wait 3000
901 Click Link xpath=//a[@title='Users']
902 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500903 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500904 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
905 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
906
907
908Application admin Edit Standard User Existing user
909 [Documentation] Naviage to Users tab
910 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400911# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
912# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
913# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore92d70d62017-10-11 14:51:31 -0500914 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
915 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANI68e98362018-04-10 18:56:38 -0400916 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500917 Set Selenium Implicit Wait 3000
918 Click Button xpath=//button[@id='new-user-save-button']
919 Set Selenium Implicit Wait 3000
920 Page Should Contain Users
921 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500922 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500923 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
924 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
925
926
927Application admin Delete Standard User Existing user
928 [Documentation] Naviage to Users tab
929 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400930# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
931# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500932 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
933 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500934 Click Element xpath=//button[@id='div-confirm-ok-button']
935 Click Button xpath=//button[@id='new-user-save-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400936# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
937# Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore6eebdba2017-10-03 11:12:57 -0500938 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore72d3adf2017-10-19 11:05:22 -0500939 #Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400940 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500941
942
943
944Application admin Logout from Portal GUI
945 [Documentation] Logout from Portal GUI
946 Click Element xpath=//div[@id='header-user-icon']
kishore72d3adf2017-10-19 11:05:22 -0500947 #Set Selenium Implicit Wait 3000
kishore82eb79a2017-10-31 08:04:25 -0500948 Click Button xpath=//button[contains(text(),'Log out')]
kishore72d3adf2017-10-19 11:05:22 -0500949 #Set Selenium Implicit Wait 3000
kishore4089a332017-10-18 17:02:53 -0500950 Title Should Be Login
951
952
953
kishore6eebdba2017-10-03 11:12:57 -0500954
955
956Standared user Login To Portal GUI
957 [Documentation] Logs into Portal GUI
958 # Setup Browser Now being managed by test case
959 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500960# Go To ${PORTAL_LOGIN_URL}
961# Maximize Browser Window
962# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
963# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
964# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500965 # Handle Proxy Warning
966 Title Should Be Login
967 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
968 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
969 Click Link xpath=//a[@id='loginBtn']
970 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
971 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
972
973
974Standared user Navigation Application Link Tab
975 [Documentation] Logs into Portal GUI as application admin
976 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -0500977 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
978 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500979 Click Element xpath=(.//span[@id='tab-Home'])[1]
CHINTAMANI68e98362018-04-10 18:56:38 -0400980 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500981
982Standared user Navigation Functional Menu
983 [Documentation] Logs into Portal GUI as application admin
984 Click Link xpath=//a[contains(.,'Manage')]
CHINTAMANI68e98362018-04-10 18:56:38 -0400985 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
986 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
987 Page Should Contain Welcome to VID
988 Click Element xpath=(.//span[@id='tab-Home'])[1]
989 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500990
991
992Standared user Broadcast Notifications
993 [Documentation] Logs into Portal GUI as application admin
994 [Arguments] ${AdminBroadCastMsg}
995 Click element xpath=//*[@id='megamenu-notification-button']
996 Click element xpath=//*[@id='notification-history-link']
997 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
998 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
999 log ${AdminBroadCastMsg}
1000
1001
1002Standared user Category Notifications
1003 [Documentation] Logs into Portal GUI as application admin
1004 [Arguments] ${AdminCategoryMsg}
1005 #click element xpath=//*[@id='megamenu-notification-button']
1006 #click element xpath=//*[@id="notification-history-link"]
1007 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1008 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1009 log ${AdminCategoryMsg}
1010
1011
1012Standared user Logout from Portal GUI
1013 [Documentation] Logout from Portal GUI
1014 Click Element xpath=//div[@id='header-user-icon']
1015 Click Button xpath=//button[contains(.,'Log out')]
1016 #Confirm Action
1017 Title Should Be Login
1018
1019
1020
1021
1022Tear Down
1023 [Documentation] Close all browsers
1024 Close All Browsers
1025
1026
1027Enhanced Notification on ONAP Portal
1028 [Documentation] Runs portal Post request
1029 [Arguments] ${data_path} ${data}
kishorebbca0cf2017-10-09 16:59:38 -05001030# Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -05001031 ${session}= Create Session portal ${PORTAL_URL}
1032 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1033 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
1034# Log Received response from portal ${resp.text}
1035 [Return] ${resp}
1036
1037
1038
1039Notification on ONAP Portal
1040 [Documentation] Create Config portal
1041 ${configportal}= Create Dictionary jira_id=${jira}
1042 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
1043 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1044 Should Be Equal As Strings ${post_resp.status_code} 200
1045
1046
1047
1048
1049Portal Application Account Management
1050 [Documentation] Naviage to Application Account Management tab
1051 Click Link xpath=//a[@title='App Account Management']
1052 Click Button xpath=//button[@id='account-onboarding-button-add']
1053 Input Text xpath=//input[@name='name'] JIRA
1054 Input Text xpath=//input[@name='username'] jira
1055 Input Text xpath=//input[@name='password'] _pass
1056 Input Text xpath=//input[@name='repassword'] _pass
1057 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1058 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1059
1060Portal Application Account Management validation
1061 [Documentation] Naviage to user notification tab
1062 Click Link xpath=//a[@id='parent-item-User-Notifications']
1063 click element xpath=//*[@id="megamenu-notification-button"]
1064 Click element xpath=//*[@id="notification-history-link"]
1065 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1066 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1067
1068
1069Portal AAF new fields
1070 [Documentation] Naviage to user Application details tab
1071 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001072 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001073 Page Should Contain Name Space
1074 Page Should Contain Centralized
1075 Click Element xpath=//button[@id='button-notification-cancel']
1076
1077
kishorebbca0cf2017-10-09 16:59:38 -05001078