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