test: add holdings page sell balance update coverage (#574) - #638
Merged
Chucks1093 merged 1 commit intoJul 27, 2026
Merged
Conversation
|
@extolkom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 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.
Summary
Closes #574
Adds integration test coverage for the holdings page reflecting the
correct balance after a successful key sell — covering both partial
sells (quantity decrements) and full sells (holding entry removed
entirely), with the update happening reactively rather than via a
manual refresh.
What's included
Tests added (
[test file path])decrements_holding_quantity_after_partial_sell_confirmation—mocks a holding of 3 keys, simulates a sell of 1 confirming
successfully, asserts the displayed quantity updates to 2
removes_holding_entry_after_full_sell_confirmation— mocks aholding of 1 key, simulates a full sell, asserts the holding entry
is no longer rendered
updates_holdings_without_manual_refresh— asserts the quantityupdate reflects via the app's existing reactive state/query
invalidation, without any forced refetch or re-render in the test
partial_sell_leaves_other_holdings_unaffected— mocks two holdingsfor two different creators, sells from one, asserts the other is
unchanged
Scope / non-goals
itself — this PR is test coverage only, per the issue scope
test failed against current main and why, and that component logic
was NOT modified to force it to pass — flag this clearly as a
possible pre-existing regression for maintainer triage]
Acceptance criteria (from #574)
Verification
npm test -- holdings— [pass/fail summary]npm run typecheck— [pass/fail]npm run lint— [pass/fail]origin/mainNotes for reviewers
[Fill in if anything surprising came up — e.g. if the "no manual
refresh" test required digging into how the app invalidates queries,
or if any existing test conventions had to be inferred rather than
matched exactly]