diff --git a/airgun/entities/subscription.py b/airgun/entities/subscription.py index 348634538..20b8e812c 100644 --- a/airgun/entities/subscription.py +++ b/airgun/entities/subscription.py @@ -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( + 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""" diff --git a/airgun/views/activationkey.py b/airgun/views/activationkey.py index 219dafdd3..baf64122a 100644 --- a/airgun/views/activationkey.py +++ b/airgun/views/activationkey.py @@ -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): diff --git a/airgun/views/contenthost.py b/airgun/views/contenthost.py index 3e2a02c02..9027f3bab 100644 --- a/airgun/views/contenthost.py +++ b/airgun/views/contenthost.py @@ -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') diff --git a/airgun/views/organization.py b/airgun/views/organization.py index f39bfc4bb..3e4032135 100644 --- a/airgun/views/organization.py +++ b/airgun/views/organization.py @@ -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"]') @@ -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 diff --git a/airgun/views/subscription.py b/airgun/views/subscription.py index ec0b23b27..0daf8e6f5 100644 --- a/airgun/views/subscription.py +++ b/airgun/views/subscription.py @@ -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={