summaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/portal/testsuites/test1.robot367
1 files changed, 216 insertions, 151 deletions
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()