Skip to content

Commit

Permalink
moving sca alert into sub class
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 committed Jan 8, 2024
1 parent a4182d7 commit 8d3aef8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 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(
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 All @@ -191,15 +200,6 @@ 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

0 comments on commit 8d3aef8

Please sign in to comment.