airgun.views.redhat_repository

Module Contents

airgun.views.redhat_repository._wait_for_spinner(widget)

Wait for any spinner to disappear from widget

class airgun.views.redhat_repository.AvailableRepositoryItem

Bases: widgetastic.widget.GenericLocatorWidget

The widget representation of Available repository item of an Available repository set.

ENABLE_BUTTON = .//button
TEXT = .//span
text

Return the text representation of this repository eg: architecture + OS version if available.

read(self)

Read this widget by return it’s text representation.

enable(self)

Enable this repository.

class airgun.views.redhat_repository.AvailableRepositorySetWidget

Bases: widgetastic.widget.GenericLocatorWidget

The widget representation of Available repository set item.

ITEM
EXPAND_BUTTON = .//div[contains(@class, 'expand')]
NAME = .//div[contains(@class, 'item-heading')]
LABEL = .//div[contains(@class, 'item-text')]
ITEMS = .//div[contains(@class, 'list-item-with-divider')]
expand_button

Return the expand button element.

expanded

Check whether this repository set is expanded or not.

name

Return the name displayed for this repository item

label

Return the label displayed for this repository item

items

Return all the items (available repositories) of this repository set.

expand(self)

Expand the repository set item section.

read_items(self)

Read all the items (repositories) of this repository set

read(self)

Return the name and label of this repository.

enable(self, item)

Enable a repository of this repository set.

Parameters:item (str) – The arch and version (if available) of the repository.
class airgun.views.redhat_repository.EnabledRepositoryWidget

Bases: airgun.views.redhat_repository.AvailableRepositorySetWidget

The widget representation of Enabled repository item.

ITEM
DISABLE_BUTTON = .//button
disable(self)

Disable this repository.

class airgun.views.redhat_repository.RepositorySearchCategory

Bases: airgun.widgets.ActionsDropdown

The category search selector, eg: Available, Enabled or Both.

button
fill(self, item)

Selects Search Repository Category.

class airgun.views.redhat_repository.RepositorySearchTypes

Bases: airgun.widgets.ActionsDropdown

Repository content types dropdown for repository search.

button
selected_items

Returns a list of all dropdown selected items as strings.

close(self)

Closes the dropdown list.

select(self, items)

Selects Search Repository content types.

Parameters:items – The Repository content types required
fill(self, items)

Selects Search Repository content types

class airgun.views.redhat_repository.RepositoryCategoryView

Bases: widgetastic.widget.View

The base class view that represent the Available or Enabled Repository

Example html representation:

<div class="enabled-repositories-container">
    <h2>Enabled Repositories</h2>
    <div class="list-group list-view-pf list-view-pf-view">
        <div class="sticky-pagination sticky-pagination-grey">
        <div class="list-group-item list-view-pf-stacked">
            ...
        </div>
    </div>
ITEMS = ./div/div[contains(@class, 'list-group-item')]
ITEM_WIDGET
items(self, name=None, label=None)
read(self)
class airgun.views.redhat_repository.RedHatRepositoriesView

Bases: airgun.views.common.BaseLoggedInView

The main Red Hat repositories view.

class available

Bases: airgun.views.redhat_repository.RepositoryCategoryView

ROOT = //div[contains(@class, 'available-repositories-container')]
ITEM_WIDGET
class enabled

Bases: airgun.views.redhat_repository.RepositoryCategoryView

ROOT = //div[contains(@class, 'enabled-repositories-container')]
ITEM_WIDGET
title
search_category
search_box
search_button
search_types
search_clear
recommended_repos
is_displayed
search(self, value, category='Available', types=None)

Search repositories.

Parameters:
  • value (str) – The string to search by.
  • category (str) – The repository category to search, options: Available, Enabled, Both
  • types (list[str]) – (optional) The repository content types to refine the search
Returns: