Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests][Component] Create test for src/people/widgetViews/organization/HistoryModal.tsx #1260

Closed
7 tasks
elraphty opened this issue Jan 5, 2024 · 2 comments
Closed
7 tasks
Assignees
Milestone

Comments

@elraphty
Copy link
Contributor

elraphty commented Jan 5, 2024

Context

HistoryModal.tsx displays the payment history for an organization.

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

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

Make a Mock API request to get payment history and pass it as a prop to History Modal, check getPaymentHistories in frontend/app/src/store/main.ts, and mock the request API request in the function.

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

We want to test that the payments listed match the mock data bounties

Acceptance Criteria

  • Test that payment history is visible
  • Test that the payment type displayed matches the payment type from the mock data
  • Test that the amount displayed matches the amount from the mock data
  • Test that the sender displayed matches the sender on the mock data
  • Test deposit does not have a receiver but has a sender
  • Test that payment has a sender and a receiver
  • Test that the Deposit, Withdrawals, and Payments checkboxes are visible

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

@Vayras
Copy link
Contributor

Vayras commented Jan 5, 2024

Hey! Can I work on this , I wish to contribute towards this issue.

@ecurrencyhodler
Copy link
Contributor

It's yours.

@ecurrencyhodler ecurrencyhodler added this to the Component/Unit Tests milestone Jan 5, 2024
elraphty added a commit that referenced this issue Jan 9, 2024
fix(#1260):added the test for history modal
elraphty added a commit that referenced this issue Jan 26, 2024
fix(#1260):added the test for history modal
elraphty added a commit that referenced this issue Jan 26, 2024
fix(#1260):added the test for history modal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants