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