Skip to content

Commit 62b2b54

Browse files
Automation to support MultiCV bulk update (#20755)
* Automation to support MultiCV bulk update * Update tests/foreman/ui/test_host.py Co-authored-by: Vijaykumar Sawant <visawant@redhat.com> --------- Co-authored-by: Vijaykumar Sawant <visawant@redhat.com>
1 parent 23e4381 commit 62b2b54

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

tests/foreman/ui/test_host.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,22 +2069,28 @@ def test_all_hosts_bulk_cve_reassign(
20692069
with target_sat.ui_session() as session:
20702070
session.organization.select(module_org.name)
20712071
session.location.select(module_location.name)
2072-
headers = session.all_hosts.get_displayed_table_headers()
2073-
if "Lifecycle environment" not in headers:
2072+
try:
2073+
headers = session.all_hosts.get_displayed_table_headers()
2074+
if 'Lifecycle environment' not in headers:
2075+
session.all_hosts.manage_table_columns(
2076+
{
2077+
'Lifecycle environment': True,
2078+
}
2079+
)
2080+
pre_table = session.all_hosts.read_table()
2081+
for row in pre_table:
2082+
assert row['Lifecycle environment'] == module_lce.name
2083+
session.all_hosts.manage_cve(lce_name=lce2.name, cv_name=module_cv.name)
20742084
wait_for(lambda: session.browser.refresh(), timeout=5)
2085+
post_table = session.all_hosts.read_table()
2086+
for row in post_table:
2087+
assert row['Lifecycle environment'] == lce2.name
2088+
finally:
20752089
session.all_hosts.manage_table_columns(
20762090
{
2077-
'Lifecycle environment': True,
2091+
'Lifecycle environment': False,
20782092
}
20792093
)
2080-
pre_table = session.all_hosts.read_table()
2081-
for row in pre_table:
2082-
assert row['Lifecycle environment'] == module_lce.name
2083-
session.all_hosts.manage_cve(lce=lce2.name, cv=module_cv.name)
2084-
wait_for(lambda: session.browser.refresh(), timeout=5)
2085-
post_table = session.all_hosts.read_table()
2086-
for row in post_table:
2087-
assert row['Lifecycle environment'] == lce2.name
20882094

20892095

20902096
def test_all_hosts_redirect_button(target_sat):

0 commit comments

Comments
 (0)