From 507bb8e474623c2fe51bea2c5cd8fa1bdd2bb3d5 Mon Sep 17 00:00:00 2001 From: Timur Karimov Date: Tue, 12 Dec 2023 21:01:40 +0100 Subject: [PATCH] use unique card --- .../shopper-deferred-intent-creation-upe-enabled.spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/e2e/specs/upe-split/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js b/tests/e2e/specs/upe-split/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js index 69e69775400..e743122f4f8 100644 --- a/tests/e2e/specs/upe-split/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js +++ b/tests/e2e/specs/upe-split/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js @@ -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', () => { @@ -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(); @@ -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.'