summaryrefslogtreecommitdiffstats
path: root/robot/resources/portal-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/portal-sdk')
-rw-r--r--robot/resources/portal-sdk/portalDef.robot30
-rw-r--r--robot/resources/portal-sdk/portalSdkDef.robot56
2 files changed, 14 insertions, 72 deletions
diff --git a/robot/resources/portal-sdk/portalDef.robot b/robot/resources/portal-sdk/portalDef.robot
index 57b6e1bb..41fbeea4 100644
--- a/robot/resources/portal-sdk/portalDef.robot
+++ b/robot/resources/portal-sdk/portalDef.robot
@@ -1,16 +1,14 @@
*** Settings ***
Documentation This is RobotFrame work script
-Library ExtendedSelenium2Library
+Library SeleniumLibrary
Library OperatingSystem
-Library ../../library/eteutils/RequestsClientCert.py
Library RequestsLibrary
-Library ../../library/eteutils/UUID.py
-Library ../../library/robot/libraries/DateTime.py
+Library UUID
+Library DateTime
Library Collections
-Library ../../library/eteutils/OSUtils.py
-Library ../../library/eteutils/StringTemplater.py
+Library OSUtils
+Library StringTemplater
Library String
-#Library XvfbRobot
Resource ../json_templater.robot
Resource ../browser_setup.robot
@@ -23,8 +21,8 @@ ${PORTAL_LOGIN_URL} ${PORTAL_URL}${PORTAL_ENV}/login.htm
${PORTAL_HOME_PAGE} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
${PORTAL_MICRO_ENDPOINT} ${PORTAL_URL}${PORTAL_ENV}/commonWidgets
${PORTAL_HOME_URL} ${PORTAL_URL}${PORTAL_ENV}/applicationsHome
-${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck
-${PORTAL_XDEMPAPP_REST_URL} http://portal-sdk:8080/ONAPPORTALSDK/api/v2
+${PORTAL_HEALTH_CHECK_PATH} ${PORTAL_ENV}/portalApi/healthCheck
+${PORTAL_XDEMPAPP_REST_URL} ${PORTAL_URL}/ONAPPORTALSDK/api/v2
${PORTAL_ASSETS_DIRECTORY} ../../assets/widgets/
${GLOBAL_APPLICATION_ID} robot-functional
${GLOBAL_PORTAL_ADMIN_USER} demo
@@ -33,14 +31,11 @@ ${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/
${GLOBAL_BUILD_NUMBER} 0
${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
${jira} jira
-${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent
+${RESOURCE_PATH} ${PORTAL_URL}/auxapi/ticketevent
${portal_Template} ${CURDIR}/portal.template
-${Result} FALSE
-${td_id} 0
-${download_link_id} 0
-${HEADLESS} False
+${download_link_id} 0
*** Keywords ***
@@ -165,8 +160,7 @@ Portal admin Add Application admin User New user
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${GLOBAL_PORTAL_ADMIN_PWD}
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
-
- ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
+ ${Result}= Get Element Count xpath=//*[contains(text(),'User with same loginId already exists')]
#log ${Result}
#${type_result}= Evaluate type(${Result})
@@ -212,7 +206,7 @@ Portal admin Add Standard User New user
Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${GLOBAL_PORTAL_ADMIN_PWD}
Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()']
- ${Result}= Get Matching XPath Count xpath=//*[contains(text(),'User with same loginId already exists')]
+ ${Result}= Get Element Count xpath=//*[contains(text(),'User with same loginId already exists')]
#log ${Result}
#${type_result}= Evaluate type(${Result})
@@ -907,7 +901,7 @@ Admin widget download
Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Click Link xpath=//a[@title='Widget Onboarding']
Wait until page contains Element xpath=//table[@class='ng-scope']
- ${td_id}= get element attribute xpath=//*[contains(text(),'Events')]@id
+ ${td_id}= get element attribute xpath=//*[contains(text(),'Events')] id
log ${td_id}
${test}= Get Substring ${td_id} -1
log ${test}
diff --git a/robot/resources/portal-sdk/portalSdkDef.robot b/robot/resources/portal-sdk/portalSdkDef.robot
index 1efb1413..16cef97b 100644
--- a/robot/resources/portal-sdk/portalSdkDef.robot
+++ b/robot/resources/portal-sdk/portalSdkDef.robot
@@ -1,60 +1,10 @@
*** Settings ***
Documentation This is RobotFrame work script
-Library ExtendedSelenium2Library
-Library OperatingSystem
-#Library XvfbRobot
+Library SeleniumLibrary
-*** Variables ***
-${PORTAL_SDK_URL} http://portal.api.simpledemo.onap.org:8990
-${PORTAL_SDK_ENV} /ONAPPORTALSDK
-${PORTAL_SDK_LOGIN_URL} ${PORTAL_SDK_URL}${PORTAL_ENV}/login.htm
-${PORTAL_SDK_HOME_PAGE} ${PORTAL_SDK_URL}${PORTAL_ENV}/welcome
-${PORTAL_SDK_MICRO_ENDPOINT} ${PORTAL_SDK_URL}${PORTAL_ENV}/commonWidgets
-${PORTAL_SDK_HOME_URL} ${PORTAL_SDK_URL}${PORTAL_ENV}/applicationsHome
-${GLOBAL_APPLICATION_ID} robot-functional
-${GLOBAL_PORTAL_ADMIN_USER} demo
-${GLOBAL_PORTAL_ADMIN_PWD} demo
-${GLOBAL_SELENIUM_BROWSER} chrome
-${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
-${GLOBAL_SELENIUM_DELAY} 0
-${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
-${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
-${GLOBAL_BUILD_NUMBER} 0
-${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
-
-#*** Test Cases ***
-
*** Keywords ***
-SDKPortal admin Login To Portal GUI
- [Documentation] Logs into Portal GUI
- # Setup Browser
- # Start Virtual Display 1920 1080
- Open Browser ${PORTAL_SDK_LOGIN_URL} chrome
- # Go To ${PORTAL_SDK_LOGIN_URL}
- Maximize Browser Window
- Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
- Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
- Log Logging in to ${PORTAL_SDK_URL}${PORTAL_SDK_ENV}
- # Handle Proxy Warning
- Title Should Be Login
- Input Text xpath=//input[@id='loginId'] ${GLOBAL_PORTAL_ADMIN_USER}
- Input Password xpath=//input[@id='password'] ${GLOBAL_PORTAL_ADMIN_PWD}
- Click Element //*[@id="loginBtn"]
- Wait Until Page Contains Element xpath=//img[@src='app/fusionapp/icons/logo_onap_transbg.png'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
- Log Logged in to ${PORTAL_SDK_URL}${PORTAL_SDK_ENV}
-
-SDKPortalAdmin Navigation Application Link Tab
- [Documentation] Logs into Portal GUI as Portal admin
- Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
- Comment Go To ${PORTAL_SDK_HOME_PAGE}
- Comment Dismiss Alert accept=false
- #Scroll Element Into View xpath=//span[@id='tab-Home']
- #Click Element xpath=//span[@id='tab-Home']
- #Click Element xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1]
- Comment Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
-
Validate SDK Sub Menu
[Documentation] Logs into SDK GUI as Portal admin
Page Should Contain Home
@@ -132,6 +82,4 @@ Click Admin and validate sub Menu
Click Link xpath=//a[@id='parent-item-Admin']
Click Link xpath=//a[@id='parent-item-Admin']
Click Link xpath=//a[contains(@title,'Usage')]
- Page Should Contain Current Usage
-
-
+ Page Should Contain Current Usage \ No newline at end of file