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] Add tests to frontend/app/src/pages/tickets/TicketModalPage.tsx #1414

Closed elraphty closed 8 months ago

elraphty commented 9 months ago

Context

TicketModalPage.tsx Displays a single bounty in a modal. Add component test coverage.

File to be tested src/pages/tickets/__tests__/TicketModalPage.spec.tsx

Create file src/pages/tickets/__tests__/TicketModalPage.spec.tsx

Make a mock bounty and return the mock bounty when TicketModalPage.tsx makes a getBounty() call, also mock the main.getBountyIndexById() call to return your mock bounty index.

Check frontend/app/src/people/main/__tests__/MainHeader.spec.tsx for example

We want to test that the TicketModalPage displays the right data

Acceptance Criteria

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

KumarNayan commented 9 months ago

Assign

elraphty commented 9 months ago

Assign

@ecurrencyhodler

KumarNayan commented 9 months ago

@ecurrencyhodler can I work on this ?

ecurrencyhodler commented 9 months ago

Sorry missed this. It's yours.

ecurrencyhodler commented 8 months ago

@KumarNayan do you have an update on this issue? Also can you submit your pr to the frontend repo but tag this issue in the backend repo?

KumarNayan commented 8 months ago

@KumarNayan do you have an update on this issue? Also can you submit your pr to the frontend repo but tag this issue in the backend repo?

Hi @ecurrencyhodler sorry for the delay. PR is up for review.