blob: cf553e4c7618cb46f0dcbca8bce473a2ac889abb [file] [log] [blame]
CHINTAMANIdadbef32018-08-14 21:22:59 -04001*** Settings ***
2Documentation This is RobotFrame work script
3Library ExtendedSelenium2Library
4Library OperatingSystem
5Library ../../library/eteutils/RequestsClientCert.py
6Library RequestsLibrary
7Library ../../library/eteutils/UUID.py
8Library ../../library/robot/libraries/DateTime.py
9Library Collections
10Library ../../library/eteutils/OSUtils.py
11Library ../../library/eteutils/StringTemplater.py
12Library String
13#Library XvfbRobot
14
15Resource ../json_templater.robot
CHINTAMANI24d19fd2018-09-20 18:08:37 -040016Resource ../browser_setup.robot
CHINTAMANIdadbef32018-08-14 21:22:59 -040017
18*** Variables ***
CHINTAMANI61ca7ad2018-09-18 16:09:32 -040019#${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989
20${PORTAL_URL} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://${GLOBAL_INJECTED_PORTAL_IP_ADDR}:${GLOBAL_PORTAL_SERVER_PORT}
21${PORTAL_ENV} /ONAPPORTAL
CHINTAMANIdadbef32018-08-14 21:22:59 -040022${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
23${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
24${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
25${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
26${App_LoginID} demoapp
27${App_Email_Address} demoapp@onap.com
28${Sta_LoginID} demosta
29${Sta_Email_Address} demosta@onap.com
30${Test_LoginID} portal
31${Test_Email_Address} portal@onap.com
32${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
33${PORTAL_XDEMPAPP_REST_URL} http://portal-sdk:8080/ONAPPORTALSDK/api/v2
34${PORTAL_ASSETS_DIRECTORY} ../../assets/widgets/
35${GLOBAL_APPLICATION_ID} robot-functional
36${GLOBAL_PORTAL_ADMIN_USER} demo
37${GLOBAL_PORTAL_ADMIN_PWD} demo123456!
38${AppUserName} testApp
39${AppPassword} testApp123!
40${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
41${GLOBAL_SELENIUM_BROWSER} chrome
42${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
43${GLOBAL_SELENIUM_DELAY} 0
44${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
45${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 45
46${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
47${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
48${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
49${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
50${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
51${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
52${GLOBAL_BUILD_NUMBER} 0
53${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
54${jira} jira
55${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
56${portal_Template} ${CURDIR}/portal.template
57
58${Result} FALSE
59${td_id} 0
60${download_link_id} 0
61
62*** Keywords ***
63
CHINTAMANIdadbef32018-08-14 21:22:59 -040064Portal admin Login To Portal GUI
65 [Documentation] Logs into Portal GUI
66 ## Setup Browser Now being managed by test case
CHINTAMANI0fb684b2018-09-14 21:05:04 -040067 Setup Browser
CHINTAMANIdadbef32018-08-14 21:22:59 -040068 #Start Virtual Display 1920 1080
CHINTAMANI24d19fd2018-09-20 18:08:37 -040069 #Open Browser ${PORTAL_LOGIN_URL} chrome
70 Go To ${PORTAL_LOGIN_URL}
71 #Maximize Browser Window
CHINTAMANIdadbef32018-08-14 21:22:59 -040072 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
73 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
74 Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
75 #Handle Proxy Warning
76 Title Should Be Login
77 Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
78 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
79 Click Link xpath=//a[@id='loginBtn']
80 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
81 #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none'
82 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
83
84Portal admin Go To Portal HOME
85 [Documentation] Naviage to Portal Home
86 Go To ${PORTAL_HOME_URL}
87 Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
88
89Portal admin User Notifications
90 [Documentation] Naviage to User notification tab
91 Click Link xpath=//a[@id='parent-item-User-Notifications']
92 Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
93 Click Button xpath=//button[@id='button-openAddNewApp']
94 Click Button xpath=(//button[@id='undefined'])[1]
95 #Click Button xpath=//input[@id='datepicker-start']
96
97Portal admin Add Application Admin Exiting User
98 [Documentation] Naviage to Admins tab
99 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
100 Click Link xpath=//a[@title='Admins']
101 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
102 Page Should Contain Admins
103 Click Button xpath=//button[@ng-click='toggleSidebar()']
104 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
105 Input Text xpath=//input[@id='input-user-search'] ${Test_LoginID}
106 Click Button xpath=//button[@id='button-search-users']
107 Click Element xpath=//span[@id='result-uuid-0']
108 Click Button xpath=//button[@id='search-users-button-next']
109 Click Button xpath=//input[@value='Select application']
110 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
111 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
112 #Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Default' )])[1]
113 #Click Element xpath=(//li[contains(.,'Default' )])[2]
114 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
115 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
116 Click Element xpath=//button[@id='admin-div-ok-button']
117 Click Element xpath=//button[@id='div-confirm-ok-button']
118 Get Selenium Implicit Wait
119 Click Link xpath=//a[@aria-label='Admins']
120 Click Element xpath=//input[@id='dropdown1']
121 #Click Element xpath=//li[contains(.,'Default' )]
122 Click Element xpath=//li[contains(.,'xDemo App' )]
123 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
124 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${Test_LoginID}
125 #Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Test_LoginID}
126 #Element Text Should Be xpath=(//span[contains(.,'demo')])[1] ${Test_LoginID}
127
128Portal admin Delete Application Admin Existing User
129 [Documentation] Naviage to Admins tab
130 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
131 Click Link xpath=//a[@title='Admins']
132 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
133 Page Should Contain Admins
134 Click Button xpath=//button[@ng-click='toggleSidebar()']
135 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
136 Click Element xpath=(//span[contains(.,'portal')] )[1]
137 #Click Element xpath=(//span[contains(.,'demo')] )[1]
138 Click Element xpath=//*[@id='select-app-xDemo-App']/following::i[@id='i-delete-application']
139 #Click Element xpath=//*[@id='select-app-Default']/following::i[@id='i-delete-application']
140 Click Element xpath=//button[@id='div-confirm-ok-button']
141 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
142 Click Element xpath=//button[@id='admin-div-ok-button']
143 #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2]
144 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
145 Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal
146 #Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] demo
147 Click Image xpath=//img[@alt='Onap Logo']
148 Set Selenium Implicit Wait 3000
149
150Portal admin Add Application admin User New user
151 [Documentation] Naviage to Users tab
152 Click Link xpath=//a[@title='Users']
153 Page Should Contain Users
154 Click Button xpath=//button[@ng-click='toggleSidebar()']
155 Click Button xpath=//button[@id='users-button-add']
156 Click Button xpath=//button[@id='Create-New-User-button']
157 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_LoginID}
158 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${GLOBAL_PORTAL_ADMIN_USER}
159 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address}
160 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID}
161 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${GLOBAL_PORTAL_ADMIN_PWD}
162 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
163 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
164
165 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
166
167 #log ${Result}
168 #${type_result}= Evaluate type(${Result})
169 #log ${type_result}
170
171 Run Keyword if '${Result}'== 0 AdminUser does not exist already
172 ... ELSE Goto Home Image
173 Set Selenium Implicit Wait 3000
174
175Goto Home Image
176 Click Image xpath=//img[@alt='Onap Logo']
177
178AdminUser does not exist already
179 Click Button xpath=//button[@id='next-button']
180 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
181 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
182 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
183 Set Selenium Implicit Wait 3000
184 Click Button xpath=//button[@id='new-user-save-button']
185 Set Selenium Implicit Wait 3000
186 Go To ${PORTAL_HOME_PAGE}
187 Click Link xpath=//a[@title='Users']
188 Click Element xpath=//input[@id='dropdown1']
189 Click Element xpath=//li[contains(.,'xDemo App')]
190 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${App_LoginID}
191 #Input Text xpath=//input[@id='input-table-search'] ${App_LoginID}
192 #Element Text Should Be xpath=(//span[contains(.,'demoapp')] )[1] ${App_LoginID}
193 Click Image xpath=//img[@alt='Onap Logo']
194 Set Selenium Implicit Wait 3000
195
196Portal admin Add Standard User New user
197 [Documentation] Naviage to Users tab
198 Click Link xpath=//a[@title='Users']
199 Page Should Contain Users
200 Click Button xpath=//button[@ng-click='toggleSidebar()']
201 Click Button xpath=//button[@id='users-button-add']
202 Click Button xpath=//button[@id='Create-New-User-button']
203 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_LoginID}
204 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${GLOBAL_PORTAL_ADMIN_USER}
205 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address}
206 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID}
207 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${GLOBAL_PORTAL_ADMIN_PWD}
208 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
209 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
210
211 ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
212
213 #log ${Result}
214 #${type_result}= Evaluate type(${Result})
215 #log ${type_result}
216
217 Run Keyword if '${Result}'== 0 StaUser does not exist already
218 ... ELSE Goto Home Image
219 Set Selenium Implicit Wait 3000
220
221StaUser does not exist already
222 Click Button xpath=//button[@id='next-button']
223 #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-xDemo-App']
224 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
225 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
226 Set Selenium Implicit Wait 3000
227 Click Button xpath=//button[@id='new-user-save-button']
228 Set Selenium Implicit Wait 3000
229 Go To ${PORTAL_HOME_PAGE}
230 Click Link xpath=//a[@title='Users']
231 Click Element xpath=//input[@id='dropdown1']
232 Click Element xpath=//li[contains(.,'xDemo App')]
233 Table Column Should Contain xpath=//*[@table-data='users.accountUsers'] 1 ${Sta_LoginID}
234 #Input Text xpath=//input[@id='input-table-search'] ${Sta_LoginID}
235 #Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_LoginID}
236 Click Image xpath=//img[@alt='Onap Logo']
237 Set Selenium Implicit Wait 3000
238
239Portal admin Add Application admin User New user -Test
240 [Documentation] Naviage to Users tab
241 Click Link xpath=//a[@title='Users']
242 Page Should Contain Users
243 Click Button xpath=//button[@ng-click='toggleSidebar()']
244 Click Button xpath=//button[@id='users-button-add']
245 Click Button xpath=//button[@id='Create-New-User-button']
246 Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_LoginID}
247 Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${GLOBAL_PORTAL_ADMIN_USER}
248 Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address}
249 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID}
250 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${GLOBAL_PORTAL_ADMIN_PWD}
251 Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
252 Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
253 Click Button xpath=//button[@id='search-users-button-cancel']
254 Click Image xpath=//img[@alt='Onap Logo']
255 Set Selenium Implicit Wait 3000
256
257
258Portal admin Add Application Admin Exiting User -APPDEMO
259 [Documentation] Naviage to Admins tab
260 Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
261 Click Link xpath=//a[@title='Admins']
262 Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
263 Page Should Contain Admins
264 Click Button xpath=//button[@ng-click='toggleSidebar()']
265 Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
266 Input Text xpath=//input[@id='input-user-search'] ${App_LoginID}
267 Click Button xpath=//button[@id='button-search-users']
268 Click Element xpath=//span[@id='result-uuid-0']
269 Click Button xpath=//button[@id='search-users-button-next']
270 Click Button xpath=//input[@value='Select application']
271 Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App' )])[1]
272 Click Element xpath=(//li[contains(.,'xDemo App' )])[2]
273 #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'xDemo App')])[1] xDemo App
274 Click Button xpath=//button[@id='div-updateAdminAppsRoles']
275 Click Element xpath=//button[@id='admin-div-ok-button']
276 Click Element xpath=//button[@id='div-confirm-ok-button']
277 Get Selenium Implicit Wait
278 Click Link xpath=//a[@aria-label='Admins']
279 Click Element xpath=//input[@id='dropdown1']
280 Click Element xpath=//li[contains(.,'xDemo App' )]
281 Input Text xpath=//input[@id='input-table-search'] ${App_LoginID}
282 #Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_LoginID}
283 Table Column Should Contain xpath=//*[@table-data='admins.adminsTableData'] 1 ${App_LoginID}
284 Click Image xpath=//img[@alt='Onap Logo']
285 Set Selenium Implicit Wait 3000
286
287Portal admin Add Standard User Existing user
288 [Documentation] Naviage to Users tab
289 Click Link xpath=//a[@title='Users']
290 Page Should Contain Users
291 Click Button xpath=//button[@ng-click='toggleSidebar()']
292 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
293 Input Text xpath=//input[@id='input-user-search'] ${Test_LoginID}
294 Click Button xpath=//button[@id='button-search-users']
295 Click Element xpath=//span[@id='result-uuid-0']
296 Click Button xpath=//button[@id='next-button']
297 #Click Element xpath=//*[@id='div-app-name-dropdown-Default']
298 #Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
299 Click Element xpath=//div[@id='app-select-Select roles1']
300 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='Standard-User-checkbox']
301 Set Selenium Implicit Wait 3000
302 Click Button xpath=//button[@id='new-user-save-button']
303 Set Selenium Implicit Wait 3000
304 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
305 #Select From List xpath=//input[@value='Select application'] xDemo App
306 #Click Link xpath=//a[@title='Users']
307 #Page Should Contain Users
308 #Focus xpath=//input[@name='dropdown1']
309 Go To ${PORTAL_HOME_PAGE}
310
311Portal admin Edit Standard User Existing user
312 [Documentation] Naviage to Users tab
313 Click Link xpath=//a[@title='Users']
314 Click Element xpath=//input[@id='dropdown1']
315 #Click Element xpath=//li[contains(.,'Default')]
316 #Set Selenium Implicit Wait 3000
317 Click Element xpath=//li[contains(.,'xDemo App')]
318 #Set Selenium Implicit Wait 3000
319 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
320 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
321 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
322 #Click Element xpath=//*[@id='div-app-name-dropdown-Default']
323 #Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
324 #Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
325 Click Element xpath=//*[@id='app-select-Standard User1']
326 Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='Standard-User-checkbox']
327 Set Selenium Implicit Wait 3000
328 Click Button xpath=//button[@id='new-user-save-button']
329 Set Selenium Implicit Wait 3000
330
331 Page Should Contain Users
332 Click Button xpath=//button[@ng-click='toggleSidebar()']
333 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
334 Input Text xpath=//input[@id='input-user-search'] ${Test_LoginID}
335 Click Button xpath=//button[@id='button-search-users']
336 Click Element xpath=//span[@id='result-uuid-0']
337 Click Button xpath=//button[@id='next-button']
338 Click Element xpath=//div[@id='app-select-Select roles1']
339 Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox']
340 Set Selenium Implicit Wait 3000
341 #Click Element xpath=//*[@id='app-select-Standard User1']
342 #Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox']
343 # Click Element xpath=//*[@id='div-app-name-dropdown-SDC']
344 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox']
345 # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox']
346 Set Selenium Implicit Wait 3000
347 Click Button xpath=//button[@id='new-user-save-button']
348 Set Selenium Implicit Wait 3000
349 Page Should Contain Users
350 #Click Button xpath=//input[@id='dropdown1']
351 #Click Element xpath=//li[contains(.,'xDemo App')]
352 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
353 #Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Portal Notification Admin
354 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
355 Set Selenium Implicit Wait 3000
356
357Portal admin Delete Standard User Existing user
358 [Documentation] Naviage to Users tab
359 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
360 #Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
361 #Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
362 Set Selenium Implicit Wait 9000
363 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
364 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
365 #Scroll Element Into View xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
366 #Click Element xpath=//*[@id='div-app-name-SDC']/following::*[@id='app-item-delete'][1]
367 Click Element xpath=//button[@id='div-confirm-ok-button']
368 Click Button xpath=//button[@id='new-user-save-button']
369 #Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
370 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
371 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
372 #Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] demo
373 Set Selenium Implicit Wait 3000
374
375Functional Top Menu Get Access
376 [Documentation] Naviage to Support tab
377 Go To ${PORTAL_HOME_URL}
378 Click Link xpath=//a[contains(.,'Support')]
379 Mouse Over xpath=//*[contains(text(),'Get Access')]
380 Click Link xpath=//a[contains(.,'Get Access')]
381 Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access
382 Set Selenium Implicit Wait 3000
383
384Functional Top Menu Contact Us
385 [Documentation] Naviage to Support tab
386 Click Link xpath=//a[contains(.,'Support')]
387 Mouse Over xpath=//*[contains(text(),'Contact Us')]
388 Click Link xpath=//a[contains(.,'Contact Us')]
389 Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us
390 Click Image xpath=//img[@alt='Onap Logo']
391 Set Selenium Implicit Wait 3000
392
393Portal admin Edit Functional menu
394 [Documentation] Naviage to Edit Functional menu tab
395 Click Link xpath=//a[@title='Edit Functional Menu']
396 Click Link xpath=.//*[@id='Manage']/div/a
397 Click Link xpath=.//*[@id='Design']/div/a
398 Click Link xpath=.//*[@id='Product_Design']/div/a
399 Open Context Menu xpath=//*[@id='Product_Design']/div/span
400 Click Link xpath=//a[@href='#add']
401 Input Text xpath=//input[@id='input-title'] ONAP Test
402 #Input Text xpath=//input[@id='input-url'] http://google.com
403 Click Element xpath=//input[@id='select-app']
404 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
405 Click Element xpath=//li[contains(.,'xDemo App')]
406 Input Text xpath=//input[@id='input-url'] http://google.com
407 Click Button xpath=//button[@id='button-save-continue']
408 #Click Button xpath=//div[@title='Select Roles']
409 Click Element xpath=//*[@id='app-select-Select Roles']
410 Click Element xpath=//input[@id='Standard-User-checkbox']
411 Click Element xpath=//button[@id='button-save-add']
412 Click Image xpath=//img[@alt='Onap Logo']
413 Set Selenium Implicit Wait 3000
414 Click Link xpath=//a[contains(.,'Manage')]
415 Mouse Over xpath=//*[contains(text(),'Design')]
416 Set Selenium Implicit Wait 3000
417 Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test
418 Set Selenium Implicit Wait 3000
419 Click Image xpath=//img[@alt='Onap Logo']
420 Click Link xpath=//a[@title='Edit Functional Menu']
421 Click Link xpath=.//*[@id='Manage']/div/a
422 Click Link xpath=.//*[@id='Design']/div/a
423 Click Link xpath=.//*[@id='Product_Design']/div/a
424 Open Context Menu xpath=//*[@id='ONAP_Test']
425 Click Link xpath=//a[@href='#delete']
426 Set Selenium Implicit Wait 3000
427 Click Element xpath=//button[@id='div-confirm-ok-button']
428 Click Image xpath=//img[@alt='Onap Logo']
429 Set Selenium Implicit Wait 3000
430 Click Link xpath=//a[contains(.,'Manage')]
431 Mouse Over xpath=//*[contains(text(),'Design')]
432 Set Selenium Implicit Wait 3000
433 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test
434 Set Selenium Implicit Wait 3000
435 Click Image xpath=//img[@alt='Onap Logo']
436 Set Selenium Implicit Wait 3000
437
438Portal admin Microservice Onboarding
439 [Documentation] Naviage to Edit Functional menu tab
440 Click Link xpath=//a[@title='Microservice Onboarding']
441 Click Button xpath=//button[@id='microservice-onboarding-button-add']
442 Input Text xpath=//input[@name='name'] Test Microservice
443 Input Text xpath=//*[@name='desc'] Test
444 Click Element xpath=//input[@id='microservice-details-input-app']
445 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
446 Click Element xpath=//li[contains(.,'xDemo App')]
447 Click Element xpath=//*[@name='desc']
448 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
449 Click Element xpath=//input[@id='microservice-details-input-security-type']
450 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
451 Click Element xpath=//li[contains(.,'Basic Authentication')]
452 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
453 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
454 Click Button xpath=//button[@id='microservice-details-save-button']
455 Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice
456 #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice
457 Set Selenium Implicit Wait 3000
458
459Portal admin Microservice Delete
460 [Documentation] Naviage to Edit Functional menu tab
461 Click Link xpath=//a[@title='Microservice Onboarding']
462 Click Button xpath=//button[@id='microservice-onboarding-button-add']
463 Input Text xpath=//input[@name='name'] TestMS
464 Input Text xpath=//*[@name='desc'] TestMS
465 Click Element xpath=//input[@id='microservice-details-input-app']
466 Scroll Element Into View xpath=//li[contains(.,'xDemo App')]
467 Click Element xpath=//li[contains(.,'xDemo App')]
468 Click Element xpath=//*[@name='desc']
469 Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT}
470 Click Element xpath=//input[@id='microservice-details-input-security-type']
471 Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')]
472 Click Element xpath=//li[contains(.,'Basic Authentication')]
473 Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER}
474 Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
475 Click Button xpath=//button[@id='microservice-details-save-button']
476 Execute Javascript window.scrollTo(0,document.body.scrollHeight);
477 Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1]
478 Click Button xpath=//button[@id="div-confirm-ok-button"]
479 Set Selenium Implicit Wait 3000
480
481Portal Admin Create Widget for All users
482 [Documentation] Navigate to Create Widget menu tab
483 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}news_widget.zip
484 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
485 Click Link xpath=//a[@title='Widget Onboarding']
486 Click Button xpath=//button[@ng-click='toggleSidebar()']
487 Click Button xpath=//button[@id='widget-onboarding-button-add']
488 Input Text xpath=//*[@name='name'] ONAP-xDemo
489 Input Text xpath=//*[@name='desc'] ONAP xDemo
490 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
491 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
492 Click Element xpath=//li[contains(.,'News Microservice')]
493 Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1]
494 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
495 Click Button xpath=//button[@id='widgets-details-save-button']
496 Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
497 Page Should Contain ONAP-xDemo
498 Set Selenium Implicit Wait 3000
499 GO TO ${PORTAL_HOME_PAGE}
500
501Portal Admin Delete Widget for All users
502 [Documentation] Naviage to delete Widget menu tab
503 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
504 #Page Should Contain ONAP-xDemo
505 #Click Image xpath=//img[@alt='Onap Logo']
506 Click Link xpath=//a[@title='Widget Onboarding']
507 Click Element xpath=//input[@id='dropdown1']
508 Click Element xpath=//li[contains(.,'xDemo App')]
509 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/followi
510 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
511 Click Button xpath=//button[@ng-click='toggleSidebar()']
512 Click Element xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1]
513 Click Element xpath=//button[@id='div-confirm-ok-button']
514 Set Selenium Implicit Wait 3000
515 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
516 #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData']
517 #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-xDemo
518 #Set Selenium Implicit Wait 3000
519
520Portal Admin Create Widget for Application Roles
521 [Documentation] Naviage to Create Widget menu tab
522 ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}news_widget.zip
523 Click Link xpath=//a[@title='Widget Onboarding']
524 Click Button xpath=//button[@ng-click='toggleSidebar()']
525 Click Button xpath=//button[@id='widget-onboarding-button-add']
526 Input Text xpath=//*[@name='name'] ONAP-xDemo
527 Input Text xpath=//*[@name='desc'] ONAP xDemo
528 Click Element xpath=//*[@id='widgets-details-input-endpoint-url']
529 Scroll Element Into View xpath=//li[contains(.,'News Microservice')]
530 Click Element xpath=//li[contains(.,'News Microservice')]
531 Click element xpath=//*[@id="app-select-Select Applications"]
532 Click element xpath=//*[@id="xDemo-App-checkbox"]
533 Click element xpath=//*[@name='desc']
534 Click element xpath=//*[@id="app-select-Select Roles0"]
535 Click element xpath=//*[@id="Standard-User-checkbox"]
536 Click element xpath=//*[@name='desc']
537 Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file']
538 Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment}
539 Click Button xpath=//button[@id='widgets-details-save-button']
540 Click Image xpath=//img[@alt='Onap Logo']
541 Set Selenium Implicit Wait 3000
542 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
543 Click Link xpath=//a[@title='Widget Onboarding']
544 Click Element xpath=//input[@id='dropdown1']
545 Click Element xpath=//li[contains(.,'xDemo App')]
546 Page Should Contain ONAP-xDemo
547 Set Selenium Implicit Wait 3000
548 GO TO ${PORTAL_HOME_PAGE}
549
550Portal Admin Delete Widget for Application Roles
551 #Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
552 #Page Should Contain ONAP-xDemo
553 #Click Image xpath=//img[@alt='Onap Logo']
554 Click Link xpath=//a[@title='Widget Onboarding']
555 Click Element xpath=//input[@id='dropdown1']
556 Click Element xpath=//li[contains(.,'xDemo App')]
557 #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-xDemo')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
558 Click Button xpath=//button[@ng-click='toggleSidebar()']
559 Scroll Element Into View xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
560 Click Element xpath=//*[contains(text(),'ONAP-xDemo')]/following::td[3]/div
561 Click Element xpath=//button[@id='div-confirm-ok-button']
562 Set Selenium Implicit Wait 3000
563 Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-xDemo
564 Set Selenium Implicit Wait 3000
565
566Portal Admin Edit Widget
567 [Documentation] Naviage to Home tab
568 #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
569 Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1]
570 Set Browser Implicit Wait 8000
571 #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60
572 Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
573 Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1]
574 Input Text xpath=//input[@name='title'] ONAP_VID
575 Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html
576 Input Text xpath=//input[@id='widget-input-add-order'] 5
577 Click Link xpath=//a[contains(.,'Add New')]
578 Click Element xpath=//div[@id='close-button']
579 Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
580 Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1]
581 Click Element xpath=//div[@id='confirmation-button-next']
582 Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID
583 Click Link xpath=//a[@id='close-button']
584 Set Selenium Implicit Wait 3000
585
586Portal Admin Broadcast Notifications
587 [Documentation] Portal Test Admin Broadcast Notifications
588 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
589 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
590 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
591 ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate}
592 Go To ${PORTAL_HOME_URL}
593 Click Image xpath=//img[@alt='Onap Logo']
594 Set Selenium Implicit Wait 3000
595 Click Link xpath=//*[@id="parent-item-User-Notifications"]
596 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
597 Click button xpath=//*[@id="button-openAddNewApp"]
598 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
599 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
600 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation
601 Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg}
602 Click element xpath=//*[@id="button-notification-save"]
603 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
604 Click element xpath=//*[@id="megamenu-notification-button"]
605 Click element xpath=//*[@id="notification-history-link"]
606 # Notification bug, Uncomment the code when PORTAL-232 is fixed
607 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
608 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg}
609 Set Selenium Implicit Wait 3000
610 log ${AdminBroadCastMsg}
611 [Return] ${AdminBroadCastMsg}
612
613Portal Admin Category Notifications
614 [Documentation] Portal Admin Broadcast Notifications
615 ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y
616 ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y
617 #${CurrentDay}= Get Current Date result_format=%m/%d/%Y
618 ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M
619 ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate}
620 Click Link xpath=//a[@id='parent-item-Home']
621 Click Link xpath=//*[@id="parent-item-User-Notifications"]
622 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
623 Click button xpath=//*[@id="button-openAddNewApp"]
624 #Select Radio Button NO radio-button-no
625 Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1]
626 #Select Radio Button //label[@class='radio'] radio-button-approles
627 Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1]
628 Click Element xpath=//*[contains(text(),'xDemo App')]/preceding::input[@ng-model='member.isSelected'][1]
629 Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay}
630 Input Text xpath=//input[@id='datepicker-end'] ${NextDay}
631 Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation
632 Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg}
633 Click element xpath=//*[@id="button-notification-save"]
634 Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10
635 Click element xpath=//*[@id="megamenu-notification-button"]
636 Click element xpath=//*[@id="notification-history-link"]
637# Notification bug, Uncomment the code when PORTAL-232 is fixed
638 # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
639 # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg}
640 Set Selenium Implicit Wait 3000
641 log ${AdminCategoryMsg}
642 [Return] ${AdminCategoryMsg}
643
644Portal admin Logout from Portal GUI
645 [Documentation] Logout from Portal GUI
646 Click Element xpath=//div[@id='header-user-icon']
647 Click Button xpath=//button[contains(.,'Log out')]
648 Title Should Be Login
649
650Application admin Login To Portal GUI
651 [Documentation] Logs into Portal GUI
652 # Setup Browser Now being managed by test case
653 ##Setup Browser
654 Title Should Be Login
655 Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID}
656 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
657 Click Link xpath=//a[@id='loginBtn']
658 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
659 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
660
661Application Admin Navigation Application Link Tab
662 [Documentation] Logs into Portal GUI as application admin
663 Click Link xpath=//a[@id='parent-item-Home']
664 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
665 Page Should Contain ONAP Portal
666 Scroll Element Into View xpath=//i[@class='ion-close-round']
667 Click Element xpath=//i[@class='ion-close-round']
668 Set Selenium Implicit Wait 3000
669 #Click Element xpath=(.//span[@id='tab-Home'])[1]
670
671Application Admin Navigation Functional Menu
672 [Documentation] Logs into Portal GUI as application admin
673 Click Link xpath=//a[contains(.,'Manage')]
674 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
675 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
676 Page Should Contain ONAP Portal
677 Click Element xpath=//i[@class='ion-close-round']
678 Click Element xpath=(.//span[@id='tab-Home'])[1]
679
680Application admin Add Standard User Existing user
681 [Documentation] Naviage to Users tab
682 Click Link xpath=//a[@title='Users']
683 Page Should Contain Users
684 Click Button xpath=//button[@ng-click='toggleSidebar()']
685 Click Button xpath=//button[@ng-click='users.openAddNewUserModal()']
686 Input Text xpath=//input[@id='input-user-search'] ${Test_LoginID}
687 Click Button xpath=//button[@id='button-search-users']
688 Click Element xpath=//span[@id='result-uuid-0']
689 Click Button xpath=//button[@id='next-button']
690 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
691 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
692 # Click Element xpath=//*[@id='div-app-name-dropdown-Default']
693 # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
694 # Set Selenium Implicit Wait 3000
695 Click Button xpath=//button[@id='new-user-save-button']
696 Set Selenium Implicit Wait 3000
697 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
698 #Select From List xpath=//input[@value='Select application'] xDemo App
699 #Click Link xpath=//a[@title='Users']
700 #Page Should Contain Users
701 Go To ${PORTAL_HOME_PAGE}
702 Set Selenium Implicit Wait 3000
703 Click Link xpath=//a[@title='Users']
704 Click Element xpath=//input[@id='dropdown1']
705 #Click Element xpath=//li[contains(.,'Default')]
706 Click Element xpath=//li[contains(.,'xDemo App')]
707 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
708 #Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
709 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User
710
711Application admin Edit Standard User Existing user
712 [Documentation] Naviage to Users tab
713 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
714 #Click Element xpath=//*[@id='div-app-name-dropdown-Default']
715 #Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox']
716 #Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox']
717 Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App']
718 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox']
719 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='System-Administrator-checkbox']
720 Set Selenium Implicit Wait 3000
721 Click Button xpath=//button[@id='new-user-save-button']
722 Set Selenium Implicit Wait 3000
723 Page Should Contain Users
724 #Click Button xpath=//input[@id='dropdown1']
725 #Click Element xpath=//li[contains(.,'xDemo App')]
726 Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
727 #Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Account Administrator
728 Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator
729
730Application admin Delete Standard User Existing user
731 [Documentation] Naviage to Users tab
732 Click Element xpath=(.//*[@id='rowheader_t1_0'])[2]
733 #Scroll Element Into View xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
734 #Click Element xpath=//*[@id='div-app-name-Default']/following::*[@id='app-item-delete'][1]
735 Scroll Element Into View xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
736 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::*[@id='app-item-delete'][1]
737 Click Element xpath=//button[@id='div-confirm-ok-button']
738 Click Button xpath=//button[@id='new-user-save-button']
739 #Input Text xpath=//input[@id='input-table-search'] ${Test_LoginID}
740 #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2]
741 Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal
742 #Click Image xpath=//img[@alt='Onap Logo']
743 Set Selenium Implicit Wait 3000
744
745Application admin Logout from Portal GUI
746 [Documentation] Logout from Portal GUI
747 Click Element xpath=//div[@id='header-user-icon']
748 #Set Selenium Implicit Wait 3000
749 Click Button xpath=//button[contains(text(),'Log out')]
750 #Set Selenium Implicit Wait 3000
751 Title Should Be Login
752
753Standared user Login To Portal GUI
754 [Documentation] Logs into Portal GUI
755 # Setup Browser Now being managed by test case
756 ##Setup Browser
757 #Go To ${PORTAL_LOGIN_URL}
758 #Maximize Browser Window
759 #Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
760 #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
761 #Log Logging in to ${PORTAL_URL}${PORTAL_ENV}
762 # Handle Proxy Warning
763 Title Should Be Login
764 Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID}
765 Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
766 Click Link xpath=//a[@id='loginBtn']
767 Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
768 Log Logged in to ${PORTAL_URL}${PORTAL_ENV}
769
770Standared user Navigation Application Link Tab
771 [Documentation] Logs into Portal GUI as application admin
772 #Portal admin Go To Portal HOME
773 Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
774 Page Should Contain ONAP Portal
775 Click Element xpath=(.//span[@id='tab-Home'])[1]
776 Set Selenium Implicit Wait 3000
777
778Standared user Navigation Functional Menu
779 [Documentation] Logs into Portal GUI as application admin
780 Click Link xpath=//a[contains(.,'Manage')]
781 Mouse Over xpath=//*[contains(text(),'Technology Insertion')]
782 Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')]
783 Page Should Contain Welcome to VID
784 Click Element xpath=(.//span[@id='tab-Home'])[1]
785 Set Selenium Implicit Wait 3000
786
787Standared user Broadcast Notifications
788 [Documentation] Logs into Portal GUI as application admin
789 [Arguments] ${AdminBroadCastMsg}
790 Click element xpath=//*[@id='megamenu-notification-button']
791 Click element xpath=//*[@id='notification-history-link']
792 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
793 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg}
794 log ${AdminBroadCastMsg}
795
796Standared user Category Notifications
797 [Documentation] Logs into Portal GUI as application admin
798 [Arguments] ${AdminCategoryMsg}
799 #click element xpath=//*[@id='megamenu-notification-button']
800 #click element xpath=//*[@id="notification-history-link"]
801 Wait until Element is visible xpath=//*[@id='app-title'] timeout=10
802 Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg}
803 log ${AdminCategoryMsg}
804
805Standared user Logout from Portal GUI
806 [Documentation] Logout from Portal GUI
807 Click Element xpath=//div[@id='header-user-icon']
808 Click Button xpath=//button[contains(.,'Log out')]
809 #Confirm Action
810 Title Should Be Login
811
812Portal admin Add New Account
813 Click Link //*[@id="parent-item-App-Account-Management"]
814 Click Button xpath=//button[@ng-click='toggleSidebar()']
815 Set Selenium Implicit Wait 3000
816 Click Button //*[@id="account-onboarding-button-add"]
817 Set Selenium Implicit Wait 3000
818 Input Text //*[@id="account-details-input-name"] ${AppUserName}
819 Input Text //*[@id="account-details-input-username"] ${AppUserName}
820 Input Text //*[@id="account-details-input-password"] ${AppPassword}
821 Input Text //*[@id="account-details-input-repassword"] ${AppPassword}
822 #Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()']
823 ##Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()']
824 #account-details-next-button
825 Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()']
826
827Portal admin Delete Account
828 Click Link //*[@id="parent-item-App-Account-Management"]
829 Click Button xpath=//button[@ng-click='toggleSidebar()']
830 Set Selenium Implicit Wait 3000
831 Click Button //*[@id="account-onboarding-button-add"]
832 Set Selenium Implicit Wait 3000
833
834Enhanced Notification on ONAP Portal
835 [Documentation] Runs portal Post request
836 [Arguments] ${data_path} ${data}
837 #Log Creating session ${GLOBAL_PORTAL_SERVER_URL}
838 ${session}= Create Session portal ${PORTAL_URL}
839 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass
840 ${resp}= Post Request portal ${data_path} data=${data} headers=${headers}
841 #Log Received response from portal ${resp.text}
842 [Return] ${resp}
843
844Notification on ONAP Portal
845 [Documentation] Create Config portal
846 ${configportal}= Create Dictionary jira_id=${jira}
847 ${output} = Fill JSON Template File ${portal_Template} ${configportal}
848 ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output}
849 Should Be Equal As Strings ${post_resp.status_code} 200
850
851Portal Application Account Management
852 [Documentation] Naviage to Application Account Management tab
853 Click Link xpath=//a[@title='App Account Management']
854 Click Button xpath=//button[@id='account-onboarding-button-add']
855 Input Text xpath=//input[@name='name'] JIRA
856 Input Text xpath=//input[@name='username'] jira
857 Input Text xpath=//input[@name='password'] _pass
858 Input Text xpath=//input[@name='repassword'] _pass
859 Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()']
860 Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA
861
862Portal Application Account Management validation
863 [Documentation] Naviage to user notification tab
864 Click Link xpath=//a[@id='parent-item-User-Notifications']
865 Click Element xpath=//*[@id="megamenu-notification-button"]
866 Click Element xpath=//*[@id="notification-history-link"]
867 Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10
868 Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA
869
870Portal AAF new fields
871 [Documentation] Naviage to user Application details tab
872 Click Link xpath=//a[@title='Application Onboarding']
873 Click Element xpath=//td[contains(.,'xDemo App')]
874 Page Should Contain Name Space
875 Page Should Contain Centralized
876 Click Element xpath=//button[@id='button-notification-cancel']
877 Set Selenium Implicit Wait 3000
878
879Portal Change REST URL
880 [Documentation] Naviage to user Application details tab
881 Click Link xpath=//a[@title='Application Onboarding']
882 Click Element xpath=//td[contains(.,'xDemo App')]
883 Input Text xpath=//input[@name='restUrl'] ${PORTAL_XDEMPAPP_REST_URL}
884 Click Element xpath=//button[@id='button-save-app']
885 Set Selenium Implicit Wait 6000
886 Go To ${PORTAL_HOME_PAGE}
887 Wait Until Element Is Visible xpath=//a[@title='Application Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
888
889Admin widget download
890 Go To ${PORTAL_HOME_URL}
891 Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
892 Click Link xpath=//a[@title='Widget Onboarding']
893 Wait until page contains Element xpath=//table[@class='ng-scope']
894 ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
895 log ${td_id}
896 ${test}= Get Substring ${td_id} -1
897 log ${test}
898 ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}'
899 click Element xpath=//*[@id=${download_link_id}]
900
901Reset widget layout option
902 Go To ${PORTAL_HOME_URL}
903 Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
904 Execute Javascript document.getElementById('widgets').scrollTo(0,1400)
905 Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
906 Execute Javascript document.getElementById('widgets').scrollTo(0,1800)
907 Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500
908 Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight);
909 Execute Javascript document.getElementById('dashboardDefaultPreference').click()
910 Execute Javascript document.getElementById('div-confirm-ok-button').click()
911
912Add Portal Admin
913 Click Link xpath=//a[@id='parent-item-Portal-Admins']
914 Scroll Element Into View xpath=//button[@id='portal-admin-button-add']
915 Click Button xpath=//button[@id='portal-admin-button-add']
916 Input Text xpath=//input[@id='input-user-search'] ${Test_LoginID}
917 Click Button xpath=//button[@id='button-search-users']
918 Wait Until Page Contains Element xpath=//span[@id='result-uuid-0'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
919 Click Element xpath=//span[@id='result-uuid-0']
920 Click Button xpath=//button[@id='pa-search-users-button-save']
921 Click Button xpath=//button[@id='admin-div-ok-button']
922
923Delete Portal Admin
924 Wait Until Page Does Not Contain Element xpath=//*[@class='b2b-modal-header']
925 Click Link xpath=//a[@id='parent-item-Portal-Admins']
926 Click Element xpath=//td[contains(.,'portal')]/following::span[@id='1-button-portal-admin-remove']
927 Click Button xpath=//*[@id='div-confirm-ok-button']