From 2fe364acbb63b67c06d9ab3e9e3bad1cc7b2ceb2 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:39:58 -0500 Subject: [PATCH] add read ansible role entities and views (#1620) (#1624) (cherry picked from commit 1c392976ff818402cc1d951176e87af908f2c56c) Co-authored-by: amolpati30 <151733635+amolpati30@users.noreply.github.com> --- airgun/entities/ansible_role.py | 7 +++++++ airgun/views/ansible_role.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/airgun/entities/ansible_role.py b/airgun/entities/ansible_role.py index ecf109cfc..f0bc0a3aa 100644 --- a/airgun/entities/ansible_role.py +++ b/airgun/entities/ansible_role.py @@ -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): diff --git a/airgun/views/ansible_role.py b/airgun/views/ansible_role.py index 8f6729196..34f46352b 100644 --- a/airgun/views/ansible_role.py +++ b/airgun/views/ansible_role.py @@ -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')