Skip to content

test: add web positions, orders, collateral dialog, and oracle staleness indicator tests#285

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
sanmipaul:any/web-positions-oracle-tests
Jun 26, 2026
Merged

test: add web positions, orders, collateral dialog, and oracle staleness indicator tests#285
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
sanmipaul:any/web-positions-oracle-tests

Conversation

@sanmipaul

@sanmipaul sanmipaul commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for 4 UI components in the web positions area, addressing issues.

Tests added

OracleStalenessIndicator (#230)

  • Staleness states (fresh, stale, unknown, warning)
  • Threshold-based visual indicators
  • Various staleness levels display

OrdersList (#231)

  • Loading skeleton, empty state, indexer disabled
  • Active orders with market name and type
  • Multiple orders rendering
  • Frozen status badge
  • Cancel buttons per order

PositionsList (#232)

  • Loading skeleton, empty state with trading link
  • Positions with market name, side badge, size
  • Short position badge
  • Action buttons (Share, + Collateral, - Collateral, Close)
  • Funding fee display and Claim button logic
  • Indexer disabled state
  • PnL color coding (green for positive, red for negative)

CollateralDialog (#233)

  • Null position/mode guards
  • Add/remove collateral dialog titles
  • Wallet balance display
  • Use Max button visibility
  • Insufficient balance validation
  • Cannot-remove-all-collateral validation
  • Confirm button enable/disable logic
  • Cancel handler

Closes #230
Closes #231
Closes #232
Closes #233

…ess indicator tests

- OracleStalenessIndicator: staleness states, thresholds, visual indicators
- OrdersList: loading, empty, disabled, active orders, multiple orders, frozen badge, cancel buttons
- PositionsList: loading, empty, positions rendering, short badge, action buttons, funding fee, disabled state, PnL colors
- CollateralDialog: null/mode guards, add/remove title, wallet balance, validation, enable/disable confirm, cancel handler
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@sanmipaul 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 Jun 26, 2026

Copy link
Copy Markdown

@sanmipaul 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 cc4d5c5 into SO4-Markets:main Jun 26, 2026
0 of 2 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

Development

Successfully merging this pull request may close these issues.

Web positions: collateral dialog Web positions: orders list states Web positions: positions list states Web trade: oracle staleness indicator

2 participants