Skip to content

Commit

Permalink
fix3
Browse files Browse the repository at this point in the history
  • Loading branch information
damoore044 committed Oct 21, 2024
1 parent b4098ed commit f8e0a96
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions airgun/entities/contentview_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,19 @@ def delete(self, entity_name):
view.delete_finish.click()

def delete_version(self, entity_name, version):
"""Deletes the specified version of the content view"""
view = self.navigate_to(self, 'Version', entity_name=entity_name, version=version)
"""Deletes the specified version of the content view
:return: bool,
True if specified version was found and clicked 'Delete'
False (default) if not found
"""
result = False
view = self.navigate_to(
self,
'Version',
entity_name=entity_name,
version=version,
timeout=60,
)
self.browser.plugin.ensure_page_safe(timeout='10s')
view.wait_displayed()
result = view.version_dropdown.item_select('Delete')
Expand Down Expand Up @@ -129,7 +140,13 @@ def read_repositories(self, entity_name):

def read_version_table(self, entity_name, version, tab_name, search_param=None):
"""Reads a specific table for a CV Version"""
view = self.navigate_to(self, 'Version', entity_name=entity_name, version=version)
view = self.navigate_to(
self,
'Version',
entity_name=entity_name,
version=version,
timeout=60,
)
self.browser.plugin.ensure_page_safe(timeout='5s')
view.wait_displayed()
# This allows dynamic access to the proper table
Expand Down Expand Up @@ -292,6 +309,7 @@ def prerequisite(self, *args, **kwargs):

def step(self, *args, **kwargs):
version = kwargs.get('version')
self.parent.versions.table.wait_displayed()
self.parent.versions.search(version)
self.parent.versions.table.row(version=version)['Version'].widget.click()

Expand Down

0 comments on commit f8e0a96

Please sign in to comment.