Skip to content

Commit

Permalink
add read ansible role entities and views (#1620) (#1624)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1c39297)

Co-authored-by: amolpati30 <[email protected]>
  • Loading branch information
Satellite-QE and amolpati30 authored Nov 7, 2024
1 parent 3a41047 commit 2fe364a
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 2fe364a

Please sign in to comment.