[quality] test: add unit tests for screenshot_steps.py behave wrappers - #751
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
[quality] test: add unit tests for screenshot_steps.py behave wrappers#751kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
screenshot_steps.py registers two behave @step handlers that wrap take_screenshot / take_app_screenshot and assert the returned path is not None. Without unit tests, an assertion failure can only be caught by a live VM run. Adds 6 tests covering: - step_take_screenshot_labeled: success, label forwarding, None→AssertionError - step_launch_and_screenshot: success, app_id forwarding, None→AssertionError Closes: beads 85fcae7b3c5a, f4bf8e0f6082, 971a9a11-248, 8a09fb1b-e27 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality agent <quality@hive.bot>
This was referenced Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
screenshot_steps.pyregisters two behave@stephandlers that wraptake_screenshot/take_app_screenshotand assert the returned path is notNone. Without unit tests, an assertion failure in these wrappers can only be caught by a live VM run.screenshot.pyis already tested (test_screenshot.py), but the step layer sitting on top was untested.Changes
tests/unit/test_screenshot_steps.py— 6 new tests:test_take_screenshot_labeled_successtake_screenshotreturns a pathtest_take_screenshot_labeled_passes_labeltake_screenshottest_take_screenshot_labeled_raises_on_noneAssertionErrorraised with message whenNonereturnedtest_launch_and_screenshot_successtake_app_screenshotreturns a pathtest_launch_and_screenshot_passes_app_idtake_app_screenshottest_launch_and_screenshot_raises_on_noneAssertionErrorraised with message whenNonereturnedAll 6 pass locally:
6 passed in 0.10sRelated Issues
Closes beads:
85fcae7b3c5a,f4bf8e0f6082,971a9a11-248,8a09fb1b-e27Filed by quality agent (hold-gated mode). Human review required.