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