Skip to content

Commit

Permalink
redhat_repositories search box & button xpath, add wait_for in search (
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Apr 8, 2024
1 parent 927d7f0 commit 1c1e2d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions airgun/entities/redhat_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def search(self, value, category='Available', types=None):
eg: RPM, OSTree ...
"""
view = self.navigate_to(self, 'All')
wait_for(lambda: view.search_box.is_displayed, timeout=10, delay=1)
return view.search(value, category=category, types=types)

def read(self, entity_name=None, category='Available', recommended_repo=None):
Expand Down
8 changes: 6 additions & 2 deletions airgun/views/redhat_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ class RedHatRepositoriesView(BaseLoggedInView):

title = Text("//h1[contains(., 'Red Hat Repositories')]")
search_category = RepositorySearchCategory(".//div[button[@id='search-list-select']]")
search_box = TextInput(locator=".//input[@aria-label='Search input']")
search_button = Text(".//button[@aria-label='Search']")
search_box = TextInput(
locator='//*[@id="redhatRepositoriesPage"]//following::input[@aria-label="Search input"]'
)
search_button = Text(
'//*[@id="redhatRepositoriesPage"]//following::button[@aria-label="Search"]'
)
search_types = RepositorySearchTypes(".//div[button[@data-id='formControlsSelectMultiple']]")
search_clear = Text(".//span[@class = 'fa fa-times']")
recommended_repos = Text(".//div[contains(@class, 'bootstrap-switch wrapper')]")
Expand Down

0 comments on commit 1c1e2d6

Please sign in to comment.