[SDK-React] Add comprehensive unit tests for useStreamRunway hook and StreamRunwayProgress component
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
- Create
packages/flowfi-react/tests/useStreamRunway.test.tsx. - Test runway calculation before start time, at 50% progress, when paused, and after completion using Vitest fake timers.
Acceptance Criteria
- [ ] Tests verify
percentage,remainingSeconds, andisDepletedstates. - [ ] Tests verify
<StreamRunwayProgress />renders correct ARIA progressbar attributes. - [ ]
npm testinpackages/flowfi-reactpasses.
@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.
@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.
@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.
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 🌊
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.