sphinx-tribes
sphinx-tribes copied to clipboard
Implement component tests for paying bounties
These unit tests are all from the perspective of a user who is signed in.
Pay through organization from the home page
- [ ] If I click a bounty on the home page, it should take me to the bounty url and pop-up
- [ ] I should see "Pay Bounty" button if a bounty is associated with an organization
- [ ] When I click on "Pay bounty", it should first check to see if there is enough funds in the org to perform a key send. If there is, then the bounty should be marked as paid and payment should be sent via keysend.
- [ ] When I click on "Pay bounty", it should first check to see if there is enough funds in the org to perform a key send. If there is NOT, then an error modal should pop up
Pay through organization from the profile page
- [ ] If I click a bounty on the home page, it should take me to the bounty url and pop-up (The modal here should pull from the same one as the home page)
Pay without the organization
- [ ] If I click a bounty on the home page, it should take me to the bounty url and pop-up
- [ ] When a bounty is NOT associated with an organization, I should NOT see a "Pay Bounty" button.
- [ ] When a bounty is NOT associated with an organization, I should see a green mark as paid button.
- [ ] The green mark as paid button should be clickable.
- [ ] When I click on the green mark as paid button, it should take me to a modal called "adjust the amount"
- [ ] On this screen I should see the assigned hunter, place to enter in sats, and a blue next button that is clickable.
- [ ] On this screen, the default amount should be what was listed in the bounty but it should also be editable.
- [ ] When I click "next" it should take me to the Award Badge screen with a "skip and mark as paid" button.
- [ ] If I select a badge, the green button should be replaced as "Mark as paid"
- [ ] When either "skip and mark as paid" and "mark as paid" is clicked, the bounty should be marked as completed.
- [ ] When it is in the completed state, a "mark as unpaid" should be visible and clickable.
- [ ] When "mark as unpaid" is clicked, it should revert the bounty to an "assigned" state that has yet to be completed.