From 02bc14f369f06f6fc211cd68d5a894e2de8ac065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Va=C5=A1ina?= Date: Wed, 11 Sep 2024 11:58:17 +0200 Subject: [PATCH] Fix hostCollection UI e2e test (#16318) (cherry picked from commit 5535d6f014b85c56ef66c2e58d80902d93a6ea78) --- tests/foreman/ui/test_hostcollection.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/foreman/ui/test_hostcollection.py b/tests/foreman/ui/test_hostcollection.py index 66704c1fa1b..827690a0cea 100644 --- a/tests/foreman/ui/test_hostcollection.py +++ b/tests/foreman/ui/test_hostcollection.py @@ -205,9 +205,7 @@ def _get_content_repository_urls(repos_collection, lce, content_view, module_tar @pytest.mark.tier2 @pytest.mark.upgrade -def test_positive_end_to_end( - session, module_target_sat, module_org_with_parameter, smart_proxy_location -): +def test_positive_end_to_end(module_target_sat, module_org_with_parameter, smart_proxy_location): """Perform end to end testing for host collection component :id: 1d40bc74-8e05-42fa-b6e3-2999dc3b730d @@ -222,7 +220,8 @@ def test_positive_end_to_end( host = module_target_sat.api.Host( organization=module_org_with_parameter, location=smart_proxy_location ).create() - with session: + with module_target_sat.ui_session() as session: + session.organization.select(module_org_with_parameter.name) session.location.select(smart_proxy_location.name) # Create new host collection session.hostcollection.create(