mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-17 21:21:23 +01:00
Merge pull request #10403 from danfengliu/add-test-case-tag-immutability
Add nightly test case for tag immutability
This commit is contained in:
commit
7edac6d8e8
@ -27,11 +27,27 @@ Add A Tag Retention Rule
|
|||||||
Retry Element Click xpath=${project_tag_retention_save_add_button_xpath}
|
Retry Element Click xpath=${project_tag_retention_save_add_button_xpath}
|
||||||
Retry Wait Until Page Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
Retry Wait Until Page Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
||||||
|
|
||||||
|
Add A Tag Immutability Rule
|
||||||
|
[Arguments] ${scope} ${tag}
|
||||||
|
Retry Double Keywords When Error Retry Element Click xpath=${project_tag_retention_add_rule_xpath} Retry Wait Until Page Contains Element xpath=${project_tag_immutability_save_add_button_xpath}
|
||||||
|
Retry Clear Element Text ${project_tag_immutability_scope_input_xpath}
|
||||||
|
Retry Text Input ${project_tag_immutability_scope_input_xpath} ${scope}
|
||||||
|
Retry Clear Element Text ${project_tag_immutability_tag_input_xpath}
|
||||||
|
Retry Text Input ${project_tag_immutability_tag_input_xpath} ${tag}
|
||||||
|
Retry Double Keywords When Error Retry Element Click xpath=${project_tag_immutability_save_add_button_xpath} Retry Wait Until Page Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
||||||
|
Retry Wait Until Page Contains ${scope}
|
||||||
|
Retry Wait Until Page Contains ${tag}
|
||||||
|
|
||||||
Delete A Tag Retention Rule
|
Delete A Tag Retention Rule
|
||||||
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
||||||
Retry Element Click xpath=${project_tag_retention_delete_button_xpath}
|
Retry Element Click xpath=${project_tag_retention_delete_button_xpath}
|
||||||
Retry Wait Until Page Not Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
Retry Wait Until Page Not Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
||||||
|
|
||||||
|
Delete A Tag Immutability Rule
|
||||||
|
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
||||||
|
Retry Element Click xpath=${project_tag_retention_delete_button_xpath}
|
||||||
|
Retry Wait Until Page Not Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
||||||
|
|
||||||
Edit A Tag Retention Rule
|
Edit A Tag Retention Rule
|
||||||
[Arguments] ${repos} ${tags}
|
[Arguments] ${repos} ${tags}
|
||||||
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
||||||
@ -42,6 +58,18 @@ Edit A Tag Retention Rule
|
|||||||
Retry Element Click xpath=${project_tag_retention_save_add_button_xpath}
|
Retry Element Click xpath=${project_tag_retention_save_add_button_xpath}
|
||||||
Retry Wait Until Page Contains Element xpath=//span[contains(@class, 'rule-name')]//span[contains(.,'${tags}')]
|
Retry Wait Until Page Contains Element xpath=//span[contains(@class, 'rule-name')]//span[contains(.,'${tags}')]
|
||||||
|
|
||||||
|
Edit A Tag Immutability Rule
|
||||||
|
[Arguments] ${scope} ${tag}
|
||||||
|
Retry Element Click xpath=${project_tag_retention_action_button_xpath}
|
||||||
|
Retry Element Click xpath=${project_tag_retention_edit_button_xpath}
|
||||||
|
Retry Clear Element Text ${project_tag_immutability_scope_input_xpath}
|
||||||
|
Retry Text Input ${project_tag_immutability_scope_input_xpath} ${scope}
|
||||||
|
Retry Clear Element Text ${project_tag_immutability_tag_input_xpath}
|
||||||
|
Retry Text Input ${project_tag_immutability_tag_input_xpath} ${tag}
|
||||||
|
Retry Double Keywords When Error Retry Element Click xpath=${project_tag_immutability_save_add_button_xpath} Retry Wait Until Page Contains Element xpath=${project_tag_retention_rule_name_xpath}
|
||||||
|
Retry Wait Until Page Contains ${scope}
|
||||||
|
Retry Wait Until Page Contains ${tag}
|
||||||
|
|
||||||
Set Daily Schedule
|
Set Daily Schedule
|
||||||
Retry Element Click xpath=${project_tag_retention_edit_schedule_xpath}
|
Retry Element Click xpath=${project_tag_retention_edit_schedule_xpath}
|
||||||
Retry Element Click xpath=${project_tag_retention_select_policy_xpath}
|
Retry Element Click xpath=${project_tag_retention_select_policy_xpath}
|
||||||
|
@ -39,3 +39,7 @@ ${project_tag_retention_action_button_xpath} //button[contains(.,'ACTION')]
|
|||||||
${project_tag_retention_delete_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Delete')]
|
${project_tag_retention_delete_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Delete')]
|
||||||
${project_tag_retention_edit_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Edit')]
|
${project_tag_retention_edit_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Edit')]
|
||||||
${project_tag_retention_modal_title_edit_xpath} //h3[contains(.,'Edit Tag Retention Rule')]
|
${project_tag_retention_modal_title_edit_xpath} //h3[contains(.,'Edit Tag Retention Rule')]
|
||||||
|
|
||||||
|
${project_tag_immutability_scope_input_xpath} //*[@id='scope-input']
|
||||||
|
${project_tag_immutability_tag_input_xpath} //*[@id='tag-input']
|
||||||
|
${project_tag_immutability_save_add_button_xpath} //*[@id='add-edit-btn']
|
||||||
|
@ -70,6 +70,13 @@ Switch To Tag Retention
|
|||||||
#Switch To Project Tab Overflow
|
#Switch To Project Tab Overflow
|
||||||
Retry Element Click xpath=${project_tag_strategy_xpath}
|
Retry Element Click xpath=${project_tag_strategy_xpath}
|
||||||
Sleep 1
|
Sleep 1
|
||||||
|
|
||||||
|
Switch To Tag Immutability
|
||||||
|
#Switch To Project Tab Overflow
|
||||||
|
Retry Double Keywords When Error Retry Element Click xpath=${project_tag_strategy_xpath} Retry Wait Until Page Contains Element ${project_tag_immutability_switch}
|
||||||
|
Retry Double Keywords When Error Retry Element Click xpath=${project_tag_immutability_switch} Retry Wait Until Page Contains Immutability rules
|
||||||
|
Sleep 1
|
||||||
|
|
||||||
Switch To Project Tab Overflow
|
Switch To Project Tab Overflow
|
||||||
Retry Element Click xpath=${project_tab_overflow_btn}
|
Retry Element Click xpath=${project_tab_overflow_btn}
|
||||||
Sleep 1
|
Sleep 1
|
||||||
|
@ -29,6 +29,8 @@ ${project_config_tabsheet} xpath=//project-detail//a[contains(.,'Configuration'
|
|||||||
${project_tag_strategy_xpath} //clr-tabs//a[contains(.,'Tag')]
|
${project_tag_strategy_xpath} //clr-tabs//a[contains(.,'Tag')]
|
||||||
${project_tab_overflow_btn} //clr-tabs//li//button[contains(@class,"dropdown-toggle")]
|
${project_tab_overflow_btn} //clr-tabs//li//button[contains(@class,"dropdown-toggle")]
|
||||||
|
|
||||||
|
${project_tag_immutability_switch} //project-detail/app-tag-feature-integration//label/a[contains(.,'Tag Immutability')]
|
||||||
|
|
||||||
${create_project_CANCEL_button_xpath} xpath=//button[contains(.,'CANCEL')]
|
${create_project_CANCEL_button_xpath} xpath=//button[contains(.,'CANCEL')]
|
||||||
${create_project_OK_button_xpath} xpath=//button[contains(.,'OK')]
|
${create_project_OK_button_xpath} xpath=//button[contains(.,'OK')]
|
||||||
${delete_confirm_btn} xpath=//confirmation-dialog//button[contains(.,'DELETE')]
|
${delete_confirm_btn} xpath=//confirmation-dialog//button[contains(.,'DELETE')]
|
||||||
|
@ -608,6 +608,28 @@ Test Case - Tag Retention
|
|||||||
Execute Run
|
Execute Run
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Test Case - Tag Immutability
|
||||||
|
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}
|
||||||
|
Go Into Project project${d} has_image=${false}
|
||||||
|
Switch To Tag Immutability
|
||||||
|
Add A Tag Immutability Rule 1212 3434
|
||||||
|
Delete A Tag Immutability Rule
|
||||||
|
Add A Tag Immutability Rule 5566 7788
|
||||||
|
Edit A Tag Immutability Rule hello-world latest
|
||||||
|
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest
|
||||||
|
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox latest
|
||||||
|
Go Into Project project${d}
|
||||||
|
@{repo_list} Create List hello-world busybox
|
||||||
|
Multi-delete Object ${repo_delete_btn} @{repo_list}
|
||||||
|
# Verify
|
||||||
|
Delete Fail hello-world
|
||||||
|
Delete Success busybox
|
||||||
|
Close Browser
|
||||||
|
|
||||||
|
|
||||||
Test Case - Robot Account
|
Test Case - Robot Account
|
||||||
Init Chrome Driver
|
Init Chrome Driver
|
||||||
${d}= Get Current Date result_format=%m%s
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
Loading…
Reference in New Issue
Block a user