From f793cc1822226afb2d76fac40b1cecf7ddc172d1 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:00:38 -0500 Subject: [PATCH] add airgun support for parsing package details page link (#1596) (cherry picked from commit 36d08c82dcaa5a852e131a4b5880bfb44205ffb8) Co-authored-by: vijaysawant --- airgun/entities/package.py | 10 ++++++++++ airgun/views/package.py | 1 + 2 files changed, 11 insertions(+) diff --git a/airgun/entities/package.py b/airgun/entities/package.py index 23c798882..16b00c550 100644 --- a/airgun/entities/package.py +++ b/airgun/entities/package.py @@ -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): diff --git a/airgun/views/package.py b/airgun/views/package.py index 0f795ce01..51e2260de 100644 --- a/airgun/views/package.py +++ b/airgun/views/package.py @@ -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):