Add Job Service Dashboard Workers testcase (#18582)

Fix #17949

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2023-04-23 21:13:36 +08:00 committed by GitHub
parent 2ed1e4f2ea
commit 369129ef66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View File

@ -24,6 +24,10 @@ Switch To Job Schedules
Retry Element Click //clr-main-container//clr-vertical-nav-group//span[contains(.,'Job Service Dashboard')]
Retry Double Keywords When Error Retry Button Click ${job_service_schedules_btn} Retry Wait Until Page Contains Vendor Type
Switch To Job Workers
Retry Element Click //clr-main-container//clr-vertical-nav-group//span[contains(.,'Job Service Dashboard')]
Retry Double Keywords When Error Retry Button Click ${job_service_workers_btn} Retry Wait Until Page Contains Worker Pools
Select Jobs
[Arguments] @{job_types}
FOR ${job_type} IN @{job_types}

View File

@ -24,3 +24,4 @@ ${job_service_refresh_btn} //clr-datagrid//span[contains(@class,'refresh-btn')]
${job_service_schedules_btn} //*[@id='schedules']
${job_service_schedules_pause_all_btn} //button[.//span[text()=' PAUSE ALL ']]
${job_service_schedules_resume_all_btn} //button[.//span[text()=' RESUME ALL ']]
${job_service_workers_btn} //button[text()=' Workers ']

View File

@ -1124,3 +1124,29 @@ Test Case - Job Service Dashboard Schedules
Check Schedules Status Is Not Pause project${d} ${replication_policy_name} ${p2p_policy_name}
Reset Schedules For Job Service Dashboard Schedules project${d} ${replication_policy_name} ${p2p_policy_name}
Close Browser
Test Case - Job Service Dashboard Workers
[Tags] job_service_workers
Init Chrome Driver
${d}= Get Current Date result_format=%m%s
${project_name}= Set Variable project${d}
${endpoint_name}= Set Variable e${d}
${rule_name}= Set Variable rule${d}
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project And Go Into Project ${project_name}
Switch to Registries
Create A New Endpoint harbor ${endpoint_name} https://${LOCAL_REGISTRY} ${null} ${null}
Switch To Replication Manage
Create A Rule With Existing Endpoint ${rule_name} pull ${LOCAL_REGISTRY_NAMESPACE}/test_replication image ${endpoint_name} ${project_name} bandwidth=50 bandwidth_unit=Mbps
Select Rule And Replicate ${rule_name}
Retry Wait Until Page Contains Running
Switch To Job Workers
Retry Wait Until Page 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()=' 1/10 ']
Switch To Replication Manage
Select Rule ${rule_name}
Retry Action Keyword Check Latest Replication Job Status Succeeded
Switch To Job 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 Contains Element //app-donut-chart//div[text()=' 0/10 ']
Close Browser