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

moving sca alert into sub class #1123

Merged
merged 1 commit into from
Jan 8, 2024
Merged
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
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
Loading