Skip to content

Commit

Permalink
Adding views and entities for sca only tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 committed Dec 11, 2023
1 parent 8322495 commit bd3a7be
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions airgun/entities/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ def read_subscriptions(self):
view = self.navigate_to(self, 'All')
return view.table.read()

def sca_alert(self):
view = self.navigate_to(self, 'All')
# return view.sca_alert.read()
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"""
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
1 change: 1 addition & 0 deletions airgun/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,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

0 comments on commit bd3a7be

Please sign in to comment.