Skip to content
Merged
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
27 changes: 27 additions & 0 deletions tests/foreman/ui/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
DEFAULT_ARCHITECTURE,
DEFAULT_CV,
DEFAULT_LOC,
DEFAULT_ORG,
ENVIRONMENT,
FAKE_1_CUSTOM_PACKAGE,
FAKE_7_CUSTOM_PACKAGE,
Expand Down Expand Up @@ -4248,3 +4249,29 @@ def test_assign_different_cv_from_same_env(

cv_env = session.host_new.get_content_view_envs(rhel_contenthost.hostname)[0]
assert cv_env['content_view'] == cv.name


def test_positive_only_single_library_option_in_create_form(target_sat):
"""Ensure that only 1 Library option is displayed in the Create Host form
when location is set to "Any location"

:id: 559f6324-dc17-4274-99f5-957ef0a2faf0

:steps:
1. Set location to "Any location"
2. Read LCE dropdown options in the Create host form

:expectedresults:
1. Only 1 Library option is displayed

:verifies: SAT-42710, SAT-32425

:customerscenario: true
"""
with target_sat.ui_session() as session:
session.organization.select(org_name=DEFAULT_ORG)
session.location.select(loc_name=ANY_CONTEXT['location'])
create_form = session.host.get_create_form()
create_form.host.lce.open_filter.click()
# Check that 'Library' appears just once
assert create_form.host.lce.filter_content.read().count('Library') == 1
Loading