π Description
src/app/TransactionProgressModal.tsx drives the pending β submitted β success
/ failed transaction lifecycle and (per the design issues) a copy-hash and retry
affordance. It currently has no test file, so its state transitions and retry
callback are unverified.
Goal: cover each transaction state's rendering plus the retry and copy-hash
actions.
π― Requirements and Context
- Assert distinct rendering for pending, submitted, success, and failed states.
- On failed, assert a retry control invokes the retry handler.
- On success/submitted, assert the transaction hash renders and copy-to-clipboard
is wired (mock navigator.clipboard).
- Verify the modal closes via its close handler and never throws when a hash is
absent.
π οΈ Suggested Execution
1. Fork the repo and create a branch
git checkout -b test/transaction-progress-modal
2. Implement changes
- Add
src/app/__tests__/TransactionProgressModal.test.tsx (RTL + Vitest).
- Stub
navigator.clipboard.writeText and assert it is called with the hash.
3. Test and commit
- Run the repo suite:
pnpm test
- Edge cases: failed with no hash, clipboard rejection, retry while pending.
Example commit message
test: cover TransactionProgressModal states, retry, and copy-hash
β
Guidelines
- Minimum 95% test coverage on the component under test.
- Clear, reviewer-friendly test names.
- Timeframe: 96 hours.
π·οΈ Labels
type-testing Β· area-frontend Β· MAYBE REWARDED Β· GRANTFOX OSS Β·
OFFICIAL CAMPAIGN
π¬ Community & Support
- Join the CommitLabs contributor Discord: https://discord.gg/WV7tdYkJk
- Please introduce yourself before you start so we can avoid duplicate work.
π Description
src/app/TransactionProgressModal.tsxdrives the pending β submitted β success/ failed transaction lifecycle and (per the design issues) a copy-hash and retry
affordance. It currently has no test file, so its state transitions and retry
callback are unverified.
π― Requirements and Context
is wired (mock
navigator.clipboard).absent.
π οΈ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
src/app/__tests__/TransactionProgressModal.test.tsx(RTL + Vitest).navigator.clipboard.writeTextand assert it is called with the hash.3. Test and commit
pnpm testExample commit message
β Guidelines
π·οΈ Labels
type-testingΒ·area-frontendΒ·MAYBE REWARDEDΒ·GRANTFOX OSSΒ·OFFICIAL CAMPAIGNπ¬ Community & Support