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