Skip to content

Commit

Permalink
add read ansible role entities and views
Browse files Browse the repository at this point in the history
  • Loading branch information
amolpati30 committed Nov 5, 2024
1 parent 5d77ac1 commit e292482
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 e292482

Please sign in to comment.