diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index 5177f9e5d..c44165154 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -1035,7 +1035,7 @@ "TAGGED": "Tagged", "UNTAGGED": "Untagged", "ALL": "All", - "PLACEHOLDER": "We couldn't find any artifactds!", + "PLACEHOLDER": "We couldn't find any artifacts!", "SCAN_UNSUPPORTED": "Unsupported" }, "TAG": { diff --git a/tests/resources/Harbor-Pages/Configuration.robot b/tests/resources/Harbor-Pages/Configuration.robot index cd4fa9e06..0e85a8e60 100644 --- a/tests/resources/Harbor-Pages/Configuration.robot +++ b/tests/resources/Harbor-Pages/Configuration.robot @@ -304,6 +304,12 @@ Click GC Now Retry Element Click xpath=${gc_now_xpath} Sleep 2 +Click GC Now With Param Delete Untagged Artifacts + Sleep 1 + Retry Element Click xpath=${checkbox_delete_untagged_artifacts} + Retry Element Click xpath=${gc_now_xpath} + Sleep 5 + View GC Details Retry Element Click xpath=${gc_log_details_xpath} Sleep 2 diff --git a/tests/resources/Harbor-Pages/Configuration_Elements.robot b/tests/resources/Harbor-Pages/Configuration_Elements.robot index 5e39d1ee4..7a0e67b3c 100644 --- a/tests/resources/Harbor-Pages/Configuration_Elements.robot +++ b/tests/resources/Harbor-Pages/Configuration_Elements.robot @@ -36,4 +36,5 @@ ${configuration_system_wl_add_btn} //*[@id='show-add-modal-button'] ${configuration_system_wl_textarea} //*[@id='whitelist-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]/clr-icon -${configuration_sys_repo_readonly_chb_id} //*[@id='repo_read_only_lbl'] \ No newline at end of file +${configuration_sys_repo_readonly_chb_id} //*[@id='repo_read_only_lbl'] +${checkbox_delete_untagged_artifacts} //gc-config//clr-checkbox-wrapper//label[contains(@for,'delete_untagged')] \ No newline at end of file diff --git a/tests/resources/Harbor-Pages/Project-Artifact.robot b/tests/resources/Harbor-Pages/Project-Artifact.robot index 72e45690d..8f8cb2da0 100644 --- a/tests/resources/Harbor-Pages/Project-Artifact.robot +++ b/tests/resources/Harbor-Pages/Project-Artifact.robot @@ -41,4 +41,10 @@ Delete A Tag Retry Element Click xpath=//clr-dg-row[contains(.,'${tag}')]//clr-checkbox-wrapper//label[contains(@class,'clr-control-label')] Retry Element Click ${delete_tag_button} Retry Wait Until Page Contains Element ${dialog_delete_button} - Retry Element Click ${dialog_delete_button} \ No newline at end of file + Retry Element Click ${dialog_delete_button} + +Should Contain Artifact + Retry Wait Until Page Contains Element xpath=//artifact-list-tab//clr-dg-row//a[contains(.,'sha256')] + +Should Not Contain Any Artifact + Retry Wait Until Page Not Contains Element xpath=//artifact-list-tab//clr-dg-row \ No newline at end of file diff --git a/tests/robot-cases/Group1-Nightly/Common.robot b/tests/robot-cases/Group1-Nightly/Common.robot index b4571f120..0e3e89393 100644 --- a/tests/robot-cases/Group1-Nightly/Common.robot +++ b/tests/robot-cases/Group1-Nightly/Common.robot @@ -556,6 +556,38 @@ Test Case - Tag CRUD Should Contain Tag 456 Delete A Tag latest Should Not Contain Tag latest + Close Browser + +Test Case - GC Untagged Images + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + ${d}= Get Current Date result_format=%m%s + Create An New Project project${d} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest + # make hello-world untagged + Go Into Project project${d} + Go Into Repo hello-world + Go Into Artifact latest + Should Contain Tag latest + Delete A Tag latest + Should Not Contain Tag latest + # run gc without param delete untagged artifacts checked, should not delete hello-world:latest + Switch To Garbage Collection + Click GC Now + Go Into Project project${d} + Switch To Project Repo + Go Into Repo hello-world + Should Contain Artifact + # run gc with param delete untagged artifacts checked, should delete hello-world + Switch To Garbage Collection + Click GC Now With Param Delete Untagged Artifacts + Go Into Project project${d} + Switch To Project Repo + Go Into Repo hello-world + Should Not Contain Any Artifact + Close Browser + + Test Case - Tag Retention Init Chrome Driver