Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.13.z] Fix Ansible Roles pagination test #15583

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/foreman/destructive/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_positive_import_all_roles(request, target_sat, function_org, auth_type)


@pytest.mark.parametrize('setting_update', ['entries_per_page=12'], indirect=True)
def test_positive_hostgroup_ansible_roles_tab_pagination(target_sat, setting_update):
def test_positive_hostgroup_ansible_roles_tab_pagination(target_sat, setting_update, function_org):
"""Import all Ansible roles available by default.

:id: 53fe3857-a08f-493d-93c7-3fed331ed392
Expand All @@ -117,6 +117,7 @@ def test_positive_hostgroup_ansible_roles_tab_pagination(target_sat, setting_upd
target_sat.api.Setting().search(query={'search': 'name=entries_per_page'})[0].value
)
with target_sat.ui_session() as session:
session.organization.select(function_org.name)
imported_roles = session.ansibleroles.import_all_roles()
total_role_count = str(session.ansibleroles.imported_roles_count)
assert imported_roles == int(total_role_count)
Expand All @@ -128,7 +129,9 @@ def test_positive_hostgroup_ansible_roles_tab_pagination(target_sat, setting_upd
assert create_page['ansible_roles']['pagination']['_items'].split()[2] == setting_value
assert create_page['ansible_roles']['pagination']['_items'].split()[-2] == total_role_count

hg = target_sat.api.HostGroup(name=gen_string('alpha')).create()
hg = target_sat.api.HostGroup(
name=gen_string('alpha'), organization=[function_org]
).create()
edit_page = session.hostgroup.helper.read_filled_view(
'Edit',
navigation_kwargs={'entity_name': hg.name},
Expand Down
Loading