Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
damoore044 committed Oct 22, 2024
1 parent b4098ed commit 00ee4d1
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 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 in table by version name
"""
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,7 +309,9 @@ def prerequisite(self, *args, **kwargs):

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


Expand Down

0 comments on commit 00ee4d1

Please sign in to comment.