Skip to content

Add unit tests for the staking panel asserting the claim button state based on the lock expiry #815

Description

@Chucks1093

Summary

The staking panel's Claim button should be disabled while the lock period is active and enabled once it expires. Unit tests using fake timers should assert the correct button state at various points relative to the lock expiry.

Scope

  • Test that the Claim button is disabled when unlock_ledger is in the future
  • Test that the Claim button is enabled when unlock_ledger has passed
  • Test that the lock expiry countdown displays the correct HH:MM:SS value
  • Test that the countdown reaches 00:00:00 and the Claim button enables without a page reload
  • Test that clicking Claim calls the contract with the correct key_id

Acceptance Criteria

  • Claim disabled when lock is active
  • Claim enabled after lock expires
  • Countdown displays correct time remaining
  • Claim button enables automatically when countdown hits zero
  • Contract called with correct key_id on claim

ETA: 12 hours


Coordinate on Telegram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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