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/OrganizationDetails.tsx #1261

Closed elraphty closed 9 months ago

elraphty commented 9 months ago

Context

OrganizationDetails.tsx displays the details and users of an organization add test coverage.

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

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

Mock a user organization and pass it as a prop to OrganizationDetails, check the Organization interface in /app/src/store/main.ts, and make a mock.

Mock the local storage and add a user, the user pubkey should be the same as the Organization owner_pubkey so the user can be the org admin.

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

We want to test that the right organization details are displayed

Acceptance Criteria

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

wright-eric commented 9 months ago

@elraphty can i work on this ?

ecurrencyhodler commented 9 months ago

This is yours eric