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

[Test][cypress] View bounty modal #377

Closed kevkevinpal closed 6 months ago

kevkevinpal commented 6 months ago

Context

Currently, we have a cypress command to create a bounty but we want to assert that we can view the bounty modal after creating it

So what we want to do is use create a bounty and then after open the first bounty on the page to view the modal. We want to assert that a few things in the modal appear

File to create

sphinx-tribes-frontend/cypress/e2e/4_openBountyModal.cy.ts there will be modifications to sphinx-tribes-frontend/cypress/support/commands.ts

Acceptance Criteria

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty owner appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty title appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty description appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty acceptance criteria appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty assignee appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty sat amount appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty copy link button appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty estimate time appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty share to twitter appears

Given a user is signed in When we create a bounty and click on the bounty tile Then the test asserts that in the bounty modal the bounty mark as paid button appears

Modal shown below image

References

Example cypress test https://github.com/stakwork/sphinx-tribes-frontend/blob/master/cypress/e2e/0_create_bounty.cy.ts

jordan-ae commented 6 months ago

I can help with these

kevkevinpal commented 6 months ago

I assigned it to you @okhot let me know if you run into any issues you can refer to this doc

please refer to this if you need to setup cypress locally https://github.com/stakwork/sphinx-tribes-frontend/blob/master/docs/setupCypressTest.md

jordan-ae commented 6 months ago

@kevkevinpal I'm facing issues running test locally. I this error when I try to run locally. Any Clues on why?

Screenshot 2024-03-11 at 16 52 34

kevkevinpal commented 6 months ago

@kevkevinpal I'm facing issues running test locally. I this error when I try to run locally. Any Clues on why?

Screenshot 2024-03-11 at 16 52 34

did you setup sphinx stack and move the NODES.json files over to the correct location?

jordan-ae commented 6 months ago

Yes I followed the documentation to the letter

saithsab877 commented 6 months ago

Hi @elraphty, @kevkevinpal, Please assign me if @okhot gives up.

elraphty commented 6 months ago

@aliraza556 You can take this.

aliraza556 commented 6 months ago

@elraphty, Yes