Skip to content

Commit

Permalink
add read ansible role entities and views (#1620) (#1622)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Nov 7, 2024
1 parent b3c3ff5 commit 9648844
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions airgun/entities/ansible_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ def import_all_roles(self):
view.submit.click()
return available_roles_count

def read_all(self):
"""Read all roles before importing"""
view = self.navigate_to(self, 'Import')
view.dropdown.click()
view.max_per_pg.click()
return view.roles.read()


@navigator.register(AnsibleRolesEntity, 'All')
class ShowAllRoles(NavigateStep):
Expand Down
3 changes: 3 additions & 0 deletions airgun/views/ansible_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class AnsibleRolesImportView(BaseLoggedInView):
0: Checkbox(locator='.//input[@type="checkbox"]'),
},
)
roles = Text("//table[contains(@class, 'pf-c-table')]")
dropdown = Text("//button[contains(@class, 'pf-c-options-menu')]")
max_per_pg = Text("//ul[contains(@class, 'pf-c-options-menu')]/li[6]")
pagination = CompactPagination()
submit = Button('Submit')
cancel = Button('Cancel')
Expand Down

0 comments on commit 9648844

Please sign in to comment.