Skip to content

Commit 36d08c8

Browse files
vijaysawantpondrejk
authored andcommitted
add airgun support for parsing package details page link
1 parent 4cb153e commit 36d08c8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

airgun/entities/package.py

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ def read(self, entity_name, repository='All Repositories', widget_names=None):
3232
view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository)
3333
return view.read(widget_names=widget_names)
3434

35+
def click_install_on_link(self, entity_name, repository='All Repositories'):
36+
"""Click on host link 'Installed On' which is present on Package detail tab
37+
38+
:param str entity_name: the package name to read.
39+
:param str repository: repository name to select when searching for the
40+
package.
41+
"""
42+
view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository)
43+
view.install_on_host_link.click()
44+
3545

3646
@navigator.register(PackageEntity, 'All')
3747
class ShowAllPackages(NavigateStep):

airgun/views/package.py

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def is_displayed(self):
5151

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

5556
@property
5657
def is_displayed(self):

0 commit comments

Comments
 (0)