Skip to content

Commit 5353565

Browse files
[6.18.z] Automation for SAT-32425 (#20896)
618AutomationSAT-32425
1 parent 460a71a commit 5353565

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tests/foreman/ui/test_host.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
DEFAULT_ARCHITECTURE,
3232
DEFAULT_CV,
3333
DEFAULT_LOC,
34+
DEFAULT_ORG,
3435
ENVIRONMENT,
3536
FAKE_1_CUSTOM_PACKAGE,
3637
FAKE_7_CUSTOM_PACKAGE,
@@ -3128,3 +3129,29 @@ def cleanup():
31283129
assert host_entity.location.id == new_location.id, (
31293130
f'Host {host_name} not moved to second location'
31303131
)
3132+
3133+
3134+
def test_positive_only_single_library_option_in_create_form(target_sat):
3135+
"""Ensure that only 1 Library option is displayed in the Create Host form
3136+
when location is set to "Any location"
3137+
3138+
:id: 559f6324-dc17-4274-99f5-957ef0a2faf0
3139+
3140+
:steps:
3141+
1. Set location to "Any location"
3142+
2. Read LCE dropdown options in the Create host form
3143+
3144+
:expectedresults:
3145+
1. Only 1 Library option is displayed
3146+
3147+
:verifies: SAT-42710, SAT-32425
3148+
3149+
:customerscenario: true
3150+
"""
3151+
with target_sat.ui_session() as session:
3152+
session.organization.select(org_name=DEFAULT_ORG)
3153+
session.location.select(loc_name=ANY_CONTEXT['location'])
3154+
create_form = session.host.get_create_form()
3155+
create_form.host.lce.open_filter.click()
3156+
# Check that 'Library' appears just once
3157+
assert create_form.host.lce.filter_content.read().count('Library') == 1

0 commit comments

Comments
 (0)