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