Skip to content

Add unit tests for the key quantity input enforcing a minimum of 1 and a maximum equal to the available contract supply #753

Description

@Chucks1093

Summary

The key quantity input on the buy modal must reject values below 1 and above the creator's available supply. Unit tests should confirm inline validation errors appear for out-of-range values and the confirm button is disabled while the input is invalid.

Scope

  • Test entering 0 shows 'Minimum quantity is 1'
  • Test entering a negative number shows 'Minimum quantity is 1'
  • Test entering a value above available supply shows 'Exceeds available supply'
  • Test entering exactly the available supply passes validation
  • Test the confirm button is disabled while any validation error is active

Acceptance Criteria

  • 0 or negative shows minimum error
  • Above available supply shows capacity error
  • Exactly available supply passes validation
  • Confirm button disabled while input is invalid
  • No error shown for a valid quantity within range

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions