Skip to content

Commit

Permalink
add airgun support for parsing package details page link
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant authored and pondrejk committed Oct 15, 2024
1 parent 4cb153e commit 36d08c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions airgun/entities/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def read(self, entity_name, repository='All Repositories', widget_names=None):
view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository)
return view.read(widget_names=widget_names)

def click_install_on_link(self, entity_name, repository='All Repositories'):
"""Click on host link 'Installed On' which is present on Package detail tab
:param str entity_name: the package name to read.
:param str repository: repository name to select when searching for the
package.
"""
view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository)
view.install_on_host_link.click()


@navigator.register(PackageEntity, 'All')
class ShowAllPackages(NavigateStep):
Expand Down
1 change: 1 addition & 0 deletions airgun/views/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def is_displayed(self):

class PackageDetailsView(BaseLoggedInView):
breadcrumb = BreadCrumb()
install_on_host_link = Text(locator='*//span[contains(@ng-show, "installedPackageCount")]')

@property
def is_displayed(self):
Expand Down

0 comments on commit 36d08c8

Please sign in to comment.