diff options
-rw-r--r-- | deployment/heat/onap-oom/env/default/integration-override.yaml | 139 | ||||
-rw-r--r-- | deployment/heat/onap-oom/k8s_vm_entrypoint.sh | 8 | ||||
-rw-r--r-- | test/csit/plans/aaf/aafapi/setup.sh | 17 | ||||
-rw-r--r-- | test/csit/plans/aaf/aafapi/teardown.sh | 6 | ||||
-rwxr-xr-x | test/csit/scripts/common_functions.sh | 17 | ||||
-rw-r--r-- | test/csit/tests/portal/testsuites/test1.robot | 367 |
6 files changed, 394 insertions, 160 deletions
diff --git a/deployment/heat/onap-oom/env/default/integration-override.yaml b/deployment/heat/onap-oom/env/default/integration-override.yaml new file mode 100644 index 000000000..f9f91e7aa --- /dev/null +++ b/deployment/heat/onap-oom/env/default/integration-override.yaml @@ -0,0 +1,139 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This override file is useful to test one or more subcharts. +# It overrides the default ONAP parent chart behaviour to deploy +# all of ONAP. +# +# Example use to enable a single subchart (from this directory): +# +# helm install local/onap -n onap --namespace onap -f disable-allcharts.yaml --set so.enabled=true + + +################################################################# +# Global configuration overrides. +# +# These overrides will affect all helm charts (ie. applications) +# that are listed below and are 'enabled'. +################################################################# +global: + # Change to an unused port prefix range to prevent port conflicts + # with other instances running within the same k8s cluster + nodePortPrefix: 302 + + # local nexus proxy - nexus3 default + repository: nexus3.onap.org:10001 + # image pull policy + #pullPolicy: Always + pullPolicy: IfNotPresent + + + # default mount path root directory referenced + # by persistent volumes and log files +# persistence: +# mountPath: /onapdata + +################################################################# +# Enable/disable and configure helm charts (ie. applications) +# to customize the ONAP deployment. +################################################################# +aaf: + enabled: true +aai: + enabled: true + # aai subchart image overrides + aai-champ: + image: onap/champ:1.2-STAGING-latest + aai-data-router: + image: onap/data-router:1.2-STAGING-latest + aai-modelloader: + image: onap/model-loader:1.2-STAGING-latest + aai-resources: + image: onap/aai-resources:1.2-STAGING-latest + aai-search-data: + image: onap/search-data-service:1.2-STAGING-latest + aai-sparky-be: + image: onap/sparky-be:1.2-STAGING-latest + aai-traveral: + image: onap/aai-traversal:1.2-STAGING-latest +appc: + enabled: false +clamp: + enabled: true +cli: + enabled: true +consul: + enabled: true +dcaegen2: + enabled: false +esr: + enabled: true + # esr parent chart (server) image override + image: onap/aai/esr-server:1.1.0-SNAPSHOT + # esr subchart omage override + esr-gui: + image: onap/aai/esr-gui:1.1.0-SNAPSHOT +log: + enabled: true +message-router: + enabled: true +# kafka: +# repositoryOverride: docker.io +# image: wurstmeister/kafka:latest +mock: + enabled: true +msb: + enabled: true +multicloud: + enabled: true +policy: + enabled: true +portal: + enabled: true +robot: + enabled: true + #pullPolicy: Always +# config: + # openstack configuration + openStackUserName: "demo" + openStackRegion: "RegionOne" + openStackKeyStoneUrl: "http://10.12.25.2:5000" + openStackServiceTenantName: "service" + #openStackEncryptedPasswordHere: "c124921a3a0efbe579782cde8227681e" + openStackPassword: "onapdemo" + openStackPublicNetId: "971040b2-7059-49dc-b220-4fab50cb2ad4" + openStackTenantId: "d570c718cbc545029f40e50b75eb13df" +sdc: + enabled: true +sdnc: + enabled: true +so: + enabled: true + # so server configuration + config: + # openstack configuration + openStackUserName: "demo" + openStackRegion: "RegionOne" + openStackKeyStoneUrl: "http://10.12.25.2:5000" + openStackServiceTenantName: "service" + openStackEncryptedPasswordHere: "bbaef6cd76625ab9eb60deedeae7dbb9" + +uui: + enabled: true +vfc: + enabled: true +vid: + enabled: true +vnfsdk: + enabled: true diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh index f4c6eb6a5..7e8ca46fe 100644 --- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -145,6 +145,7 @@ git log -1 cd ~ ln -s ~/integration/deployment/heat/onap-oom/env/__lab_name__/integration-override.yaml +sed -i 's/nexus3.onap.org:10001/__docker_proxy__/g' integration-override.yaml # version control the persistence volume to see what's happening @@ -168,7 +169,12 @@ helm repo add local http://127.0.0.1:8879 helm repo list make all helm search -l | grep local -helm install local/onap -n dev --namespace onap -f ~/integration/deployment/heat/onap-oom/env/__lab_name__/integration-override.yaml +if [ -e ~/integration-override.yaml ]; then + helm install local/onap -n dev --namespace onap -f ~/integration-override.yaml +else + helm install local/onap -n dev --namespace onap +fi + # Check ONAP status: sleep 3 diff --git a/test/csit/plans/aaf/aafapi/setup.sh b/test/csit/plans/aaf/aafapi/setup.sh index 4a312704f..add9ae17e 100644 --- a/test/csit/plans/aaf/aafapi/setup.sh +++ b/test/csit/plans/aaf/aafapi/setup.sh @@ -37,12 +37,15 @@ chmod -R 777 $WORKSPACE/archives/aafcsit/authz/auth/auth-service/src/main/resour # start aaf containers with docker compose and configuration from docker-compose.yml docker-compose up -d +export aaf_service=$(get_docker_compose_service aaf_container) +export cassandra_service=$(get_docker_compose_service cassandra_container) -# Wait for initialization of Docker contaienr for AAF & Cassandra +# Wait for initialization of Docker container for AAF & Cassandra for i in {1..12}; do - if [ $(docker inspect --format '{{ .State.Running }}' dockercompose_aaf_container_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' dockercompose_cassandra_container_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' dockercompose_aaf_container_1) ] + + if [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' $cassandra_service) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] then echo "AAF Service Running" break @@ -53,9 +56,11 @@ for i in {1..12}; do done -AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_aaf_container_1) -CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_cassandra_container_1) +AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $aaf_service) +CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $cassandra_service) +bypass_ip_adress $AAF_IP +bypass_ip_adress $CASSANDRA_IP echo AAF_IP=${AAF_IP} echo CASSANDRA_IP=${CASSANDRA_IP} diff --git a/test/csit/plans/aaf/aafapi/teardown.sh b/test/csit/plans/aaf/aafapi/teardown.sh index 1f7b2853d..41e0b00ea 100644 --- a/test/csit/plans/aaf/aafapi/teardown.sh +++ b/test/csit/plans/aaf/aafapi/teardown.sh @@ -17,6 +17,8 @@ # Modifications copyright (c) 2017 AT&T Intellectual Property # -kill-instance.sh dockercompose_aaf_container_1 -kill-instance.sh dockercompose_cassandra_container_1 +kill-instance.sh $aaf_service +kill-instance.sh $cassandra_service +unset aaf_service +unset cassandra_service diff --git a/test/csit/scripts/common_functions.sh b/test/csit/scripts/common_functions.sh index 69856dab3..4293a526c 100755 --- a/test/csit/scripts/common_functions.sh +++ b/test/csit/scripts/common_functions.sh @@ -233,3 +233,20 @@ function run_simulator_docker () ROBOT_VARIABLES=${ROBOT_VARIABLES}" -v SIMULATOR_IP:${SIMULATOR_IP} -v SCRIPTS:${SCRIPTS}" echo ${ROBOT_VARIABLES} } + +function get_docker_compose_service () +{ + local service=$1 + local compose_file=${2:-docker-compose.yml} + + echo $(docker-compose --file ./${compose_file} ps | grep $service | cut -d " " -f1 ) +} + +function bypass_ip_adress () +{ + local ip_address=$1 + + if [[ $no_proxy && $no_proxy != *$ip_address* ]]; then + export no_proxy=$no_proxy,$ip_address + fi +} diff --git a/test/csit/tests/portal/testsuites/test1.robot b/test/csit/tests/portal/testsuites/test1.robot index 90aa10788..b2728f06f 100644 --- a/test/csit/tests/portal/testsuites/test1.robot +++ b/test/csit/tests/portal/testsuites/test1.robot @@ -1,17 +1,17 @@ *** Settings *** Documentation This is RobotFrame work script -Library ExtendedSelenium2Library -Library OperatingSystem -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 json_templater.robot - +Library ExtendedSelenium2Library +Library OperatingSystem +Library eteutils/RequestsClientCert.py +Library RequestsLibrary +Library eteutils/UUID.py +Library DateTime +Library Collections +Library eteutils/OSUtils.py +Library eteutils/StringTemplater.py +Library String +Library XvfbRobot +Resource json_templater.robot *** Variables *** ${PORTAL_URL} http://portal.api.simpledemo.onap.org:8989 @@ -44,6 +44,9 @@ ${PORTAL_ASSETS_DIRECTORY} ${CURDIR} ${GLOBAL_APPLICATION_ID} robot-functional ${GLOBAL_PORTAL_ADMIN_USER} demo ${GLOBAL_PORTAL_ADMIN_PWD} demo123456! +${AppAccountName} testApp +${AppUserName} testApp +${AppPassword} testApp123! ${GLOBAL_MSO_STATUS_PATH} /ecomp/mso/infra/orchestrationRequests/v2/ ${GLOBAL_SELENIUM_BROWSER} chrome ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary @@ -63,7 +66,8 @@ ${RESOURCE_PATH} ONAPPORTAL/auxapi/ticketevent ${portal_Template} ${CURDIR}/portal.template ${Result} FALSE - +${td_id} 0 +${download_link_id} 0 *** Test Cases *** @@ -82,114 +86,125 @@ Portal R1 Release for AAF [Documentation] ONAP Portal R1 functionality for AAF test Portal AAF new fields -#Create Microse service onboarding - #Portal admin Microservice Onboarding +Create Microse service onboarding + Portal admin Microservice Onboarding -#Delete Microse service - #Portal admin Microservice Delete +##Delete Microse service + ##Portal admin Microservice Delete -#Create Widget for all users - #Portal Admin Create Widget for All users +Create Widget for all users + Portal Admin Create Widget for All users -# Delete Widget for all users - # Portal Admin Delete Widget for All users +Delete Widget for all users + Portal Admin Delete Widget for All users -#Create Widget for Application Roles - #Portal Admin Create Widget for Application Roles +Create Widget for Application Roles + Portal Admin Create Widget for Application Roles #Delete Widget for Application Roles - #Portal Admin Delete Widget for Application Roles + #Portal Admin Delete Widget for Application Roles -#Validate Functional Top Menu Get Access - #Functional Top Menu Get Access +#EP Admin widget download + #Admin widget download -#Validate Functional Top Menu Contact Us - #Functional Top Menu Contact Us +#EP Admin widget layout reset + #Reset widget layout option + +Validate Functional Top Menu Get Access + Functional Top Menu Get Access -#Edit Functional Menu - #Portal admin Edit Functional menu +Validate Functional Top Menu Contact Us + Functional Top Menu Contact Us +Edit Functional Menu + Portal admin Edit Functional menu -# Broadbond Notification functionality - # ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications - # set global variable ${AdminBroadCastMsg} +Broadbond Notification functionality + ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications + set global variable ${AdminBroadCastMsg} -# Category Notification functionality - # ${AdminCategoryMsg}= Portal Admin Category Notifications - # set global variable ${AdminCategoryMsg} +Category Notification functionality + ${AdminCategoryMsg}= Portal Admin Category Notifications + set global variable ${AdminCategoryMsg} -#Create a Test user for Application Admin -Test - #Portal admin Add Application admin User New user -Test +Create a Test user for Application Admin -Test + Portal admin Add Application admin User New user -Test -#Create a Test User for Apllication Admin - #Portal admin Add Application admin User New user +Create a Test User for Apllication Admin + Portal admin Add Application admin User New user -#Add Application Admin for Existing User Test user - #Portal admin Add Application Admin Exiting User -APPDEMO +Add Application Admin for Existing User Test user + Portal admin Add Application Admin Exiting User -APPDEMO -#Create a Test user for Standared User - #Portal admin Add Standard User New user +Create a Test user for Standared User + Portal admin Add Standard User New user -#Add Application Admin for Exisitng User - #Portal admin Add Application Admin Exiting User +Add Application Admin for Exisitng User + Portal admin Add Application Admin Exiting User -#Delete Application Admin for Exisitng User - #Portal admin Delete Application Admin Existing User +Delete Application Admin for Exisitng User + Portal admin Delete Application Admin Existing User -# Add Standard User Role for Existing user - # Portal admin Add Standard User Existing user +#Add Standard User Role for Existing user + #Portal admin Add Standard User Existing user -# Edit Standard User Role for Existing user - # Portal admin Edit Standard User Existing user +#Edit Standard User Role for Existing user + #Portal admin Edit Standard User Existing user - #Delete Standard User Role for Existing user - #Portal admin Delete Standard User Existing user - + #Portal admin Delete Standard User Existing user + +#Add Account new account from App Account Management + #Portal admin Add New Account + +#Delete Account new account from App Account Management + #Portal admin Delete Account + Logout from Portal GUI as Portal Admin - Portal admin Logout from Portal GUI + Portal admin Logout from Portal GUI -# Application Admin user Test cases +## Application Admin user Test cases -#Login To Portal GUI as APP Admin - #Application admin Login To Portal GUI +Login To Portal GUI as APP Admin + Application admin Login To Portal GUI ##Navigate Functional Link as APP Admin -## Application Admin Navigation Functional Menu + ##Application Admin Navigation Functional Menu -# Add Standard User Role for Existing user as APP Admin - # Application admin Add Standard User Existing user +#Add Standard User Role for Existing user as APP Admin + #Application admin Add Standard User Existing user -# Edit Standard User Role for Existing user as APP Admin - # Application admin Edit Standard User Existing user +#Edit Standard User Role for Existing user as APP Admin + #Application admin Edit Standard User Existing user -# Delete Standard User Role for Existing user as APP Admin - # Application admin Delete Standard User Existing user +#Delete Standard User Role for Existing user as APP Admin + #Application admin Delete Standard User Existing user -# #Navigate Application Link as APP Admin -# # Application Admin Navigation Application Link Tab +#Navigate Application Link as APP Admin + #Application Admin Navigation Application Link Tab -#Logout from Portal GUI as APP Admin - #Application admin Logout from Portal GUI +Logout from Portal GUI as APP Admin + Application admin Logout from Portal GUI -#Standard User Test cases +##Standard User Test cases -#Login To Portal GUI as Standared User - #Standared user Login To Portal GUI +Login To Portal GUI as Standared User + Standared user Login To Portal GUI #Navigate Application Link as Standared User -# Standared user Navigation Application Link Tab + #Standared user Navigation Application Link Tab -##Navigate Functional Link as Standared User -## Standared user Navigation Functional Menu - +#Navigate Functional Link as Standared User + #Standared user Navigation Functional Menu -# Broadcast Notifications Standared user - # Standared user Broadcast Notifications ${AdminBroadCastMsg} +#Broadcast Notifications Standared user + #Standared user Broadcast Notifications ${AdminBroadCastMsg} -# Category Notifications Standared user - # Standared user Category Notifications ${AdminCategoryMsg} +#Category Notifications Standared user + #Standared user Category Notifications ${AdminCategoryMsg} +Logout from Portal GUI as Standared User + Standared User Logout from Portal GUI Teardown [Documentation] Close All Open browsers @@ -231,6 +246,7 @@ Run 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} @@ -259,7 +275,8 @@ Portal admin Login To Portal GUI 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} + #Execute Javascript document.getElementById('w-ecomp-footer').style.display = 'none' + Log Logged in to ${PORTAL_URL}${PORTAL_ENV} Portal admin Go To Portal HOME [Documentation] Naviage to Portal Home @@ -272,10 +289,7 @@ Portal admin 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'] - - - + #Click Button xpath=//input[@id='datepicker-start'] Portal admin Add Application Admin Exiting User [Documentation] Naviage to Admins tab @@ -458,8 +472,6 @@ Portal admin Add Application admin User New user -Test #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} @@ -520,18 +532,41 @@ Portal admin Add Standard User Existing user Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User Set Selenium Implicit Wait 3000 -Portal admin Edit Standard User Existing user +Portal admin Edit Standard User Existing user [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + # Click Element xpath=//li[contains(.,'Default')] +# Set Selenium Implicit Wait 3000 + Click Element xpath=//li[contains(.,'xDemo App')] +# Set Selenium Implicit Wait 3000 + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] -# Click Element xpath=//*[@id='div-app-name-dropdown-Default'] -# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox'] -# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox'] - 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=//*[@id='div-app-name-xDemo-App']/following::input[@id='Portal-Notification-Admin-checkbox'] -# Click Element xpath=//*[@id='div-app-name-dropdown-SDC'] -# Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox'] -# Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox'] + # Click Element xpath=//*[@id='div-app-name-dropdown-Default'] + # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox'] + # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox'] + Click Element xpath=//*[@id='app-select-Standard User1'] + Click Element xpath=//*[@id='app-select-Standard User1']/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 + + 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=//div[@id='app-select-Select roles1'] + Click Element xpath=//div[@id='app-select-Select roles1']/following::input[@id='System-Administrator-checkbox'] + Set Selenium Implicit Wait 3000 +# Click Element xpath=//*[@id='app-select-Standard User1'] +# Click Element xpath=//*[@id='app-select-Standard User1']/following::input[@id='System-Administrator-checkbox'] + # Click Element xpath=//*[@id='div-app-name-dropdown-SDC'] + # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Standard-User-checkbox'] + # Click Element xpath=//*[@id='div-app-name-SDC']/following::input[@id='Portal-Notification-Admin-checkbox'] Set Selenium Implicit Wait 3000 Click Button xpath=//button[@id='new-user-save-button'] Set Selenium Implicit Wait 3000 @@ -539,6 +574,7 @@ Portal admin Edit Standard User Existing user #Click Button xpath=//input[@id='dropdown1'] #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] Portal Notification Admin Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator Set Selenium Implicit Wait 3000 @@ -561,6 +597,7 @@ Portal admin Edit Standard User Existing user Functional Top Menu Get Access [Documentation] Naviage to Support tab + Go To ${PORTAL_HOME_URL} Click Link xpath=//a[contains(.,'Support')] Mouse Over xpath=//*[contains(text(),'Get Access')] Click Link xpath=//a[contains(.,'Get Access')] @@ -618,7 +655,8 @@ Portal admin Edit Functional menu Set Selenium Implicit Wait 3000 Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test Set Selenium Implicit Wait 3000 - + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 Portal admin Microservice Onboarding [Documentation] Naviage to Edit Functional menu tab @@ -658,7 +696,7 @@ Portal admin Microservice Delete 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 TestMS + Execute Javascript window.scrollTo(0,document.body.scrollHeight); Click Element xpath=(.//*[contains(text(),'TestMS')]/following::*[@ng-click='microserviceOnboarding.deleteService(rowData)'])[1] Click Button xpath=//button[@id="div-confirm-ok-button"] Set Selenium Implicit Wait 3000 @@ -666,20 +704,21 @@ Portal admin Microservice Delete Portal Admin Create Widget for All users [Documentation] Navigate to Create Widget menu tab ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}//news_widget.zip + Wait until page contains Element xpath=//a[@title='Widget Onboarding'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 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-xDemo Input Text xpath=//*[@name='desc'] ONAP xDemo 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')] + Scroll Element Into View xpath=//li[contains(.,'News Microservice')] + Click Element xpath=//li[contains(.,'News 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-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Wait Until Page Contains ONAP-xDemo ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} Page Should Contain ONAP-xDemo - Set Selenium Implicit Wait 3000 + Set Selenium Implicit Wait 3000 GO TO ${PORTAL_HOME_PAGE} @@ -711,12 +750,12 @@ Portal Admin Create Widget for Application Roles Input Text xpath=//*[@name='name'] ONAP-xDemo Input Text xpath=//*[@name='desc'] ONAP xDemo 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')] + Scroll Element Into View xpath=//li[contains(.,'News Microservice')] + Click Element xpath=//li[contains(.,'News Microservice')] Click element xpath=//*[@id="app-select-Select Applications"] click element xpath=//*[@id="xDemo-App-checkbox"] Click element xpath=//*[@name='desc'] - click element xpath=//*[@id="app-select-Select Roles"] + click element xpath=//*[@id="app-select-Select Roles0"] click element xpath=//*[@id="Standard-User-checkbox"] Click element xpath=//*[@name='desc'] Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file'] @@ -775,12 +814,12 @@ Portal Admin Edit Widget Portal Admin Broadcast Notifications [Documentation] Portal Test Admin Broadcast Notifications - ${CurrentDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y ${NextDay}= Get Current Date increment=48:00:00 result_format=%m/%d/%Y ${CurrentDate}= Get Current Date increment=24:00:00 result_format=%m%d%y%H%M ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate} - Click Image xpath=//img[@alt='Onap Logo'] + Go To ${PORTAL_HOME_URL} + 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 @@ -793,8 +832,9 @@ Portal Admin Broadcast Notifications 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} +# Notification bug, Uncomment the code when PORTAL-232 is fixed + # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg} Set Selenium Implicit Wait 3000 log ${AdminBroadCastMsg} [Return] ${AdminBroadCastMsg} @@ -823,21 +863,19 @@ Portal Admin Category Notifications 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} +# Notification bug, Uncomment the code when PORTAL-232 is fixed + # Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + # Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg} Set Selenium Implicit Wait 3000 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 @@ -876,7 +914,7 @@ Application Admin Navigation Functional Menu Click Element xpath=(.//span[@id='tab-Home'])[1] -Application admin Add Standard User Existing user +Application admin Add Standard User Existing user [Documentation] Naviage to Users tab Click Link xpath=//a[@title='Users'] Page Should Contain Users @@ -887,9 +925,10 @@ Application admin Add Standard User Existing user 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'] - Set Selenium Implicit Wait 3000 Click Element xpath=//*[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox'] - Set Selenium Implicit Wait 3000 + # Click Element xpath=//*[@id='div-app-name-dropdown-Default'] + # Click Element xpath=//*[@id='div-app-name-Default']/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} @@ -900,20 +939,21 @@ Application admin Add Standard User Existing user Set Selenium Implicit Wait 3000 Click Link xpath=//a[@title='Users'] Click Element xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Default')] 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] Account Administrator Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User - -Application admin Edit Standard User Existing 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-Default'] -# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox'] -# Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox'] + # Click Element xpath=//*[@id='div-app-name-dropdown-Default'] + # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Standard-User-checkbox'] + # Click Element xpath=//*[@id='div-app-name-Default']/following::input[@id='Portal-Notification-Admin-checkbox'] 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=//*[@id='div-app-name-xDemo-App']/following::input[@id='Portal-Notification-Admin-checkbox'] + Click Element xpath=//*[@id='div-app-name-xDemo-App']/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 @@ -921,9 +961,9 @@ Application admin Edit Standard User Existing user #Click Button xpath=//input[@id='dropdown1'] #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] Account Administrator 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] @@ -939,8 +979,6 @@ Application admin Delete Standard User Existing user #Click Image xpath=//img[@alt='Onap Logo'] Set Selenium Implicit Wait 3000 - - Application admin Logout from Portal GUI [Documentation] Logout from Portal GUI Click Element xpath=//div[@id='header-user-icon'] @@ -948,10 +986,6 @@ Application admin Logout from Portal GUI Click Button xpath=//button[contains(text(),'Log out')] #Set Selenium Implicit Wait 3000 Title Should Be Login - - - - Standared user Login To Portal GUI [Documentation] Logs into Portal GUI @@ -970,7 +1004,6 @@ Standared user Login To Portal GUI 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 @@ -1008,7 +1041,6 @@ Standared user Category Notifications 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'] @@ -1016,35 +1048,48 @@ Standared user Logout from Portal GUI #Confirm Action Title Should Be Login - - - -Tear Down +Portal admin Add New Account + Click Link //*[@id="parent-item-App-Account-Management"] + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Set Selenium Implicit Wait 3000 + Click Button //*[@id="account-onboarding-button-add"] + Set Selenium Implicit Wait 3000 + Input Text //*[@id="account-details-input-name"] ${AppAccountName} + Input Text //*[@id="account-details-input-username"] ${AppUserName} + Input Text //*[@id="account-details-input-password"] ${AppPassword} + Input Text //*[@id="account-details-input-repassword"] ${AppPassword} + # Click Button xpath=//*[@ng-click='accountAddDetails.saveChanges()'] + # #Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + #account-details-next-button + Click Button xpath=//button[@ng-click='accountAddDetails.saveChanges()'] + +Portal admin Delete Account + Click Link //*[@id="parent-item-App-Account-Management"] + Click Button xpath=//button[@ng-click='toggleSidebar()'] + Set Selenium Implicit Wait 3000 + Click Button //*[@id="account-onboarding-button-add"] + Set Selenium Implicit Wait 3000 + +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 ${GLOBAL_PORTAL_SERVER_URL} + # Log Creating session ${GLOBAL_PORTAL_SERVER_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} + # 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 @@ -1057,7 +1102,7 @@ Portal Application Account Management Click Element xpath=//div[@ng-click='accountAddDetails.saveChanges()'] Element Text Should Be xpath=//*[@table-data='serviceList'] JIRA -Portal Application Account Management validation +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"] @@ -1066,7 +1111,7 @@ Portal Application Account Management validation Table Column Should Contain xpath=//*[@id="notification-history-table"] 1 JIRA -Portal AAF new fields +Portal AAF new fields [Documentation] Naviage to user Application details tab Click Link xpath=//a[@title='Application Onboarding'] Click Element xpath=//td[contains(.,'xDemo App')] @@ -1074,5 +1119,25 @@ Portal AAF new fields Page Should Contain Centralized Click Element xpath=//button[@id='button-notification-cancel'] - - +Admin widget download + Go To ${PORTAL_HOME_URL} + 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 + log ${td_id} + ${test}= Get Substring ${td_id} -1 + log ${test} + ${download_link_id}= Catenate 'widget-onboarding-div-download-widget-${test}' + click Element xpath=//*[@id=${download_link_id}] + +Reset widget layout option + Go To ${PORTAL_HOME_URL} + Wait Until Page Contains Element xpath=//div[@id='widget-boarder'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Execute Javascript document.getElementById('widgets').scrollTo(0,1400) + Wait Until Page Contains Element xpath=//*[@id='widget-gridster-Events-icon'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Execute Javascript document.getElementById('widgets').scrollTo(0,1800) + Drag And Drop By Offset xpath=//*[@id='widget-gridster-Events-icon'] 500 500 + Execute Javascript document.getElementById('widgets').scrollTo(0,document.getElementById('widgets').scrollHeight); + Execute Javascript document.getElementById('dashboardDefaultPreference').click() + Execute Javascript document.getElementById('div-confirm-ok-button').click() |