Skip to content

Commit b660a46

Browse files
committed
add enable functionality to iop
1 parent d210fcb commit b660a46

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tests/foreman/ui/test_rhcloud_iop.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def test_iop_recommendations_remediation_type_and_status(
288288
module_target_sat_insights,
289289
):
290290
"""Set up Satellite with iop enabled, verify recommendations remediation type,
291-
and test filtering recommendations by status.
291+
disable the recommendation, check status, then re-enable the recommendation.
292292
293293
:id: 62834698-b4b8-4218-855c-2b2aa584b364
294294
@@ -297,21 +297,18 @@ def test_iop_recommendations_remediation_type_and_status(
297297
2. In Satellite UI, go to Red Hat Lightspeed > Recommendations.
298298
3. Search for "OpenSSH config permissions" recommendation.
299299
4. Verify the recommendation's remediation type is "Playbook".
300-
5. Apply filter for "Enabled" status recommendations.
301-
6. Verify Enabled recommendations are greater than 0.
302-
7. Apply filter for "Disabled" status recommendations.
303-
8. Verify Disabled recommendations are 0.
300+
5. Disable recommendation.
301+
6. Verify recommendation is disabled.
302+
7. Re-enable recommendation.
303+
8. Verify recommendation is enabled.
304304
305305
:expectedresults:
306306
1. Red Hat Lightspeed recommendation related to "OpenSSH config permissions" issue is listed
307307
for misconfigured machine.
308308
2. The recommendation has remediation type "Playbook".
309-
3. Enabled recommendations are displayed (count greater than 0).
310-
4. No disabled recommendations are displayed.
309+
3. Recommendation can be disabled and re-enabled.
311310
312-
:CaseImportance: Critical
313-
314-
:Verifies: SAT-32566
311+
:Verifies: SAT-32566, SAT-38139
315312
316313
:parametrized: yes
317314
@@ -345,3 +342,10 @@ def test_iop_recommendations_remediation_type_and_status(
345342
# Verify that the disabled recommendation is filtered
346343
result = session.recommendationstab.apply_filter("Status", "Disabled")
347344
assert 'Decreased security: OpenSSH config permissions' in result[0]['Name']
345+
346+
session.recommendationstab.enable_recommendation(
347+
recommendation_name='Decreased security: OpenSSH config permissions'
348+
)
349+
350+
result = session.recommendationstab.apply_filter("Status", "Enabled")
351+
assert 'Decreased security: OpenSSH config permissions' in result[0]['Name']

0 commit comments

Comments
 (0)