stakwork / sphinx-tribes

Backend for sphinx tribes and bounties. The bounty platform pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
33 stars 60 forks source link

[Tests][Component] Create test for people/widgetViews/UserTicketsView.tsx #1228

Closed elraphty closed 9 months ago

elraphty commented 9 months ago

Context

UserTicketsView.tsx displays the bounties assigned to a bounty hunter and adds some test coverage.

File to be tested src/people/widgetViews/__tests__/UserTicketsView.spec.tsx

Create a file named src/people/widgetViews/__tests__/UserTicketsView.spec.tsx

Make a Mock API request to get user-assigned tickets, check getPersonAssignedBounties in frontend/app/src/store/main.ts, and mock the request API request in the function.

Check frontend/app/src/bounties/__tests__/bountyTest.spec.ts for example

We want to test that the bounties listed match the mock data bounties

Acceptance Criteria

You can use this PR as an example https://github.com/stakwork/sphinx-tribes/pull/1185

KumarNayan commented 9 months ago

Can you assign this to me ? @elraphty

elraphty commented 9 months ago

Can you assign this to me ? @elraphty

@ecurrencyhodler has not created a bounty for it yet.

ecurrencyhodler commented 9 months ago

All yours @KumarNayan https://community.sphinx.chat/bounty/1028