Skip to content

test: add comprehensive lifecycle and component test coverage - #387

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
codellins:add-test-coverage-lifecycle-components
Jul 26, 2026
Merged

test: add comprehensive lifecycle and component test coverage#387
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
codellins:add-test-coverage-lifecycle-components

Conversation

@codellins

Copy link
Copy Markdown
Contributor

What

Comprehensive test coverage for order/withdrawal lifecycle events in the indexer and trade UI components.

Issues Resolved

Closes #264
Closes #263
Closes #228
Closes #229

Changes

#264 - Indexer: order lifecycle mapping tests

Added fixtures and tests covering the full order lifecycle from creation through cancellation:

  • Tests for ord_crt (create), ord_upd (update), ord_frz (freeze), ord_exe (execute), ord_can (cancel)
  • Validates order status transitions and key fields (account, market, order type, price)
  • Verifies frozen orders remain queryable with correct status
  • Tests idempotency of event dispatch

#263 - Indexer: withdrawal lifecycle mapping tests

Added comprehensive withdrawal lifecycle tests:

  • Tests for wth_crt (create), wth_exe (execute), wth_can (cancel)
  • Validates entity IDs, account, market, ledger, and status fields
  • Tests idempotency across event reruns
  • Ensures withdrawal states transition correctly

#228 - Web trade: referral prompt flow

Added full test coverage for ApplyReferralCodePrompt component:

  • Render states: with/without account, loading, existing code, completed prompt
  • Code normalization to uppercase
  • Submission with validation and callback assertions
  • Error handling for validation and apply failures
  • Button state management during pending operations
  • Skip flow and prompt dismissal
  • Error clearing on user input

#229 - Web trade: circuit breaker banner

Added comprehensive CircuitBreakerBanner component tests:

  • Hidden state when inactive or dismissed
  • Visible frozen state with correct message
  • Alert role for accessibility
  • Amber warning styling verification
  • Dismiss button functionality and styling
  • Behavior when status remains active after dismissal
  • Explanatory copy display with accessible text

Resolves SO4-Markets#264: Add order lifecycle mapping tests covering ord_crt, ord_upd, ord_frz, ord_exe, and ord_can events with idempotency verification

Resolves SO4-Markets#263: Add withdrawal lifecycle mapping tests covering wth_crt, wth_exe, and wth_can events, verify idempotency and key fields (account, market, ledger)

Resolves SO4-Markets#228: Add ApplyReferralCodePrompt component tests covering render states, code normalization, submission, validation, error handling, and skip flow

Resolves SO4-Markets#229: Add CircuitBreakerBanner component tests verifying hidden/visible states, alert role, styling, dismissal behavior, and accessible explanatory text
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@codellins is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@codellins 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

@IbrahimIjai
IbrahimIjai merged commit 6f43e99 into SO4-Markets:main Jul 26, 2026
0 of 4 checks 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

2 participants