flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[SDK-React] Add comprehensive unit tests for useStreamRunway hook and StreamRunwayProgress component

Open blurbeast opened this issue 1 month ago • 5 comments

Overview

packages/flowfi-react includes src/hooks/useStreamRunway.ts and src/components/StreamRunwayProgress.tsx, but currently only useClaimableBalance.test.tsx exists in packages/flowfi-react/tests/.

Problem

  • Runway percentage and time-remaining calculations lack automated test coverage for active, paused, and depleted streams.

Proposed Changes

  1. Create packages/flowfi-react/tests/useStreamRunway.test.tsx.
  2. Test runway calculation before start time, at 50% progress, when paused, and after completion using Vitest fake timers.

Acceptance Criteria

  • [ ] Tests verify percentage, remainingSeconds, and isDepleted states.
  • [ ] Tests verify <StreamRunwayProgress /> renders correct ARIA progressbar attributes.
  • [ ] npm test in packages/flowfi-react passes.

blurbeast avatar Oct 18 '26 05:10 blurbeast

@rajesetavie-maker has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello Maintainer, I’ve gone through the requirements, and I can provide a proper solution that aligns with the specified criteria. Kindly assign this task to me.Thank you

ℹ️ Repo Maintainers: To accept this application, review their application or assign @rajesetavie-maker to this issue.

rajesetavie-maker avatar Oct 18 '26 11:10 rajesetavie-maker

@Ova-Klik has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

HI, maintainer, please assign me this task.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ova-Klik to this issue.

Ova-Klik avatar Oct 18 '26 11:10 Ova-Klik

@greyforreal has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello, please help assign this issues to me

ℹ️ Repo Maintainers: To accept this application, review their application or assign @greyforreal to this issue.

greyforreal avatar Oct 18 '26 11:10 greyforreal

Congratulations, @greyforreal! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @greyforreal: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Oct 18 '26 11:10 drips-wave[bot]

This issue has been completed by @greyforreal as part of the Stellar Wave Program's 10th Wave 🥳

😎 @greyforreal: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Oct 18 '26 13:10 drips-wave[bot]