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