Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion airgun/entities/redhat_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ def search(self, value, category='Available', types=None):
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):
def read(self, entity_name=None, category='Available', recommended_repo=None, filter_type=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: The new filter_type parameter is added but not documented in the function docstring.

Please specify the valid values for filter_type and describe its impact on the repository search in the docstring.

"""Read RH Repositories values.

:param entity_name: The repository name
:param category: The repository category to search, options: Available, Enabled
:param recommended_repo: on/off RH recommended repositories
:param filter_type: repository type such as RPM, Kickstart
"""
view = self.navigate_to(self, 'All')
view.wait_displayed()

view.search_by_filter_type.select('')
if filter_type:
view.search_by_filter_type.select(filter_type)

if recommended_repo:
current_value = self.browser.get_attribute(
'class', locator=view.recommended_repos.locator
Expand Down
1 change: 1 addition & 0 deletions airgun/views/redhat_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class RedHatRepositoriesView(BaseLoggedInView):
'//*[@id="redhatRepositoriesPage"]//following::button[@aria-label="Search"]'
)
search_types = RepositorySearchTypes(".//div[button[@data-id='formControlsSelectMultiple']]")
search_by_filter_type = RepositorySearchTypes(".//div[button[@aria-owns='bs-select-2']]")
search_clear = Text(".//span[@class = 'fa fa-times']")
recommended_repos = Text(".//div[contains(@class, 'bootstrap-switch wrapper')]")

Expand Down