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