Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace all Xpaths with pf-v5 to pf-v6 #2140

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

manosnoam
Copy link
Contributor

@manosnoam manosnoam commented Dec 19, 2024

This is for RHOAIENG-16689

Besides fixing all hardcoded xpaths of pf5 to pf6, it is also fixing the global suites setup failure on RHOAI login, due to RHOAI image (alt) renamed.

image

- Also fix global suites failure on login, due to RHOAI image renamed

Signed-off-by: manosnoam <nmanos@redhat.com>
Wait Until Element Is Visible xpath://*[contains(@style, 'fill: var(--pf-v5-chart-tooltip--Fill')]
${tooltip_text} = Get Text xpath://*[contains(@style, 'fill: var(--pf-v5-chart-tooltip--Fill')]
Wait Until Element Is Visible xpath://*[contains(@style, 'fill: var(--pf-v6-chart-tooltip--Fill')]
${tooltip_text} = Get Text xpath://*[contains(@style, 'fill: var(--pf-v6-chart-tooltip--Fill')]

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
@@ -310,10 +310,10 @@
${cpu_usage_hover_value} ${cpu_requested_hover_value} = Get CPU Requested Tooltip Text
Check Resource Consuming Usage ${cpu_usage} ${cpu_usage_hover_value} CPU
Should Be True ${cpu_requested_hover_value} == ${cpu_requested}
${cpu_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v5-chart-donut--label--title--Fill')]])[1]
${cpu_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v6-chart-donut--label--title--Fill')]])[1]

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
@@ -323,7 +323,7 @@
${memory_usage_hover_value} ${memory_requested_hover_value} = Get Memory Requested Tooltip Text
Check Resource Consuming Usage ${memory_usage} ${memory_usage_hover_value} Memory
Should Be True ${memory_requested_hover_value} == ${memory_requested}
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v5-chart-donut--label--title--Fill')]])[2]
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v6-chart-donut--label--title--Fill')]])[2]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (123/120)
@@ -323,7 +323,7 @@
${memory_usage_hover_value} ${memory_requested_hover_value} = Get Memory Requested Tooltip Text
Check Resource Consuming Usage ${memory_usage} ${memory_usage_hover_value} Memory
Should Be True ${memory_requested_hover_value} == ${memory_requested}
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v5-chart-donut--label--title--Fill')]])[2]
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v6-chart-donut--label--title--Fill')]])[2]

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
@@ -367,7 +367,7 @@
Wait For Job With Status
[Documentation] Wait for job status with job name
[Arguments] ${job_name} ${job_status} ${timeout}
Wait Until Element Is Visible //td[@class='pf-v5-c-table__td' and contains(text(), '${job_name}')]/following-sibling::td[@data-label='Status']/span/span/span[@class='pf-v5-c-label__text'and text()='${job_status}'] timeout=${timeout}
Wait Until Element Is Visible //td[@class='pf-v6-c-table__td' and contains(text(), '${job_name}')]/following-sibling::td[@data-label='Status']/span/span/span[@class='pf-v6-c-label__text'and text()='${job_status}'] timeout=${timeout}

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (242/120)
ELSE
Click Link xpath://div[contains(@class,'pf-v5-l-gallery')]/div[contains(@class,'pf-v5-c-card')]/div[@class="pf-v5-c-card__title"]//span[text()="${dashboard_app}"]/../..//div[contains(@class,"pf-v5-c-card__footer")]/a
Click Link xpath://div[contains(@class,'pf-v6-l-gallery')]/div[contains(@class,'pf-v6-c-card')]/div[@class="pf-v6-c-card__title"]//span[text()="${dashboard_app}"]/../..//div[contains(@class,"pf-v6-c-card__footer")]/a

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (229/120)
@@ -145,8 +145,8 @@

Launch ${dashboard_app} From RHODS Dashboard Dropdown
Wait Until RHODS Dashboard ${dashboard_app} Is Visible
Click Button xpath://div[@class="pf-v5-c-card__title" and .="${dashboard_app}"]/..//button[contains(@class,pf-v5-c-dropdown__toggle)]
Click Link xpath://div[@class="pf-v5-c-card__title" and .="${dashboard_app}"]/..//a[.="Launch"]
Click Button xpath://div[@class="pf-v6-c-card__title" and .="${dashboard_app}"]/..//button[contains(@class,pf-v6-c-dropdown__toggle)]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (136/120)
@@ -16,7 +16,7 @@
${REPLICAS_PLUS_BTN_XP}= xpath=//div/button[@aria-label="Plus"]
${REPLICAS_MIN_BTN_XP}= xpath=//div/button[@aria-label="Minus"]
${SERVING_RUNTIME_NAME}= xpath=//input[@id="serving-runtime-name-input"]
${SERVING_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-v5-c-form__group-control']/descendant::button
${SERVING_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-v6-c-form__group-control']/descendant::button

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (161/120)
Click Button Run queries
Wait Until Element is Visible xpath://table[@class="pf-v5-c-table pf-m-compact"] timeout=15seconds
@{data} = Get WebElements //table[@class="pf-v5-c-table pf-m-compact"] //tbody/tr/td[${count_of_columns}]
Wait Until Element is Visible xpath://table[@class="pf-v6-c-table pf-m-compact"] timeout=15seconds

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Wait Until Element is Visible' does not follow case convention
Check Resource Consuming Usage ${cpu_usage} ${cpu_consuming} CPU

Wait Until Element Is Visible xpath=//*[@id="topResourceConsumingMemory-ChartLabel-title"] timeout=180
Wait Until Element Is Visible xpath=//*[@id="topResourceConsumingMemory-ChartLegend-ChartLabel-0"] timeout=180
${memory_usage} = Get Current Memory Usage ${PRJ_TITLE} Job
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v5-chart-donut--label--title--Fill')]])[2]
${memory_consuming} = Get Text xpath:(//*[@style[contains(., 'var(--pf-v6-chart-donut--label--title--Fill')]])[2]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (123/120)
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
590 0 0 590 100

@manosnoam manosnoam enabled auto-merge (squash) December 19, 2024 12:48
@bdattoma
Copy link
Contributor

@manosnoam could you run a smoke test as regression check pls?

@manosnoam manosnoam added verified This PR has been tested with Jenkins ⚠️ high priority review I need this to be reviewed ASAP labels Dec 19, 2024
@manosnoam manosnoam merged commit 3a386c2 into red-hat-data-services:master Dec 19, 2024
11 checks passed
@manosnoam
Copy link
Contributor Author

@manosnoam could you run a smoke test as regression check pls?

I did, but many other tests failed due to further PF6 UI changes. This PR is mandatory to start with, to unblock further fixes.

omrirh pushed a commit to omrirh/ods-ci that referenced this pull request Dec 30, 2024
- Also fix global suites failure on login, due to RHOAI image renamed

Signed-off-by: manosnoam <nmanos@redhat.com>
omrirh pushed a commit to omrirh/ods-ci that referenced this pull request Dec 30, 2024
- Also fix global suites failure on login, due to RHOAI image renamed

Signed-off-by: manosnoam <nmanos@redhat.com>
omrirh pushed a commit to omrirh/ods-ci that referenced this pull request Dec 30, 2024
- Also fix global suites failure on login, due to RHOAI image renamed

Signed-off-by: manosnoam <nmanos@redhat.com>
lenahorsley pushed a commit to lenahorsley/ods-ci that referenced this pull request Jan 17, 2025
- Also fix global suites failure on login, due to RHOAI image renamed

Signed-off-by: manosnoam <nmanos@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified This PR has been tested with Jenkins ⚠️ high priority review I need this to be reviewed ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants