[Repo Assist] test: add 5 unit tests for OperationComplete and Error message handling (231→236)#174
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…ng (231→236) - operation_complete_single_op_invalidates_cache: verifies detail_cache is cleared when a successful single operation (Upgrade) completes - operation_complete_failure_no_refresh: verifies loading stays false and post_refresh_status remains None for a failed operation - operation_complete_success_sets_post_refresh_status: verifies a successful Pin sets post_refresh_status with the operation message - operation_complete_unpin_invalidates_cache: verifies detail_cache is cleared after Unpin (parallel to the Upgrade cache test) - error_clears_loading_and_post_refresh_status: verifies the Error handler resets both loading and post_refresh_status (the existing test only covered detail_loading and the status string) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
What
Adds 5 unit tests covering the
OperationCompleteandErrormessage paths inprocess_messages, which previously had no dedicated test coverage for single-operation scenarios.process_messages_operation_complete_single_op_invalidates_cachedetail_cacheis evicted when a successfulUpgradecompletesprocess_messages_operation_complete_failure_no_refreshloading, does not setpost_refresh_statusprocess_messages_operation_complete_success_sets_post_refresh_statusPinsetspost_refresh_statuscarrying the operation messageprocess_messages_operation_complete_unpin_invalidates_cachedetail_cacheis evicted afterUnpinprocess_messages_error_clears_loading_and_post_refresh_statusErrorhandler resets bothloadingandpost_refresh_status(existing test only covereddetail_loading+ status text)Why
The only
OperationCompletetest that existed before was for theBatchUpgradepath (multi-select clearing). The five code paths for single operations (Install / Uninstall / Upgrade / Pin / Unpin) were exercised by the code but not covered by tests — a regression in cache-invalidation or refresh-triggering logic would have gone unnoticed.Test Status