Skip to content

Commit

Permalink
added new support for feature manifest expires soon
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant committed May 8, 2024
1 parent 3470a54 commit 5db9f61
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions airgun/entities/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ def read_delete_manifest_message(self):
manage_view.close_button.click()
return delete_message

def read_expire_manifest_message(self): # new changes
"""Read message displayed about 'manifest expiration' at Subscription Manifest section"""
view = self.navigate_to(self, 'Manage Manifest')
view.wait_animation_end()
if not view.manifest_alert.is_displayed:
return None
expire_manifest_header = view.manifest_expire_header.read()
expire_manifest_message = view.manifest_expire_message.read()
# close opened modal dialogs views
manage_view = ManageManifestView(self.browser)
if manage_view.is_displayed:
manage_view.close_button.click()
return expire_manifest_header, expire_manifest_message

def add(self, entity_name, quantity=1):
"""Attach new subscriptions
:param entity_name: Name of subscription to attach
Expand Down
7 changes: 7 additions & 0 deletions airgun/views/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ def is_searchable(self):

class ManageManifestView(BaseLoggedInView):
ROOT = '//div[@role="dialog" and @tabindex][div//h4[normalize-space(.)="Manage Manifest"]]'
manifest_alert = Text(
'//*[@id="manifest-history-tabs-pane-1"]/div/h3//following-sibling::div[@aria-label="Warning Alert" or @aria-label="Danger Alert"]'
)
manifest_expire_header = Text('//*[@id="manifest-history-tabs-pane-1"]//following::div/h4')
manifest_expire_message = Text(
'//*[@id="manifest-history-tabs-pane-1"]//following::div/div[2]/span'
)
close_button = Button('Close')

@View.nested
Expand Down

0 comments on commit 5db9f61

Please sign in to comment.