From 6eebdba780e945a2c8b318897dca9b4f09fa132d Mon Sep 17 00:00:00 2001 From: kishore Date: Tue, 3 Oct 2017 11:12:57 -0500 Subject: Add updated scripts Issue-ID:PORTAL-53 Signed-off-by: kishore Change-Id: I8a6d65877bbdeee196b187d60af3d0600ea4209f --- test/csit/plans/portal/testsuite/.env | 12 +- .../csit/plans/portal/testsuite/docker-compose.yml | 96 ++ test/csit/plans/portal/testsuite/setup.sh | 176 +++- test/csit/plans/portal/testsuite/teardown.sh | 2 +- test/csit/plans/portal/testsuite/testplan.txt | 2 +- test/csit/tests/portal/testsuites/__init__.robot | 2 +- .../tests/portal/testsuites/json_templater.robot | 21 + test/csit/tests/portal/testsuites/portal.template | 34 + test/csit/tests/portal/testsuites/test1.robot | 1033 +++++++++++++++++++- test/csit/tests/portal/testsuites/widget_news.zip | Bin 0 -> 1503954 bytes 10 files changed, 1305 insertions(+), 73 deletions(-) create mode 100644 test/csit/plans/portal/testsuite/docker-compose.yml create mode 100644 test/csit/tests/portal/testsuites/json_templater.robot create mode 100644 test/csit/tests/portal/testsuites/portal.template create mode 100644 test/csit/tests/portal/testsuites/widget_news.zip (limited to 'test') diff --git a/test/csit/plans/portal/testsuite/.env b/test/csit/plans/portal/testsuite/.env index fa3076859..8fb2357b6 100644 --- a/test/csit/plans/portal/testsuite/.env +++ b/test/csit/plans/portal/testsuite/.env @@ -2,7 +2,10 @@ # used by docker-compose AND by other shell scripts # Host directory with config files -PROJECT_DIR=/PROJECT/OpenSource/UbuntuEP + +LOGS_DIR=./logs +PROPS_DIR=./properties + # Directory within containers WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps @@ -11,7 +14,10 @@ WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps EP_IMG_NAME=portal-apps DB_IMG_NAME=portal-db WMS_IMG_NAME=portal-wms -# Tag all images with this -PORTAL_TAG=1.1.0 +CLI_IMG_NAME=onap/cli +# Tag all images with this +PORTAL_TAG=1.3.0 +DOCKER_IMAGE_VERSION=1.3-STAGING-latest +CLI_DOCKER_VERSION=1.1-STAGING-latest NEXUS_REPO=nexus3.onap.org:10003 diff --git a/test/csit/plans/portal/testsuite/docker-compose.yml b/test/csit/plans/portal/testsuite/docker-compose.yml new file mode 100644 index 000000000..f40a106e9 --- /dev/null +++ b/test/csit/plans/portal/testsuite/docker-compose.yml @@ -0,0 +1,96 @@ +# docker-compose for ONAP portal containers: database, microservice, portal apps. +# Relies on .env file in current directory. +# Works in multiple environments; does not pull from a Nexus registry. +# Exposes the portal apps docker (but not DB nor WMS dockers) on the host network. +# Images must be pulled from ONAP Nexus registry after logging in like this: +# docker login -u USER -p PASS nexus3.onap.org:10001 + +version: '2.0' + +services: + + cli: + image: ${CLI_IMG_NAME}:${PORTAL_TAG} + environment: + CLI_MODE: 'daemon' + expose: + - 80 + ports: + - 8080:80 + logging: + driver: json-file + + # Config files may use hostname "portal-db" + portal-db: + image: ${DB_IMG_NAME}:${PORTAL_TAG} + environment: + MYSQL_ROOT_PASSWORD: 'Aa123456' + expose: + - 3306 + volumes: + # Just specify a path and let the Engine create a volume + - /var/lib/mysql + logging: + driver: json-file + + # An environment variable here CAN override the database URL; + # instead the value in the config file uses hostname from above + portal-wms: + image: ${WMS_IMG_NAME}:${PORTAL_TAG} + expose: + - 8082 + links: + - portal-db + depends_on: + - portal-db + volumes: + - ${PROPS_DIR}/ECOMPWIDGETMS/application.properties:/application.properties + command: + - /wait-for.sh + - -t + - "300" + - portal-db:3306 + - -- + - /start-wms-cmd.sh + logging: + driver: json-file + + # Environment variables here CANNOT override the database URL because + # two apps use identical configuration keys with different values + portal-apps: + image: ${EP_IMG_NAME}:${PORTAL_TAG} + expose: + - 8989 + ports: + - 8989:8080 + - 8010:8009 + - 8006:8005 + links: + - portal-db + - portal-wms + depends_on: + - portal-db + - portal-wms + volumes: + - ${PROPS_DIR}/ECOMPPORTALAPP/system.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/conf/system.properties + - ${PROPS_DIR}/ECOMPPORTALAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties + - ${PROPS_DIR}/ECOMPPORTALAPP/portal.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/portal.properties + - ${PROPS_DIR}/ECOMPPORTALAPP/openid-connect.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties + - ${PROPS_DIR}/ECOMPPORTALAPP/logback.xml:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/logback.xml + - ${PROPS_DIR}/ECOMPSDKAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties + - ${PROPS_DIR}/ECOMPSDKAPP/system.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/conf/system.properties + - ${PROPS_DIR}/ECOMPSDKAPP/portal.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/classes/portal.properties + - ${PROPS_DIR}/ECOMPDBCAPP/system.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/conf/system.properties + - ${PROPS_DIR}/ECOMPDBCAPP/portal.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/classes/portal.properties + - ${PROPS_DIR}/ECOMPDBCAPP/dbcapp.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties + - ${PROPS_DIR}/ECOMPDBCAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties + - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs + command: + - /wait-for.sh + - -t + - "300" + - portal-db:3306 + - -- + - /start-apps-cmd.sh + logging: + driver: json-file diff --git a/test/csit/plans/portal/testsuite/setup.sh b/test/csit/plans/portal/testsuite/setup.sh index a6c1ba483..c3e9e5160 100644 --- a/test/csit/plans/portal/testsuite/setup.sh +++ b/test/csit/plans/portal/testsuite/setup.sh @@ -1,40 +1,172 @@ #!/bin/bash -# Starts docker containers for ONAP Portal in Rackspace. -# Version for Amsterdam/R1 uses docker-compose. +# Starts docker containers for ONAP Portal +# This version for Amsterdam/R1 of Portal, uses docker-compose. +# Temporarily maintained in portal/deliveries area; +# replicated from the ONAP demo/boot area due to release concerns. + +# Start Xvfb +echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}" +Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR & +XVFBPID=$! +# Get pid of this spawned process to make sure we kill the correct process later + +#Get current IP of VM +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +export HOST_IP=${HOST_IP} + +if ! ifconfig docker0; then +if ! ifconfig ens3; then +echo "Could not determine IP address" +exit 1 +fi +export DOCKER_IP_IP=`ifconfig ens3 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'` +else +export DOCKER_IP=`ifconfig docker0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'` +fi +echo $DOCKER_IP + + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +#ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v DOCKER_IP:${DOCKER_IP}" +#export PORTAL_IP=${PORTAL_IP} +ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v DOCKER_IP:${DOCKER_IP}" +export DOCKER_IP=${DOCKER_IP} + + + + + + + # be verbose set -x # Establish environment variables -NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) -NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) -NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) -DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) +NEXUS_USERNAME=docker +NEXUS_PASSWD=docker +NEXUS_DOCKER_REPO=nexus3.onap.org:10003 + + + +CURR="$(pwd)" +git clone http://gerrit.onap.org/r/portal # Refresh configuration and scripts -cd /opt/portal +cd portal git pull cd deliveries - +rm .env +rm docker-compose.yml +cp $CURR/.env . +cp $CURR/docker-compose.yml . +#cd properties_rackspace/ECOMPPORTALAPP +#rm system.properties +#cp $CURR/system.properties . +#cd ../.. # Get image names used below from docker-compose environment file -source .env +source $CURR/.env + +# Copy property files to new directory +mkdir -p $PROPS_DIR +cp -r properties_rackspace/* $PROPS_DIR +# Also create logs directory +mkdir -p $LOGS_DIR -# Copy property files -ETC=/PROJECT/OpenSource/UbuntuEP/etc -mkdir -p $ETC -cp -r properties_rackspace/* $ETC # Refresh images docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO -docker pull $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION -docker pull $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION -docker pull $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/onap/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/onap/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/onap/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/$CLI_IMG_NAME:$CLI_DOCKER_VERSION # Tag them as expected by docker-compose file -docker tag $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG -docker tag $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG -docker tag $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/onap/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/onap/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/onap/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/$CLI_IMG_NAME:$CLI_DOCKER_VERSION $CLI_IMG_NAME:$PORTAL_TAG + +# compose is not in /usr/bin +docker-compose down +docker-compose up -d + + +#${HOSTNAME}="portal.api.simpledemo.openecomp.org" +#echo "$HOST_IP ${HOSTNAME}" >> /etc/hosts + +#echo "$HOST_IP portal.api.simpledemo.openecomp.org" >> /etc/hosts +#sudo sed -i "2i$HOST_IP portal.api.simpledemo.openecomp.org" /etc/hosts + +#HOST="portal.api.simpledemo.openecomp.org" +#sudo sed -i "/$HOST/ s/.*/$HOST_IP\t$HOST/g" /etc/hosts + +# insert/update hosts entry +ip_address=$HOST_IP +host_name="portal.api.simpledemo.openecomp.org" +# find existing instances in the host file and save the line numbers +matches_in_hosts="$(grep -n $host_name /etc/hosts | cut -f1 -d:)" +host_entry="${ip_address} ${host_name}" + +echo "$host_entry" + +if [ ! -z "$matches_in_hosts" ] +then +echo "Updating existing hosts entry." +# iterate over the line numbers on which matches were found +while read -r line_number; do +# replace the text of each line with the desired host entry +sudo sed -i '' "${line_number}s/.*/${host_entry} /" /etc/hosts +echo "${line_number} ${host_entry}" +done <<< "$matches_in_hosts" +else +echo "Adding new hosts entry." +echo "$host_entry" | sudo tee -a /etc/hosts > /dev/null +fi + + + +# WAIT 5 minutes maximum and test every 5 seconds if Portal up using HealthCheck API +TIME_OUT=460 +INTERVAL=20 +TIME=0 +while [ "$TIME" -lt "$TIME_OUT" ]; do + response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/portalApi/healthCheck); echo $response + + if [ "$response" == "200" ]; then + echo Portal and its database well started in $TIME seconds + break; + fi + + echo Sleep: $INTERVAL seconds before testing if Portal is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds + sleep $INTERVAL + TIME=$(($TIME+$INTERVAL)) +done + +if [ "$TIME" -ge "$TIME_OUT" ]; then + echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for tests... +fi + +#sleep 3m + + + +#if [ "$TIME" -ge "$TIME_OUT" ]; then +# echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for tests... +#fi + + + + + +#Get current IP of VM +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +export HOST_IP=${HOST_IP} + + +docker logs deliveries_portal-apps_1 +docker logs deliveries_portal-wms_1 + + + -# docker-compose is not in /usr/bin -/opt/docker/docker-compose down -/opt/docker/docker-compose up -d diff --git a/test/csit/plans/portal/testsuite/teardown.sh b/test/csit/plans/portal/testsuite/teardown.sh index 4214c8279..e0431a72f 100644 --- a/test/csit/plans/portal/testsuite/teardown.sh +++ b/test/csit/plans/portal/testsuite/teardown.sh @@ -15,6 +15,6 @@ # limitations under the License. # -kill-instance.sh i-mock +docker kill $(docker ps -q) diff --git a/test/csit/plans/portal/testsuite/testplan.txt b/test/csit/plans/portal/testsuite/testplan.txt index 5aba3164c..d7b18a5ce 100644 --- a/test/csit/plans/portal/testsuite/testplan.txt +++ b/test/csit/plans/portal/testsuite/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration.git]/test/csit/tests/. # Place the suites in run order. -portal/Healthcheck +portal/testsuites diff --git a/test/csit/tests/portal/testsuites/__init__.robot b/test/csit/tests/portal/testsuites/__init__.robot index 3b8528dff..885710c9b 100644 --- a/test/csit/tests/portal/testsuites/__init__.robot +++ b/test/csit/tests/portal/testsuites/__init__.robot @@ -1,2 +1,2 @@ *** Settings *** -Documentation APPC - healthcheck +Documentation Portal - Testcases diff --git a/test/csit/tests/portal/testsuites/json_templater.robot b/test/csit/tests/portal/testsuites/json_templater.robot new file mode 100644 index 000000000..01eba480d --- /dev/null +++ b/test/csit/tests/portal/testsuites/json_templater.robot @@ -0,0 +1,21 @@ +*** Settings *** +Documentation This resource is filling out json string templates and returning the json back +Library RequestsLibrary +Library eteutils/StringTemplater.py +Library OperatingSystem +#Resource global_properties.robot + +*** Keywords *** +Fill JSON Template + [Documentation] Runs substitution on template to return a filled in json + [Arguments] ${json} ${arguments} + ${returned_string}= Template String ${json} ${arguments} + ${returned_json}= To Json ${returned_string} + [Return] ${returned_json} + +Fill JSON Template File + [Documentation] Runs substitution on template to return a filled in json + [Arguments] ${json_file} ${arguments} + ${json}= OperatingSystem.Get File ${json_file} + ${returned_json}= Fill JSON Template ${json} ${arguments} + [Return] ${returned_json} \ No newline at end of file diff --git a/test/csit/tests/portal/testsuites/portal.template b/test/csit/tests/portal/testsuites/portal.template new file mode 100644 index 000000000..57a3b798b --- /dev/null +++ b/test/csit/tests/portal/testsuites/portal.template @@ -0,0 +1,34 @@ +{ +"application" : "${jira_id}", +"event" : { +"body" : { +"ticketStatePhrase" : "We recently detected a problem with the equipment at your site. The event is in queue for immediate work.", +"ivrNotificationFlag" : "1", +"expectedRestoreDate" : 0, +"bridgeTransport" : "AOTS", +"reptRequestType" : 0, +"ticketNum" : "PORTAL-104", +"assetID" : "JIRA notification from demo", +"eventAbstract" : "This is the place to enter notification contents!!! ", +"severity" : "2 - Major", +"ticketPriority" : "3", +"reportedCustomerImpact" : 0, +"testAutoIndicator" : 0, +"supportGroupName" : "US-TEST-ORT", +"messageGroup" : "SNMP", +"csi" : 0, +"mfabRestoredTime" : 0 +}, +"header" : { +"timestamp" : "2017-04-10T14:35:05.219+0000", +"eventSource" : "JIRA", +"entityId" : "000002000857405", +"sequenceNumber" : 2 +}, +"blinkMsgId" : "f38c071e-1a47-4b55-9e72-1db830100a61", +"sourceIP" : "130.4.165.158" +}, +"SubscriberInfo" : { +"UserList" : ["demo"] +} +} diff --git a/test/csit/tests/portal/testsuites/test1.robot b/test/csit/tests/portal/testsuites/test1.robot index c19655892..a6b91fa83 100644 --- a/test/csit/tests/portal/testsuites/test1.robot +++ b/test/csit/tests/portal/testsuites/test1.robot @@ -2,70 +2,224 @@ Documentation This is RobotFrame work script Library ExtendedSelenium2Library Library OperatingSystem -Resource ../resources/browser_setup.robot -#Resource ../resources/Portal/portal_int_par.robot -Resource ../resources/Portal/portal_VID.robot -#Resource ../resources/Portal/portal_SDC.robot +Library eteutils/RequestsClientCert.py +Library RequestsLibrary +Library eteutils/UUID.py +Library DateTime +Library Collections +Library eteutils/OSUtils.py +Library eteutils/StringTemplater.py +Library XvfbRobot +#Resource ../resources/browser_setup.robot +Resource json_templater.robot *** Variables *** +#${PORTAL_URL} http://%{DOCKER_IP}:8989 +#${PORTAL_URL} http://%{HOST_IP}:8989 +#${PORTAL_URL} http://localhost:8989 +${PORTAL_URL} http://portal.api.simpledemo.openecomp.org:8989 +#${PORTAL_URL} http://104.239.203.25:8989 +${PORTAL_ENV} /ECOMPPORTAL +${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 +${App_First_Name} appdemo +${App_Last_Name} demo +${App_Email_Address} appdemo@onap.com +${App_LoginID} appdemo +${App_Loginpwd} demo123456! +${App_LoginPwdCheck} demo123456! +${Sta_First_Name} stademo +${Sta_Last_Name} demo +${Sta_Email_Address} stademo@onap.com +${Sta_LoginID} stademo +${Sta_Loginpwd} demo123456! +${Sta_LoginPwdCheck} demo123456! +${Test_First_Name} portal +${Test_Last_Name} demo +${Test_Email_Address} portal@onap.com +${Test_LoginID} portal +${Test_Loginpwd} demo123456! +${Test_LoginPwdCheck} demo123456! +${Existing_User} portal +${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck +${PORTAL_ASSETS_DIRECTORY} ${CURDIR} +${GLOBAL_APPLICATION_ID} robot-functional +${GLOBAL_PORTAL_ADMIN_USER} demo +${GLOBAL_PORTAL_ADMIN_PWD} demo123456! +${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/ +${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_OPENSTACK_HEAT_SERVICE_TYPE} orchestration +${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume +${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute +${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network +${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image +${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity +${GLOBAL_BUILD_NUMBER} 0 +${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt +${jira} jira +${RESOURCE_PATH} ECOMPPORTAL/auxapi/ticketevent +${GLOBAL_PORTAL_SERVER_URL} http://vm-ep-dev3.client.research.att.com:8989/ +${portal_Template} ${CURDIR}/portal.template + *** Test Cases *** Portal Health Check Run Portal Health Check + +Portal admin Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case +# Setup Browser + Start Virtual Display 1920 1080 + Open Browser ${PORTAL_LOGIN_URL} chrome + #Go To ${PORTAL_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_URL}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${PORTAL_URL}${PORTAL_ENV} + + +Notification on ONAP Portal + [Documentation] Create Config portal + ${configportal}= Create Dictionary jira_id=${jira} + ${output} = Fill JSON Template File ${portal_Template} ${configportal} + ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output} + Should Be Equal As Strings ${post_resp.status_code} 200 + +Portal Application Account Management validation + [Documentation] Naviage to user notification tab + Click Link xpath=//a[@id='parent-item-User-Notifications'] + click element xpath=//*[@id="megamenu-notification-button"] + Click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA + + +#Portal AAF new fields +# [Documentation] Naviage to user Application details tab +# Click Link xpath=//a[@title='Application Onboarding'] +# Click Element xpath=//td[contains(.,'Virtual Infrastructure Deployment')] +# Page Should Contain Name Space +# Page Should Contain Centralized +# Click Element xpath=//button[@id='button-notification-cancel'] + +Portal admin Microservice Onboarding + [Documentation] Naviage to Edit Functional menu tab + Click Link xpath=//a[@title='Microservice Onboarding'] + Click Button xpath=//button[@id='microservice-onboarding-button-add'] + Input Text xpath=//input[@name='name'] Test Microservice + Input Text xpath=//*[@name='desc'] Test + Click Element xpath=//input[@id='microservice-details-input-app'] + Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//*[@name='desc'] + Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT} + Click Element xpath=//input[@id='microservice-details-input-security-type'] + Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')] + Click Element xpath=//li[contains(.,'Basic Authentication')] + Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Button xpath=//button[@id='microservice-details-save-button'] + Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice + #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice + + +Functional Top Menu Get Access + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Get Access')] + Click Link xpath=//a[contains(.,'Get Access')] + Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access + + +Functional Top Menu Contact Us + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Contact Us')] + Click Link xpath=//a[contains(.,'Contact Us')] + Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us + Click Image xpath=//img[@alt='Onap Logo'] + + +Notification functionality + [Documentation] Notification functionality + #Setup Browser + ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications + set global variable ${AdminBroadCastMsg} -Portal Admin functionality - [Documentation] ONAP Portal Admin functionality test - Setup Browser - Portal admin Login To Portal GUI - Portal admin Microservice Onboarding - Portal Admin Create Widget for All users - Portal Admin Delete Widget for All users - Portal Admin Create Widget for Application Roles - Portal Admin Delete Widget for Application Roles - Portal admin Add Application admin User New user - Portal admin Add Standard User New user - Portal admin Add Application Admin Exiting User -APPDEMO - Portal admin Add Application Admin Exiting User - Portal admin Delete Application Admin Existing User - Portal Admin Delete Widget for All users - Portal admin Add Standard User Existing user - Portal admin Edit Standard User Existing user - Portal admin Delete Standard User Existing user - Functional Top Menu Get Access - Functional Top Menu Contact Us - Portal admin Edit Functional menu - ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications - set global variable ${AdminBroadCastMsg} - ${AdminCategoryMsg}= Portal Admin Category Notifications - set global variable ${AdminCategoryMsg} - Portal admin Logout from Portal GUI +Portal admin Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + Title Should Be Login + + + +#Portal Admin functionality +# [Documentation] ONAP Portal Admin functionality test + #Setup Browser +# Portal admin Login To Portal GUI +# Portal admin Microservice Onboarding +# Portal Admin Create Widget for All users +# Portal Admin Delete Widget for All users +# Portal Admin Create Widget for Application Roles +# Portal Admin Delete Widget for Application Roles +# Portal admin Add Application admin User New user -Test +# Portal admin Add Standard User New user +# Portal admin Add Application Admin Exiting User -APPDEMO +# Portal admin Add Application Admin Exiting User +# Portal admin Delete Application Admin Existing User +# Portal admin Add Standard User Existing user +# Portal admin Edit Standard User Existing user +# Portal admin Delete Standard User Existing user +# Functional Top Menu Get Access +# Functional Top Menu Contact Us +# Portal admin Edit Functional menu +# ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications +# set global variable ${AdminBroadCastMsg} +# ${AdminCategoryMsg}= Portal Admin Category Notifications +# set global variable ${AdminCategoryMsg} +# Portal admin Logout from Portal GUI -Application Admin functionality - [Documentation] ONAP Application Admin functionality test - Application admin Login To Portal GUI +#Application Admin functionality +# [Documentation] ONAP Application Admin functionality test +# Application admin Login To Portal GUI # Application Admin Navigation Application Link Tab -# Application Admin Navigation Functional Menu - Application admin Add Standard User Existing user - Application admin Edit Standard User Existing user - Application admin Delete Standard User Existing user - Application admin Logout from Portal GUI - -Standared User functionality - [Documentation] ONAP Standared User functionality test - Standared user Login To Portal GUI +# Application Admin Navigation Functional Menu +# Application admin Add Standard User Existing user +# Application admin Edit Standard User Existing user +# Application admin Delete Standard User Existing user +# Application admin Logout from Portal GUI + +#Standared User functionality +# [Documentation] ONAP Standared User functionality test +# Standared user Login To Portal GUI # Standared user Navigation Application Link Tab # Standared user Navigation Functional Menu - Standared user Broadcast Notifications ${AdminBroadCastMsg} - Standared user Category Notifications ${AdminCategoryMsg} +# Standared user Broadcast Notifications ${AdminBroadCastMsg} +# Standared user Category Notifications ${AdminCategoryMsg} Teardown [Documentation] Close All Open browsers - Close All Browsers + Close All Browsers @@ -73,3 +227,792 @@ Teardown *** Keywords *** + +Setup Browser + [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER} +# Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox + Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome + Log Running with ${GLOBAL_SELENIUM_BROWSER} + + + Setup Browser Chrome + ${os}= Get Normalized Os + Log Normalized OS=${os} + ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys + Call Method ${chrome options} add_argument no-sandbox + ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver + Set To Dictionary ${dc} elementScrollBehavior 1 + Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc} + Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc} + +Handle Proxy Warning + [Documentation] Handle Intermediate Warnings from Proxies + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE} + Return From Keyword if '${status}' != 'PASS' + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} + Return From Keyword if '${status}' != 'PASS' + Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == '' + Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == '' + ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE} + Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} + + + + + + +Run Portal Health Check + [Documentation] Runs Portal Health check + ${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} + ${session}= Create Session portal ${PORTAL_URL} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${resp}= Get Request portal ${data_path} headers=${headers} + Log Received response from portal ${resp.text} + [Return] ${resp} + + +Portal admin Login To Portal GUI + [Documentation] Logs into Portal GUI + ## Setup Browser Now being managed by test case + #Setup Browser + Start Virtual Display 1920 1080 + Open Browser ${PORTAL_LOGIN_URL} chrome + #Go To ${PORTAL_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_URL}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${PORTAL_URL}${PORTAL_ENV} + +Portal admin Go To Portal HOME + [Documentation] Naviage to Portal Home + Go To ${PORTAL_HOME_URL} + Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + +Portal admin User Notifications + [Documentation] Naviage to User notification tab + Click Link xpath=//a[@id='parent-item-User-Notifications'] + Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button xpath=//button[@id='button-openAddNewApp'] + Click Button xpath=(//button[@id='undefined'])[1] + #Click Button xpath=//input[@id='datepicker-start'] + + + + +Portal admin Add Application Admin Exiting User + [Documentation] Naviage to Admins tab + Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Admins'] + Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain Admins + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='search-users-button-next'] + Click Button xpath=//input[@value='Select application'] + Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1] + + Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2] + #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Get Selenium Implicit Wait + Click Link xpath=//a[@aria-label='Admins'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User} + + +Portal admin Delete Application Admin Existing User + [Documentation] Naviage to Admins tab + Click Element xpath=(//span[contains(.,'portal')] )[1] + Click Element xpath=//*[@id='select-app-Virtual-Infrastructure-Deployment']/following::i[@id='i-delete-application'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2] + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal + + +Portal admin Add Application admin User New user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='next-button'] + #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${App_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${App_First_Name} + + +Portal admin Add Standard User New user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='next-button'] + #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name} + + + +Portal admin Add Application admin User New user -Test + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Test_First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Test_Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Test_Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Test_LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Test_Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Test_LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='next-button'] + #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Test_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Test_First_Name} + + + +Portal admin Add Application Admin Exiting User -APPDEMO + [Documentation] Naviage to Admins tab + Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Admins'] + Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain Admins + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + Input Text xpath=//input[@id='input-user-search'] ${App_First_Name} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='search-users-button-next'] + Click Button xpath=//input[@value='Select application'] + Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1] + + Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2] + #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Get Selenium Implicit Wait + Click Link xpath=//a[@aria-label='Admins'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )] + Input Text xpath=//input[@id='input-table-search'] ${App_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name} + + + + + + + +Portal admin Add Standard User Existing user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='next-button'] + Click Element xpath=//*[@id='div-app-name-dropdown-xDemo-App'] + Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox'] + #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App'] + #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox'] + + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + #Select From List xpath=//input[@value='Select application'] xDemo App + #Click Link xpath=//a[@title='Users'] + #Page Should Contain Users + #Focus xpath=//input[@name='dropdown1'] + + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'XDemo App')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User + + +Portal admin Edit Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Page Should Contain Users + #Click Button xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator + + + Portal admin Delete Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='new-user-save-button'] + #Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal + + + + +Functional Top Menu Get Access + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Get Access')] + Click Link xpath=//a[contains(.,'Get Access')] + Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access + + +Functional Top Menu Contact Us + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Contact Us')] + Click Link xpath=//a[contains(.,'Contact Us')] + Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us + Click Image xpath=//img[@alt='Onap Logo'] + + +Portal admin Edit Functional menu + [Documentation] Naviage to Edit Functional menu tab + Click Link xpath=//a[@title='Edit Functional Menu'] + Click Link xpath=.//*[@id='Manage']/div/a + Click Link xpath=.//*[@id='Design']/div/a + Click Link xpath=.//*[@id='Product_Design']/div/a + Open Context Menu xpath=//*[@id='Product_Design']/div/span + Click Link xpath=//a[@href='#add'] + Input Text xpath=//input[@id='input-title'] ONAP Test + #Input Text xpath=//input[@id='input-url'] http://google.com + Click Element xpath=//input[@id='select-app'] + Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-url'] http://google.com + Click Button xpath=//button[@id='button-save-continue'] + #Click Button xpath=//div[@title='Select Roles'] + Click Element xpath=//*[@id='app-select-Select Roles'] + Click Element xpath=//input[@id='Standard-User-checkbox'] + Click Element xpath=//button[@id='button-save-add'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Design')] + Set Selenium Implicit Wait 3000 + Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[@title='Edit Functional Menu'] + Click Link xpath=.//*[@id='Manage']/div/a + Click Link xpath=.//*[@id='Design']/div/a + Click Link xpath=.//*[@id='Product_Design']/div/a + Open Context Menu xpath=//*[@id='ONAP_Test'] + Click Link xpath=//a[@href='#delete'] + Set Selenium Implicit Wait 3000 + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Design')] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test + + + +Portal admin Microservice Onboarding + [Documentation] Naviage to Edit Functional menu tab + Click Link xpath=//a[@title='Microservice Onboarding'] + Click Button xpath=//button[@id='microservice-onboarding-button-add'] + Input Text xpath=//input[@name='name'] Test Microservice + Input Text xpath=//*[@name='desc'] Test + Click Element xpath=//input[@id='microservice-details-input-app'] + Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//*[@name='desc'] + Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT} + Click Element xpath=//input[@id='microservice-details-input-security-type'] + Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')] + Click Element xpath=//li[contains(.,'Basic Authentication')] + Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Button xpath=//button[@id='microservice-details-save-button'] + Table Column Should Contain xpath=//*[@table-data='serviceList'] 1 Test Microservice + #Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice + + + +Portal Admin Create Widget for All users + [Documentation] Naviage to Create Widget menu tab + ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip + Click Link xpath=//a[@title='Widget Onboarding'] + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@id='widget-onboarding-button-add'] + Input Text xpath=//*[@name='name'] ONAP-VID + Input Text xpath=//*[@name='desc'] ONAP VID + Click Element xpath=//*[@id='widgets-details-input-endpoint-url'] + Scroll Element Into View xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1] + Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment} + Click Button xpath=//button[@id='widgets-details-save-button'] + Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain ONAP-VID + Set Selenium Implicit Wait 3000 + GO TO ${PORTAL_HOME_PAGE} + + +Portal Admin Delete Widget for All users + [Documentation] Naviage to delete Widget menu tab + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + #Page Should Contain ONAP-VID + #Click Image xpath=//img[@alt='Onap Logo'] + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/followi + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID + #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] + #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID + #Set Selenium Implicit Wait 3000 + + +Portal Admin Create Widget for Application Roles + [Documentation] Naviage to Create Widget menu tab + ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//widget_news.zip + Click Link xpath=//a[@title='Widget Onboarding'] + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@id='widget-onboarding-button-add'] + Input Text xpath=//*[@name='name'] ONAP-VID + Input Text xpath=//*[@name='desc'] ONAP VID + Click Element xpath=//*[@id='widgets-details-input-endpoint-url'] + Scroll Element Into View xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//li[contains(.,'Test Microservice')] + Click element xpath=//*[@id="app-select-Select Applications"] + click element xpath=//*[@id="Virtual-Infrastructure-Deployment-checkbox"] + Click element xpath=//*[@name='desc'] + click element xpath=//*[@id="app-select-Select Roles"] + click element xpath=//*[@id="Standard-User-checkbox"] + Click element xpath=//*[@name='desc'] + Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file'] + Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment} + Click Button xpath=//button[@id='widgets-details-save-button'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Page Should Contain ONAP-VID + Set Selenium Implicit Wait 3000 + GO TO ${PORTAL_HOME_PAGE} + + + + + Portal Admin Delete Widget for Application Roles + [Documentation] Naviage to delete Widget menu tab + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + #Page Should Contain ONAP-VID + #Click Image xpath=//img[@alt='Onap Logo'] + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID + #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] + #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID + #Set Selenium Implicit Wait 3000 + + + +Portal Admin Edit Widget + [Documentation] Naviage to Home tab + #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1] + Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1] + Set Browser Implicit Wait 8000 + #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60 + Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] + Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] + Input Text xpath=//input[@name='title'] ONAP_VID + Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html + Input Text xpath=//input[@id='widget-input-add-order'] 5 + Click Link xpath=//a[contains(.,'Add New')] + Click Element xpath=//div[@id='close-button'] + Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID + Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1] + Click Element xpath=//div[@id='confirmation-button-next'] + Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID + Click Link xpath=//a[@id='close-button'] + + + + +Portal Admin Broadcast Notifications + [Documentation] Portal Test Admin Broadcast Notifications + ${CurrentDay}= Get Current Date result_format=%m/%d/%Y + ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y + ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M + ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate} + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//*[@id="parent-item-User-Notifications"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + Click button xpath=//*[@id="button-openAddNewApp"] + Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay} + Input Text xpath=//input[@id='datepicker-end'] ${NextDay} + Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation + Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg} + click element xpath=//*[@id="button-notification-save"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + click element xpath=//*[@id="megamenu-notification-button"] + click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg} + log ${AdminBroadCastMsg} + [Return] ${AdminBroadCastMsg} + +Portal Admin Category Notifications + [Documentation] Portal Admin Broadcast Notifications + ${CurrentDay}= Get Current Date result_format=%m/%d/%Y + ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y + ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M + ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate} + Click Link xpath=//a[@id='parent-item-Home'] + Click Link xpath=//*[@id="parent-item-User-Notifications"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + Click button xpath=//*[@id="button-openAddNewApp"] + #Select Radio Button NO radio-button-no + Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1] + #Select Radio Button //label[@class='radio'] radio-button-approles + Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1] + Click Element xpath=//*[contains(text(),'Virtual Infrastructure Deployment')]/preceding::input[@ng-model='member.isSelected'][1] + Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay} + Input Text xpath=//input[@id='datepicker-end'] ${NextDay} + Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation + Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg} + click element xpath=//*[@id="button-notification-save"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + click element xpath=//*[@id="megamenu-notification-button"] + click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg} + log ${AdminCategoryMsg} + [Return] ${AdminCategoryMsg} + + + Portal admin Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + Title Should Be Login + + + +Application admin Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${PORTAL_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_URL}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${App_LoginID} + Input Password xpath=//input[@ng-model='password'] ${App_Loginpwd} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${PORTAL_URL}${PORTAL_ENV} + +Application Admin Navigation Application Link Tab + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[@id='parent-item-Home'] + Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1] + Page Should Contain Welcome to VID + Click Element xpath=//i[@class='ion-close-round'] + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Application Admin Navigation Functional Menu + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Technology Insertion')] + Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')] + Page Should Contain Welcome to VID + Click Element xpath=//i[@class='ion-close-round'] + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Application admin Add Standard User Existing user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='next-button'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + #Select From List xpath=//input[@value='Select application'] Virtual Infrastructure Deployment + #Click Link xpath=//a[@title='Users'] + #Page Should Contain Users + Go To ${PORTAL_HOME_PAGE} + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User + + +Application admin Edit Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Page Should Contain Users + #Click Button xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator + + +Application admin Delete Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='new-user-save-button'] + #Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal + + + +Application admin Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + #Confirm Action + Title Should Be Login + + +Standared user Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${PORTAL_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_URL}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${Sta_LoginID} + Input Password xpath=//input[@ng-model='password'] ${Sta_Loginpwd} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${PORTAL_URL}${PORTAL_ENV} + + +Standared user Navigation Application Link Tab + [Documentation] Logs into Portal GUI as application admin + #Portal admin Go To Portal HOME + Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1] + Page Should Contain Welcome to VID + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Standared user Navigation Functional Menu + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Technology Insertion')] + Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')] + Page Should Contain Welcome to VID + Click Element xpath=(.//span[@id='tab-Home'])[1] + + + +Standared user Broadcast Notifications + [Documentation] Logs into Portal GUI as application admin + [Arguments] ${AdminBroadCastMsg} + Click element xpath=//*[@id='megamenu-notification-button'] + Click element xpath=//*[@id='notification-history-link'] + Wait until Element is visible xpath=//*[@id='app-title'] timeout=10 + Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg} + log ${AdminBroadCastMsg} + + +Standared user Category Notifications + [Documentation] Logs into Portal GUI as application admin + [Arguments] ${AdminCategoryMsg} + #click element xpath=//*[@id='megamenu-notification-button'] + #click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id='app-title'] timeout=10 + Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg} + log ${AdminCategoryMsg} + + +Standared user Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + #Confirm Action + Title Should Be Login + + + + +Tear Down + [Documentation] Close all browsers + Close All Browsers + + +Enhanced Notification on ONAP Portal + [Documentation] Runs portal Post request + [Arguments] ${data_path} ${data} +# Log Creating session ${PORTAL_URL} + ${session}= Create Session portal ${PORTAL_URL} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass + ${resp}= Post Request portal ${data_path} data=${data} headers=${headers} +# Log Received response from portal ${resp.text} + [Return] ${resp} + + + +Notification on ONAP Portal + [Documentation] Create Config portal + ${configportal}= Create Dictionary jira_id=${jira} + ${output} = Fill JSON Template File ${portal_Template} ${configportal} + ${post_resp} = Enhanced Notification on ONAP Portal ${RESOURCE_PATH} ${output} + Should Be Equal As Strings ${post_resp.status_code} 200 + + + + +Portal Application Account Management + [Documentation] Naviage to Application Account Management tab + Click Link xpath=//a[@title='App Account Management'] + Click Button xpath=//button[@id='account-onboarding-button-add'] + Input Text xpath=//input[@name='name'] JIRA + Input Text xpath=//input[@name='username'] jira + Input Text xpath=//input[@name='password'] _pass + Input Text xpath=//input[@name='repassword'] _pass + Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()'] + Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA + +Portal Application Account Management validation + [Documentation] Naviage to user notification tab + Click Link xpath=//a[@id='parent-item-User-Notifications'] + click element xpath=//*[@id="megamenu-notification-button"] + Click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA + + +Portal AAF new fields + [Documentation] Naviage to user Application details tab + Click Link xpath=//a[@title='Application Onboarding'] + Click Element xpath=//td[contains(.,'Virtual Infrastructure Deployment')] + Page Should Contain Name Space + Page Should Contain Centralized + Click Element xpath=//button[@id='button-notification-cancel'] + + diff --git a/test/csit/tests/portal/testsuites/widget_news.zip b/test/csit/tests/portal/testsuites/widget_news.zip new file mode 100644 index 000000000..532cf6105 Binary files /dev/null and b/test/csit/tests/portal/testsuites/widget_news.zip differ -- cgit 1.2.3-korg