Skip to content

Commit

Permalink
use unique card
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Dec 12, 2023
1 parent f3d79a6 commit 507bb8e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const UPE_METHOD_CHECKBOXES = [
'#inspector-checkbox-control-9', // sofort
];
const card = config.get( 'cards.basic' );
const card2 = config.get( 'cards.basic2' );
const MIN_WAIT_TIME_BETWEEN_PAYMENT_METHODS = 20000;

describe( 'Enabled UPE with deferred intent creation', () => {
Expand Down Expand Up @@ -152,7 +153,7 @@ describe( 'Enabled UPE with deferred intent creation', () => {

it( 'should be able to set payment method as default', async () => {
await shopperWCP.goToPaymentMethods();
await shopperWCP.addNewPaymentMethod( 'basic', card );
await shopperWCP.addNewPaymentMethod( 'basic2', card2 );
// Take note of the time when we added this card
timeAdded = Date.now();

Expand All @@ -162,9 +163,9 @@ describe( 'Enabled UPE with deferred intent creation', () => {
);
await expect( page ).toMatch( 'Payment method successfully added' );
await expect( page ).toMatch(
`${ card.expires.month }/${ card.expires.year }`
`${ card2.expires.month }/${ card2.expires.year }`
);
await shopperWCP.setDefaultPaymentMethod( card.label );
await shopperWCP.setDefaultPaymentMethod( card2.label );
// Verify that the card was set as default
await expect( page ).toMatch(
'This payment method was successfully set as your default.'
Expand Down

0 comments on commit 507bb8e

Please sign in to comment.