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

[6.16.z] add airgun support for parsing package details page link #1596

Open
wants to merge 1 commit into
base: 6.16.z
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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
Loading