diff --git a/tests/foreman/ui/test_host.py b/tests/foreman/ui/test_host.py index a1bfd17bc09..bfa71e51e07 100644 --- a/tests/foreman/ui/test_host.py +++ b/tests/foreman/ui/test_host.py @@ -1203,6 +1203,37 @@ def test_positive_manage_table_columns( assert (column in displayed_columns) is is_displayed +@pytest.mark.tier2 +def test_all_hosts_manage_columns(target_sat, function_org, new_host_ui): + """Verify that the manage columns widget changes the columns appropriately + + :id: 5e13267a-68d2-451a-ae00-6502dd5db7f4 + + :expectedresults: Through the widget you can change the columns on the All Hosts page + + :CaseComponent:Hosts-Content + + :Team: Phoenix-subscriptions + """ + columns = { + 'Host group': True, + 'Last report': True, + 'Comment': True, + 'IPv4': True, + 'MAC': True, + 'Sockets': True, + 'Cores': True, + 'RAM': True, + 'Boot time': True, + } + with target_sat.ui_session() as session: + session.organization.select(function_org.name) + session.all_hosts.manage_table_columns(columns) + displayed_columns = session.all_hosts.get_displayed_table_headers() + for column, is_displayed in columns.items(): + assert (column in displayed_columns) is is_displayed + + @pytest.mark.tier4 def test_positive_host_details_read_templates( session, target_sat, current_sat_org, current_sat_location @@ -1849,6 +1880,37 @@ def test_all_hosts_bulk_delete(target_sat, function_org, function_location, new_ assert session.all_hosts.bulk_delete_all() +@pytest.mark.tier2 +def test_multi_cv_read(target_sat, rhel_contenthost, function_org, new_host_ui): + """Create a host setup with multi-cv, and verify that the popover shows the appropriate info + + :id: ec6649df-3d3d-4557-8113-a23eee7032c9 + + :expectedresults: Successful read of multi-cv in Hosts UI and All Hosts UI + + :CaseComponent:Hosts-Content + + :Team: Phoenix-subscriptions + """ + cv1 = target_sat.api.ContentView(organization=function_org).create() + cv1.publish() + cv1 = cv1.read() + cv2 = target_sat.api.ContentView(organization=function_org).create() + cv2.publish() + cv2 = cv2.read() + lce1 = target_sat.api.LifecycleEnvironment(organization=function_org).create() + lce2 = target_sat.api.LifecycleEnvironment(organization=function_org).create() + cv1.version[0].promote(data={'environment_ids': lce1.id, 'force': False}) + cv2.version[0].promote(data={'environment_ids': lce2.id, 'force': False}) + rhel_contenthost.install_katello_ca(target_sat) + rhel_contenthost.register_contenthost( + org=function_org.name, lce=None, lces=f'{lce1.name}/{cv1.name},{lce2.name}/{cv2.name}' + ) + with target_sat.ui_session() as session: + session.organization.select(function_org.name) + session.all_hosts.read_table() + + @pytest.fixture(scope='module') def change_content_source_prep( module_target_sat,