Skip to content

Commit

Permalink
Add test for rendering inquiries awaiting response
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinksi committed Sep 28, 2023
1 parent 8a6166c commit 24d86f5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions client/payment-details/summary/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,29 @@ describe( 'PaymentDetailsSummary', () => {
).toBeNull();
} );

test( 'correctly renders dispute details for "warning_needs_response" inquiry disputes', () => {
const charge = getBaseCharge();
charge.disputed = true;
charge.dispute = getBaseDispute();
charge.dispute.status = 'warning_needs_response';

renderCharge( charge );

// Dispute Notice
screen.getByText(
/The cardholder claims this is an unauthorized transaction/,
{ ignore: '.a11y-speak-region' }
);

// Actions
screen.getByRole( 'button', {
name: /Submit evidence/i,
} );
screen.getByRole( 'button', {
name: /Issue refund/i,
} );
} );

test( 'correctly renders dispute details for "warning_under_review" inquiry disputes', () => {
const charge = getBaseCharge();
charge.disputed = true;
Expand Down

0 comments on commit 24d86f5

Please sign in to comment.