Skip to content

test: add holdings page sell balance update coverage (#574) - #638

Merged
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
extolkom:test/574-holdings-sell-balance-update
Jul 27, 2026
Merged

test: add holdings page sell balance update coverage (#574)#638
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
extolkom:test/574-holdings-sell-balance-update

Conversation

@extolkom

Copy link
Copy Markdown
Contributor

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 a
    holding of 1 key, simulates a full sell, asserts the holding entry
    is no longer rendered
  • updates_holdings_without_manual_refresh — asserts the quantity
    update 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 holdings
    for two different creators, sells from one, asserts the other is
    unchanged

Scope / non-goals

  • No changes to the holdings page component or sell-confirmation flow
    itself — this PR is test coverage only, per the issue scope
  • [If step 5's stop condition triggered: note here that a specific
    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)

  • Holding quantity decrements correctly after sell confirmation
  • Holding entry removed when quantity reaches 0
  • Holdings page does not require a manual refresh to reflect the change
  • Test covers both partial sell and full sell cases

Verification

  • npm test -- holdings — [pass/fail summary]
  • npm run typecheck — [pass/fail]
  • npm run lint — [pass/fail]
  • Branch rebased on latest origin/main

Notes 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]

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit f0f0e02 into accesslayerorg:dev Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration test for holdings page showing updated balance after a successful sell

2 participants