*** Settings ***
-Documentation The main interface for interacting with Portal. It handles low level stuff like managing the http request library and Portal required fields
-Library RequestsLibrary
-Library ONAPLibrary.Utilities
-Library SeleniumLibrary
+Documentation The main interface for interacting with Portal. It handles low level stuff like managing the http request library and Portal required fields
+Library RequestsLibrary
+Library ONAPLibrary.Utilities
+Library SeleniumLibrary
Library Collections
Library String
*** Variables ***
${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
${PORTAL_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://${GLOBAL_INJECTED_PORTAL_IP_ADDR}:${GLOBAL_PORTAL_SERVER_PORT}
-${PORTAL_GUI_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://portal.api.simpledemo.onap.org:${GLOBAL_PORTAL_SERVER_PORT}
+#${PORTAL_GUI_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://portal.api.simpledemo.onap.org:${GLOBAL_PORTAL_SERVER_PORT}
+#${PORTAL_GUI_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://portal-app.onap:${GLOBAL_PORTAL_SERVER_PORT}
+${PORTAL_GUI_ENDPOINT} https://portal.api.simpledemo.onap.org:30225
${PORTAL_ENV} /ONAPPORTAL
${PORTAL_LOGIN_URL} ${PORTAL_GUI_ENDPOINT}${PORTAL_ENV}/login.htm
${PORTAL_HOME_URL} ${PORTAL_GUI_ENDPOINT}${PORTAL_ENV}/applicationsHome
*** Keywords ***
Run Portal Health Check
[Documentation] Runs Portal Health check
- ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
+ ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['statusCode']} 200
-
+
Run Portal Get Request
[Documentation] Runs Portal Get request
[Arguments] ${data_path}
Run Portal Application Access Tests
[Documentation] Runs Portal Application Access Tests
- Log To Console Testing SDC,VID,Policy
- Run Portal Application Login Test cs0008 demo123456! gridster-SDC-icon-link tabframe-SDC Welcome to SDC
+ Log Testing SDC,VID,Policy console=yes
+ ${status} ${resp} Run Keyword And Ignore Error Run Portal Application Login Test cs0008 demo123456! gridster-SDC-icon-link tabframe-SDC Welcome to SDC
+ Log SDC ${status} console=yes
+ Close All Browsers
+ ${status} ${resp} Run Keyword And Ignore Error Run Portal Application Login Test demo demo123456! gridster-Virtual-Infrastructure-Deployment-icon-link tabframe-Virtual-Infrastructure-Deployment Welcome to VID
+ Log VID ${status} console=yes
+ Close All Browsers
+ ${status} ${resp} Run Keyword And Ignore Error Run Portal Application Login Test demo demo123456! gridster-A&AI-UI-icon-link tabframe-A&AI-UI A&AI
+ Log A&AI UI ${status} console=yes
Close All Browsers
- Run Portal Application Login Test demo demo123456! gridster-Virtual-Infrastructure-Deployment-icon-link tabframe-Virtual-Infrastructure-Deployment Welcome to VID
+ ${status} ${resp} Run Keyword And Ignore Error Run Portal Application Login Test demo demo123456! gridster-Policy-icon-link tabframe-Policy Policy Editor
+ Log Policy ${status} console=yes
Close All Browsers
- Run Portal Application Login Test demo demo123456! gridster-Policy-icon-link tabframe-Policy Policy Editor
+ ${status} ${resp} Run Keyword And Ignore Error Run Portal Application Login Test demo demo123456! gridster-SO-Monitoring-icon-link tabframe-SO-Monitoring SO
+ Log SO-Monitoring ${status} console=yes
Close All Browsers
Login To Portal GUI And Go Home
Log Logging in to ${PORTAL_ENDPOINT}${PORTAL_ENV}
Handle Proxy Warning
Title Should Be Login
+ Log Source
Input Text xpath=//input[@ng-model='loginId'] ${loginId}
Input Password xpath=//input[@ng-model='password'] ${password}
Click Element xpath=//a[@id='loginBtn']
- Wait Until Page Contains Applications ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
+ Sleep 5s
+ #Go To ${PORTAL_HOME_URL}
+ #Wait Until Page Contains Applications ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
+ Wait Until Page Contains Applications 30
Log Logged in to ${PORTAL_ENDPOINT}${PORTAL_ENV}
- Log To Console ${loginId} SUCCESS
-
+ Log ${loginId} SUCCESS
+
Logout From Portal GUI
[Documentation] Logs out of Portal GUI
Go To ${PORTAL_LOGIN_URL}
# Setup Browser Now being managed by test case
### revert to local Setup Browser for Login test
Setup Browser
+ Set Window Size 2000 1000
Go To ${PORTAL_LOGIN_URL}
#Maximize Browser Window
Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
Input Text xpath=//input[@ng-model='loginId'] ${loginId}
Input Password xpath=//input[@ng-model='password'] ${password}
Click Element xpath=//a[@id='loginBtn']
+ Sleep 5s
+ #Go To ${PORTAL_HOME_URL}
Wait Until Page Contains Applications ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Log Logged in to ${PORTAL_ENDPOINT}${PORTAL_ENV}
- Log To Console ${loginId} SUCCESS
+ Log ${loginId} SUCCESS
Sleep 5
Click Element id=${click_element}
Sleep 5
Select Frame id=${tabframe}
Sleep 5
- Page Should Contain ${match_string}
- Log To Console Portal Application Access SUCCESS ${click_element}
+ Wait Until Page Contains ${match_string} 60
Go To Portal HOME
[Documentation] Naviage to Portal Home
[Arguments] ${xpath} ${value} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Wait Until Page Contains Element xpath=${xpath} ${timeout}
Wait Until Element Is Enabled xpath=${xpath} ${timeout}
- Select From List xpath=${xpath} ${value}
+ Select From List By Label xpath=${xpath} ${value}
Input Text When Enabled
[Arguments] ${xpath} ${value} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Wait Until Page Contains Element xpath=${xpath} ${timeout}
Wait Until Element Is Enabled xpath=${xpath} ${timeout}
Input Text xpath=${xpath} ${value}
-