[cherry-pick]Update replication and trivy testcases (#17369)

Update replication and trivy testcases

1 Update replication filter_label_xpath because of this PR #17267 updated xpath
2 Update the Manual Scan All test case, because Scan All will affect other testcases if it is not finished running

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-08-10 16:37:41 +08:00 committed by GitHub
parent d8df5af9ce
commit d21b88eee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 25 deletions

View File

@ -61,9 +61,9 @@ Select Filter Label Model
Select Filter Label
[Arguments] ${label}
Retry Element Click ${filter_label_button}
Retry Element Click ${filter_label_xpath}
Retry Element Click //div[@class='filterSelect ng-star-inserted'][3]//label[contains(text(), '${label}')]
Retry Element Click ${filter_label_button}
Retry Element Click ${filter_label_xpath}
Select Bandwidth Unit
[Arguments] ${unit}

View File

@ -64,7 +64,7 @@ ${replication_mode_radio_pull} //clr-main-container//hbr-create-edit-rule//labe
${filter_name_id} //input[@id='filter_name']
${filter_tag_model_select} //div[@class='filterSelect ng-star-inserted'][2]//select
${filter_tag_id} //input[@id='filter_tag']
${filter_label_button} //div[@class='filterSelect ng-star-inserted'][3]//button
${filter_label_xpath} //div//clr-dropdown//div[contains(@class,'label-text')]
${filter_label_model_select} //div[@class='filterSelect ng-star-inserted'][3]//select
${rule_resource_selector} //*[@id='select_resource']
${trigger_mode_selector} //*[@id='ruleTrigger']

View File

@ -20,8 +20,7 @@ Set Scan Schedule
Trigger Scan Now And Wait Until The Result Appears
Retry Element Click xpath=${scan_now_button}
Sleep 60
Retry Wait Until Page Contains Element ${scan_now_result}
Retry Action Keyword Wait Until Element Is Visible And Enabled ${scan_now_button}
Switch To Vulnerability Page
Retry Element Click xpath=//clr-main-container//clr-vertical-nav//a[contains(.,'Interrogation')]

View File

@ -45,6 +45,9 @@ Test Case - Disable Scan Schedule
Retry Wait Until Page Contains None
Close Browser
Test Case - Manual Scan All
Body Of Manual Scan All Critical High
Test Case - Scan A Tag In The Repo
Body Of Scan A Tag In The Repo vmware/photon 1.0
@ -63,22 +66,6 @@ Test Case - Scan As An Unprivileged User
Test Case - Scan Image With Empty Vul
Body Of Scan Image With Empty Vul photon 4.0_scan
Test Case - Manual Scan All
Body Of Manual Scan All Critical High
#Test Case - View Scan Error
# Init Chrome Driver
# ${d}= get current date result_format=%m%s
# Sign In Harbor ${HARBOR_URL} user026 Test1@34
# Create An New Project And Go Into Project project${d}
# Push Image ${ip} user026 Test1@34 project${d} busybox:latest
# Go Into Project project${d}
# Go Into Repo project${d}/busybox
# Scan Repo latest Fail
# View Scan Error Log
# Close Browser
Test Case - Scan Image On Push
[Tags] run-once
Body Of Scan Image On Push Critical High
@ -92,9 +79,6 @@ Test Case - Project Level Image Serverity Policy
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
${d}= get current date result_format=%m%s
#For docker-hub registry
#${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089
#For internal CPE harbor registry
${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a
${image}= Set Variable redis
Create An New Project And Go Into Project project${d}
@ -121,4 +105,4 @@ Test Case - Verfiy Project Level CVE Allowlist By Quick Way of Add System
Test Case - Stop Scan And Stop Scan All
[Tags] stop_scan_job
Body Of Stop Scan And Stop Scan All
Body Of Stop Scan And Stop Scan All