Add tests for activation key with multiple content view environments#20745
Conversation
Reviewer's GuideAdds two UI test cases that validate activation key behavior when assigning content views across multiple lifecycle environments, covering both single-CV/multi-LCE and multi-CV/multi-LCE scenarios. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The setup for creating/publishing/promoting content views and lifecycle environments is duplicated across both tests; consider extracting a small helper to keep this logic consistent and easier to maintain.
- In both tests you index
session.activationkey.search(name)[0]without checking the list length; adding an explicit assertion that a single result is returned before indexing would make the tests more robust and clearer when they fail.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The setup for creating/publishing/promoting content views and lifecycle environments is duplicated across both tests; consider extracting a small helper to keep this logic consistent and easier to maintain.
- In both tests you index `session.activationkey.search(name)[0]` without checking the list length; adding an explicit assertion that a single result is returned before indexing would make the tests more robust and clearer when they fail.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
trigger: test-robottelo |
LadislavVasina1
left a comment
There was a problem hiding this comment.
Small changes requested, otherwise looks good.
Co-authored-by: Ladislav Vašina <ladislavvasina@gmail.com>
Co-authored-by: Ladislav Vašina <ladislavvasina@gmail.com>
|
trigger: test-robottelo |
|
Suggested. cosmetic changes which will not break execution flow |
|
trigger: test-robottelo |
Updated |
|
trigger: test-robottelo |
…v_lce_activation_key
…t/robottelo into multicv_lce_activation_key
|
trigger: test-robottelo |
Problem Statement
New MutiCV feature added for Activation key.
Solution
Add tests for activation key with multiple content view environments
test_positive_multi_lce_with_single_cv:
Validates that an activation key can have the same content view assigned to
multiple lifecycle environments. Creates a single content view, promotes it
to two different lifecycle environments, and verifies the activation key can
be configured with both CV/LCE combinations (CV1+LCE1, CV1+LCE2).
test_positive_multi_lce_with_multi_cv:
Validates that an activation key can have multiple content views assigned to
multiple lifecycle environments. Creates three different content views, each
promoted to a different lifecycle environment, and verifies the activation key
can be configured with all three unique CV/LCE combinations (CV1+LCE1, CV2+LCE2,
CV3+LCE3).
Related Issues
Airgun PR :SatelliteQE/airgun#2305
Automating https://issues.redhat.com/browse/SAT-30913
PRT test Cases example
trigger: test-robottelo
pytest: tests/foreman/ui/test_activationkey.py -k "test_positive_multi_lce_with_single_cv or test_positive_multi_lce_with_multi_cv"
airgun: 2305
Summary by Sourcery
Add UI tests validating activation keys can associate content views with multiple lifecycle environments.
Tests: