2018-09-19 18:57:15 +02:00
|
|
|
# Copyright Project Harbor Authors
|
2017-08-07 08:02:38 +02:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
*** Settings ***
|
|
|
|
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
|
|
|
Resource ../../resources/Util.robot
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Init LDAP
|
|
|
|
${rc} ${output}= Run And Return Rc And Output ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'
|
|
|
|
Log ${output}
|
|
|
|
Sleep 2
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapUrl'] ldaps://${output}
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapSearchDN'] cn=admin,dc=example,dc=com
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapSearchPwd'] admin
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapBaseDN'] dc=example,dc=com
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapFilter'] (&(objectclass=inetorgperson)(memberof=cn=harbor_users,ou=groups,dc=example,dc=com))
|
2017-11-29 12:29:51 +01:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapUid'] cn
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
|
|
|
Capture Page Screenshot
|
2017-11-01 11:19:58 +01:00
|
|
|
Disable Ldap Verify Cert Checkbox
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_auth_save_button_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 2
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=/html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3]
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 1
|
|
|
|
Capture Page Screenshot
|
|
|
|
|
|
|
|
Switch To Configure
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 2
|
|
|
|
|
2017-11-01 11:19:58 +01:00
|
|
|
Test Ldap Connection
|
|
|
|
${rc} ${output}= Run And Return Rc And Output ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'
|
|
|
|
Log ${output}
|
|
|
|
Sleep 2
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapUrl'] ldaps://${output}
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapSearchDN'] cn=admin,dc=example,dc=com
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapSearchPwd'] admin
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapBaseDN'] dc=example,dc=com
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='ldapUid'] cn
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
|
|
|
|
|
|
|
# default is checked, click test connection to verify fail as no cert.
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${test_ldap_xpath}
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 1
|
|
|
|
Wait Until Page Contains Failed to verify LDAP server with error
|
|
|
|
Sleep 5
|
|
|
|
|
|
|
|
Disable Ldap Verify Cert Checkbox
|
|
|
|
# ldap checkbox unchecked, click test connection to verify success.
|
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${test_ldap_xpath}
|
2017-11-01 11:19:58 +01:00
|
|
|
Capture Page Screenshot
|
|
|
|
Wait Until Page Contains Connection to LDAP server is verified timeout=15
|
|
|
|
|
2018-01-23 06:04:19 +01:00
|
|
|
Test LDAP Server Success
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${test_ldap_xpath}
|
2018-01-23 06:04:19 +01:00
|
|
|
Wait Until Page Contains Connection to LDAP server is verified timeout=15
|
|
|
|
|
2017-11-01 11:19:58 +01:00
|
|
|
Disable Ldap Verify Cert Checkbox
|
2019-01-30 07:22:31 +01:00
|
|
|
Mouse Down xpath=//*[@id='clr-checkbox-ldapVerifyCert']
|
|
|
|
Mouse Up xpath=//*[@id='clr-checkbox-ldapVerifyCert']
|
2017-11-01 11:19:58 +01:00
|
|
|
Sleep 2
|
|
|
|
Capture Page Screenshot
|
|
|
|
Ldap Verify Cert Checkbox Should Be Disabled
|
|
|
|
|
|
|
|
Ldap Verify Cert Checkbox Should Be Disabled
|
2019-01-30 07:22:31 +01:00
|
|
|
Checkbox Should Not Be Selected xpath=//*[@id='clr-checkbox-ldapVerifyCert']
|
2017-11-01 11:19:58 +01:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
Set Pro Create Admin Only
|
2017-09-07 12:29:05 +02:00
|
|
|
#set limit to admin only
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 2
|
2019-09-12 07:56:56 +02:00
|
|
|
Retry Element Click xpath=${configuration_system_tabsheet_id}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//select[@id='proCreation']
|
|
|
|
Retry Element Click xpath=//select[@id='proCreation']//option[@value='adminonly']
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_system_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Capture Page Screenshot AdminCreateOnly.png
|
|
|
|
|
2018-08-08 04:48:21 +02:00
|
|
|
Set Pro Create Every One
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2018-08-08 04:48:21 +02:00
|
|
|
sleep 1
|
2018-01-05 07:09:03 +01:00
|
|
|
#set limit to Every One
|
2019-09-12 07:56:56 +02:00
|
|
|
Retry Element Click xpath=${configuration_system_tabsheet_id}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//select[@id='proCreation']
|
|
|
|
Retry Element Click xpath=//select[@id='proCreation']//option[@value='everyone']
|
|
|
|
Sleep 1
|
|
|
|
Retry Element Click xpath=${config_system_save_button_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
Sleep 2
|
2017-09-07 12:29:05 +02:00
|
|
|
Capture Page Screenshot EveryoneCreate.png
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2018-01-05 07:09:03 +01:00
|
|
|
Disable Self Reg
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
Mouse Down xpath=${self_reg_xpath}
|
|
|
|
Mouse Up xpath=${self_reg_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
|
|
|
Self Reg Should Be Disabled
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_auth_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Capture Page Screenshot DisableSelfReg.png
|
|
|
|
Sleep 1
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
Enable Self Reg
|
2017-09-07 12:29:05 +02:00
|
|
|
Mouse Down xpath=${self_reg_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
Mouse Up xpath=${self_reg_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
|
|
|
Self Reg Should Be Enabled
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_auth_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Capture Page Screenshot EnableSelfReg.png
|
|
|
|
Sleep 1
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Self Reg Should Be Disabled
|
2017-09-07 12:29:05 +02:00
|
|
|
Checkbox Should Not Be Selected xpath=${self_reg_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Self Reg Should Be Enabled
|
2017-09-07 12:29:05 +02:00
|
|
|
Checkbox Should Be Selected xpath=${self_reg_xpath}
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Project Creation Should Display
|
2019-12-24 04:40:10 +01:00
|
|
|
Retry Wait Until Page Contains Element xpath=${project_create_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Project Creation Should Not Display
|
2019-12-24 04:40:10 +01:00
|
|
|
Retry Wait Until Page Not Contains Element xpath=${project_create_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
## System settings
|
2017-08-07 08:02:38 +02:00
|
|
|
Switch To System Settings
|
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2019-09-12 07:56:56 +02:00
|
|
|
Retry Element Click xpath=${configuration_system_tabsheet_id}
|
|
|
|
Sleep 1
|
|
|
|
|
|
|
|
Switch To Project Quotas
|
2019-12-30 07:11:19 +01:00
|
|
|
Sleep 1
|
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2019-09-12 07:56:56 +02:00
|
|
|
Sleep 1
|
2019-10-30 06:56:55 +01:00
|
|
|
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Project Quotas')]
|
2019-09-12 07:56:56 +02:00
|
|
|
Sleep 1
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Modify Token Expiration
|
2017-09-07 12:29:05 +02:00
|
|
|
[Arguments] ${minutes}
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='tokenExpiration'] ${minutes}
|
2019-08-21 08:12:12 +02:00
|
|
|
Click Button xpath=${config_system_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Token Must Be Match
|
2017-09-07 12:29:05 +02:00
|
|
|
[Arguments] ${minutes}
|
2019-01-30 07:22:31 +01:00
|
|
|
Textfield Value Should Be xpath=//*[@id='tokenExpiration'] ${minutes}
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
## Replication
|
|
|
|
Check Verify Remote Cert
|
|
|
|
Mouse Down xpath=//*[@id='clr-checkbox-verifyRemoteCert']
|
2019-01-30 07:22:31 +01:00
|
|
|
Mouse Up xpath=//*[@id='clr-checkbox-verifyRemoteCert']
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Capture Page Screenshot RemoteCert.png
|
|
|
|
Sleep 1
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Switch To System Replication
|
|
|
|
Sleep 1
|
|
|
|
Switch To Configure
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//*[@id='config-replication']
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Should Verify Remote Cert Be Enabled
|
2019-01-30 07:22:31 +01:00
|
|
|
Checkbox Should Not Be Selected xpath=//*[@id='clr-checkbox-verifyRemoteCert']
|
2017-09-07 12:29:05 +02:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
## Email
|
2017-08-07 08:02:38 +02:00
|
|
|
Switch To Email
|
2017-09-07 12:29:05 +02:00
|
|
|
Switch To Configure
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//*[@id='config-email']
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Config Email
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='mailServer'] smtp.vmware.com
|
|
|
|
Input Text xpath=//*[@id='emailPort'] 25
|
2019-08-21 08:12:12 +02:00
|
|
|
Input Text xpath=//*[@id='emailUsername'] example@vmware.com
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='emailPassword'] example
|
|
|
|
Input Text xpath=//*[@id='emailFrom'] example<example@vmware.com>
|
2019-09-05 09:13:13 +02:00
|
|
|
Sleep 1
|
|
|
|
Retry Element Click xpath=//*[@id='emailSSL-wrapper']/label
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 1
|
2019-09-05 09:13:13 +02:00
|
|
|
Retry Element Click xpath=//*[@id='emailInsecure-wrapper']/label
|
2017-10-30 03:34:43 +01:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${config_email_save_button_xpath}
|
2017-09-07 12:29:05 +02:00
|
|
|
Sleep 6
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Verify Email
|
2019-01-30 07:22:31 +01:00
|
|
|
Textfield Value Should Be xpath=//*[@id='mailServer'] smtp.vmware.com
|
|
|
|
Textfield Value Should Be xpath=//*[@id='emailPort'] 25
|
|
|
|
Textfield Value Should Be xpath=//*[@id='emailUsername'] example@vmware.com
|
|
|
|
Textfield Value Should Be xpath=//*[@id='emailFrom'] example<example@vmware.com>
|
|
|
|
Checkbox Should Be Selected xpath=//*[@id='emailSSL']
|
|
|
|
Checkbox Should Not Be Selected xpath=//*[@id='emailInsecure']
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Set Scan All To None
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //vulnerability-config//select
|
|
|
|
Retry Element Click //vulnerability-config//select/option[@value='none']
|
2017-08-07 08:02:38 +02:00
|
|
|
sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click ${vulnerbility_save_button_xpath}
|
2018-03-26 03:22:35 +02:00
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Set Scan All To Daily
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //vulnerability-config//select
|
|
|
|
Retry Element Click //vulnerability-config//select/option[@value='daily']
|
2017-08-07 08:02:38 +02:00
|
|
|
sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click ${vulnerbility_save_button_xpath}
|
2018-03-26 03:22:35 +02:00
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Click Scan Now
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click //vulnerability-config//button[contains(.,'SCAN')]
|
2018-03-26 03:22:35 +02:00
|
|
|
|
2018-03-30 05:38:45 +02:00
|
|
|
|
2018-03-26 03:22:35 +02:00
|
|
|
Enable Read Only
|
2020-03-22 03:48:52 +01:00
|
|
|
${rc} ${output}= Run And Return Rc And Output curl -u admin:Harbor12345 -s --insecure -H "Content-Type: application/json" -X PUT -d '{"read_only":true}' "https://${ip}/api/v2.0/configurations"
|
2018-03-26 03:22:35 +02:00
|
|
|
Log To Console ${output}
|
|
|
|
Should Be Equal As Integers ${rc} 0
|
|
|
|
|
|
|
|
Disable Read Only
|
2020-03-22 03:48:52 +01:00
|
|
|
${rc} ${output}= Run And Return Rc And Output curl -u admin:Harbor12345 -s --insecure -H "Content-Type: application/json" -X PUT -d '{"read_only":false}' "https://${ip}/api/v2.0/configurations"
|
2018-03-26 03:22:35 +02:00
|
|
|
Log To Console ${output}
|
2018-03-30 05:38:45 +02:00
|
|
|
Should Be Equal As Integers ${rc} 0
|
|
|
|
|
|
|
|
## System labels
|
|
|
|
Switch To System Labels
|
|
|
|
Sleep 1
|
2019-10-30 06:56:55 +01:00
|
|
|
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Labels')]
|
2019-08-21 08:12:12 +02:00
|
|
|
|
|
|
|
## System labels
|
|
|
|
Switch To Configuration System Setting
|
|
|
|
Sleep 1
|
|
|
|
Retry Element Click xpath=${configuration_xpath}
|
2019-09-12 07:56:56 +02:00
|
|
|
Retry Element Click xpath=${configuration_system_tabsheet_id}
|
|
|
|
|
|
|
|
Switch To Configuration Project Quotas
|
|
|
|
Sleep 1
|
2019-10-30 06:56:55 +01:00
|
|
|
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Project Quotas')]
|
2018-03-30 05:38:45 +02:00
|
|
|
|
|
|
|
Create New Labels
|
|
|
|
[Arguments] ${labelname}
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//button[contains(.,'New Label')]
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='name'] ${labelname}
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//hbr-create-edit-label//clr-dropdown/clr-icon
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//hbr-create-edit-label//clr-dropdown-menu/label[1]
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='description'] global
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//div/form/section/label[4]/button[2]
|
2018-03-30 05:38:45 +02:00
|
|
|
Capture Page Screenshot
|
|
|
|
Wait Until Page Contains ${labelname}
|
|
|
|
|
|
|
|
Update A Label
|
|
|
|
[Arguments] ${labelname}
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox-wrapper
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//button[contains(.,'Edit')]
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-01-30 07:22:31 +01:00
|
|
|
Input Text xpath=//*[@id='name'] ${labelname}1
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//hbr-create-edit-label//form/section//button[2]
|
2018-03-30 05:38:45 +02:00
|
|
|
Capture Page Screenshot
|
2018-04-09 10:10:07 +02:00
|
|
|
Wait Until Page Contains ${labelname}1
|
2018-03-30 05:38:45 +02:00
|
|
|
|
|
|
|
Delete A Label
|
2018-05-24 07:07:19 +02:00
|
|
|
[Arguments] ${labelname}
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox-wrapper
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//button[contains(.,'Delete')]
|
2018-03-30 05:38:45 +02:00
|
|
|
Sleep 3
|
|
|
|
Capture Page Screenshot
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=//clr-modal//div//button[contains(.,'DELETE')]
|
2019-09-05 09:13:13 +02:00
|
|
|
Wait Until Page Contains Element //*[@id='contentAll']//div[contains(.,'${labelname}')]/../div/clr-icon[@shape='success-standard']
|
2018-10-12 11:01:16 +02:00
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
## Garbage Collection
|
2018-10-12 11:01:16 +02:00
|
|
|
Switch To Garbage Collection
|
|
|
|
Sleep 1
|
2019-03-28 13:36:44 +01:00
|
|
|
Retry Element Click xpath=${gc_config_page}
|
2019-08-21 08:12:12 +02:00
|
|
|
Wait Until Page Contains Element ${garbage_collection_xpath}
|
|
|
|
Retry Element Click xpath=${garbage_collection_xpath}
|
2018-10-12 11:01:16 +02:00
|
|
|
|
|
|
|
Click GC Now
|
|
|
|
Sleep 1
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${gc_now_xpath}
|
2018-10-12 11:01:16 +02:00
|
|
|
Sleep 2
|
|
|
|
|
|
|
|
View GC Details
|
2019-08-21 08:12:12 +02:00
|
|
|
Retry Element Click xpath=${gc_log_details_xpath}
|
2018-10-12 11:01:16 +02:00
|
|
|
Sleep 2
|
2019-03-28 13:36:44 +01:00
|
|
|
|
|
|
|
Switch To GC History
|
|
|
|
Retry Element Click xpath=${gc_log_xpath}
|
|
|
|
Retry Wait Until Page Contains Job
|
|
|
|
|
2019-08-21 08:12:12 +02:00
|
|
|
Add Items To System CVE Whitelist
|
|
|
|
[Arguments] ${cve_id}
|
|
|
|
Retry Element Click ${configuration_system_wl_add_btn}
|
|
|
|
Retry Text Input ${configuration_system_wl_textarea} ${cve_id}
|
|
|
|
Retry Element Click ${configuration_system_wl_add_confirm_btn}
|
|
|
|
Retry Element Click ${config_system_save_button_xpath}
|
|
|
|
|
|
|
|
Delete Top Item In System CVE Whitelist
|
2019-09-09 05:52:56 +02:00
|
|
|
[Arguments] ${count}=1
|
|
|
|
:FOR ${idx} IN RANGE 1 ${count}
|
|
|
|
\ Retry Element Click ${configuration_system_wl_delete_a_cve_id_icon}
|
2019-09-12 07:56:56 +02:00
|
|
|
Retry Element Click ${config_system_save_button_xpath}
|
|
|
|
|
|
|
|
Get Project Count Quota Text From Project Quotas List
|
|
|
|
[Arguments] ${project_name}
|
|
|
|
Switch To Project Quotas
|
|
|
|
${count_quota}= Get Text xpath=//project-quotas//clr-datagrid//clr-dg-row[contains(.,'${project_name}')]//clr-dg-cell[3]//label
|
|
|
|
[Return] ${count_quota}
|
|
|
|
|
|
|
|
Get Project Storage Quota Text From Project Quotas List
|
|
|
|
[Arguments] ${project_name}
|
2020-04-29 10:08:09 +02:00
|
|
|
Switch To Configure
|
2019-09-12 07:56:56 +02:00
|
|
|
Switch To Project Quotas
|
2020-04-07 11:28:09 +02:00
|
|
|
${storage_quota}= Get Text xpath=//project-quotas//clr-datagrid//clr-dg-row[contains(.,'${project_name}')]//clr-dg-cell[3]//label
|
2019-10-30 06:56:55 +01:00
|
|
|
[Return] ${storage_quota}
|