Skip to content

test: add unit tests for earn tabs, rewards bar, GLV vault hook, and …#284

Merged
IbrahimIjai merged 4 commits into
SO4-Markets:mainfrom
gerani1:feat/earn-referral-tests-234-235-236-237
Jun 26, 2026
Merged

test: add unit tests for earn tabs, rewards bar, GLV vault hook, and …#284
IbrahimIjai merged 4 commits into
SO4-Markets:mainfrom
gerani1:feat/earn-referral-tests-234-235-236-237

Conversation

@gerani1

@gerani1 gerani1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

…referral code hook

  • Add unit tests for EarnPage tab navigation (Portfolio, Discover, Additional opportunities, Distributions)
  • Add unit tests for RewardsBar covering zero rewards, non-zero rewards, loading state, and claim button state
  • Add unit tests for useGLVVaultData hook covering success, RPC error fallback, wallet-connected/disconnected balance, and disabled state
  • Add unit tests for useReferralCode hook covering stored code, on-chain fallback, not-found, and RPC error paths

Closes

Closes #234
Closes #235
Closes #236
Closes #237

Test plan

  • bun run --cwd apps/web test passes for all four new test files
  • Tab navigation tests use role="tab" assertions
  • Rewards bar tests assert disabled/enabled claim button based on pending rewards
  • GLV vault tests mock syntheticsReaderClient and cover error fallback path
  • Referral code tests mock readStoredAffiliateCode and referralStorageClient.getReferralInfo

…referral code hook

Closes SO4-Markets#234 — earn-page tab navigation tests
Closes SO4-Markets#235 — portfolio rewards bar tests
Closes SO4-Markets#236 — GLV vault data query hook tests
Closes SO4-Markets#237 — referral code query states tests
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@gerani1 is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@gerani1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@IbrahimIjai IbrahimIjai merged commit 6eb289c into SO4-Markets:main Jun 26, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web referrals: referral code query states Web earn: GLV vault data query hook Web earn: portfolio rewards bar Web earn: earn page tab navigation

2 participants