mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 01:27:49 +01:00
Add Retain image last pull time UI test case (#18695)
Fix #18690 Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
parent
2016d32497
commit
ac70a14397
@ -371,3 +371,9 @@ Enable Skip Audit Log Database
|
|||||||
Switch To System Settings
|
Switch To System Settings
|
||||||
Retry Double Keywords When Error Click Element ${skip_audit_log_database_label} Checkbox Should Be Selected ${skip_audit_log_database_checkbox}
|
Retry Double Keywords When Error Click Element ${skip_audit_log_database_label} Checkbox Should Be Selected ${skip_audit_log_database_checkbox}
|
||||||
Retry Double Keywords When Error Retry Element Click ${config_save_button_xpath} Retry Wait Until Page Contains Configuration has been successfully saved.
|
Retry Double Keywords When Error Retry Element Click ${config_save_button_xpath} Retry Wait Until Page Contains Configuration has been successfully saved.
|
||||||
|
|
||||||
|
Set Up Retain Image Last Pull Time
|
||||||
|
[Arguments] ${action}
|
||||||
|
Run Keyword If '${action}'=='enable' Retry Double Keywords When Error Click Element ${retain_image_last_pull_time_label} Checkbox Should Be Selected ${retain_image_last_pull_time_checkbox}
|
||||||
|
... ELSE Retry Double Keywords When Error Click Element ${retain_image_last_pull_time_label} Checkbox Should Not Be Selected ${retain_image_last_pull_time_checkbox}
|
||||||
|
Retry Double Keywords When Error Retry Element Click ${config_save_button_xpath} Retry Wait Until Page Contains Configuration has been successfully saved.
|
||||||
|
@ -60,3 +60,5 @@ ${filter_dist_input} //hbr-filter//input
|
|||||||
${audit_log_forward_syslog_endpoint_input_id} //*[@id='auditLogForwardEndpoint']
|
${audit_log_forward_syslog_endpoint_input_id} //*[@id='auditLogForwardEndpoint']
|
||||||
${skip_audit_log_database_checkbox} //*[@id='skipAuditLogDatabase']
|
${skip_audit_log_database_checkbox} //*[@id='skipAuditLogDatabase']
|
||||||
${skip_audit_log_database_label} //clr-checkbox-wrapper//label[contains(@for,'skipAuditLogDatabase')]
|
${skip_audit_log_database_label} //clr-checkbox-wrapper//label[contains(@for,'skipAuditLogDatabase')]
|
||||||
|
${retain_image_last_pull_time_label} //clr-checkbox-wrapper//label[contains(@for,'scannerSkipUpdatePullTime')]
|
||||||
|
${retain_image_last_pull_time_checkbox} //*[@id='scannerSkipUpdatePullTime']
|
||||||
|
@ -1133,3 +1133,35 @@ Test Case - Job Service Dashboard Workers
|
|||||||
Retry Wait Until Page Not Contains Element //clr-datagrid[.//button[text()='Worker ID']]//clr-dg-row//clr-dg-cell[text()='REPLICATION']
|
Retry Wait Until Page Not Contains Element //clr-datagrid[.//button[text()='Worker ID']]//clr-dg-row//clr-dg-cell[text()='REPLICATION']
|
||||||
Retry Wait Until Page Contains Element //app-donut-chart//div[text()=' 0/10 ']
|
Retry Wait Until Page Contains Element //app-donut-chart//div[text()=' 0/10 ']
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Test Case - Retain Image Last Pull Time
|
||||||
|
[Tags] retain_image_last_pull_time
|
||||||
|
Init Chrome Driver
|
||||||
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
${image}= Set Variable alpine
|
||||||
|
${tag}= Set Variable 3.10
|
||||||
|
${project_name}= Set Variable project${d}
|
||||||
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||||
|
Create An New Project And Go Into Project ${project_name}
|
||||||
|
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${project_name} ${image} ${tag} ${tag}
|
||||||
|
Switch To Configuration System Setting
|
||||||
|
Set Up Retain Image Last Pull Time enable
|
||||||
|
Go Into Project ${project_name}
|
||||||
|
Go Into Repo ${project_name}/${image}
|
||||||
|
Scan Repo ${tag} Succeed
|
||||||
|
Sleep 15
|
||||||
|
Reload Page
|
||||||
|
Retry Wait Element Visible //clr-dg-row//clr-dg-cell[10]
|
||||||
|
${last_pull_time}= Get Text //clr-dg-row//clr-dg-cell[10]
|
||||||
|
Should Be Empty ${last_pull_time}
|
||||||
|
Switch To Configuration System Setting
|
||||||
|
Set Up Retain Image Last Pull Time disable
|
||||||
|
Go Into Project ${project_name}
|
||||||
|
Go Into Repo ${project_name}/${image}
|
||||||
|
Scan Repo ${tag} Succeed
|
||||||
|
Sleep 15
|
||||||
|
Reload Page
|
||||||
|
Retry Wait Element Visible //clr-dg-row//clr-dg-cell[10]
|
||||||
|
${last_pull_time}= Get Text //clr-dg-row//clr-dg-cell[10]
|
||||||
|
Should Not Be Empty ${last_pull_time}
|
||||||
|
Close Browser
|
||||||
|
Loading…
Reference in New Issue
Block a user