Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branching off 6.15.z for sca only #1071

Merged
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
9 changes: 9 additions & 0 deletions airgun/entities/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ def post_navigate(self, _tries, *args, **kwargs):
logger=self.view.logger,
)

def sca_alert(self):
view = self.navigate_to(self, 'All')
wait_for(
lambda: view.sca_alert.read(),
handle_exception=True,
timeout=10,
)
return view.sca_alert.read()


@navigator.register(SubscriptionEntity, 'All')
class SubscriptionList(SubscriptionNavigationStep):
Expand Down
1 change: 1 addition & 0 deletions airgun/views/activationkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class ActivationKeyEditView(BaseLoggedInView):
breadcrumb = BreadCrumb()
actions = ActionsDropdown("//div[contains(@class, 'btn-group')]")
dialog = ConfirmationDialog()
sca_alert = Text('//div[contains(@class,"alert-warning")]')

@property
def is_displayed(self):
Expand Down
1 change: 1 addition & 0 deletions airgun/views/contenthost.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def is_displayed(self):
@View.nested
class details(SatTab):
# Basic information
sca_alert = Text('//div[contains(@class,"alert-warning")]')
name = EditableEntry(name='Name')
uuid = ReadOnlyEntry(name='Subscription UUID')
bios_uuid = ReadOnlyEntry(name='BIOS UUID')
Expand Down
2 changes: 2 additions & 0 deletions airgun/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class OrganizationCreateView(BaseLoggedInView):
breadcrumb = BreadCrumb()
name = TextInput(id='organization_name')
label = TextInput(id='organization_label')
sca = Checkbox(locator=".//input[@id='simple_content_access' and @type='checkbox']")
description = TextInput(id='organization_description')
submit = Text('//input[@name="commit"]')

Expand Down Expand Up @@ -78,6 +79,7 @@ class primary(SatVerticalTab):
name = TextInput(id='organization_name')
label = TextInput(id='organization_label')
default_system_sla = FilteredDropdown(id='organization_service_level')
sca_alert = Text('//div[contains(@class,"alert-warning")]')
description = TextInput(id='organization_description')

@View.nested
Expand Down
1 change: 1 addition & 0 deletions airgun/views/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def fill(self, values):
class SubscriptionListView(BaseLoggedInView, SubscriptionSearchableViewMixin):
"""List of all subscriptions."""

sca_alert = Text('//div[contains(@class,"alert-warning")]')
table = SatSubscriptionsViewTable(
locator='//div[@id="subscriptions-table"]//table',
column_widgets={
Expand Down
Loading