blob: 0b61807b2c66ce7b48b7f83661c39943517a3fde [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
93
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
CHINTAMANI3f00f5b2018-05-01 07:33:05 -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
CHINTAMANIaf44d442018-04-25 12:38:44 -0400153#Add Standard User Role for Existing user
154 #Portal admin Add Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500155
CHINTAMANIaf44d442018-04-25 12:38:44 -0400156#Edit Standard User Role for Existing user
157 #Portal admin Edit Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500158
CHINTAMANI68e98362018-04-10 18:56:38 -0400159#Delete Standard User Role for Existing user
CHINTAMANIaf44d442018-04-25 12:38:44 -0400160 #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
168Logout from Portal GUI as Portal Admin
169 Portal admin Logout from Portal GUI
170
171## Application Admin user Test cases
CHINTAMANI68e98362018-04-10 18:56:38 -0400172
CHINTAMANIaf44d442018-04-25 12:38:44 -0400173Login To Portal GUI as APP Admin
174 Application admin Login To Portal GUI
CHINTAMANI68e98362018-04-10 18:56:38 -0400175
kishore92d70d62017-10-11 14:51:31 -0500176##Navigate Functional Link as APP Admin
CHINTAMANIaf44d442018-04-25 12:38:44 -0400177 ##Application Admin Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500178
CHINTAMANIaf44d442018-04-25 12:38:44 -0400179#Add Standard User Role for Existing user as APP Admin
180 #Application admin Add Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500181
CHINTAMANIaf44d442018-04-25 12:38:44 -0400182#Edit Standard User Role for Existing user as APP Admin
183 #Application admin Edit Standard User Existing user
kishorebbca0cf2017-10-09 16:59:38 -0500184
CHINTAMANIaf44d442018-04-25 12:38:44 -0400185#Delete Standard User Role for Existing user as APP Admin
186 #Application admin Delete Standard User Existing user
kishore5ea942b2017-10-14 22:19:45 -0500187
CHINTAMANIaf44d442018-04-25 12:38:44 -0400188#Navigate Application Link as APP Admin
189 #Application Admin Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500190
CHINTAMANIaf44d442018-04-25 12:38:44 -0400191Logout from Portal GUI as APP Admin
192 Application admin Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500193
CHINTAMANIaf44d442018-04-25 12:38:44 -0400194##Standard User Test cases
kishorebbca0cf2017-10-09 16:59:38 -0500195
CHINTAMANIaf44d442018-04-25 12:38:44 -0400196Login To Portal GUI as Standared User
197 Standared user Login To Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500198
199#Navigate Application Link as Standared User
CHINTAMANIaf44d442018-04-25 12:38:44 -0400200 #Standared user Navigation Application Link Tab
kishorebbca0cf2017-10-09 16:59:38 -0500201
CHINTAMANIaf44d442018-04-25 12:38:44 -0400202#Navigate Functional Link as Standared User
203 #Standared user Navigation Functional Menu
kishorebbca0cf2017-10-09 16:59:38 -0500204
CHINTAMANIaf44d442018-04-25 12:38:44 -0400205#Broadcast Notifications Standared user
206 #Standared user Broadcast Notifications ${AdminBroadCastMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500207
CHINTAMANIaf44d442018-04-25 12:38:44 -0400208#Category Notifications Standared user
209 #Standared user Category Notifications ${AdminCategoryMsg}
kishorebbca0cf2017-10-09 16:59:38 -0500210
CHINTAMANIaf44d442018-04-25 12:38:44 -0400211Logout from Portal GUI as Standared User
212 Standared User Logout from Portal GUI
kishorebbca0cf2017-10-09 16:59:38 -0500213
kishore328996f2017-09-08 17:15:42 -0500214Teardown
kishorebbca0cf2017-10-09 16:59:38 -0500215 [Documentation] Close All Open browsers
216 Close All Browsers
kishore328996f2017-09-08 17:15:42 -0500217
kishore328996f2017-09-08 17:15:42 -0500218*** Keywords ***
kishore6eebdba2017-10-03 11:12:57 -0500219
220Setup Browser
221 [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
222# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
223 Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
224 Log Running with ${GLOBAL_SELENIUM_BROWSER}
225
226
227 Setup Browser Chrome
228 ${os}= Get Normalized Os
229 Log Normalized OS=${os}
230 ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
231 Call Method ${chrome options} add_argument no-sandbox
232 ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
233 Set To Dictionary ${dc} elementScrollBehavior 1
234 Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
235 Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
236
237Handle Proxy Warning
238 [Documentation] Handle Intermediate Warnings from Proxies
239 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE}
240 Return From Keyword if '${status}' != 'PASS'
241 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
242 Return From Keyword if '${status}' != 'PASS'
243 Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == ''
244 Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == ''
245 ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE}
246 Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}
247
248
kishore6eebdba2017-10-03 11:12:57 -0500249Run Portal Health Check
250 [Documentation] Runs Portal Health check
251 ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
252 Should Be Equal As Strings ${resp.status_code} 200
253 Should Be Equal As Strings ${resp.json()['statusCode']} 200
CHINTAMANIaf44d442018-04-25 12:38:44 -0400254
kishore6eebdba2017-10-03 11:12:57 -0500255Run Portal Get Request
256 [Documentation] Runs Portal Get request
257 [Arguments] ${data_path}
258 ${session}= Create Session portal ${PORTAL_URL}
259 ${uuid}= Generate UUID
260 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
261 ${resp}= Get Request portal ${data_path} headers=${headers}
262 Log Received response from portal ${resp.text}
263 [Return] ${resp}
264
265
266Portal admin Login To Portal GUI
267 [Documentation] Logs into Portal GUI
268 ## Setup Browser Now being managed by test case
kishorebbca0cf2017-10-09 16:59:38 -0500269# Setup Browser
kishore6eebdba2017-10-03 11:12:57 -0500270 Start Virtual Display 1920 1080
271 Open Browser ${PORTAL_LOGIN_URL} chrome
kishorebbca0cf2017-10-09 16:59:38 -0500272# Go To ${PORTAL_LOGIN_URL}
kishore6eebdba2017-10-03 11:12:57 -0500273 Maximize Browser Window
274 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
275 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
276 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
277 # Handle Proxy Warning
278 Title Should Be Login
279 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
280 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
281 Click Link xpath=//a[@id='loginBtn']
282 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400283 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
284 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500285
286Portal admin Go To Portal HOME
287 [Documentation] Naviage to Portal Home
288 Go To ${PORTAL_HOME_URL}
289 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
290
291Portal admin User Notifications
292 [Documentation] Naviage to User notification tab
293 Click Link xpath=//a[@id='parent-item-User-Notifications']
294 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
295 Click Button xpath=//button[@id='button-openAddNewApp']
296 Click Button xpath=(//button[@id='undefined'])[1]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400297 #Click Button xpath=//input[@id='datepicker-start']
kishore6eebdba2017-10-03 11:12:57 -0500298
299Portal admin Add Application Admin Exiting User
300 [Documentation] Naviage to Admins tab
301 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
302 Click Link xpath=//a[@title='Admins']
303 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
304 Page Should Contain Admins
305 Click Button xpath=//button[@ng-click='toggleSidebar()']
306 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
kishorebbca0cf2017-10-09 16:59:38 -0500307 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500308 Click Button xpath=//button[@id='button-search-users']
309 Click Element xpath=//span[@id='result-uuid-0']
310 Click Button xpath=//button[@id='search-users-button-next']
311 Click Button xpath=//input[@value='Select application']
kishore5ea942b2017-10-14 22:19:45 -0500312 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500313 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400314# Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
315# Click Element xpath=(//li[contains(.,'Default' )])[2]
kishore92d70d62017-10-11 14:51:31 -0500316 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500317 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
318 Click Element xpath=//button[@id='admin-div-ok-button']
319 Click Element xpath=//button[@id='div-confirm-ok-button']
320 Get Selenium Implicit Wait
321 Click Link xpath=//a[@aria-label='Admins']
322 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400323# Click Element xpath=//li[contains(.,'Default' )]
kishore92d70d62017-10-11 14:51:31 -0500324 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500325 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore5ea942b2017-10-14 22:19:45 -0500326 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Existing_User}
327 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User}
kishore92d70d62017-10-11 14:51:31 -0500328 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500329
330
331Portal admin Delete Application Admin Existing User
332 [Documentation] Naviage to Admins tab
CHINTAMANI68e98362018-04-10 18:56:38 -0400333 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
334 Click Link xpath=//a[@title='Admins']
335 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
336 Page Should Contain Admins
337 Click Button xpath=//button[@ng-click='toggleSidebar()']
338 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
kishore6eebdba2017-10-03 11:12:57 -0500339 Click Element xpath=(//span[contains(.,'portal')] )[1]
kishore92d70d62017-10-11 14:51:31 -0500340 #Click Element xpath=(//span[contains(.,'demo')] )[1]
341 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
CHINTAMANI68e98362018-04-10 18:56:38 -0400342# Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
kishore6eebdba2017-10-03 11:12:57 -0500343 Click Element xpath=//button[@id='div-confirm-ok-button']
344 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
345 Click Element xpath=//button[@id='admin-div-ok-button']
346 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
347 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
348 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
kishore92d70d62017-10-11 14:51:31 -0500349 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
kishore5ea942b2017-10-14 22:19:45 -0500350 Click Image xpath=//img[@alt='Onap Logo']
351 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500352
353
354Portal admin Add Application admin User New user
355 [Documentation] Naviage to Users tab
356 Click Link xpath=//a[@title='Users']
357 Page Should Contain Users
358 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500359 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500360 Click Button xpath=//button[@id='Create-New-User-button']
361 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name}
362 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name}
363 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
364 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
365 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd}
366 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck}
367 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400368
369 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
370
371 #log ${Result}
372 #${type_result}= Evaluate type(${Result})
373 #log ${type_result}
374
375 Run Keyword if '${Result}'== 0 AdminUser does not exist already
376 ... ELSE Goto Home Image
377 Set Selenium Implicit Wait 3000
378
379Goto Home Image
380 Click Image xpath=//img[@alt='Onap Logo']
381
382AdminUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500383 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500384 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
385 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
386 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500387 Set Selenium Implicit Wait 3000
388 Click Button xpath=//button[@id='new-user-save-button']
389 Set Selenium Implicit Wait 3000
390 Go To ${PORTAL_HOME_PAGE}
391 Click Link xpath=//a[@title='Users']
392 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500393 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500394 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_First_Name}
395 #Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500396 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_First_Name}
397 Click Image xpath=//img[@alt='Onap Logo']
398 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500399
400
401Portal admin Add Standard User New user
402 [Documentation] Naviage to Users tab
403 Click Link xpath=//a[@title='Users']
404 Page Should Contain Users
405 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500406 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500407 Click Button xpath=//button[@id='Create-New-User-button']
408 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name}
409 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name}
410 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
411 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
412 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd}
413 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck}
414 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
CHINTAMANI68e98362018-04-10 18:56:38 -0400415
416 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
417
418 #log ${Result}
419 #${type_result}= Evaluate type(${Result})
420 #log ${type_result}
421
422 Run Keyword if '${Result}'== 0 StaUser does not exist already
423 ... ELSE Goto Home Image
424 Set Selenium Implicit Wait 3000
425
426StaUser does not exist already
kishore6eebdba2017-10-03 11:12:57 -0500427 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500428 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
429 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
430 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500431 Set Selenium Implicit Wait 3000
432 Click Button xpath=//button[@id='new-user-save-button']
433 Set Selenium Implicit Wait 3000
434 Go To ${PORTAL_HOME_PAGE}
435 Click Link xpath=//a[@title='Users']
436 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500437 Click Element xpath=//li[contains(.,'xDemo App')]
kishorebbca0cf2017-10-09 16:59:38 -0500438 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_First_Name}
439 #Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500440 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name}
441 Click Image xpath=//img[@alt='Onap Logo']
442 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500443
444
445
446Portal admin Add Application admin User New user -Test
447 [Documentation] Naviage to Users tab
448 Click Link xpath=//a[@title='Users']
449 Page Should Contain Users
450 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore5ea942b2017-10-14 22:19:45 -0500451 Click Button xpath=//button[@id='users-button-add']
kishore6eebdba2017-10-03 11:12:57 -0500452 Click Button xpath=//button[@id='Create-New-User-button']
453 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name}
454 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name}
455 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
456 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
457 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd}
458 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck}
459 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
kishore5ea942b2017-10-14 22:19:45 -0500460 Click Button xpath=//button[@id='search-users-button-cancel']
461 Click Image xpath=//img[@alt='Onap Logo']
462 Set Selenium Implicit Wait 3000
463
464
465 #Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500466 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
kishore5ea942b2017-10-14 22:19:45 -0500467 #Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
468 #Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
469 #Set Selenium Implicit Wait 3000
470 #Click Button xpath=//button[@id='new-user-save-button']
471 #Set Selenium Implicit Wait 3000
472 #Go To ${PORTAL_HOME_PAGE}
473 #Click Link xpath=//a[@title='Users']
474 #Click Element xpath=//input[@id='dropdown1']
475 #Click Element xpath=//li[contains(.,'xDemo App')]
476 #Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Test_First_Name}
kishorebbca0cf2017-10-09 16:59:38 -0500477 #Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name}
478 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name}
kishore6eebdba2017-10-03 11:12:57 -0500479
kishore6eebdba2017-10-03 11:12:57 -0500480Portal admin Add Application Admin Exiting User -APPDEMO
481 [Documentation] Naviage to Admins tab
482 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
483 Click Link xpath=//a[@title='Admins']
484 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
485 Page Should Contain Admins
486 Click Button xpath=//button[@ng-click='toggleSidebar()']
487 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
488 Input Text xpath=//input[@id='input-user-search'] ${App_First_Name}
489 Click Button xpath=//button[@id='button-search-users']
490 Click Element xpath=//span[@id='result-uuid-0']
491 Click Button xpath=//button[@id='search-users-button-next']
492 Click Button xpath=//input[@value='Select application']
kishore92d70d62017-10-11 14:51:31 -0500493 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
kishore92d70d62017-10-11 14:51:31 -0500494 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
495 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500496 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
497 Click Element xpath=//button[@id='admin-div-ok-button']
498 Click Element xpath=//button[@id='div-confirm-ok-button']
499 Get Selenium Implicit Wait
500 Click Link xpath=//a[@aria-label='Admins']
501 Click Element xpath=//input[@id='dropdown1']
kishore5ea942b2017-10-14 22:19:45 -0500502 Click Element xpath=//li[contains(.,'xDemo App' )]
kishore6eebdba2017-10-03 11:12:57 -0500503 Input Text xpath=//input[@id='input-table-search'] ${App_First_Name}
kishore5ea942b2017-10-14 22:19:45 -0500504 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name}
505 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_First_Name}
506 Click Image xpath=//img[@alt='Onap Logo']
507 Set Selenium Implicit Wait 3000
CHINTAMANI68e98362018-04-10 18:56:38 -0400508
kishore6eebdba2017-10-03 11:12:57 -0500509Portal admin Add Standard User Existing user
510 [Documentation] Naviage to Users tab
511 Click Link xpath=//a[@title='Users']
512 Page Should Contain Users
513 Click Button xpath=//button[@ng-click='toggleSidebar()']
514 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
515 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
516 Click Button xpath=//button[@id='button-search-users']
517 Click Element xpath=//span[@id='result-uuid-0']
518 Click Button xpath=//button[@id='next-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400519# Click Element xpath=//*[@id='div-app-name-dropdown-Default']
520# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
CHINTAMANI3f00f5b2018-05-01 07:33:05 -0400521 Click Element xpath=//div[@id='app-select-Select roles1']
522 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='Standard-User-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500523 Set Selenium Implicit Wait 3000
524 Click Button xpath=//button[@id='new-user-save-button']
525 Set Selenium Implicit Wait 3000
526 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500527 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500528 #Click Link xpath=//a[@title='Users']
529 #Page Should Contain Users
530 #Focus xpath=//input[@name='dropdown1']
kishore6eebdba2017-10-03 11:12:57 -0500531 Go To ${PORTAL_HOME_PAGE}
532 Click Link xpath=//a[@title='Users']
533 Click Element xpath=//input[@id='dropdown1']
CHINTAMANI68e98362018-04-10 18:56:38 -0400534# Click Element xpath=//li[contains(.,'Default')]
535 Click Element xpath=//li[contains(.,'XDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500536 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400537 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
538 Set Selenium Implicit Wait 3000
539
CHINTAMANIaf44d442018-04-25 12:38:44 -0400540Portal admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500541 [Documentation] Naviage to Users tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400542 Click Link xpath=//a[@title='Users']
543 Click Element xpath=//input[@id='dropdown1']
544 # Click Element xpath=//li[contains(.,'Default')]
545# Set Selenium Implicit Wait 3000
546 Click Element xpath=//li[contains(.,'xDemo App')]
547# Set Selenium Implicit Wait 3000
548 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
549 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
kishore6eebdba2017-10-03 11:12:57 -0500550 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400551 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
552 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
553 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
554 Click Element xpath=//*[@id='app-select-Standard User1']
555 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
556 Set Selenium Implicit Wait 3000
557 Click Button xpath=//button[@id='new-user-save-button']
558 Set Selenium Implicit Wait 3000
559
560 Page Should Contain Users
561 Click Button xpath=//button[@ng-click='toggleSidebar()']
562 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
563 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
564 Click Button xpath=//button[@id='button-search-users']
565 Click Element xpath=//span[@id='result-uuid-0']
566 Click Button xpath=//button[@id='next-button']
567 Click Element xpath=//div[@id='app-select-Select roles1']
568 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
569 Set Selenium Implicit Wait 3000
570# Click Element xpath=//*[@id='app-select-Standard User1']
571# Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
572 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
573 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
574 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500575 Set Selenium Implicit Wait 3000
576 Click Button xpath=//button[@id='new-user-save-button']
577 Set Selenium Implicit Wait 3000
578 Page Should Contain Users
579 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500580 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500581 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400582 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
kishore6eebdba2017-10-03 11:12:57 -0500583 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
CHINTAMANI68e98362018-04-10 18:56:38 -0400584 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500585
586 Portal admin Delete Standard User Existing user
587 [Documentation] Naviage to Users tab
588 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400589# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
590# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500591 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
592 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
CHINTAMANI68e98362018-04-10 18:56:38 -0400593# Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
594# Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500595 Click Element xpath=//button[@id='div-confirm-ok-button']
596 Click Button xpath=//button[@id='new-user-save-button']
597 #Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANI68e98362018-04-10 18:56:38 -0400598 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
599 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
600 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
601 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500602
603Functional Top Menu Get Access
604 [Documentation] Naviage to Support tab
CHINTAMANIaf44d442018-04-25 12:38:44 -0400605 Go To ${PORTAL_HOME_URL}
kishore6eebdba2017-10-03 11:12:57 -0500606 Click Link xpath=//a[contains(.,'Support')]
607 Mouse Over xpath=//*[contains(text(),'Get Access')]
608 Click Link xpath=//a[contains(.,'Get Access')]
609 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
CHINTAMANI68e98362018-04-10 18:56:38 -0400610 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500611
612Functional Top Menu Contact Us
613 [Documentation] Naviage to Support tab
614 Click Link xpath=//a[contains(.,'Support')]
615 Mouse Over xpath=//*[contains(text(),'Contact Us')]
616 Click Link xpath=//a[contains(.,'Contact Us')]
617 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
618 Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400619 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500620
621Portal admin Edit Functional menu
622 [Documentation] Naviage to Edit Functional menu tab
623 Click Link xpath=//a[@title='Edit Functional Menu']
624 Click Link xpath=.//*[@id='Manage']/div/a
625 Click Link xpath=.//*[@id='Design']/div/a
626 Click Link xpath=.//*[@id='Product_Design']/div/a
627 Open Context Menu xpath=//*[@id='Product_Design']/div/span
628 Click Link xpath=//a[@href='#add']
629 Input Text xpath=//input[@id='input-title'] ONAP Test
630 #Input Text xpath=//input[@id='input-url'] http://google.com
631 Click Element xpath=//input[@id='select-app']
kishore92d70d62017-10-11 14:51:31 -0500632 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
633 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500634 Input Text xpath=//input[@id='input-url'] http://google.com
635 Click Button xpath=//button[@id='button-save-continue']
636 #Click Button xpath=//div[@title='Select Roles']
637 Click Element xpath=//*[@id='app-select-Select Roles']
638 Click Element xpath=//input[@id='Standard-User-checkbox']
639 Click Element xpath=//button[@id='button-save-add']
640 Click Image xpath=//img[@alt='Onap Logo']
641 Set Selenium Implicit Wait 3000
642 Click Link xpath=//a[contains(.,'Manage')]
643 Mouse Over xpath=//*[contains(text(),'Design')]
644 Set Selenium Implicit Wait 3000
645 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
646 Set Selenium Implicit Wait 3000
kishorebbca0cf2017-10-09 16:59:38 -0500647 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500648 Click Link xpath=//a[@title='Edit Functional Menu']
649 Click Link xpath=.//*[@id='Manage']/div/a
650 Click Link xpath=.//*[@id='Design']/div/a
651 Click Link xpath=.//*[@id='Product_Design']/div/a
652 Open Context Menu xpath=//*[@id='ONAP_Test']
653 Click Link xpath=//a[@href='#delete']
654 Set Selenium Implicit Wait 3000
655 Click Element xpath=//button[@id='div-confirm-ok-button']
656 Click Image xpath=//img[@alt='Onap Logo']
657 Set Selenium Implicit Wait 3000
658 Click Link xpath=//a[contains(.,'Manage')]
659 Mouse Over xpath=//*[contains(text(),'Design')]
660 Set Selenium Implicit Wait 3000
661 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
CHINTAMANI68e98362018-04-10 18:56:38 -0400662 Set Selenium Implicit Wait 3000
CHINTAMANIaf44d442018-04-25 12:38:44 -0400663 Click Image xpath=//img[@alt='Onap Logo']
664 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500665
666Portal admin Microservice Onboarding
667 [Documentation] Naviage to Edit Functional menu tab
668 Click Link xpath=//a[@title='Microservice Onboarding']
669 Click Button xpath=//button[@id='microservice-onboarding-button-add']
670 Input Text xpath=//input[@name='name'] Test Microservice
671 Input Text xpath=//*[@name='desc'] Test
672 Click Element xpath=//input[@id='microservice-details-input-app']
kishore92d70d62017-10-11 14:51:31 -0500673 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
674 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500675 Click Element xpath=//*[@name='desc']
676 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
677 Click Element xpath=//input[@id='microservice-details-input-security-type']
678 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
679 Click Element xpath=//li[contains(.,'Basic Authentication')]
680 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
681 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
682 Click Button xpath=//button[@id='microservice-details-save-button']
683 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
684 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
CHINTAMANI68e98362018-04-10 18:56:38 -0400685 Set Selenium Implicit Wait 3000
686
687Portal admin Microservice Delete
688 [Documentation] Naviage to Edit Functional menu tab
689 Click Link xpath=//a[@title='Microservice Onboarding']
690 Click Button xpath=//button[@id='microservice-onboarding-button-add']
691 Input Text xpath=//input[@name='name'] TestMS
692 Input Text xpath=//*[@name='desc'] TestMS
693 Click Element xpath=//input[@id='microservice-details-input-app']
694 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
695 Click Element xpath=//li[contains(.,'xDemo App')]
696 Click Element xpath=//*[@name='desc']
697 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
698 Click Element xpath=//input[@id='microservice-details-input-security-type']
699 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
700 Click Element xpath=//li[contains(.,'Basic Authentication')]
701 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
702 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
703 Click Button xpath=//button[@id='microservice-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400704 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
CHINTAMANI68e98362018-04-10 18:56:38 -0400705 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
706 Click Button xpath=//button[@id="div-confirm-ok-button"]
707 Set Selenium Implicit Wait 3000
708
kishore6eebdba2017-10-03 11:12:57 -0500709Portal Admin Create Widget for All users
CHINTAMANI68e98362018-04-10 18:56:38 -0400710 [Documentation] Navigate to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600711 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
CHINTAMANIaf44d442018-04-25 12:38:44 -0400712 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500713 Click Link xpath=//a[@title='Widget Onboarding']
714 Click Button xpath=//button[@ng-click='toggleSidebar()']
715 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500716 Input Text xpath=//*[@name='name'] ONAP-xDemo
717 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500718 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400719 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
720 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500721 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
722 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
723 Click Button xpath=//button[@id='widgets-details-save-button']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400724 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore92d70d62017-10-11 14:51:31 -0500725 Page Should Contain ONAP-xDemo
CHINTAMANIaf44d442018-04-25 12:38:44 -0400726 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500727 GO TO ${PORTAL_HOME_PAGE}
728
729
730Portal Admin Delete Widget for All users
731 [Documentation] Naviage to delete Widget menu tab
kishore92d70d62017-10-11 14:51:31 -0500732 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
733 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500734 #Click Image xpath=//img[@alt='Onap Logo']
735 Click Link xpath=//a[@title='Widget Onboarding']
736 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500737 Click Element xpath=//li[contains(.,'xDemo App')]
738 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
739 #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 -0500740 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500741 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500742 Click Element xpath=//button[@id='div-confirm-ok-button']
743 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500744 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500745 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500746 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500747 #Set Selenium Implicit Wait 3000
748
kishore6eebdba2017-10-03 11:12:57 -0500749Portal Admin Create Widget for Application Roles
750 [Documentation] Naviage to Create Widget menu tab
kishore5f57af12017-11-27 13:57:35 -0600751 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip
kishore6eebdba2017-10-03 11:12:57 -0500752 Click Link xpath=//a[@title='Widget Onboarding']
753 Click Button xpath=//button[@ng-click='toggleSidebar()']
754 Click Button xpath=//button[@id='widget-onboarding-button-add']
kishore92d70d62017-10-11 14:51:31 -0500755 Input Text xpath=//*[@name='name'] ONAP-xDemo
756 Input Text xpath=//*[@name='desc'] ONAP xDemo
kishore6eebdba2017-10-03 11:12:57 -0500757 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400758 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
759 Click Element xpath=//li[contains(.,'News Microservice')]
kishore6eebdba2017-10-03 11:12:57 -0500760 Click element xpath=//*[@id="app-select-Select Applications"]
kishore92d70d62017-10-11 14:51:31 -0500761 click element xpath=//*[@id="xDemo-App-checkbox"]
kishore6eebdba2017-10-03 11:12:57 -0500762 Click element xpath=//*[@name='desc']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400763 click element xpath=//*[@id="app-select-Select Roles0"]
kishore6eebdba2017-10-03 11:12:57 -0500764 click element xpath=//*[@id="Standard-User-checkbox"]
765 Click element xpath=//*[@name='desc']
766 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
767 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
768 Click Button xpath=//button[@id='widgets-details-save-button']
769 Click Image xpath=//img[@alt='Onap Logo']
770 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500771 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
kishore6eebdba2017-10-03 11:12:57 -0500772 Click Link xpath=//a[@title='Widget Onboarding']
773 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500774 Click Element xpath=//li[contains(.,'xDemo App')]
775 Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500776 Set Selenium Implicit Wait 3000
777 GO TO ${PORTAL_HOME_PAGE}
CHINTAMANI68e98362018-04-10 18:56:38 -0400778
kishore92d70d62017-10-11 14:51:31 -0500779Portal Admin Delete Widget for Application Roles
780 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
781 #Page Should Contain ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500782 #Click Image xpath=//img[@alt='Onap Logo']
783 Click Link xpath=//a[@title='Widget Onboarding']
784 Click Element xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500785 Click Element xpath=//li[contains(.,'xDemo App')]
786 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
787 #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 -0500788 Click Button xpath=//button[@ng-click='toggleSidebar()']
kishore92d70d62017-10-11 14:51:31 -0500789 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
790 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
kishore6eebdba2017-10-03 11:12:57 -0500791 Click Element xpath=//button[@id='div-confirm-ok-button']
792 Set Selenium Implicit Wait 3000
kishore92d70d62017-10-11 14:51:31 -0500793 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
kishore6eebdba2017-10-03 11:12:57 -0500794 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
kishore92d70d62017-10-11 14:51:31 -0500795 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
CHINTAMANI68e98362018-04-10 18:56:38 -0400796 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500797
798
799
800Portal Admin Edit Widget
801 [Documentation] Naviage to Home tab
802 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
803 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
804 Set Browser Implicit Wait 8000
805 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
806 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
807 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
808 Input Text xpath=//input[@name='title'] ONAP_VID
809 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
810 Input Text xpath=//input[@id='widget-input-add-order'] 5
811 Click Link xpath=//a[contains(.,'Add New')]
812 Click Element xpath=//div[@id='close-button']
813 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
814 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
815 Click Element xpath=//div[@id='confirmation-button-next']
816 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
817 Click Link xpath=//a[@id='close-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400818 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500819
820Portal Admin Broadcast Notifications
821 [Documentation] Portal Test Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400822 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
823 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
824 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500825 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400826 Go To ${PORTAL_HOME_URL}
827 Click Image xpath=//img[@alt='Onap Logo']
kishore6eebdba2017-10-03 11:12:57 -0500828 Set Selenium Implicit Wait 3000
829 Click Link xpath=//*[@id="parent-item-User-Notifications"]
830 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
831 Click button xpath=//*[@id="button-openAddNewApp"]
832 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
833 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
834 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
835 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
836 click element xpath=//*[@id="button-notification-save"]
837 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
838 click element xpath=//*[@id="megamenu-notification-button"]
839 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400840# Notification bug, Uncomment the code when PORTAL-232 is fixed
841 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
842 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400843 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500844 log ${AdminBroadCastMsg}
845 [Return] ${AdminBroadCastMsg}
846
847Portal Admin Category Notifications
848 [Documentation] Portal Admin Broadcast Notifications
CHINTAMANI68e98362018-04-10 18:56:38 -0400849 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
850 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
851# ${CurrentDay}= Get Current Date result_format=%m/%d/%Y
852 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
kishore6eebdba2017-10-03 11:12:57 -0500853 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
854 Click Link xpath=//a[@id='parent-item-Home']
855 Click Link xpath=//*[@id="parent-item-User-Notifications"]
856 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
857 Click button xpath=//*[@id="button-openAddNewApp"]
858 #Select Radio Button NO radio-button-no
859 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
860 #Select Radio Button //label[@class='radio'] radio-button-approles
861 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
kishore92d70d62017-10-11 14:51:31 -0500862 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
kishore6eebdba2017-10-03 11:12:57 -0500863 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
864 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
865 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
866 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
867 click element xpath=//*[@id="button-notification-save"]
868 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
869 click element xpath=//*[@id="megamenu-notification-button"]
870 click element xpath=//*[@id="notification-history-link"]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400871# Notification bug, Uncomment the code when PORTAL-232 is fixed
872 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
873 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400874 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500875 log ${AdminCategoryMsg}
CHINTAMANI68e98362018-04-10 18:56:38 -0400876 [Return] ${AdminCategoryMsg}
kishore6eebdba2017-10-03 11:12:57 -0500877
kishorebbca0cf2017-10-09 16:59:38 -0500878Portal admin Logout from Portal GUI
kishore6eebdba2017-10-03 11:12:57 -0500879 [Documentation] Logout from Portal GUI
880 Click Element xpath=//div[@id='header-user-icon']
881 Click Button xpath=//button[contains(.,'Log out')]
882 Title Should Be Login
883
kishore6eebdba2017-10-03 11:12:57 -0500884Application admin Login To Portal GUI
885 [Documentation] Logs into Portal GUI
886 # Setup Browser Now being managed by test case
887 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500888# Go To ${PORTAL_LOGIN_URL}
889# Maximize Browser Window
890# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
891# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
892# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -0500893 # Handle Proxy Warning
894 Title Should Be Login
895 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
896 Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd}
897 Click Link xpath=//a[@id='loginBtn']
898 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
899 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
900
901Application Admin Navigation Application Link Tab
902 [Documentation] Logs into Portal GUI as application admin
903 Click Link xpath=//a[@id='parent-item-Home']
kishore92d70d62017-10-11 14:51:31 -0500904 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
905 Page Should Contain ONAP Portal
kishore5ea942b2017-10-14 22:19:45 -0500906 Scroll Element Into View xpath=//i[@class='ion-close-round']
907 Click Element xpath=//i[@class='ion-close-round']
908 Set Selenium Implicit Wait 3000
909 #Click Element xpath=(.//span[@id='tab-Home'])[1]
kishore6eebdba2017-10-03 11:12:57 -0500910
911
912Application Admin Navigation Functional Menu
913 [Documentation] Logs into Portal GUI as application admin
914 Click Link xpath=//a[contains(.,'Manage')]
915 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
916 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
kishore92d70d62017-10-11 14:51:31 -0500917 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -0500918 Click Element xpath=//i[@class='ion-close-round']
919 Click Element xpath=(.//span[@id='tab-Home'])[1]
920
921
CHINTAMANIaf44d442018-04-25 12:38:44 -0400922Application admin Add Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500923 [Documentation] Naviage to Users tab
924 Click Link xpath=//a[@title='Users']
925 Page Should Contain Users
926 Click Button xpath=//button[@ng-click='toggleSidebar()']
927 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
928 Input Text xpath=//input[@id='input-user-search'] ${Existing_User}
929 Click Button xpath=//button[@id='button-search-users']
930 Click Element xpath=//span[@id='result-uuid-0']
931 Click Button xpath=//button[@id='next-button']
kishore92d70d62017-10-11 14:51:31 -0500932 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
933 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400934 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
935 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
936 # Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500937 Click Button xpath=//button[@id='new-user-save-button']
938 Set Selenium Implicit Wait 3000
939 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
kishore92d70d62017-10-11 14:51:31 -0500940 #Select From List xpath=//input[@value='Select application'] xDemo App
kishore6eebdba2017-10-03 11:12:57 -0500941 #Click Link xpath=//a[@title='Users']
942 #Page Should Contain Users
943 Go To ${PORTAL_HOME_PAGE}
944 Set Selenium Implicit Wait 3000
945 Click Link xpath=//a[@title='Users']
946 Click Element xpath=//input[@id='dropdown1']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400947 #Click Element xpath=//li[contains(.,'Default')]
kishore92d70d62017-10-11 14:51:31 -0500948 Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500949 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400950 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500951 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
952
CHINTAMANIaf44d442018-04-25 12:38:44 -0400953Application admin Edit Standard User Existing user
kishore6eebdba2017-10-03 11:12:57 -0500954 [Documentation] Naviage to Users tab
955 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANIaf44d442018-04-25 12:38:44 -0400956 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
957 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
958 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
kishore92d70d62017-10-11 14:51:31 -0500959 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
960 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
CHINTAMANIaf44d442018-04-25 12:38:44 -0400961 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
kishore6eebdba2017-10-03 11:12:57 -0500962 Set Selenium Implicit Wait 3000
963 Click Button xpath=//button[@id='new-user-save-button']
964 Set Selenium Implicit Wait 3000
965 Page Should Contain Users
966 #Click Button xpath=//input[@id='dropdown1']
kishore92d70d62017-10-11 14:51:31 -0500967 #Click Element xpath=//li[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -0500968 Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
CHINTAMANIaf44d442018-04-25 12:38:44 -0400969 # Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
kishore6eebdba2017-10-03 11:12:57 -0500970 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
971
kishore6eebdba2017-10-03 11:12:57 -0500972Application admin Delete Standard User Existing user
973 [Documentation] Naviage to Users tab
974 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
CHINTAMANI68e98362018-04-10 18:56:38 -0400975# Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
976# Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
kishore92d70d62017-10-11 14:51:31 -0500977 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
978 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
kishore6eebdba2017-10-03 11:12:57 -0500979 Click Element xpath=//button[@id='div-confirm-ok-button']
980 Click Button xpath=//button[@id='new-user-save-button']
CHINTAMANI68e98362018-04-10 18:56:38 -0400981# Input Text xpath=//input[@id='input-table-search'] ${Existing_User}
982# Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
kishore6eebdba2017-10-03 11:12:57 -0500983 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
kishore72d3adf2017-10-19 11:05:22 -0500984 #Click Image xpath=//img[@alt='Onap Logo']
CHINTAMANI68e98362018-04-10 18:56:38 -0400985 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -0500986
kishore6eebdba2017-10-03 11:12:57 -0500987Application admin Logout from Portal GUI
988 [Documentation] Logout from Portal GUI
989 Click Element xpath=//div[@id='header-user-icon']
kishore72d3adf2017-10-19 11:05:22 -0500990 #Set Selenium Implicit Wait 3000
kishore82eb79a2017-10-31 08:04:25 -0500991 Click Button xpath=//button[contains(text(),'Log out')]
kishore72d3adf2017-10-19 11:05:22 -0500992 #Set Selenium Implicit Wait 3000
kishore4089a332017-10-18 17:02:53 -0500993 Title Should Be Login
kishore6eebdba2017-10-03 11:12:57 -0500994
995Standared user Login To Portal GUI
996 [Documentation] Logs into Portal GUI
997 # Setup Browser Now being managed by test case
998 ##Setup Browser
kishore72d3adf2017-10-19 11:05:22 -0500999# Go To ${PORTAL_LOGIN_URL}
1000# Maximize Browser Window
1001# Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
1002# Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
1003# Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
kishore6eebdba2017-10-03 11:12:57 -05001004 # Handle Proxy Warning
1005 Title Should Be Login
1006 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
1007 Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd}
1008 Click Link xpath=//a[@id='loginBtn']
1009 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1010 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
1011
kishore6eebdba2017-10-03 11:12:57 -05001012Standared user Navigation Application Link Tab
1013 [Documentation] Logs into Portal GUI as application admin
1014 #Portal admin Go To Portal HOME
kishore92d70d62017-10-11 14:51:31 -05001015 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
1016 Page Should Contain ONAP Portal
kishore6eebdba2017-10-03 11:12:57 -05001017 Click Element xpath=(.//span[@id='tab-Home'])[1]
CHINTAMANI68e98362018-04-10 18:56:38 -04001018 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001019
1020Standared user Navigation Functional Menu
1021 [Documentation] Logs into Portal GUI as application admin
1022 Click Link xpath=//a[contains(.,'Manage')]
CHINTAMANI68e98362018-04-10 18:56:38 -04001023 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
1024 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
1025 Page Should Contain Welcome to VID
1026 Click Element xpath=(.//span[@id='tab-Home'])[1]
1027 Set Selenium Implicit Wait 3000
kishore6eebdba2017-10-03 11:12:57 -05001028
1029
1030Standared user Broadcast Notifications
1031 [Documentation] Logs into Portal GUI as application admin
1032 [Arguments] ${AdminBroadCastMsg}
1033 Click element xpath=//*[@id='megamenu-notification-button']
1034 Click element xpath=//*[@id='notification-history-link']
1035 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1036 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
1037 log ${AdminBroadCastMsg}
1038
1039
1040Standared user Category Notifications
1041 [Documentation] Logs into Portal GUI as application admin
1042 [Arguments] ${AdminCategoryMsg}
1043 #click element xpath=//*[@id='megamenu-notification-button']
1044 #click element xpath=//*[@id="notification-history-link"]
1045 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
1046 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
1047 log ${AdminCategoryMsg}
1048
kishore6eebdba2017-10-03 11:12:57 -05001049Standared user Logout from Portal GUI
1050 [Documentation] Logout from Portal GUI
1051 Click Element xpath=//div[@id='header-user-icon']
1052 Click Button xpath=//button[contains(.,'Log out')]
1053 #Confirm Action
1054 Title Should Be Login
1055
CHINTAMANIaf44d442018-04-25 12:38:44 -04001056Portal admin Add New Account
1057 Click Link //*[@id="parent-item-App-Account-Management"]
1058 Click Button xpath=//button[@ng-click='toggleSidebar()']
1059 Set Selenium Implicit Wait 3000
1060 Click Button //*[@id="account-onboarding-button-add"]
1061 Set Selenium Implicit Wait 3000
1062 Input Text //*[@id="account-details-input-name"] ${AppAccountName}
1063 Input Text //*[@id="account-details-input-username"] ${AppUserName}
1064 Input Text //*[@id="account-details-input-password"] ${AppPassword}
1065 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
1066 # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
1067 # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
1068 #account-details-next-button
1069 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
1070
1071Portal admin Delete Account
1072 Click Link //*[@id="parent-item-App-Account-Management"]
1073 Click Button xpath=//button[@ng-click='toggleSidebar()']
1074 Set Selenium Implicit Wait 3000
1075 Click Button //*[@id="account-onboarding-button-add"]
1076 Set Selenium Implicit Wait 3000
1077
1078Tear Down
kishore6eebdba2017-10-03 11:12:57 -05001079 [Documentation] Close all browsers
1080 Close All Browsers
1081
kishore6eebdba2017-10-03 11:12:57 -05001082Enhanced Notification on ONAP Portal
1083 [Documentation] Runs portal Post request
1084 [Arguments] ${data_path} ${data}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001085 # Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
kishore6eebdba2017-10-03 11:12:57 -05001086 ${session}= Create Session portal ${PORTAL_URL}
1087 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
1088 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001089 # Log Received response from portal ${resp.text}
kishore6eebdba2017-10-03 11:12:57 -05001090 [Return] ${resp}
CHINTAMANIaf44d442018-04-25 12:38:44 -04001091
kishore6eebdba2017-10-03 11:12:57 -05001092Notification on ONAP Portal
1093 [Documentation] Create Config portal
1094 ${configportal}= Create Dictionary jira_id=${jira}
1095 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
1096 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
1097 Should Be Equal As Strings ${post_resp.status_code} 200
kishore6eebdba2017-10-03 11:12:57 -05001098
1099Portal Application Account Management
1100 [Documentation] Naviage to Application Account Management tab
1101 Click Link xpath=//a[@title='App Account Management']
1102 Click Button xpath=//button[@id='account-onboarding-button-add']
1103 Input Text xpath=//input[@name='name'] JIRA
1104 Input Text xpath=//input[@name='username'] jira
1105 Input Text xpath=//input[@name='password'] _pass
1106 Input Text xpath=//input[@name='repassword'] _pass
1107 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
1108 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
1109
CHINTAMANIaf44d442018-04-25 12:38:44 -04001110Portal Application Account Management validation
kishore6eebdba2017-10-03 11:12:57 -05001111 [Documentation] Naviage to user notification tab
1112 Click Link xpath=//a[@id='parent-item-User-Notifications']
1113 click element xpath=//*[@id="megamenu-notification-button"]
1114 Click element xpath=//*[@id="notification-history-link"]
1115 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
1116 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
1117
1118
CHINTAMANIaf44d442018-04-25 12:38:44 -04001119Portal AAF new fields
kishore6eebdba2017-10-03 11:12:57 -05001120 [Documentation] Naviage to user Application details tab
1121 Click Link xpath=//a[@title='Application Onboarding']
kishore92d70d62017-10-11 14:51:31 -05001122 Click Element xpath=//td[contains(.,'xDemo App')]
kishore6eebdba2017-10-03 11:12:57 -05001123 Page Should Contain Name Space
1124 Page Should Contain Centralized
1125 Click Element xpath=//button[@id='button-notification-cancel']
CHINTAMANI3f00f5b2018-05-01 07:33:05 -04001126
1127Portal Change REST URL
1128 [Documentation] Naviage to user Application details tab
1129 Click Link xpath=//a[@title='Application Onboarding']
1130 Click Element xpath=//td[contains(.,'xDemo App')]
1131 Input Text xpath=//input[@name='restUrl'] ${PORTAL_XDEMPAPP_REST_URL}
1132 Click Element xpath=//button[@id='button-save-app']
kishore6eebdba2017-10-03 11:12:57 -05001133
CHINTAMANIaf44d442018-04-25 12:38:44 -04001134Admin widget download
1135 Go To ${PORTAL_HOME_URL}
1136 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1137 click Link xpath=//a[@title='Widget Onboarding']
1138 Wait until page contains Element xpath=//table[@class='ng-scope']
1139 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
1140 log ${td_id}
1141 ${test}= Get Substring ${td_id} -1
1142 log ${test}
1143 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
1144 click Element xpath=//*[@id=${download_link_id}]
1145
1146Reset widget layout option
1147 Go To ${PORTAL_HOME_URL}
1148 Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1149 Execute Javascript document.getElementById('widgets').scrollTo(0,1400)
1150 Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
1151 Execute Javascript document.getElementById('widgets').scrollTo(0,1800)
1152 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
1153 Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight);
1154 Execute Javascript document.getElementById('dashboardDefaultPreference').click()
1155 Execute Javascript document.getElementById('div-confirm-ok-button').click()