Skip to content

Add unit tests for the bonding curve price preview component rendering the correct XLM amount #684

Description

@Chucks1093

Summary

The bonding curve price preview component calculates the XLM cost for buying N keys and displays it to the user. Unit tests should confirm the displayed amount is correct for boundary values and that the component re-renders when the input quantity changes.

Scope

  • Test quantity 1 displays the correct price for the first key on the curve
  • Test quantity 0 displays 0 XLM and no buy button
  • Test a large quantity (e.g. 100) displays a price higher than quantity 1
  • Test that changing the quantity input updates the displayed price without a page reload
  • Mock the bonding curve calculation function and assert it is called with the correct arguments

Acceptance Criteria

  • Correct XLM price shown for quantity 1, 0, and a large value
  • Price updates on quantity change without reload
  • Bonding curve function called with correct arguments on each render
  • Component shows a loading state while the price is being calculated

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions