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