Update CVE allowlist UI test case (#16980)

Because this PR #16941 migrates CVE allowlist from Configuration System
Settings page to Configuration Security page.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-06-13 11:54:58 +08:00 committed by GitHub
parent f946bd21f5
commit a2829850b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 15 deletions

View File

@ -250,12 +250,15 @@ Switch To System Labels
Sleep 1
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Labels')]
## System labels
Switch To Configuration System Setting
Sleep 1
Retry Element Click xpath=${configuration_xpath}
Retry Element Click xpath=${configuration_system_tabsheet_id}
Switch To Configuration Security
Retry Element Click xpath=${configuration_xpath}
Retry Double Keywords When Error Retry Element Click xpath=${configuration_security_tabsheet_id} Retry Wait Until Page Contains Deployment security
Switch To Configuration Project Quotas
Sleep 1
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Project Quotas')]
@ -330,14 +333,14 @@ Add Items To System CVE Allowlist
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}
Retry Element Click ${config_security_save_button_xpath}
Delete Top Item In System CVE Allowlist
[Arguments] ${count}=1
FOR ${idx} IN RANGE 1 ${count}
Retry Element Click ${configuration_system_wl_delete_a_cve_id_icon}
Retry Element Click ${configuration_system_wl_delete_a_cve_id_icon}
END
Retry Element Click ${config_system_save_button_xpath}
Retry Element Click ${config_security_save_button_xpath}
Get Project Count Quota Text From Project Quotas List
[Arguments] ${project_name}

View File

@ -23,6 +23,7 @@ ${config_save_button_xpath} //config//div/button[contains(.,'SAVE')]
${config_email_save_button_xpath} //*[@id='config_email_save']
${config_auth_save_button_xpath} //*[@id='config_auth_save']
${config_system_save_button_xpath} //*[@id='config_system_save']
${config_security_save_button_xpath} //*[@id='security_save']
${vulnerbility_save_button_xpath} //*[@id='config-save']
${configuration_xpath} //clr-main-container//clr-vertical-nav//a[contains(.,' Configuration ')]
${garbage_collection_xpath} //*[@id='config-gc']
@ -31,12 +32,13 @@ ${gc_config_page} //clr-vertical-nav-group-children/a[contains(.,'Garbage')]
${gc_now_xpath} //*[@id='gc']/gc-config//button[contains(.,'GC')]
${gc_log_details_xpath} //*[@id='clr-dg-row26']/clr-dg-cell[6]/a
${configuration_system_tabsheet_id} //*[@id='config-system']
${configuration_security_tabsheet_id} //*[@id='config-security']
${configuration_authentication_tabsheet_id} //*[@id="config-auth"]
${configuration_project_quotas_tabsheet_id} //*[@id='config-quotas']
${configuration_system_wl_add_btn} //*[@id='show-add-modal-button']
${configuration_system_wl_textarea} //*[@id='allowlist-textarea']
${configuration_system_wl_add_confirm_btn} //*[@id='add-to-system']
${configuration_system_wl_delete_a_cve_id_icon} //system-settings/form/section//ul/li[1]/a[2]/clr-icon
${configuration_system_wl_delete_a_cve_id_icon} //app-security//form/section//ul/li[1]/a[2]/clr-icon
${configuration_sys_repo_readonly_chb_id} //*[@id='repo_read_only_lbl']
${checkbox_delete_untagged_artifacts} //gc-config//clr-toggle-wrapper/label[contains(@for,'delete_untagged')]
${cfg_auth_automatic_onboarding_checkbox} //clr-checkbox-wrapper//label[contains(@for,'oidcAutoOnboard')]
@ -64,6 +66,4 @@ ${filter_dist_input} //hbr-filter//input
${GC_schedule_edit_btn} //*[@id='editSchedule']
${GC_schedule_select} //*[@id='selectPolicy']
${GC_schedule_save_btn} //*[@id='config-save']
${GC_schedule_save_btn} //*[@id='config-save']

View File

@ -452,8 +452,7 @@ Verify System Setting Allowlist
@{cve_ids}= Get Value From Json ${json} $.configuration..cve..id
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Configure
Switch To System Settings
Switch To Configuration Security
Log To Console "@{cve_ids}"
Loop Verifiy CVE_IDs @{cve_ids}
Close Browser

View File

@ -274,8 +274,7 @@ Body Of Verfiy System Level CVE Allowlist
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Check Listed In CVE Allowlist project${d} ${image} ${sha256} ${single_cve} is_in=No
Switch To Configure
Switch To Configuration System Setting
Switch To Configuration Security
# Add Items To System CVE Allowlist CVE-2021-36222\nCVE-2021-43527 \nCVE-2021-4044 \nCVE-2021-36084 \nCVE-2021-36085 \nCVE-2021-36086 \nCVE-2021-37750 \nCVE-2021-40528
Add Items To System CVE Allowlist ${most_cve_list}
Cannot Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} err_msg=cannot be pulled due to configured policy
@ -326,9 +325,8 @@ Body Of Verfiy Project Level CVE Allowlist By Quick Way of Add System
${signin_user}= Set Variable user025
${signin_pwd}= Set Variable Test1@34
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Configure
Switch To Configuration System Setting
Add Items To System CVE Allowlist ${cve_list}
Switch To Configuration Security
Add Items To System CVE Allowlist ${cve_list}
Logout Harbor
Sign In Harbor ${HARBOR_URL} ${signin_user} ${signin_pwd}
Create An New Project And Go Into Project project${d}