airgun.views.common¶
Module Contents¶
-
class
airgun.views.common.BaseLoggedInView¶ Bases:
widgetastic.widget.View-
taxonomies¶
-
flash¶
-
validations¶
-
current_user¶
-
-
class
airgun.views.common.WrongContextAlert¶ Bases:
widgetastic.widget.ViewAlert screen which appears when switching organization while organization-specific entity is opened.
-
message¶
-
back¶
-
is_displayed¶
-
-
class
airgun.views.common.SatTab¶ Bases:
widgetastic_patternfly.TabRegular primary level
Tab.Usage:
@View.nested class mytab(SatTab): TAB_NAME = 'My Tab'
Note that
TAB_NAMEis optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’:@View.nested class subscriptions(SatTab): # no need to specify 'TAB_NAME', it will be set to 'Subscriptions' # automatically pass
-
ROOT¶
-
is_displayed¶
-
read(self)¶ Do not attempt to read hidden tab contents
-
-
class
airgun.views.common.SatVerticalTab¶ Bases:
airgun.views.common.SatTabRepresent vertical tabs that usually used in location and organization entities
Usage:
@View.nested class mytab(SatVerticalTab): TAB_NAME = 'My Tab'
-
TAB_LOCATOR¶
-
-
class
airgun.views.common.SatTabWithDropdown¶ Bases:
widgetastic_patternfly.TabWithDropdownRegular primary level
Tabwith dropdown.Usage:
@View.nested class mytab(SatTabWithDropdown): TAB_NAME = 'My Tab' SUB_ITEM = 'My Tab Dropdown Item'
-
ROOT¶
-
is_displayed¶
-
read(self)¶ Do not attempt to read hidden tab contents
-
-
class
airgun.views.common.SatSecondaryTab¶ Bases:
airgun.views.common.SatTabSecondary level Tab, typically ‘List/Remove’ or ‘Add’ sub-tab inside some primary tab.
Usage:
@View.nested class listremove(SatSecondaryTab): TAB_NAME = 'List/Remove'
-
ROOT¶
-
TAB_LOCATOR¶
-
-
class
airgun.views.common.LCESelectorGroup¶ Bases:
widgetastic.widget.ParametrizedViewGroup of
airgun.widgets.LCESelector, typically present on page for selecting desired lifecycle environment.Usage:
lce = View.nested(LCESelectorGroup) #or @View.nested class lce(LCESelectorGroup): pass
-
ROOT= .//*[self::div or self::span][@path-selector='environments' or @path-selector='availableEnvironments']¶
-
PARAMETERS= ['lce_name']¶
-
LAST_ENV= .//div[contains(@class, 'path-selector')]/ul/li[last()]¶
-
lce¶
-
classmethod
all(cls, browser)¶ Helper method which returns list of tuples with all LCESelector names (last available environment is used as a name). It’s required for
read()to work properly.
-
fill(self, values=None)¶ Shortcut to pass the value to included
lceairgun.widgets.LCESelectorwidget. Usage remains the same asairgun.widgets.LCESelectorandwidgetastic.widget.ParametrizedViewrequired param is filled automatically from passed lifecycle environment’s name.Example:
my_view.lce.fill({'PROD': True})
Value
TrueorFalsemeans to set corresponding checkbox value to the last checkbox available in widget (last lifecycle environment). If you want to select different lifecycle environment within the same route - pass its name as a value instead:my_view.lce.fill({'PROD': 'Library'})
-
read(self)¶ Shortcut which returns value of included
lceairgun.widgets.LCESelectorwidget.Note that returned result will be wrapped in extra dict due to
widgetastic.widget.ParametrizedViewnature:{ 'DEV': {'Library': False, 'DEV': True}, 'QA': {'Library': False, 'IT': True}, 'PROD': {'Library': False, 'PROD': True}, }
-
-
class
airgun.views.common.ListRemoveTab¶ Bases:
airgun.views.common.SatSecondaryTab‘List/Remove’ tab, part of
AddRemoveResourcesView.-
TAB_NAME= List/Remove¶
-
searchbox¶
-
table¶
-
search(self, value)¶ Search for specific associated resource and return the results
-
remove(self, value)¶ Remove specific associated resource
-
fill(self, values)¶ Remove associated resource(s).
-
read(self)¶ Return a list of associated resources
-
-
class
airgun.views.common.AddTab¶ Bases:
airgun.views.common.SatSecondaryTab-
TAB_NAME= Add¶
-
searchbox¶
-
table¶
-
search(self, value)¶ Search for specific available resource and return the results
-
add(self, value)¶ Associate specific resource
-
fill(self, values)¶ Associate resource(s)
-
read(self)¶ Return a list of available resources
-
-
class
airgun.views.common.AddRemoveResourcesView¶ Bases:
widgetastic.widget.ViewView which allows assigning/unassigning some resources to entity. Contains two secondary level tabs ‘List/Remove’ and ‘Add’ with tables allowing managing resources for entity.
Usage:
@View.nested class resources(AddRemoveResourcesView): pass
-
list_remove_tab¶
-
add_tab¶
-
add(self, values)¶ Assign some resource(s).
Parameters: or list values (str) – string containing resource name or a list of such strings.
-
remove(self, values)¶ Unassign some resource(s).
Parameters: or list values (str) – string containing resource name or a list of such strings.
-
read(self)¶ Read all table values from both resource tables
-
-
class
airgun.views.common.AddRemoveSubscriptionsView¶ Bases:
airgun.views.common.AddRemoveResourcesViewA variant of
AddRemoveResourcesViewfor managing subscriptions. Subscriptions table has different structure - entity label is located in separate row apart from checkbox and other cells.-
class
list_remove_tab¶ Bases:
airgun.views.common.ListRemoveTab-
table¶
-
-
class
add_tab¶ Bases:
airgun.views.common.AddTab-
table¶
-
-
class
-
class
airgun.views.common.TemplateEditor¶ Bases:
widgetastic.widget.ViewDefault view for template entity editor that can be present for example on provisioning template of partition table pages. It contains from different options of content rendering and ace editor where you can actually provide your inputs
Usage:
editor = View.nested(TemplateEditor)
-
ROOT= .//div[@id='editor-container']¶
-
rendering_options¶
-
import_template¶
-
fullscreen¶
-
editor¶
-
-
class
airgun.views.common.SearchableViewMixin¶ Bases:
widgetastic.widget.WTMixinMixin which adds
airgun.widgets.Searchwidget andsearch()to your view. It’s useful for _most_ entities list views where searchbox and results table are present.Note that class which uses this mixin should have :attr: table attribute.
-
searchbox¶
-
welcome_message¶
-
is_searchable(self)¶ Verify that search procedure can be executed against specific page. That means that we have search field present on the page and that page is not a welcome one
-
-
class
airgun.views.common.TaskDetailsView¶ Bases:
airgun.views.common.BaseLoggedInViewCommon view for task details screen. Can be found for most of tasks for various entities like Products, Repositories, Errata etc.
-
action_type¶
-
user¶
-
started_at¶
-
finished_at¶
-
parameters¶
-
state¶
-
result¶
-
progressbar¶
-
details¶
-
-
class
airgun.views.common.BookmarkCreateView¶ Bases:
airgun.views.common.BaseLoggedInViewBookmark creation modal window, available via searchbox dropdown -> Bookmark this search.
Has slightly different style for katello and foreman pages, thus some widgets have special locators.
-
ROOT= .//div[contains(@class, 'modal-dialog')]¶
-
title¶
-
name¶
-
query¶
-
public¶
-
submit¶
-
cancel¶
-
is_displayed¶
-