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

[6.15.z] Navigation search: input clear fix #1234

Conversation

Satellite-QE
Copy link
Contributor

Cherrypick of PR: #1233

More sophisticated approach for clearing the search input.

Sometimes the previous value still remained in the search input,
even when clear() was called several times in a row.

This was probably a timing issue when running on a rel. fast browser machine.

More sophisticated approach for clearing the search input.

Sometimes the previous value still remained in the search input,
even when clear() was called several times in a row.
This was probably a timing issue when running on a rel. fast browser machine.

(cherry picked from commit 37bf497)
@Satellite-QE Satellite-QE added 6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Feb 14, 2024
@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing label Feb 14, 2024
@omkarkhatavkar
Copy link

trigger: test-robottelo
pytest: tests/foreman/ui/test_search.py -k test_positive_vertical_navigation_search_end_to_end

@@ -856,7 +856,7 @@ class PF4NavSearch(PF4Search):
search_button = Button(locator=(".//button[@aria-label='Search']"))
clear_button = Button(locator=(".//button[@aria-label='Reset']"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clear_button = Button(locator=(".//button[@aria-label='Reset']"))
clear_button = PF4Button(locator=(".//button[@aria-label='Reset']"))

Change the class of the button to the PF4Button.
It needs to be imported:
from widgetastic_patternfly4 import Button as PF4Button
and if imported like this, you need to also change the import on line 30 from:
from widgetastic_patternfly4.ouia import BaseSelect, Button as PF4Button, Dropdown, Menu
to
from widgetastic_patternfly4.ouia import BaseSelect, Button as OUIAButton, Dropdown, Menu

and then change the former occurrences of PF4Button to OUIAButton

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LadislavVasina1 nice find, @pnovotny can you please also update the same in the master as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omkarkhatavkar sure. I will create new PR for master because the #1233 was alerady merged.

Vertical menu search buttons should use the correct PF4 button widgets. This fixes the search clearing issue, when a search text value pops back after clearing the search input via browser.clear()

The original PF4Button import alias was renamed to OUIAButton.
@Gauravtalreja1
Copy link
Collaborator

PRT passed on SatelliteQE/robottelo#14077, Could you fix the pre-commit?

@pnovotny
Copy link
Contributor

The pre-commit is now finally passing.
I had to make the changes online here because checking this PR locally with gh pr checkout 1234 doesn't work for me. Not sure if it's a common thing with cherry-picked PRs or just something on my end.

Copy link
Contributor

@LadislavVasina1 LadislavVasina1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, good to merge imo

@omkarkhatavkar omkarkhatavkar merged commit 001cfc7 into 6.15.z Feb 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants