blob: b2728f06fdf17d7b5ce7de260e99a427aef1641c [file] [log] [blame]
kishore328996f2017-09-08 17:15:42 -05001*** Settings ***
2Documentation This is RobotFrame work script
CHINTAMANIaf44d442018-04-25 12:38:44 -04003Library ExtendedSelenium2Library
4Library OperatingSystem
5Library eteutils/RequestsClientCert.py
6Library RequestsLibrary
7Library eteutils/UUID.py
8Library DateTime
9Library Collections
10Library eteutils/OSUtils.py
11Library eteutils/StringTemplater.py
12Library String
13Library XvfbRobot
14Resource json_templater.robot
kishore328996f2017-09-08 17:15:42 -050015
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!
CHINTAMANIaf44d442018-04-25 12:38:44 -040047${AppAccountName} testApp
48${AppUserName} testApp
49${AppPassword} testApp123!
kishore6eebdba2017-10-03 11:12:57 -050050${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
51${GLOBAL_SELENIUM_BROWSER} chrome
52${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
53${GLOBAL_SELENIUM_DELAY} 0
54${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
55${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
56${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
57${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
58${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
59${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
60${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
61${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
62${GLOBAL_BUILD_NUMBER} 0
63${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
64${jira} jira
kishore4089a332017-10-18 17:02:53 -050065${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050066${portal_Template} ${CURDIR}/portal.template
67
CHINTAMANI68e98362018-04-10 18:56:38 -040068${Result} FALSE
CHINTAMANIaf44d442018-04-25 12:38:44 -040069${td_id} 0
70${download_link_id} 0
kishore328996f2017-09-08 17:15:42 -050071
72*** Test Cases ***
73
74Portal Health Check
75 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050076
77Login into Portal URL
78 Portal admin Login To Portal GUI
79
CHINTAMANI68e98362018-04-10 18:56:38 -040080# Portal R1 Release
81 # [Documentation] ONAP Portal R1 functionality test
82 # Notification on ONAP Portal
83 # Portal Application Account Management validation
kishorebbca0cf2017-10-09 16:59:38 -050084
85Portal R1 Release for AAF
86 [Documentation] ONAP Portal R1 functionality for AAF test
87 Portal AAF new fields
88
CHINTAMANIaf44d442018-04-25 12:38:44 -040089Create Microse service onboarding
90 Portal admin Microservice Onboarding
kishore5ea942b2017-10-14 22:19:45 -050091
CHINTAMANIaf44d442018-04-25 12:38:44 -040092##Delete Microse service
93 ##Portal admin Microservice Delete
kishore5ea942b2017-10-14 22:19:45 -050094
CHINTAMANIaf44d442018-04-25 12:38:44 -040095Create Widget for all users
96 Portal Admin Create Widget for All users
kishore5ea942b2017-10-14 22:19:45 -050097
CHINTAMANIaf44d442018-04-25 12:38:44 -040098Delete Widget for all users
99 Portal Admin Delete Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400100
CHINTAMANIaf44d442018-04-25 12:38:44 -0400101Create Widget for Application Roles
102 Portal Admin Create Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -0500103
CHINTAMANI68e98362018-04-10 18:56:38 -0400104#Delete Widget for Application Roles
CHINTAMANIaf44d442018-04-25 12:38:44 -0400105 #Portal Admin Delete Widget for Application Roles
CHINTAMANI68e98362018-04-10 18:56:38 -0400106
CHINTAMANIaf44d442018-04-25 12:38:44 -0400107#EP Admin widget download
108 #Admin widget download
kishorebbca0cf2017-10-09 16:59:38 -0500109
CHINTAMANIaf44d442018-04-25 12:38:44 -0400110#EP Admin widget layout reset
111 #Reset widget layout option
112
113Validate Functional Top Menu Get Access
114 Functional Top Menu Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400115
CHINTAMANIaf44d442018-04-25 12:38:44 -0400116Validate Functional Top Menu Contact Us
117 Functional Top Menu Contact Us
kishorebbca0cf2017-10-09 16:59:38 -0500118
CHINTAMANIaf44d442018-04-25 12:38:44 -0400119Edit Functional Menu
120 Portal admin Edit Functional menu
kishorebbca0cf2017-10-09 16:59:38 -0500121
CHINTAMANIaf44d442018-04-25 12:38:44 -0400122Broadbond Notification functionality
123 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
124 set global variable ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500125
CHINTAMANIaf44d442018-04-25 12:38:44 -0400126Category Notification functionality
127 ${AdminCategoryMsg}= Portal Admin Category Notifications
128 set global variable ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400129
CHINTAMANIaf44d442018-04-25 12:38:44 -0400130Create a Test user for Application Admin -Test
131 Portal admin Add Application admin User New user -Test
kishore5ea942b2017-10-14 22:19:45 -0500132
CHINTAMANIaf44d442018-04-25 12:38:44 -0400133Create a Test User for Apllication Admin
134 Portal admin Add Application admin User New user
kishore5ea942b2017-10-14 22:19:45 -0500135
CHINTAMANIaf44d442018-04-25 12:38:44 -0400136Add Application Admin for Existing User Test user
137 Portal admin Add Application Admin Exiting User -APPDEMO
kishore5ea942b2017-10-14 22:19:45 -0500138
CHINTAMANIaf44d442018-04-25 12:38:44 -0400139Create a Test user for Standared User
140 Portal admin Add Standard User New user
kishore5ea942b2017-10-14 22:19:45 -0500141
CHINTAMANIaf44d442018-04-25 12:38:44 -0400142Add Application Admin for Exisitng User
143 Portal admin Add Application Admin Exiting User
kishore5ea942b2017-10-14 22:19:45 -0500144
CHINTAMANIaf44d442018-04-25 12:38:44 -0400145Delete Application Admin for Exisitng User
146 Portal admin Delete Application Admin Existing User
kishore5ea942b2017-10-14 22:19:45 -0500147
CHINTAMANIaf44d442018-04-25 12:38:44 -0400148#Add Standard User Role for Existing user
149 #Portal admin Add Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500150
CHINTAMANIaf44d442018-04-25 12:38:44 -0400151#Edit Standard User Role for Existing user
152 #Portal admin Edit Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500153
CHINTAMANI68e98362018-04-10 18:56:38 -0400154#Delete Standard User Role for Existing user
CHINTAMANIaf44d442018-04-25 12:38:44 -0400155 #Portal admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500156
CHINTAMANIaf44d442018-04-25 12:38:44 -0400157#Add Account new account from App Account Management
158 #Portal admin Add New Account
159
160#Delete Account new account from App Account Management
161 #Portal admin Delete Account
162
163Logout from Portal GUI as Portal Admin
164 Portal admin Logout from Portal GUI
165
166## Application Admin user Test cases
CHINTAMANI68e98362018-04-10 18:56:38 -0400167
CHINTAMANIaf44d442018-04-25 12:38:44 -0400168Login To Portal GUI as APP Admin
169 Application admin Login To Portal GUI
CHINTAMANI68e98362018-04-10 18:56:38 -0400170
kishore92d70d62017-10-11 14:51:31 -0500171##Navigate Functional Link as APP Admin
CHINTAMANIaf44d442018-04-25 12:38:44 -0400172 ##Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500173
CHINTAMANIaf44d442018-04-25 12:38:44 -0400174#Add Standard User Role for Existing user as APP Admin
175 #Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500176
CHINTAMANIaf44d442018-04-25 12:38:44 -0400177#Edit Standard User Role for Existing user as APP Admin
178 #Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500179
CHINTAMANIaf44d442018-04-25 12:38:44 -0400180#Delete Standard User Role for Existing user as APP Admin
181 #Application admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500182
CHINTAMANIaf44d442018-04-25 12:38:44 -0400183#Navigate Application Link as APP Admin
184 #Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500185
CHINTAMANIaf44d442018-04-25 12:38:44 -0400186Logout from Portal GUI as APP Admin
187 Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500188
CHINTAMANIaf44d442018-04-25 12:38:44 -0400189##Standard User Test cases
kishorebbca0cf2017-10-09 16:59:38 -0500190
CHINTAMANIaf44d442018-04-25 12:38:44 -0400191Login To Portal GUI as Standared User
192 Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500193
194#Navigate Application Link as Standared User
CHINTAMANIaf44d442018-04-25 12:38:44 -0400195 #Standared user Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500196
CHINTAMANIaf44d442018-04-25 12:38:44 -0400197#Navigate Functional Link as Standared User
198 #Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500199
CHINTAMANIaf44d442018-04-25 12:38:44 -0400200#Broadcast Notifications Standared user
201 #Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500202
CHINTAMANIaf44d442018-04-25 12:38:44 -0400203#Category Notifications Standared user
204 #Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500205
CHINTAMANIaf44d442018-04-25 12:38:44 -0400206Logout from Portal GUI as Standared User
207 Standared User Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500208
kishore328996f2017-09-08 17:15:42 -0500209Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500210 [Documentation] Close All Open browsers
211 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500212
kishore328996f2017-09-08 17:15:42 -0500213*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500214
215Setup Browser
216 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
217# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
218 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
219 Log Running with ${GLOBAL_SELENIUM_BROWSER}
220
221
222 Setup Browser Chrome
223 ${os}= Get Normalized Os
224 Log Normalized OS=${os}
225 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
226 Call Method ${chrome options} add_argument no-sandbox
227 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
228 Set To Dictionary ${dc} elementScrollBehavior 1
229 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
230 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
231
232Handle Proxy Warning
233 [Documentation] Handle Intermediate Warnings from Proxies
234 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
235 Return From Keyword if '${status}' != 'PASS'
236 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
237 Return From Keyword if '${status}' != 'PASS'
238 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
239 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
240 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
241 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
242
243
kishore6eebdba2017-10-03 11:12:57 -0500244Run Portal Health Check
245 [Documentation] Runs Portal Health check
246 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
247 Should Be Equal As Strings ${resp.status_code} 200
248 Should Be Equal As Strings ${resp.json()['statusCode']} 200
CHINTAMANIaf44d442018-04-25 12:38:44 -0400249
kishore6eebdba2017-10-03 11:12:57 -0500250Run Portal Get Request
251 [Documentation] Runs Portal Get request
252 [Arguments] ${data_path}
253 ${session}= Create Session portal ${PORTAL_URL}
254 ${uuid}= Generate UUID
255 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
256 ${resp}= Get Request portal ${data_path} headers=${headers}
257 Log Received response from portal ${resp.text}
258 [Return] ${resp}
259
260
261Portal admin Login To Portal GUI
262 [Documentation] Logs into Portal GUI
263 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500264# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500265 Start Virtual Display 1920 1080
266 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500267# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500268 Maximize Browser Window
269 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
270 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
271 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
272 # Handle Proxy Warning
273 Title Should Be Login
274 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
275 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
276 Click Link xpath=//a[@id='loginBtn']
277 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400278 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
279 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500280
281Portal admin Go To Portal HOME
282 [Documentation] Naviage to Portal Home
283 Go To ${PORTAL_HOME_URL}
284 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
285
286Portal admin User Notifications
287 [Documentation] Naviage to User notification tab
288 Click Link xpath=//a[@id='parent-item-User-Notifications']
289 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
290 Click Button xpath=//button[@id='button-openAddNewApp']
291 Click Button xpath=(//button[@id='undefined'])[1]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400292 #Click Button xpath=//input[@id='datepicker-start']
kishore6eebdba2017-10-03 11:12:57 -0500293
294Portal admin Add Application Admin Exiting User
295 [Documentation] Naviage to Admins tab
296 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
297 Click Link xpath=//a[@title='Admins']
298 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
299 Page Should Contain Admins
300 Click Button xpath=//button[@ng-click='toggleSidebar()']
301 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500302 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500303 Click Button xpath=//button[@id='button-search-users']
304 Click Element xpath=//span[@id='result-uuid-0']
305 Click Button xpath=//button[@id='search-users-button-next']
306 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500307 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500308 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400309# Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
310# Click Element xpath=(//li[contains(.,'Default' )])[2]
kishore92d70d62017-10-11 14:51:31 -0500311 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500312 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
313 Click Element xpath=//button[@id='admin-div-ok-button']
314 Click Element xpath=//button[@id='div-confirm-ok-button']
315 Get Selenium Implicit Wait
316 Click Link xpath=//a[@aria-label='Admins']
317 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400318# Click Element xpath=//li[contains(.,'Default' )]
kishore92d70d62017-10-11 14:51:31 -0500319 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500320 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500321 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
322 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500323 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500324
325
326Portal admin Delete Application Admin Existing User
327 [Documentation] Naviage to Admins tab
CHINTAMANI68e98362018-04-10 18:56:38 -0400328 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
329 Click Link xpath=//a[@title='Admins']
330 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
331 Page Should Contain Admins
332 Click Button xpath=//button[@ng-click='toggleSidebar()']
333 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500334 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500335 #Click Element xpath=(//span[contains(.,'demo')] )[1]
336 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
CHINTAMANI68e98362018-04-10 18:56:38 -0400337# Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500338 Click Element xpath=//button[@id='div-confirm-ok-button']
339 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
340 Click Element xpath=//button[@id='admin-div-ok-button']
341 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
342 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
343 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500344 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500345 Click Image xpath=//img[@alt='Onap Logo']
346 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500347
348
349Portal admin Add Application admin User New user
350 [Documentation] Naviage to Users tab
351 Click Link xpath=//a[@title='Users']
352 Page Should Contain Users
353 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500354 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500355 Click Button xpath=//button[@id='Create-New-User-button']
356 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
357 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
358 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
359 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
360 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
361 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
362 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400363
364 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
365
366 #log ${Result}
367 #${type_result}= Evaluate type(${Result})
368 #log ${type_result}
369
370 Run Keyword if '${Result}'== 0 AdminUser does not exist already
371 ... ELSE Goto Home Image
372 Set Selenium Implicit Wait 3000
373
374Goto Home Image
375 Click Image xpath=//img[@alt='Onap Logo']
376
377AdminUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500378 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500379 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
380 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
381 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500382 Set Selenium Implicit Wait 3000
383 Click Button xpath=//button[@id='new-user-save-button']
384 Set Selenium Implicit Wait 3000
385 Go To ${PORTAL_HOME_PAGE}
386 Click Link xpath=//a[@title='Users']
387 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500388 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500389 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
390 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500391 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
392 Click Image xpath=//img[@alt='Onap Logo']
393 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500394
395
396Portal admin Add Standard User New user
397 [Documentation] Naviage to Users tab
398 Click Link xpath=//a[@title='Users']
399 Page Should Contain Users
400 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500401 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500402 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()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400410
411 ${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
421StaUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500422 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500423 #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']
kishore6eebdba2017-10-03 11:12:57 -0500426 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}
430 Click Link xpath=//a[@title='Users']
431 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500432 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500433 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
434 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500435 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
436 Click Image xpath=//img[@alt='Onap Logo']
437 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500438
439
440
441Portal admin Add Application admin User New user -Test
442 [Documentation] Naviage to Users tab
443 Click Link xpath=//a[@title='Users']
444 Page Should Contain Users
445 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500446 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500447 Click Button xpath=//button[@id='Create-New-User-button']
448 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
449 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
450 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
451 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
452 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
453 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
454 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500455 Click Button xpath=//button[@id='search-users-button-cancel']
456 Click Image xpath=//img[@alt='Onap Logo']
457 Set Selenium Implicit Wait 3000
458
459
460 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500461 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500462 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
463 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
464 #Set Selenium Implicit Wait 3000
465 #Click Button xpath=//button[@id='new-user-save-button']
466 #Set Selenium Implicit Wait 3000
467 #Go To ${PORTAL_HOME_PAGE}
468 #Click Link xpath=//a[@title='Users']
469 #Click Element xpath=//input[@id='dropdown1']
470 #Click Element xpath=//li[contains(.,'xDemo App')]
471 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500472 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
473 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500474
kishore6eebdba2017-10-03 11:12:57 -0500475Portal admin Add Application Admin Exiting User -APPDEMO
476 [Documentation] Naviage to Admins tab
477 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
478 Click Link xpath=//a[@title='Admins']
479 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
480 Page Should Contain Admins
481 Click Button xpath=//button[@ng-click='toggleSidebar()']
482 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
483 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
484 Click Button xpath=//button[@id='button-search-users']
485 Click Element xpath=//span[@id='result-uuid-0']
486 Click Button xpath=//button[@id='search-users-button-next']
487 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500488 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500489 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
490 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500491 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
492 Click Element xpath=//button[@id='admin-div-ok-button']
493 Click Element xpath=//button[@id='div-confirm-ok-button']
494 Get Selenium Implicit Wait
495 Click Link xpath=//a[@aria-label='Admins']
496 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500497 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500498 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500499 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
500 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
501 Click Image xpath=//img[@alt='Onap Logo']
502 Set Selenium Implicit Wait 3000
CHINTAMANI68e98362018-04-10 18:56:38 -0400503
kishore6eebdba2017-10-03 11:12:57 -0500504Portal admin Add Standard User Existing user
505 [Documentation] Naviage to Users tab
506 Click Link xpath=//a[@title='Users']
507 Page Should Contain Users
508 Click Button xpath=//button[@ng-click='toggleSidebar()']
509 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
510 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
511 Click Button xpath=//button[@id='button-search-users']
512 Click Element xpath=//span[@id='result-uuid-0']
513 Click Button xpath=//button[@id='next-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400514# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
515# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
516 Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App']
517 Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500518 Set Selenium Implicit Wait 3000
519 Click Button xpath=//button[@id='new-user-save-button']
520 Set Selenium Implicit Wait 3000
521 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500522 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500523 #Click Link xpath=//a[@title='Users']
524 #Page Should Contain Users
525 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500526 Go To ${PORTAL_HOME_PAGE}
527 Click Link xpath=//a[@title='Users']
528 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400529# Click Element xpath=//li[contains(.,'Default')]
530 Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500531 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400532 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
533 Set Selenium Implicit Wait 3000
534
CHINTAMANIaf44d442018-04-25 12:38:44 -0400535Portal admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500536 [Documentation] Naviage to Users tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400537 Click Link xpath=//a[@title='Users']
538 Click Element xpath=//input[@id='dropdown1']
539 # Click Element xpath=//li[contains(.,'Default')]
540# Set Selenium Implicit Wait 3000
541 Click Element xpath=//li[contains(.,'xDemo App')]
542# Set Selenium Implicit Wait 3000
543 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
544 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
kishore6eebdba2017-10-03 11:12:57 -0500545 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400546 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
547 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
548 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
549 Click Element xpath=//*[@id='app-select-Standard User1']
550 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
551 Set Selenium Implicit Wait 3000
552 Click Button xpath=//button[@id='new-user-save-button']
553 Set Selenium Implicit Wait 3000
554
555 Page Should Contain Users
556 Click Button xpath=//button[@ng-click='toggleSidebar()']
557 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
558 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
559 Click Button xpath=//button[@id='button-search-users']
560 Click Element xpath=//span[@id='result-uuid-0']
561 Click Button xpath=//button[@id='next-button']
562 Click Element xpath=//div[@id='app-select-Select roles1']
563 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
564 Set Selenium Implicit Wait 3000
565# Click Element xpath=//*[@id='app-select-Standard User1']
566# Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
567 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
568 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
569 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500570 Set Selenium Implicit Wait 3000
571 Click Button xpath=//button[@id='new-user-save-button']
572 Set Selenium Implicit Wait 3000
573 Page Should Contain Users
574 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500575 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500576 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400577 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
kishore6eebdba2017-10-03 11:12:57 -0500578 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
CHINTAMANI68e98362018-04-10 18:56:38 -0400579 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500580
581 Portal admin Delete Standard User Existing user
582 [Documentation] Naviage to Users tab
583 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400584# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
585# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500586 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
587 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
CHINTAMANI68e98362018-04-10 18:56:38 -0400588# Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
589# Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500590 Click Element xpath=//button[@id='div-confirm-ok-button']
591 Click Button xpath=//button[@id='new-user-save-button']
592 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400593 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
594 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
595 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
596 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500597
598Functional Top Menu Get Access
599 [Documentation] Naviage to Support tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400600 Go To ${PORTAL_HOME_URL}
kishore6eebdba2017-10-03 11:12:57 -0500601 Click Link xpath=//a[contains(.,'Support')]
602 Mouse Over xpath=//*[contains(text(),'Get Access')]
603 Click Link xpath=//a[contains(.,'Get Access')]
604 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400605 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500606
607Functional Top Menu Contact Us
608 [Documentation] Naviage to Support tab
609 Click Link xpath=//a[contains(.,'Support')]
610 Mouse Over xpath=//*[contains(text(),'Contact Us')]
611 Click Link xpath=//a[contains(.,'Contact Us')]
612 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
613 Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400614 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500615
616Portal admin Edit Functional menu
617 [Documentation] Naviage to Edit Functional menu tab
618 Click Link xpath=//a[@title='Edit Functional Menu']
619 Click Link xpath=.//*[@id='Manage']/div/a
620 Click Link xpath=.//*[@id='Design']/div/a
621 Click Link xpath=.//*[@id='Product_Design']/div/a
622 Open Context Menu xpath=//*[@id='Product_Design']/div/span
623 Click Link xpath=//a[@href='#add']
624 Input Text xpath=//input[@id='input-title'] ONAP Test
625 #Input Text xpath=//input[@id='input-url'] http://google.com
626 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500627 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
628 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500629 Input Text xpath=//input[@id='input-url'] http://google.com
630 Click Button xpath=//button[@id='button-save-continue']
631 #Click Button xpath=//div[@title='Select Roles']
632 Click Element xpath=//*[@id='app-select-Select Roles']
633 Click Element xpath=//input[@id='Standard-User-checkbox']
634 Click Element xpath=//button[@id='button-save-add']
635 Click Image xpath=//img[@alt='Onap Logo']
636 Set Selenium Implicit Wait 3000
637 Click Link xpath=//a[contains(.,'Manage')]
638 Mouse Over xpath=//*[contains(text(),'Design')]
639 Set Selenium Implicit Wait 3000
640 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
641 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500642 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500643 Click Link xpath=//a[@title='Edit Functional Menu']
644 Click Link xpath=.//*[@id='Manage']/div/a
645 Click Link xpath=.//*[@id='Design']/div/a
646 Click Link xpath=.//*[@id='Product_Design']/div/a
647 Open Context Menu xpath=//*[@id='ONAP_Test']
648 Click Link xpath=//a[@href='#delete']
649 Set Selenium Implicit Wait 3000
650 Click Element xpath=//button[@id='div-confirm-ok-button']
651 Click Image xpath=//img[@alt='Onap Logo']
652 Set Selenium Implicit Wait 3000
653 Click Link xpath=//a[contains(.,'Manage')]
654 Mouse Over xpath=//*[contains(text(),'Design')]
655 Set Selenium Implicit Wait 3000
656 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
CHINTAMANI68e98362018-04-10 18:56:38 -0400657 Set Selenium Implicit Wait 3000
CHINTAMANIaf44d442018-04-25 12:38:44 -0400658 Click Image xpath=//img[@alt='Onap Logo']
659 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500660
661Portal admin Microservice Onboarding
662 [Documentation] Naviage to Edit Functional menu tab
663 Click Link xpath=//a[@title='Microservice Onboarding']
664 Click Button xpath=//button[@id='microservice-onboarding-button-add']
665 Input Text xpath=//input[@name='name'] Test Microservice
666 Input Text xpath=//*[@name='desc'] Test
667 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500668 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
669 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500670 Click Element xpath=//*[@name='desc']
671 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
672 Click Element xpath=//input[@id='microservice-details-input-security-type']
673 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
674 Click Element xpath=//li[contains(.,'Basic Authentication')]
675 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
676 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
677 Click Button xpath=//button[@id='microservice-details-save-button']
678 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
679 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
CHINTAMANI68e98362018-04-10 18:56:38 -0400680 Set Selenium Implicit Wait 3000
681
682Portal admin Microservice Delete
683 [Documentation] Naviage to Edit Functional menu tab
684 Click Link xpath=//a[@title='Microservice Onboarding']
685 Click Button xpath=//button[@id='microservice-onboarding-button-add']
686 Input Text xpath=//input[@name='name'] TestMS
687 Input Text xpath=//*[@name='desc'] TestMS
688 Click Element xpath=//input[@id='microservice-details-input-app']
689 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
690 Click Element xpath=//li[contains(.,'xDemo App')]
691 Click Element xpath=//*[@name='desc']
692 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
693 Click Element xpath=//input[@id='microservice-details-input-security-type']
694 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
695 Click Element xpath=//li[contains(.,'Basic Authentication')]
696 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
697 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
698 Click Button xpath=//button[@id='microservice-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400699 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
CHINTAMANI68e98362018-04-10 18:56:38 -0400700 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
701 Click Button xpath=//button[@id="div-confirm-ok-button"]
702 Set Selenium Implicit Wait 3000
703
kishore6eebdba2017-10-03 11:12:57 -0500704Portal Admin Create Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400705 [Documentation] Navigate to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600706 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
CHINTAMANIaf44d442018-04-25 12:38:44 -0400707 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
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']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400714 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
715 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500716 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
717 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
718 Click Button xpath=//button[@id='widgets-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400719 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore92d70d62017-10-11 14:51:31 -0500720 Page Should Contain ONAP-xDemo
CHINTAMANIaf44d442018-04-25 12:38:44 -0400721 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500722 GO TO ${PORTAL_HOME_PAGE}
723
724
725Portal Admin Delete Widget for All users
726 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500727 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
728 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500729 #Click Image xpath=//img[@alt='Onap Logo']
730 Click Link xpath=//a[@title='Widget Onboarding']
731 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500732 Click Element xpath=//li[contains(.,'xDemo App')]
733 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
734 #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 -0500735 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500736 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500737 Click Element xpath=//button[@id='div-confirm-ok-button']
738 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500739 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500740 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500741 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500742 #Set Selenium Implicit Wait 3000
743
kishore6eebdba2017-10-03 11:12:57 -0500744Portal Admin Create Widget for Application Roles
745 [Documentation] Naviage to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600746 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kishore6eebdba2017-10-03 11:12:57 -0500747 Click Link xpath=//a[@title='Widget Onboarding']
748 Click Button xpath=//button[@ng-click='toggleSidebar()']
749 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500750 Input Text xpath=//*[@name='name'] ONAP-xDemo
751 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500752 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400753 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
754 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500755 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500756 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500757 Click element xpath=//*[@name='desc']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400758 click element xpath=//*[@id="app-select-Select Roles0"]
kishore6eebdba2017-10-03 11:12:57 -0500759 click element xpath=//*[@id="Standard-User-checkbox"]
760 Click element xpath=//*[@name='desc']
761 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
762 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
763 Click Button xpath=//button[@id='widgets-details-save-button']
764 Click Image xpath=//img[@alt='Onap Logo']
765 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500766 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500767 Click Link xpath=//a[@title='Widget Onboarding']
768 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500769 Click Element xpath=//li[contains(.,'xDemo App')]
770 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500771 Set Selenium Implicit Wait 3000
772 GO TO ${PORTAL_HOME_PAGE}
CHINTAMANI68e98362018-04-10 18:56:38 -0400773
kishore92d70d62017-10-11 14:51:31 -0500774Portal Admin Delete Widget for Application Roles
775 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
776 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500777 #Click Image xpath=//img[@alt='Onap Logo']
778 Click Link xpath=//a[@title='Widget Onboarding']
779 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500780 Click Element xpath=//li[contains(.,'xDemo App')]
781 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
782 #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 -0500783 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500784 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
785 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500786 Click Element xpath=//button[@id='div-confirm-ok-button']
787 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500788 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500789 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500790 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
CHINTAMANI68e98362018-04-10 18:56:38 -0400791 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500792
793
794
795Portal Admin Edit Widget
796 [Documentation] Naviage to Home tab
797 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
798 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
799 Set Browser Implicit Wait 8000
800 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
801 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
802 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
803 Input Text xpath=//input[@name='title'] ONAP_VID
804 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
805 Input Text xpath=//input[@id='widget-input-add-order'] 5
806 Click Link xpath=//a[contains(.,'Add New')]
807 Click Element xpath=//div[@id='close-button']
808 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
809 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
810 Click Element xpath=//div[@id='confirmation-button-next']
811 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
812 Click Link xpath=//a[@id='close-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400813 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500814
815Portal Admin Broadcast Notifications
816 [Documentation] Portal Test Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400817 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
818 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
819 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500820 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400821 Go To ${PORTAL_HOME_URL}
822 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500823 Set Selenium Implicit Wait 3000
824 Click Link xpath=//*[@id="parent-item-User-Notifications"]
825 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
826 Click button xpath=//*[@id="button-openAddNewApp"]
827 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
828 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
829 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
830 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
831 click element xpath=//*[@id="button-notification-save"]
832 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
833 click element xpath=//*[@id="megamenu-notification-button"]
834 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400835# Notification bug, Uncomment the code when PORTAL-232 is fixed
836 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
837 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400838 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500839 log ${AdminBroadCastMsg}
840 [Return] ${AdminBroadCastMsg}
841
842Portal Admin Category Notifications
843 [Documentation] Portal Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400844 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
845 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
846# ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
847 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500848 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
849 Click Link xpath=//a[@id='parent-item-Home']
850 Click Link xpath=//*[@id="parent-item-User-Notifications"]
851 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
852 Click button xpath=//*[@id="button-openAddNewApp"]
853 #Select Radio Button NO radio-button-no
854 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
855 #Select Radio Button //label[@class='radio'] radio-button-approles
856 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500857 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500858 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
859 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
860 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
861 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
862 click element xpath=//*[@id="button-notification-save"]
863 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
864 click element xpath=//*[@id="megamenu-notification-button"]
865 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400866# Notification bug, Uncomment the code when PORTAL-232 is fixed
867 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
868 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400869 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500870 log ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400871 [Return] ${AdminCategoryMsg}
kishore6eebdba2017-10-03 11:12:57 -0500872
kishorebbca0cf2017-10-09 16:59:38 -0500873Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500874 [Documentation] Logout from Portal GUI
875 Click Element xpath=//div[@id='header-user-icon']
876 Click Button xpath=//button[contains(.,'Log out')]
877 Title Should Be Login
878
kishore6eebdba2017-10-03 11:12:57 -0500879Application admin Login To Portal GUI
880 [Documentation] Logs into Portal GUI
881 # Setup Browser Now being managed by test case
882 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500883# Go To ${PORTAL_LOGIN_URL}
884# Maximize Browser Window
885# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
886# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
887# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500888 # Handle Proxy Warning
889 Title Should Be Login
890 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
891 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
892 Click Link xpath=//a[@id='loginBtn']
893 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
894 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
895
896Application Admin Navigation Application Link Tab
897 [Documentation] Logs into Portal GUI as application admin
898 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500899 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
900 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500901 Scroll Element Into View xpath=//i[@class='ion-close-round']
902 Click Element xpath=//i[@class='ion-close-round']
903 Set Selenium Implicit Wait 3000
904 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500905
906
907Application Admin Navigation Functional Menu
908 [Documentation] Logs into Portal GUI as application admin
909 Click Link xpath=//a[contains(.,'Manage')]
910 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
911 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500912 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500913 Click Element xpath=//i[@class='ion-close-round']
914 Click Element xpath=(.//span[@id='tab-Home'])[1]
915
916
CHINTAMANIaf44d442018-04-25 12:38:44 -0400917Application admin Add Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500918 [Documentation] Naviage to Users tab
919 Click Link xpath=//a[@title='Users']
920 Page Should Contain Users
921 Click Button xpath=//button[@ng-click='toggleSidebar()']
922 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
923 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
924 Click Button xpath=//button[@id='button-search-users']
925 Click Element xpath=//span[@id='result-uuid-0']
926 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500927 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
928 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400929 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
930 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
931 # Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500932 Click Button xpath=//button[@id='new-user-save-button']
933 Set Selenium Implicit Wait 3000
934 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500935 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500936 #Click Link xpath=//a[@title='Users']
937 #Page Should Contain Users
938 Go To ${PORTAL_HOME_PAGE}
939 Set Selenium Implicit Wait 3000
940 Click Link xpath=//a[@title='Users']
941 Click Element xpath=//input[@id='dropdown1']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400942 #Click Element xpath=//li[contains(.,'Default')]
kishore92d70d62017-10-11 14:51:31 -0500943 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500944 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400945 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500946 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
947
CHINTAMANIaf44d442018-04-25 12:38:44 -0400948Application admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500949 [Documentation] Naviage to Users tab
950 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400951 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
952 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
953 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore92d70d62017-10-11 14:51:31 -0500954 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
955 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400956 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500957 Set Selenium Implicit Wait 3000
958 Click Button xpath=//button[@id='new-user-save-button']
959 Set Selenium Implicit Wait 3000
960 Page Should Contain Users
961 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500962 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500963 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400964 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500965 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
966
kishore6eebdba2017-10-03 11:12:57 -0500967Application admin Delete Standard User Existing user
968 [Documentation] Naviage to Users tab
969 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400970# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
971# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500972 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
973 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500974 Click Element xpath=//button[@id='div-confirm-ok-button']
975 Click Button xpath=//button[@id='new-user-save-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400976# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
977# Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore6eebdba2017-10-03 11:12:57 -0500978 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore72d3adf2017-10-19 11:05:22 -0500979 #Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400980 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500981
kishore6eebdba2017-10-03 11:12:57 -0500982Application admin Logout from Portal GUI
983 [Documentation] Logout from Portal GUI
984 Click Element xpath=//div[@id='header-user-icon']
kishore72d3adf2017-10-19 11:05:22 -0500985 #Set Selenium Implicit Wait 3000
kishore82eb79a2017-10-31 08:04:25 -0500986 Click Button xpath=//button[contains(text(),'Log out')]
kishore72d3adf2017-10-19 11:05:22 -0500987 #Set Selenium Implicit Wait 3000
kishore4089a332017-10-18 17:02:53 -0500988 Title Should Be Login
kishore6eebdba2017-10-03 11:12:57 -0500989
990Standared user Login To Portal GUI
991 [Documentation] Logs into Portal GUI
992 # Setup Browser Now being managed by test case
993 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500994# Go To ${PORTAL_LOGIN_URL}
995# Maximize Browser Window
996# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
997# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
998# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500999 # Handle Proxy Warning
1000 Title Should Be Login
1001 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
1002 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
1003 Click Link xpath=//a[@id='loginBtn']
1004 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1005 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
1006
kishore6eebdba2017-10-03 11:12:57 -05001007Standared user Navigation Application Link Tab
1008 [Documentation] Logs into Portal GUI as application admin
1009 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -05001010 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
1011 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -05001012 Click Element xpath=(.//span[@id='tab-Home'])[1]
CHINTAMANI68e98362018-04-10 18:56:38 -04001013 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001014
1015Standared user Navigation Functional Menu
1016 [Documentation] Logs into Portal GUI as application admin
1017 Click Link xpath=//a[contains(.,'Manage')]
CHINTAMANI68e98362018-04-10 18:56:38 -04001018 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
1019 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
1020 Page Should Contain Welcome to VID
1021 Click Element xpath=(.//span[@id='tab-Home'])[1]
1022 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001023
1024
1025Standared user Broadcast Notifications
1026 [Documentation] Logs into Portal GUI as application admin
1027 [Arguments] ${AdminBroadCastMsg}
1028 Click element xpath=//*[@id='megamenu-notification-button']
1029 Click element xpath=//*[@id='notification-history-link']
1030 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1031 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
1032 log ${AdminBroadCastMsg}
1033
1034
1035Standared user Category Notifications
1036 [Documentation] Logs into Portal GUI as application admin
1037 [Arguments] ${AdminCategoryMsg}
1038 #click element xpath=//*[@id='megamenu-notification-button']
1039 #click element xpath=//*[@id="notification-history-link"]
1040 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1041 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1042 log ${AdminCategoryMsg}
1043
kishore6eebdba2017-10-03 11:12:57 -05001044Standared user Logout from Portal GUI
1045 [Documentation] Logout from Portal GUI
1046 Click Element xpath=//div[@id='header-user-icon']
1047 Click Button xpath=//button[contains(.,'Log out')]
1048 #Confirm Action
1049 Title Should Be Login
1050
CHINTAMANIaf44d442018-04-25 12:38:44 -04001051Portal admin Add New Account
1052 Click Link //*[@id="parent-item-App-Account-Management"]
1053 Click Button xpath=//button[@ng-click='toggleSidebar()']
1054 Set Selenium Implicit Wait 3000
1055 Click Button //*[@id="account-onboarding-button-add"]
1056 Set Selenium Implicit Wait 3000
1057 Input Text //*[@id="account-details-input-name"] ${AppAccountName}
1058 Input Text //*[@id="account-details-input-username"] ${AppUserName}
1059 Input Text //*[@id="account-details-input-password"] ${AppPassword}
1060 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
1061 # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
1062 # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
1063 #account-details-next-button
1064 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
1065
1066Portal admin Delete Account
1067 Click Link //*[@id="parent-item-App-Account-Management"]
1068 Click Button xpath=//button[@ng-click='toggleSidebar()']
1069 Set Selenium Implicit Wait 3000
1070 Click Button //*[@id="account-onboarding-button-add"]
1071 Set Selenium Implicit Wait 3000
1072
1073Tear Down
kishore6eebdba2017-10-03 11:12:57 -05001074 [Documentation] Close all browsers
1075 Close All Browsers
1076
kishore6eebdba2017-10-03 11:12:57 -05001077Enhanced Notification on ONAP Portal
1078 [Documentation] Runs portal Post request
1079 [Arguments] ${data_path} ${data}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001080 # Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -05001081 ${session}= Create Session portal ${PORTAL_URL}
1082 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1083 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001084 # Log Received response from portal ${resp.text}
kishore6eebdba2017-10-03 11:12:57 -05001085 [Return] ${resp}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001086
kishore6eebdba2017-10-03 11:12:57 -05001087Notification on ONAP Portal
1088 [Documentation] Create Config portal
1089 ${configportal}= Create Dictionary jira_id=${jira}
1090 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
1091 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1092 Should Be Equal As Strings ${post_resp.status_code} 200
kishore6eebdba2017-10-03 11:12:57 -05001093
1094Portal Application Account Management
1095 [Documentation] Naviage to Application Account Management tab
1096 Click Link xpath=//a[@title='App Account Management']
1097 Click Button xpath=//button[@id='account-onboarding-button-add']
1098 Input Text xpath=//input[@name='name'] JIRA
1099 Input Text xpath=//input[@name='username'] jira
1100 Input Text xpath=//input[@name='password'] _pass
1101 Input Text xpath=//input[@name='repassword'] _pass
1102 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1103 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1104
CHINTAMANIaf44d442018-04-25 12:38:44 -04001105Portal Application Account Management validation
kishore6eebdba2017-10-03 11:12:57 -05001106 [Documentation] Naviage to user notification tab
1107 Click Link xpath=//a[@id='parent-item-User-Notifications']
1108 click element xpath=//*[@id="megamenu-notification-button"]
1109 Click element xpath=//*[@id="notification-history-link"]
1110 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1111 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1112
1113
CHINTAMANIaf44d442018-04-25 12:38:44 -04001114Portal AAF new fields
kishore6eebdba2017-10-03 11:12:57 -05001115 [Documentation] Naviage to user Application details tab
1116 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001117 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001118 Page Should Contain Name Space
1119 Page Should Contain Centralized
1120 Click Element xpath=//button[@id='button-notification-cancel']
1121
CHINTAMANIaf44d442018-04-25 12:38:44 -04001122Admin widget download
1123 Go To ${PORTAL_HOME_URL}
1124 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']
1127 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
1128 log ${td_id}
1129 ${test}= Get Substring ${td_id} -1
1130 log ${test}
1131 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
1132 click Element xpath=//*[@id=${download_link_id}]
1133
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)
1140 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
1141 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()