stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that 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
12 stars 42 forks source link

[Tests][Component] Add tests to frontend/app/src/pages/tickets/TicketModalPage.tsx For Paid State #122

Closed elraphty closed 8 months ago

elraphty commented 8 months ago

Context

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

File to add test src/pages/tickets/__tests__/TicketModalPage.spec.tsx

Update 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 performs the right actions when a bounty is paid

Acceptance Criteria

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

KumarNayan commented 8 months ago

Assign

ecurrencyhodler commented 8 months ago

@adeel-ahmad-sh do you want to try this?

adeel-ahmad-sh commented 8 months ago

@ecurrencyhodler sure

wright-eric commented 8 months ago

Assign