Skip to content

Commit

Permalink
Update DW UI tests to accommodate changes introduced in 2.10 (red-hat…
Browse files Browse the repository at this point in the history
…-data-services#1488)

closes https://issues.redhat.com/browse/RHOAIENG-7682

- Updated the CPU/Memory Usage Hover text trim as it changed from ```■
Memory usage: 0 GiB
■ Memory requested: 0 GiB``` to ```Memory usage: 0 GiB Memory requested:
0 GiB```

- Updated according to xpath refactored
  • Loading branch information
jiripetrlik authored May 30, 2024
2 parents de1c0f8 + 531fec7 commit 8abf79c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ Get Memory Requested Tooltip Text
@{memory_usage_list} Split To Lines ${memory_usage_hover_data}
${memory_usage_line} Set Variable ${memory_usage_list}[0]
${memory_requested_line} Set Variable ${memory_usage_list}[1]
${memory_usage_value} Set Variable ${memory_usage_line}[16:21]
${memory_requested_value} Set Variable ${memory_requested_line}[20:25]
${memory_usage_value} Set Variable ${memory_usage_line}[14:19]
${memory_requested_value} Set Variable ${memory_requested_line}[18:23]
RETURN ${memory_usage_value} ${memory_requested_value}

Get CPU Requested Tooltip Text
Expand All @@ -158,8 +158,8 @@ Get CPU Requested Tooltip Text
@{cpu_usage_list} Split To Lines ${cpu_usage_hover_data}
${cpu_usage_line} Set Variable ${cpu_usage_list}[0]
${cpu_requested_line} Set Variable ${cpu_usage_list}[1]
${cpu_usage_value} Set Variable ${cpu_usage_line}[13:18]
${cpu_requested_value} Set Variable ${cpu_requested_line}[17:18]
${cpu_usage_value} Set Variable ${cpu_usage_line}[11:16]
${cpu_requested_value} Set Variable ${cpu_requested_line}[15:16]
RETURN ${cpu_usage_value} ${cpu_requested_value}

Create Ray Cluster Workload
Expand Down Expand Up @@ -188,7 +188,7 @@ Check Project Metrics Default Page Contents
Page Should Contain Element ${RESOURCES_CONSUMING_TITLE_XP}
Page Should Contain Element xpath=//*[@data-testid="dw-top-consuming-workloads"]//*[text()="No distributed workloads in the selected project are currently consuming resources."]
Page Should Contain Element ${DISTRIBUITED_WORKLOAD_RESOURCE_METRICS_TITLE_XP}
Page Should Contain Element xpath=//*[@data-testid="dw-workloada-resource-metrics"]//*[text()="No distributed workloads in the selected project are currently consuming resources."]
Page Should Contain Element xpath=//*[@data-testid="dw-workload-resource-metrics"]//*[text()="No distributed workloads in the selected project are currently consuming resources."]

Check Distributed Workload Status Page Contents
[Documentation] checks Distributed Workload status Default Page contents exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Verify The Workload Metrics By Submitting Kueue Batch Workload
END

Click Button ${PROJECT_METRICS_TAB_XP}
Wait Until Element Is Visible xpath=//*[@data-testid="dw-workloada-resource-metrics"]//*[text()="No distributed workloads in the selected project are currently consuming resources."] timeout=60
Wait Until Element Is Visible xpath=//*[@data-testid="dw-workload-resource-metrics"]//*[text()="No distributed workloads in the selected project are currently consuming resources."] timeout=60
Page Should Not Contain ${JOB_NAME_QUEUE}
Page Should Not Contain Succeeded
Check Distributed Workload Status Page Contents
Expand Down

0 comments on commit 8abf79c

Please sign in to comment.