blob: 373098d67e99767e30b833cc524f55d8290637d3 [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
CHINTAMANI3f00f5b2018-05-01 07:33:05 -040043${PORTAL_XDEMPAPP_REST_URL} http://portal-sdk:8080/ONAPPORTALSDK/api/v2
kishore6eebdba2017-10-03 11:12:57 -050044${PORTAL_ASSETS_DIRECTORY} ${CURDIR}
45${GLOBAL_APPLICATION_ID} robot-functional
46${GLOBAL_PORTAL_ADMIN_USER} demo
47${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
CHINTAMANIaf44d442018-04-25 12:38:44 -040048${AppAccountName} testApp
49${AppUserName} testApp
50${AppPassword} testApp123!
kishore6eebdba2017-10-03 11:12:57 -050051${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
52${GLOBAL_SELENIUM_BROWSER} chrome
53${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
54${GLOBAL_SELENIUM_DELAY} 0
55${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
CHINTAMANI3f00f5b2018-05-01 07:33:05 -040056${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 45
kishore6eebdba2017-10-03 11:12:57 -050057${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
58${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
59${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
60${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
61${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
62${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
63${GLOBAL_BUILD_NUMBER} 0
64${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
65${jira} jira
kishore4089a332017-10-18 17:02:53 -050066${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
kishore6eebdba2017-10-03 11:12:57 -050067${portal_Template} ${CURDIR}/portal.template
68
CHINTAMANI68e98362018-04-10 18:56:38 -040069${Result} FALSE
CHINTAMANIaf44d442018-04-25 12:38:44 -040070${td_id} 0
71${download_link_id} 0
kishore328996f2017-09-08 17:15:42 -050072
73*** Test Cases ***
74
75Portal Health Check
76 Run Portal Health Check
kishorebbca0cf2017-10-09 16:59:38 -050077
78Login into Portal URL
79 Portal admin Login To Portal GUI
80
CHINTAMANI68e98362018-04-10 18:56:38 -040081# Portal R1 Release
82 # [Documentation] ONAP Portal R1 functionality test
83 # Notification on ONAP Portal
84 # Portal Application Account Management validation
CHINTAMANI3f00f5b2018-05-01 07:33:05 -040085
86Portal Change REST URL Of X-DemoApp
87 [Documentation] Portal Change REST URL Of X-DemoApp
88 Portal Change REST URL
kishorebbca0cf2017-10-09 16:59:38 -050089
90Portal R1 Release for AAF
91 [Documentation] ONAP Portal R1 functionality for AAF test
92 Portal AAF new fields
CHINTAMANI2dfb8822018-05-10 12:14:34 -040093
CHINTAMANIaf44d442018-04-25 12:38:44 -040094Create Microse service onboarding
95 Portal admin Microservice Onboarding
kishore5ea942b2017-10-14 22:19:45 -050096
CHINTAMANIaf44d442018-04-25 12:38:44 -040097##Delete Microse service
98 ##Portal admin Microservice Delete
kishore5ea942b2017-10-14 22:19:45 -050099
CHINTAMANIaf44d442018-04-25 12:38:44 -0400100Create Widget for all users
101 Portal Admin Create Widget for All users
kishore5ea942b2017-10-14 22:19:45 -0500102
CHINTAMANIaf44d442018-04-25 12:38:44 -0400103Delete Widget for all users
104 Portal Admin Delete Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400105
CHINTAMANIaf44d442018-04-25 12:38:44 -0400106Create Widget for Application Roles
107 Portal Admin Create Widget for Application Roles
kishorebbca0cf2017-10-09 16:59:38 -0500108
CHINTAMANI68e98362018-04-10 18:56:38 -0400109#Delete Widget for Application Roles
CHINTAMANIaf44d442018-04-25 12:38:44 -0400110 #Portal Admin Delete Widget for Application Roles
CHINTAMANI68e98362018-04-10 18:56:38 -0400111
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400112#EP Admin widget download
113 #Admin widget download
kishorebbca0cf2017-10-09 16:59:38 -0500114
CHINTAMANI3f00f5b2018-05-01 07:33:05 -0400115EP Admin widget layout reset
116 Reset widget layout option
CHINTAMANIaf44d442018-04-25 12:38:44 -0400117
118Validate Functional Top Menu Get Access
119 Functional Top Menu Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400120
CHINTAMANIaf44d442018-04-25 12:38:44 -0400121Validate Functional Top Menu Contact Us
122 Functional Top Menu Contact Us
kishorebbca0cf2017-10-09 16:59:38 -0500123
CHINTAMANIaf44d442018-04-25 12:38:44 -0400124Edit Functional Menu
125 Portal admin Edit Functional menu
kishorebbca0cf2017-10-09 16:59:38 -0500126
CHINTAMANIaf44d442018-04-25 12:38:44 -0400127Broadbond Notification functionality
128 ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications
129 set global variable ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500130
CHINTAMANIaf44d442018-04-25 12:38:44 -0400131Category Notification functionality
132 ${AdminCategoryMsg}= Portal Admin Category Notifications
133 set global variable ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400134
CHINTAMANIaf44d442018-04-25 12:38:44 -0400135Create a Test user for Application Admin -Test
136 Portal admin Add Application admin User New user -Test
kishore5ea942b2017-10-14 22:19:45 -0500137
CHINTAMANIaf44d442018-04-25 12:38:44 -0400138Create a Test User for Apllication Admin
139 Portal admin Add Application admin User New user
kishore5ea942b2017-10-14 22:19:45 -0500140
CHINTAMANIaf44d442018-04-25 12:38:44 -0400141Add Application Admin for Existing User Test user
142 Portal admin Add Application Admin Exiting User -APPDEMO
kishore5ea942b2017-10-14 22:19:45 -0500143
CHINTAMANIaf44d442018-04-25 12:38:44 -0400144Create a Test user for Standared User
145 Portal admin Add Standard User New user
kishore5ea942b2017-10-14 22:19:45 -0500146
CHINTAMANIaf44d442018-04-25 12:38:44 -0400147Add Application Admin for Exisitng User
148 Portal admin Add Application Admin Exiting User
kishore5ea942b2017-10-14 22:19:45 -0500149
CHINTAMANIaf44d442018-04-25 12:38:44 -0400150Delete Application Admin for Exisitng User
151 Portal admin Delete Application Admin Existing User
kishore5ea942b2017-10-14 22:19:45 -0500152
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400153Add Standard User Role for Existing user
154 Portal admin Add Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500155
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400156Edit Standard User Role for Existing user
157 Portal admin Edit Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500158
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400159Delete Standard User Role for Existing user
160 Portal admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500161
CHINTAMANIaf44d442018-04-25 12:38:44 -0400162#Add Account new account from App Account Management
163 #Portal admin Add New Account
164
165#Delete Account new account from App Account Management
166 #Portal admin Delete Account
167
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400168#EP Create Portal Admin
169 #Add Portal Admin
170
171#EP Portal Admin delete
172 #Delete Portal Admin
173
CHINTAMANIaf44d442018-04-25 12:38:44 -0400174Logout from Portal GUI as Portal Admin
175 Portal admin Logout from Portal GUI
176
177## Application Admin user Test cases
CHINTAMANI68e98362018-04-10 18:56:38 -0400178
CHINTAMANIaf44d442018-04-25 12:38:44 -0400179Login To Portal GUI as APP Admin
180 Application admin Login To Portal GUI
CHINTAMANI68e98362018-04-10 18:56:38 -0400181
kishore92d70d62017-10-11 14:51:31 -0500182##Navigate Functional Link as APP Admin
CHINTAMANIaf44d442018-04-25 12:38:44 -0400183 ##Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500184
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400185Add Standard User Role for Existing user as APP Admin
186 Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500187
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400188Edit Standard User Role for Existing user as APP Admin
189 Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500190
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400191Delete Standard User Role for Existing user as APP Admin
192 Application admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500193
CHINTAMANIaf44d442018-04-25 12:38:44 -0400194#Navigate Application Link as APP Admin
195 #Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500196
CHINTAMANIaf44d442018-04-25 12:38:44 -0400197Logout from Portal GUI as APP Admin
198 Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500199
CHINTAMANIaf44d442018-04-25 12:38:44 -0400200##Standard User Test cases
kishorebbca0cf2017-10-09 16:59:38 -0500201
CHINTAMANIaf44d442018-04-25 12:38:44 -0400202Login To Portal GUI as Standared User
203 Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500204
205#Navigate Application Link as Standared User
CHINTAMANIaf44d442018-04-25 12:38:44 -0400206 #Standared user Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500207
CHINTAMANIaf44d442018-04-25 12:38:44 -0400208#Navigate Functional Link as Standared User
209 #Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500210
CHINTAMANIaf44d442018-04-25 12:38:44 -0400211#Broadcast Notifications Standared user
212 #Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500213
CHINTAMANIaf44d442018-04-25 12:38:44 -0400214#Category Notifications Standared user
215 #Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500216
CHINTAMANIaf44d442018-04-25 12:38:44 -0400217Logout from Portal GUI as Standared User
218 Standared User Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500219
kishore328996f2017-09-08 17:15:42 -0500220Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500221 [Documentation] Close All Open browsers
222 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500223
kishore328996f2017-09-08 17:15:42 -0500224*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500225
226Setup Browser
227 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
228# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
229 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
230 Log Running with ${GLOBAL_SELENIUM_BROWSER}
231
232
233 Setup Browser Chrome
234 ${os}= Get Normalized Os
235 Log Normalized OS=${os}
236 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
237 Call Method ${chrome options} add_argument no-sandbox
238 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
239 Set To Dictionary ${dc} elementScrollBehavior 1
240 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
241 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
242
243Handle Proxy Warning
244 [Documentation] Handle Intermediate Warnings from Proxies
245 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
246 Return From Keyword if '${status}' != 'PASS'
247 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
248 Return From Keyword if '${status}' != 'PASS'
249 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
250 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
251 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
252 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
253
254
kishore6eebdba2017-10-03 11:12:57 -0500255Run Portal Health Check
256 [Documentation] Runs Portal Health check
257 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
258 Should Be Equal As Strings ${resp.status_code} 200
259 Should Be Equal As Strings ${resp.json()['statusCode']} 200
CHINTAMANIaf44d442018-04-25 12:38:44 -0400260
kishore6eebdba2017-10-03 11:12:57 -0500261Run Portal Get Request
262 [Documentation] Runs Portal Get request
263 [Arguments] ${data_path}
264 ${session}= Create Session portal ${PORTAL_URL}
265 ${uuid}= Generate UUID
266 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
267 ${resp}= Get Request portal ${data_path} headers=${headers}
268 Log Received response from portal ${resp.text}
269 [Return] ${resp}
270
271
272Portal admin Login To Portal GUI
273 [Documentation] Logs into Portal GUI
274 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500275# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500276 Start Virtual Display 1920 1080
277 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500278# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500279 Maximize Browser Window
280 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
281 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
282 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
283 # Handle Proxy Warning
284 Title Should Be Login
285 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
286 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
287 Click Link xpath=//a[@id='loginBtn']
288 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400289 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
290 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500291
292Portal admin Go To Portal HOME
293 [Documentation] Naviage to Portal Home
294 Go To ${PORTAL_HOME_URL}
295 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
296
297Portal admin User Notifications
298 [Documentation] Naviage to User notification tab
299 Click Link xpath=//a[@id='parent-item-User-Notifications']
300 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
301 Click Button xpath=//button[@id='button-openAddNewApp']
302 Click Button xpath=(//button[@id='undefined'])[1]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400303 #Click Button xpath=//input[@id='datepicker-start']
kishore6eebdba2017-10-03 11:12:57 -0500304
305Portal admin Add Application Admin Exiting User
306 [Documentation] Naviage to Admins tab
307 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
308 Click Link xpath=//a[@title='Admins']
309 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
310 Page Should Contain Admins
311 Click Button xpath=//button[@ng-click='toggleSidebar()']
312 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500313 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500314 Click Button xpath=//button[@id='button-search-users']
315 Click Element xpath=//span[@id='result-uuid-0']
316 Click Button xpath=//button[@id='search-users-button-next']
317 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500318 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500319 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400320# Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
321# Click Element xpath=(//li[contains(.,'Default' )])[2]
kishore92d70d62017-10-11 14:51:31 -0500322 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500323 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
324 Click Element xpath=//button[@id='admin-div-ok-button']
325 Click Element xpath=//button[@id='div-confirm-ok-button']
326 Get Selenium Implicit Wait
327 Click Link xpath=//a[@aria-label='Admins']
328 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400329# Click Element xpath=//li[contains(.,'Default' )]
kishore92d70d62017-10-11 14:51:31 -0500330 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500331 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500332 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
333 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500334 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500335
336
337Portal admin Delete Application Admin Existing User
338 [Documentation] Naviage to Admins tab
CHINTAMANI68e98362018-04-10 18:56:38 -0400339 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
340 Click Link xpath=//a[@title='Admins']
341 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
342 Page Should Contain Admins
343 Click Button xpath=//button[@ng-click='toggleSidebar()']
344 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500345 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500346 #Click Element xpath=(//span[contains(.,'demo')] )[1]
347 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
CHINTAMANI68e98362018-04-10 18:56:38 -0400348# Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500349 Click Element xpath=//button[@id='div-confirm-ok-button']
350 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
351 Click Element xpath=//button[@id='admin-div-ok-button']
352 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
353 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
354 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500355 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500356 Click Image xpath=//img[@alt='Onap Logo']
357 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500358
359
360Portal admin Add Application admin User New user
361 [Documentation] Naviage to Users tab
362 Click Link xpath=//a[@title='Users']
363 Page Should Contain Users
364 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500365 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500366 Click Button xpath=//button[@id='Create-New-User-button']
367 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
368 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
369 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
370 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
371 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
372 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
373 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400374
375 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
376
377 #log ${Result}
378 #${type_result}= Evaluate type(${Result})
379 #log ${type_result}
380
381 Run Keyword if '${Result}'== 0 AdminUser does not exist already
382 ... ELSE Goto Home Image
383 Set Selenium Implicit Wait 3000
384
385Goto Home Image
386 Click Image xpath=//img[@alt='Onap Logo']
387
388AdminUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500389 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500390 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
391 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
392 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500393 Set Selenium Implicit Wait 3000
394 Click Button xpath=//button[@id='new-user-save-button']
395 Set Selenium Implicit Wait 3000
396 Go To ${PORTAL_HOME_PAGE}
397 Click Link xpath=//a[@title='Users']
398 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500399 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500400 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
401 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500402 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
403 Click Image xpath=//img[@alt='Onap Logo']
404 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500405
406
407Portal admin Add Standard User New user
408 [Documentation] Naviage to Users tab
409 Click Link xpath=//a[@title='Users']
410 Page Should Contain Users
411 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500412 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500413 Click Button xpath=//button[@id='Create-New-User-button']
414 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
415 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
416 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
417 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
418 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
419 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
420 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400421
422 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
423
424 #log ${Result}
425 #${type_result}= Evaluate type(${Result})
426 #log ${type_result}
427
428 Run Keyword if '${Result}'== 0 StaUser does not exist already
429 ... ELSE Goto Home Image
430 Set Selenium Implicit Wait 3000
431
432StaUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500433 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500434 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
435 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
436 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500437 Set Selenium Implicit Wait 3000
438 Click Button xpath=//button[@id='new-user-save-button']
439 Set Selenium Implicit Wait 3000
440 Go To ${PORTAL_HOME_PAGE}
441 Click Link xpath=//a[@title='Users']
442 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500443 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500444 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
445 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500446 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
447 Click Image xpath=//img[@alt='Onap Logo']
448 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500449
450
451
452Portal admin Add Application admin User New user -Test
453 [Documentation] Naviage to Users tab
454 Click Link xpath=//a[@title='Users']
455 Page Should Contain Users
456 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500457 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500458 Click Button xpath=//button[@id='Create-New-User-button']
459 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
460 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
461 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
462 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
463 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
464 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
465 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500466 Click Button xpath=//button[@id='search-users-button-cancel']
467 Click Image xpath=//img[@alt='Onap Logo']
468 Set Selenium Implicit Wait 3000
469
470
471 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500472 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500473 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
474 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
475 #Set Selenium Implicit Wait 3000
476 #Click Button xpath=//button[@id='new-user-save-button']
477 #Set Selenium Implicit Wait 3000
478 #Go To ${PORTAL_HOME_PAGE}
479 #Click Link xpath=//a[@title='Users']
480 #Click Element xpath=//input[@id='dropdown1']
481 #Click Element xpath=//li[contains(.,'xDemo App')]
482 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500483 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
484 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500485
kishore6eebdba2017-10-03 11:12:57 -0500486Portal admin Add Application Admin Exiting User -APPDEMO
487 [Documentation] Naviage to Admins tab
488 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
489 Click Link xpath=//a[@title='Admins']
490 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
491 Page Should Contain Admins
492 Click Button xpath=//button[@ng-click='toggleSidebar()']
493 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
494 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
495 Click Button xpath=//button[@id='button-search-users']
496 Click Element xpath=//span[@id='result-uuid-0']
497 Click Button xpath=//button[@id='search-users-button-next']
498 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500499 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500500 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
501 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500502 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
503 Click Element xpath=//button[@id='admin-div-ok-button']
504 Click Element xpath=//button[@id='div-confirm-ok-button']
505 Get Selenium Implicit Wait
506 Click Link xpath=//a[@aria-label='Admins']
507 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500508 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500509 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500510 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
511 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
512 Click Image xpath=//img[@alt='Onap Logo']
513 Set Selenium Implicit Wait 3000
CHINTAMANI68e98362018-04-10 18:56:38 -0400514
kishore6eebdba2017-10-03 11:12:57 -0500515Portal admin Add Standard User Existing user
516 [Documentation] Naviage to Users tab
517 Click Link xpath=//a[@title='Users']
518 Page Should Contain Users
519 Click Button xpath=//button[@ng-click='toggleSidebar()']
520 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
521 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
522 Click Button xpath=//button[@id='button-search-users']
523 Click Element xpath=//span[@id='result-uuid-0']
524 Click Button xpath=//button[@id='next-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400525# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
526# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
CHINTAMANI3f00f5b2018-05-01 07:33:05 -0400527 Click Element xpath=//div[@id='app-select-Select roles1']
528 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500529 Set Selenium Implicit Wait 3000
530 Click Button xpath=//button[@id='new-user-save-button']
531 Set Selenium Implicit Wait 3000
532 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500533 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500534 #Click Link xpath=//a[@title='Users']
535 #Page Should Contain Users
536 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500537 Go To ${PORTAL_HOME_PAGE}
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400538 #Click Link xpath=//a[@title='Users']
539 #Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400540# Click Element xpath=//li[contains(.,'Default')]
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400541 #Click Element xpath=//li[contains(.,'XDemo App')]
542 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
543 #Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
544 #Set Selenium Implicit Wait 3000
CHINTAMANI68e98362018-04-10 18:56:38 -0400545
CHINTAMANIaf44d442018-04-25 12:38:44 -0400546Portal admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500547 [Documentation] Naviage to Users tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400548 Click Link xpath=//a[@title='Users']
549 Click Element xpath=//input[@id='dropdown1']
550 # Click Element xpath=//li[contains(.,'Default')]
551# Set Selenium Implicit Wait 3000
552 Click Element xpath=//li[contains(.,'xDemo App')]
553# Set Selenium Implicit Wait 3000
554 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
555 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
kishore6eebdba2017-10-03 11:12:57 -0500556 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400557 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
558 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
559 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
560 Click Element xpath=//*[@id='app-select-Standard User1']
561 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
562 Set Selenium Implicit Wait 3000
563 Click Button xpath=//button[@id='new-user-save-button']
564 Set Selenium Implicit Wait 3000
565
566 Page Should Contain Users
567 Click Button xpath=//button[@ng-click='toggleSidebar()']
568 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
569 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
570 Click Button xpath=//button[@id='button-search-users']
571 Click Element xpath=//span[@id='result-uuid-0']
572 Click Button xpath=//button[@id='next-button']
573 Click Element xpath=//div[@id='app-select-Select roles1']
574 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
575 Set Selenium Implicit Wait 3000
576# Click Element xpath=//*[@id='app-select-Standard User1']
577# Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
578 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
579 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
580 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500581 Set Selenium Implicit Wait 3000
582 Click Button xpath=//button[@id='new-user-save-button']
583 Set Selenium Implicit Wait 3000
584 Page Should Contain Users
585 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500586 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500587 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400588 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
kishore6eebdba2017-10-03 11:12:57 -0500589 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
CHINTAMANI68e98362018-04-10 18:56:38 -0400590 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500591
592 Portal admin Delete Standard User Existing user
593 [Documentation] Naviage to Users tab
594 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400595# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
596# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400597 Set Selenium Implicit Wait 9000
kishore92d70d62017-10-11 14:51:31 -0500598 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
599 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
CHINTAMANI68e98362018-04-10 18:56:38 -0400600# Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
601# Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500602 Click Element xpath=//button[@id='div-confirm-ok-button']
603 Click Button xpath=//button[@id='new-user-save-button']
604 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400605 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
606 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
607 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
608 Set Selenium Implicit Wait 3000
CHINTAMANI2dfb8822018-05-10 12:14:34 -0400609
kishore6eebdba2017-10-03 11:12:57 -0500610
611Functional Top Menu Get Access
612 [Documentation] Naviage to Support tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400613 Go To ${PORTAL_HOME_URL}
kishore6eebdba2017-10-03 11:12:57 -0500614 Click Link xpath=//a[contains(.,'Support')]
615 Mouse Over xpath=//*[contains(text(),'Get Access')]
616 Click Link xpath=//a[contains(.,'Get Access')]
617 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400618 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500619
620Functional Top Menu Contact Us
621 [Documentation] Naviage to Support tab
622 Click Link xpath=//a[contains(.,'Support')]
623 Mouse Over xpath=//*[contains(text(),'Contact Us')]
624 Click Link xpath=//a[contains(.,'Contact Us')]
625 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
626 Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400627 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500628
629Portal admin Edit Functional menu
630 [Documentation] Naviage to Edit Functional menu tab
631 Click Link xpath=//a[@title='Edit Functional Menu']
632 Click Link xpath=.//*[@id='Manage']/div/a
633 Click Link xpath=.//*[@id='Design']/div/a
634 Click Link xpath=.//*[@id='Product_Design']/div/a
635 Open Context Menu xpath=//*[@id='Product_Design']/div/span
636 Click Link xpath=//a[@href='#add']
637 Input Text xpath=//input[@id='input-title'] ONAP Test
638 #Input Text xpath=//input[@id='input-url'] http://google.com
639 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500640 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
641 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500642 Input Text xpath=//input[@id='input-url'] http://google.com
643 Click Button xpath=//button[@id='button-save-continue']
644 #Click Button xpath=//div[@title='Select Roles']
645 Click Element xpath=//*[@id='app-select-Select Roles']
646 Click Element xpath=//input[@id='Standard-User-checkbox']
647 Click Element xpath=//button[@id='button-save-add']
648 Click Image xpath=//img[@alt='Onap Logo']
649 Set Selenium Implicit Wait 3000
650 Click Link xpath=//a[contains(.,'Manage')]
651 Mouse Over xpath=//*[contains(text(),'Design')]
652 Set Selenium Implicit Wait 3000
653 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
654 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500655 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500656 Click Link xpath=//a[@title='Edit Functional Menu']
657 Click Link xpath=.//*[@id='Manage']/div/a
658 Click Link xpath=.//*[@id='Design']/div/a
659 Click Link xpath=.//*[@id='Product_Design']/div/a
660 Open Context Menu xpath=//*[@id='ONAP_Test']
661 Click Link xpath=//a[@href='#delete']
662 Set Selenium Implicit Wait 3000
663 Click Element xpath=//button[@id='div-confirm-ok-button']
664 Click Image xpath=//img[@alt='Onap Logo']
665 Set Selenium Implicit Wait 3000
666 Click Link xpath=//a[contains(.,'Manage')]
667 Mouse Over xpath=//*[contains(text(),'Design')]
668 Set Selenium Implicit Wait 3000
669 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
CHINTAMANI68e98362018-04-10 18:56:38 -0400670 Set Selenium Implicit Wait 3000
CHINTAMANIaf44d442018-04-25 12:38:44 -0400671 Click Image xpath=//img[@alt='Onap Logo']
672 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500673
674Portal admin Microservice Onboarding
675 [Documentation] Naviage to Edit Functional menu tab
676 Click Link xpath=//a[@title='Microservice Onboarding']
677 Click Button xpath=//button[@id='microservice-onboarding-button-add']
678 Input Text xpath=//input[@name='name'] Test Microservice
679 Input Text xpath=//*[@name='desc'] Test
680 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500681 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
682 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500683 Click Element xpath=//*[@name='desc']
684 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
685 Click Element xpath=//input[@id='microservice-details-input-security-type']
686 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
687 Click Element xpath=//li[contains(.,'Basic Authentication')]
688 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
689 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
690 Click Button xpath=//button[@id='microservice-details-save-button']
691 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
692 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
CHINTAMANI68e98362018-04-10 18:56:38 -0400693 Set Selenium Implicit Wait 3000
694
695Portal admin Microservice Delete
696 [Documentation] Naviage to Edit Functional menu tab
697 Click Link xpath=//a[@title='Microservice Onboarding']
698 Click Button xpath=//button[@id='microservice-onboarding-button-add']
699 Input Text xpath=//input[@name='name'] TestMS
700 Input Text xpath=//*[@name='desc'] TestMS
701 Click Element xpath=//input[@id='microservice-details-input-app']
702 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
703 Click Element xpath=//li[contains(.,'xDemo App')]
704 Click Element xpath=//*[@name='desc']
705 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
706 Click Element xpath=//input[@id='microservice-details-input-security-type']
707 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
708 Click Element xpath=//li[contains(.,'Basic Authentication')]
709 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
710 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
711 Click Button xpath=//button[@id='microservice-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400712 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
CHINTAMANI68e98362018-04-10 18:56:38 -0400713 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
714 Click Button xpath=//button[@id="div-confirm-ok-button"]
715 Set Selenium Implicit Wait 3000
716
kishore6eebdba2017-10-03 11:12:57 -0500717Portal Admin Create Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400718 [Documentation] Navigate to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600719 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
CHINTAMANIaf44d442018-04-25 12:38:44 -0400720 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500721 Click Link xpath=//a[@title='Widget Onboarding']
722 Click Button xpath=//button[@ng-click='toggleSidebar()']
723 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500724 Input Text xpath=//*[@name='name'] ONAP-xDemo
725 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500726 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400727 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
728 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500729 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
730 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
731 Click Button xpath=//button[@id='widgets-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400732 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore92d70d62017-10-11 14:51:31 -0500733 Page Should Contain ONAP-xDemo
CHINTAMANIaf44d442018-04-25 12:38:44 -0400734 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500735 GO TO ${PORTAL_HOME_PAGE}
736
737
738Portal Admin Delete Widget for All users
739 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500740 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
741 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500742 #Click Image xpath=//img[@alt='Onap Logo']
743 Click Link xpath=//a[@title='Widget Onboarding']
744 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500745 Click Element xpath=//li[contains(.,'xDemo App')]
746 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
747 #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 -0500748 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500749 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500750 Click Element xpath=//button[@id='div-confirm-ok-button']
751 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500752 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500753 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500754 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500755 #Set Selenium Implicit Wait 3000
756
kishore6eebdba2017-10-03 11:12:57 -0500757Portal Admin Create Widget for Application Roles
758 [Documentation] Naviage to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600759 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kishore6eebdba2017-10-03 11:12:57 -0500760 Click Link xpath=//a[@title='Widget Onboarding']
761 Click Button xpath=//button[@ng-click='toggleSidebar()']
762 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500763 Input Text xpath=//*[@name='name'] ONAP-xDemo
764 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500765 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400766 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
767 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500768 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500769 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500770 Click element xpath=//*[@name='desc']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400771 click element xpath=//*[@id="app-select-Select Roles0"]
kishore6eebdba2017-10-03 11:12:57 -0500772 click element xpath=//*[@id="Standard-User-checkbox"]
773 Click element xpath=//*[@name='desc']
774 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
775 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
776 Click Button xpath=//button[@id='widgets-details-save-button']
777 Click Image xpath=//img[@alt='Onap Logo']
778 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500779 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500780 Click Link xpath=//a[@title='Widget Onboarding']
781 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500782 Click Element xpath=//li[contains(.,'xDemo App')]
783 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500784 Set Selenium Implicit Wait 3000
785 GO TO ${PORTAL_HOME_PAGE}
CHINTAMANI68e98362018-04-10 18:56:38 -0400786
kishore92d70d62017-10-11 14:51:31 -0500787Portal Admin Delete Widget for Application Roles
788 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
789 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500790 #Click Image xpath=//img[@alt='Onap Logo']
791 Click Link xpath=//a[@title='Widget Onboarding']
792 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500793 Click Element xpath=//li[contains(.,'xDemo App')]
794 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
795 #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 -0500796 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500797 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
798 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500799 Click Element xpath=//button[@id='div-confirm-ok-button']
800 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500801 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500802 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500803 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
CHINTAMANI68e98362018-04-10 18:56:38 -0400804 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500805
806
807
808Portal Admin Edit Widget
809 [Documentation] Naviage to Home tab
810 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
811 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
812 Set Browser Implicit Wait 8000
813 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
814 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
815 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
816 Input Text xpath=//input[@name='title'] ONAP_VID
817 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
818 Input Text xpath=//input[@id='widget-input-add-order'] 5
819 Click Link xpath=//a[contains(.,'Add New')]
820 Click Element xpath=//div[@id='close-button']
821 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
822 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
823 Click Element xpath=//div[@id='confirmation-button-next']
824 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
825 Click Link xpath=//a[@id='close-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400826 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500827
828Portal Admin Broadcast Notifications
829 [Documentation] Portal Test Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400830 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
831 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
832 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500833 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400834 Go To ${PORTAL_HOME_URL}
835 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500836 Set Selenium Implicit Wait 3000
837 Click Link xpath=//*[@id="parent-item-User-Notifications"]
838 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
839 Click button xpath=//*[@id="button-openAddNewApp"]
840 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
841 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
842 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
843 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
844 click element xpath=//*[@id="button-notification-save"]
845 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
846 click element xpath=//*[@id="megamenu-notification-button"]
847 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400848# Notification bug, Uncomment the code when PORTAL-232 is fixed
849 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
850 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400851 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500852 log ${AdminBroadCastMsg}
853 [Return] ${AdminBroadCastMsg}
854
855Portal Admin Category Notifications
856 [Documentation] Portal Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400857 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
858 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
859# ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
860 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500861 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
862 Click Link xpath=//a[@id='parent-item-Home']
863 Click Link xpath=//*[@id="parent-item-User-Notifications"]
864 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
865 Click button xpath=//*[@id="button-openAddNewApp"]
866 #Select Radio Button NO radio-button-no
867 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
868 #Select Radio Button //label[@class='radio'] radio-button-approles
869 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500870 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500871 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
872 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
873 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
874 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
875 click element xpath=//*[@id="button-notification-save"]
876 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
877 click element xpath=//*[@id="megamenu-notification-button"]
878 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400879# Notification bug, Uncomment the code when PORTAL-232 is fixed
880 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
881 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400882 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500883 log ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400884 [Return] ${AdminCategoryMsg}
kishore6eebdba2017-10-03 11:12:57 -0500885
kishorebbca0cf2017-10-09 16:59:38 -0500886Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500887 [Documentation] Logout from Portal GUI
888 Click Element xpath=//div[@id='header-user-icon']
889 Click Button xpath=//button[contains(.,'Log out')]
890 Title Should Be Login
891
kishore6eebdba2017-10-03 11:12:57 -0500892Application admin Login To Portal GUI
893 [Documentation] Logs into Portal GUI
894 # Setup Browser Now being managed by test case
895 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500896# Go To ${PORTAL_LOGIN_URL}
897# Maximize Browser Window
898# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
899# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
900# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500901 # Handle Proxy Warning
902 Title Should Be Login
903 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
904 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
905 Click Link xpath=//a[@id='loginBtn']
906 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
907 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
908
909Application Admin Navigation Application Link Tab
910 [Documentation] Logs into Portal GUI as application admin
911 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500912 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
913 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500914 Scroll Element Into View xpath=//i[@class='ion-close-round']
915 Click Element xpath=//i[@class='ion-close-round']
916 Set Selenium Implicit Wait 3000
917 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500918
919
920Application Admin Navigation Functional Menu
921 [Documentation] Logs into Portal GUI as application admin
922 Click Link xpath=//a[contains(.,'Manage')]
923 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
924 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500925 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500926 Click Element xpath=//i[@class='ion-close-round']
927 Click Element xpath=(.//span[@id='tab-Home'])[1]
928
929
CHINTAMANIaf44d442018-04-25 12:38:44 -0400930Application admin Add Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500931 [Documentation] Naviage to Users tab
932 Click Link xpath=//a[@title='Users']
933 Page Should Contain Users
934 Click Button xpath=//button[@ng-click='toggleSidebar()']
935 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
936 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
937 Click Button xpath=//button[@id='button-search-users']
938 Click Element xpath=//span[@id='result-uuid-0']
939 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500940 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
941 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400942 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
943 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
944 # Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500945 Click Button xpath=//button[@id='new-user-save-button']
946 Set Selenium Implicit Wait 3000
947 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500948 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500949 #Click Link xpath=//a[@title='Users']
950 #Page Should Contain Users
951 Go To ${PORTAL_HOME_PAGE}
952 Set Selenium Implicit Wait 3000
953 Click Link xpath=//a[@title='Users']
954 Click Element xpath=//input[@id='dropdown1']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400955 #Click Element xpath=//li[contains(.,'Default')]
kishore92d70d62017-10-11 14:51:31 -0500956 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500957 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400958 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500959 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
960
CHINTAMANIaf44d442018-04-25 12:38:44 -0400961Application admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500962 [Documentation] Naviage to Users tab
963 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400964 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
965 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
966 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore92d70d62017-10-11 14:51:31 -0500967 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
968 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400969 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500970 Set Selenium Implicit Wait 3000
971 Click Button xpath=//button[@id='new-user-save-button']
972 Set Selenium Implicit Wait 3000
973 Page Should Contain Users
974 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500975 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500976 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400977 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500978 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
979
kishore6eebdba2017-10-03 11:12:57 -0500980Application admin Delete Standard User Existing user
981 [Documentation] Naviage to Users tab
982 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400983# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
984# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500985 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
986 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500987 Click Element xpath=//button[@id='div-confirm-ok-button']
988 Click Button xpath=//button[@id='new-user-save-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400989# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
990# Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore6eebdba2017-10-03 11:12:57 -0500991 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore72d3adf2017-10-19 11:05:22 -0500992 #Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400993 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500994
kishore6eebdba2017-10-03 11:12:57 -0500995Application admin Logout from Portal GUI
996 [Documentation] Logout from Portal GUI
997 Click Element xpath=//div[@id='header-user-icon']
kishore72d3adf2017-10-19 11:05:22 -0500998 #Set Selenium Implicit Wait 3000
kishore82eb79a2017-10-31 08:04:25 -0500999 Click Button xpath=//button[contains(text(),'Log out')]
kishore72d3adf2017-10-19 11:05:22 -05001000 #Set Selenium Implicit Wait 3000
kishore4089a332017-10-18 17:02:53 -05001001 Title Should Be Login
kishore6eebdba2017-10-03 11:12:57 -05001002
1003Standared user Login To Portal GUI
1004 [Documentation] Logs into Portal GUI
1005 # Setup Browser Now being managed by test case
1006 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -05001007# Go To ${PORTAL_LOGIN_URL}
1008# Maximize Browser Window
1009# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
1010# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
1011# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -05001012 # Handle Proxy Warning
1013 Title Should Be Login
1014 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
1015 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
1016 Click Link xpath=//a[@id='loginBtn']
1017 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1018 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
1019
kishore6eebdba2017-10-03 11:12:57 -05001020Standared user Navigation Application Link Tab
1021 [Documentation] Logs into Portal GUI as application admin
1022 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -05001023 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
1024 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -05001025 Click Element xpath=(.//span[@id='tab-Home'])[1]
CHINTAMANI68e98362018-04-10 18:56:38 -04001026 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001027
1028Standared user Navigation Functional Menu
1029 [Documentation] Logs into Portal GUI as application admin
1030 Click Link xpath=//a[contains(.,'Manage')]
CHINTAMANI68e98362018-04-10 18:56:38 -04001031 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
1032 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
1033 Page Should Contain Welcome to VID
1034 Click Element xpath=(.//span[@id='tab-Home'])[1]
1035 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001036
1037
1038Standared user Broadcast Notifications
1039 [Documentation] Logs into Portal GUI as application admin
1040 [Arguments] ${AdminBroadCastMsg}
1041 Click element xpath=//*[@id='megamenu-notification-button']
1042 Click element xpath=//*[@id='notification-history-link']
1043 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1044 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
1045 log ${AdminBroadCastMsg}
1046
1047
1048Standared user Category Notifications
1049 [Documentation] Logs into Portal GUI as application admin
1050 [Arguments] ${AdminCategoryMsg}
1051 #click element xpath=//*[@id='megamenu-notification-button']
1052 #click element xpath=//*[@id="notification-history-link"]
1053 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1054 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1055 log ${AdminCategoryMsg}
1056
kishore6eebdba2017-10-03 11:12:57 -05001057Standared user Logout from Portal GUI
1058 [Documentation] Logout from Portal GUI
1059 Click Element xpath=//div[@id='header-user-icon']
1060 Click Button xpath=//button[contains(.,'Log out')]
1061 #Confirm Action
1062 Title Should Be Login
1063
CHINTAMANIaf44d442018-04-25 12:38:44 -04001064Portal admin Add New Account
1065 Click Link //*[@id="parent-item-App-Account-Management"]
1066 Click Button xpath=//button[@ng-click='toggleSidebar()']
1067 Set Selenium Implicit Wait 3000
1068 Click Button //*[@id="account-onboarding-button-add"]
1069 Set Selenium Implicit Wait 3000
1070 Input Text //*[@id="account-details-input-name"] ${AppAccountName}
1071 Input Text //*[@id="account-details-input-username"] ${AppUserName}
1072 Input Text //*[@id="account-details-input-password"] ${AppPassword}
1073 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
1074 # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
1075 # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
1076 #account-details-next-button
1077 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
1078
1079Portal admin Delete Account
1080 Click Link //*[@id="parent-item-App-Account-Management"]
1081 Click Button xpath=//button[@ng-click='toggleSidebar()']
1082 Set Selenium Implicit Wait 3000
1083 Click Button //*[@id="account-onboarding-button-add"]
1084 Set Selenium Implicit Wait 3000
1085
1086Tear Down
kishore6eebdba2017-10-03 11:12:57 -05001087 [Documentation] Close all browsers
1088 Close All Browsers
1089
kishore6eebdba2017-10-03 11:12:57 -05001090Enhanced Notification on ONAP Portal
1091 [Documentation] Runs portal Post request
1092 [Arguments] ${data_path} ${data}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001093 # Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -05001094 ${session}= Create Session portal ${PORTAL_URL}
1095 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1096 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001097 # Log Received response from portal ${resp.text}
kishore6eebdba2017-10-03 11:12:57 -05001098 [Return] ${resp}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001099
kishore6eebdba2017-10-03 11:12:57 -05001100Notification on ONAP Portal
1101 [Documentation] Create Config portal
1102 ${configportal}= Create Dictionary jira_id=${jira}
1103 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
1104 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1105 Should Be Equal As Strings ${post_resp.status_code} 200
kishore6eebdba2017-10-03 11:12:57 -05001106
1107Portal Application Account Management
1108 [Documentation] Naviage to Application Account Management tab
1109 Click Link xpath=//a[@title='App Account Management']
1110 Click Button xpath=//button[@id='account-onboarding-button-add']
1111 Input Text xpath=//input[@name='name'] JIRA
1112 Input Text xpath=//input[@name='username'] jira
1113 Input Text xpath=//input[@name='password'] _pass
1114 Input Text xpath=//input[@name='repassword'] _pass
1115 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1116 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1117
CHINTAMANIaf44d442018-04-25 12:38:44 -04001118Portal Application Account Management validation
kishore6eebdba2017-10-03 11:12:57 -05001119 [Documentation] Naviage to user notification tab
1120 Click Link xpath=//a[@id='parent-item-User-Notifications']
1121 click element xpath=//*[@id="megamenu-notification-button"]
1122 Click element xpath=//*[@id="notification-history-link"]
1123 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1124 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1125
1126
CHINTAMANIaf44d442018-04-25 12:38:44 -04001127Portal AAF new fields
kishore6eebdba2017-10-03 11:12:57 -05001128 [Documentation] Naviage to user Application details tab
1129 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001130 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001131 Page Should Contain Name Space
1132 Page Should Contain Centralized
1133 Click Element xpath=//button[@id='button-notification-cancel']
CHINTAMANI2dfb8822018-05-10 12:14:34 -04001134 Set Selenium Implicit Wait 3000
CHINTAMANI3f00f5b2018-05-01 07:33:05 -04001135
1136Portal Change REST URL
1137 [Documentation] Naviage to user Application details tab
1138 Click Link xpath=//a[@title='Application Onboarding']
1139 Click Element xpath=//td[contains(.,'xDemo App')]
1140 Input Text xpath=//input[@name='restUrl'] ${PORTAL_XDEMPAPP_REST_URL}
1141 Click Element xpath=//button[@id='button-save-app']
CHINTAMANI2dfb8822018-05-10 12:14:34 -04001142 Set Selenium Implicit Wait 6000
1143 Go To ${PORTAL_HOME_PAGE}
1144 Wait Until Element Is Visible xpath=//a[@title='Application Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -05001145
CHINTAMANIaf44d442018-04-25 12:38:44 -04001146Admin widget download
1147 Go To ${PORTAL_HOME_URL}
1148 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1149 click Link xpath=//a[@title='Widget Onboarding']
1150 Wait until page contains Element xpath=//table[@class='ng-scope']
1151 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
1152 log ${td_id}
1153 ${test}= Get Substring ${td_id} -1
1154 log ${test}
1155 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
1156 click Element xpath=//*[@id=${download_link_id}]
1157
1158Reset widget layout option
1159 Go To ${PORTAL_HOME_URL}
1160 Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1161 Execute Javascript document.getElementById('widgets').scrollTo(0,1400)
1162 Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1163 Execute Javascript document.getElementById('widgets').scrollTo(0,1800)
1164 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
1165 Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight);
1166 Execute Javascript document.getElementById('dashboardDefaultPreference').click()
1167 Execute Javascript document.getElementById('div-confirm-ok-button').click()
CHINTAMANI2dfb8822018-05-10 12:14:34 -04001168
1169Add Portal Admin
1170 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1171 Scroll Element Into View xpath=//button[@id='portal-admin-button-add']
1172 Click Button xpath=//button[@id='portal-admin-button-add']
1173 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
1174 Click Button xpath=//button[@id='button-search-users']
1175 Wait Until Page Contains Element xpath=//span[@id='result-uuid-0'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1176 Click Element xpath=//span[@id='result-uuid-0']
1177 Click Button xpath=//button[@id='pa-search-users-button-save']
1178 Click Button xpath=//button[@id='admin-div-ok-button']
1179
1180
1181Delete Portal Admin
1182 Wait Until Page Does Not Contain Element xpath=//*[@class='b2b-modal-header']
1183 Click Link xpath=//a[@id='parent-item-Portal-Admins']
1184 Click Element xpath=//td[contains(.,'portal')]/following::span[@id='1-button-portal-admin-remove']
1185 Click Button xpath=//*[@id='div-confirm-ok-button']