Closed chiragDork closed 8 months ago
Hi @ecurrencyhodler the PR has been raised, please review.
So Chiragdork is having issues with the 2nd test which is clicking "yes" and paying the bounty. He wrote the test but is unsure why it's failing. @elraphty can you take a look?
I see this in the stack trace
Cannot find module '../../../../components/common' from 'src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx'
469 | const mockMakePayment = jest.fn();
470 |
> 471 | jest.mock('../../../../components/common', () => ({
| ^
472 | usePaymentConfirmationModal: () => ({
473 | openPaymentConfirmation: mockOpenPaymentConfirmation
474 | })
at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
at src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:471:10
at step (src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:67:23)
at Object.next (src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:48:53)
at src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:42:71
at Object.<anonymous>.__awaiter (src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:38:12)
at Object.<anonymous> (src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:467:87)
I also see this
458 | const { getByText, queryByText } = render(<MobileView {...props} />);
459 |
> 460 | const payBountyButton = getByText('Pay Bounty');
| ^
461 | fireEvent.click(payBountyButton);
462 |
463 | expect(getByText('Are you sure you want to')).toBeInTheDocument();
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at apply (node_modules/@testing-library/dom/dist/query-helpers.js:76:38)
at apply (node_modules/@testing-library/dom/dist/query-helpers.js:52:25)
at node_modules/@testing-library/dom/dist/query-helpers.js:95:24
at Object.<anonymous> (src/people/widgetViews/summaries/wantedSummaries/__tests__/CodingBounty.spec.tsx:460:29)
Hi @kevkevinpal I made the mentioned changes can you please check. Thanks.
Tested and paid!
Add a confirmation pop up when pay bounty button is clicked
328
Type of change
Checklist before requesting a review
https://www.loom.com/share/57fee31ec92a4c15b80d08b8bf325926?sid=7d5af493-53bd-4c77-9115-1edd4542171a