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

[6.15 RFE] Adding views and entities for sca alerts on 6.15 #1026

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 @@ -178,6 +178,15 @@ def read_subscriptions(self):
view = self.navigate_to(self, 'All')
return view.table.read()

def sca_alert(self):
view = self.navigate_to(self, 'All')
wait_for(
Comment on lines +181 to +183
Copy link
Collaborator

Choose a reason for hiding this comment

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

lambda: view.sca_alert.read(),
handle_exception=True,
timeout=10,
)
return view.sca_alert.read()


class SubscriptionNavigationStep(NavigateStep):
"""To ensure that we reached the destination, some targets need extra post navigation tasks"""
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