airgun.views.subscription
¶
Module Contents¶
Classes¶
Searchbar for table filtering |
|
Mixin which adds |
|
Usual confirmation dialog with two buttons and close 'x' button in the |
|
Table used on Red Hat Subscriptions page. It's mostly the same as |
|
Models list of enabled products (Subscriptions -> any -> |
|
This is the list of interaction items for when opening up the selectable customizable |
|
List of all subscriptions. |
|
Base view for Satellite pages |
|
Base view for Satellite pages |
|
Base view for Satellite pages |
|
Base view for Satellite pages |
- class airgun.views.subscription.SubscriptionSearch(parent, logger=None, **kwargs)¶
Searchbar for table filtering
- search_field¶
- search_button¶
- class airgun.views.subscription.SubscriptionSearchableViewMixin¶
Mixin which adds
airgun.widgets.Search
widget andairgun.widgets.Search.search()
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¶
- class airgun.views.subscription.DeleteSubscriptionConfirmationDialog(parent, logger=None, **kwargs)¶
Usual confirmation dialog with two buttons and close ‘x’ button in the right corner. Has nothing in common with javascript alert, confirm or prompt pop-ups.
Example html representation:
<div class="modal-content"> <button type="button" class="close" ... ng-click="cancel()"> <div class="modal-footer ng-scope"> <button class="btn btn-danger" ng-click="ok()"> <button class="btn ..." ng-click="cancel()"...>
Locator example:
//div[@class='modal-content']
- confirm_dialog¶
- cancel_dialog¶
- class airgun.views.subscription.SatSubscriptionsViewTable(parent, locator, column_widgets=None, assoc_column=None, rows_ignore_top=None, rows_ignore_bottom=None, top_ignore_fill=False, bottom_ignore_fill=False, logger=None)¶
Table used on Red Hat Subscriptions page. It’s mostly the same as normal table, but when search returns no results, it does display single row with message. Not to be confused with SatSubscriptionsTable, which is not used on that page
- property has_rows¶
Boolean value whether table contains some elements (rows) or is empty.
- class airgun.views.subscription.ProductContentItemsList(parent, locator, logger=None)¶
Models list of enabled products (Subscriptions -> any -> Enabled products) Main reason is that page is constructed when tab is activated. There is no HTTP request, but delay is visible nevertheless - and during that time, message about no enabled product can be seen. We have to wait for a short while before we can be sure that there really are no products.
- ITEMS = .//div[contains(@class, 'list-group-item-heading')]¶
- property has_items¶
- read()¶
Each object should implement read so it is easy to get the value of such object.
When you implement this method, the exact return value is up to you but it MUST be consistent with what
fill()
takes.
- fill(value)¶
Interactive objects like inputs, selects, checkboxes, et cetera should implement fill.
When you implement this method, it MUST ALWAYS return a boolean whether the value was changed. Otherwise it can break.
For actual filling, please use
fill_with()
. It offers richer interface for filling.- Returns
A boolean whether it changed the value or not.
- class airgun.views.subscription.SubscriptionColumnsFilter(parent, locator, logger=None)¶
This is the list of interaction items for when opening up the selectable customizable checkboxes
- ITEMS_LOCATOR = //div[@id='subscriptionTableTooltip']//li/span¶
- CHECKBOX_LOCATOR = //div[@id='subscriptionTableTooltip']//li/span[.='{}']/preceding::input[1]¶
- property is_open¶
- open()¶
- close()¶
- checkboxes()¶
- read()¶
Read values of checkboxes
- fill(values)¶
Check or uncheck one of the checkboxes
- class airgun.views.subscription.SubscriptionListView(parent, logger=None, **kwargs)¶
List of all subscriptions.
- table¶
- add_button¶
- manage_manifest_button¶
- export_csv_button¶
- delete_button¶
- progressbar¶
- confirm_deletion¶
- columns_filter_checkboxes¶
- property is_displayed¶
Overrides the
Widget.is_displayed()
. The difference is that if the view does not have the root locator, it assumes it is displayed.- Returns
- is_searchable()¶
Customized is_searchable
- class airgun.views.subscription.ManageManifestView(parent, logger=None, **kwargs)¶
Base view for Satellite pages
- class manifest(parent, logger=None, **kwargs)¶
Regular primary level
Tab
.Usage:
@View.nested class mytab(SatTab): TAB_NAME = 'My Tab' @View.nested class subscriptions(SatTab): # no need to specify 'TAB_NAME', it will be set to 'Subscriptions' # automatically pass
Note that
TAB_NAME
is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’- red_hat_cdn_url¶
- manifest_file¶
- refresh_button¶
- delete_button¶
- class manifest_history(parent, logger=None, **kwargs)¶
Regular primary level
Tab
.Usage:
@View.nested class mytab(SatTab): TAB_NAME = 'My Tab' @View.nested class subscriptions(SatTab): # no need to specify 'TAB_NAME', it will be set to 'Subscriptions' # automatically pass
Note that
TAB_NAME
is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’- TAB_NAME = Manifest History¶
- table¶
- ROOT = //div[@role="dialog" and @tabindex][div//h4[normalize-space(.)="Manage Manifest"]]¶
- close_button¶
- property is_displayed¶
Overrides the
Widget.is_displayed()
. The difference is that if the view does not have the root locator, it assumes it is displayed.- Returns
- wait_animation_end()¶
- class airgun.views.subscription.DeleteManifestConfirmationView(parent, logger=None, **kwargs)¶
Base view for Satellite pages
- ROOT = //div[@role="dialog" and @tabindex][div//h4[normalize-space(.)="Confirm delete manifest"]]¶
- message¶
- delete_button¶
- cancel_button¶
- property is_displayed¶
Overrides the
Widget.is_displayed()
. The difference is that if the view does not have the root locator, it assumes it is displayed.- Returns
- wait_animation_end()¶
- class airgun.views.subscription.AddSubscriptionView(parent, logger=None, **kwargs)¶
Base view for Satellite pages
- breadcrumb¶
- table¶
- submit_button¶
- cancel_button¶
- class airgun.views.subscription.SubscriptionDetailsView(parent, logger=None, **kwargs)¶
Base view for Satellite pages
- class details(parent, logger=None, **kwargs)¶
Regular primary level
Tab
.Usage:
@View.nested class mytab(SatTab): TAB_NAME = 'My Tab' @View.nested class subscriptions(SatTab): # no need to specify 'TAB_NAME', it will be set to 'Subscriptions' # automatically pass
Note that
TAB_NAME
is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’- associations¶
- provided_products¶
- class product_content(parent, logger=None, **kwargs)¶
Regular primary level
Tab
.Usage:
@View.nested class mytab(SatTab): TAB_NAME = 'My Tab' @View.nested class subscriptions(SatTab): # no need to specify 'TAB_NAME', it will be set to 'Subscriptions' # automatically pass
Note that
TAB_NAME
is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’- TAB_NAME = Product Content¶
- product_content_list¶
- breadcrumb¶