diff --git a/tests/e2e/config/jest.config.js b/tests/e2e/config/jest.config.js index 8e6c3a446f8..a6969e0a207 100644 --- a/tests/e2e/config/jest.config.js +++ b/tests/e2e/config/jest.config.js @@ -12,7 +12,6 @@ const e2ePaths = { subscriptions: path.resolve( __dirname, '../specs/subscriptions' ), blocks: path.resolve( __dirname, '../specs/blocks' ), upe: path.resolve( __dirname, '../specs/upe' ), - upeSplit: path.resolve( __dirname, '../specs/upe-split' ), }; // Allow E2E tests to run specific tests - wcpay, subscriptions, blocks, all (default). diff --git a/tests/e2e/specs/upe/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js b/tests/e2e/specs/upe/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js index e9f3085e5b2..82652f49ac8 100644 --- a/tests/e2e/specs/upe/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js +++ b/tests/e2e/specs/upe/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js @@ -14,12 +14,16 @@ import { } from '../../../utils/payments'; const { shopper, merchant } = require( '@woocommerce/e2e-utils' ); +// const UPE_METHOD_CHECKBOXES = [ +// "//label[contains(text(), 'giropay')]/preceding-sibling::span/input[@type='checkbox']", +// // "//label[contains(text(), 'Bancontact')]/preceding-sibling::span/input[@type='checkbox']", +// // "//label[contains(text(), 'EPS')]/preceding-sibling::span/input[@type='checkbox']", +// // "//label[contains(text(), 'iDEAL')]/preceding-sibling::span/input[@type='checkbox']", +// // "//label[contains(text(), 'Sofort')]/preceding-sibling::span/input[@type='checkbox']", +// ]; + const UPE_METHOD_CHECKBOXES = [ - "//label[contains(text(), 'giropay')]/preceding-sibling::span/input[@type='checkbox']", - "//label[contains(text(), 'Bancontact')]/preceding-sibling::span/input[@type='checkbox']", - "//label[contains(text(), 'EPS')]/preceding-sibling::span/input[@type='checkbox']", - "//label[contains(text(), 'iDEAL')]/preceding-sibling::span/input[@type='checkbox']", - "//label[contains(text(), 'Sofort')]/preceding-sibling::span/input[@type='checkbox']", + '#inspector-checkbox-control-7', // giropay ]; describe( 'Enabled UPE with deferred intent creation', () => { @@ -28,6 +32,7 @@ describe( 'Enabled UPE with deferred intent creation', () => { await merchantWCP.enablePaymentMethod( UPE_METHOD_CHECKBOXES ); await merchant.logout(); await shopper.login(); + console.log( 'a' ); } ); afterAll( async () => { @@ -39,11 +44,15 @@ describe( 'Enabled UPE with deferred intent creation', () => { describe( 'Enabled UPE with deferred intent creation', () => { it( 'should successfully place order with Giropay', async () => { + console.log( 'b' ); await shopperWCP.goToShopWithCurrency( 'EUR' ); + console.log( 'c' ); await setupProductCheckout( config.get( 'addresses.customer.billing' ) ); + console.log( 'd' ); await selectGiropayOnCheckout( page ); + console.log( 'e' ); await shopper.placeOrder(); await completeGiropayPayment( page, 'success' ); await page.waitForNavigation( { diff --git a/tests/e2e/utils/flows.js b/tests/e2e/utils/flows.js index 4eeededd5fb..7e1e2a81148 100644 --- a/tests/e2e/utils/flows.js +++ b/tests/e2e/utils/flows.js @@ -69,9 +69,11 @@ export const shopperWCP = { }, goToShopWithCurrency: async ( currency ) => { + console.log( 't' ); await page.goto( SHOP_PAGE + `/?currency=${ currency }`, { waitUntil: 'networkidle0', } ); + console.log( 'h' ); }, goToOrders: async () => { diff --git a/tests/e2e/utils/payments.js b/tests/e2e/utils/payments.js index 3c8084c0811..1025cd14da3 100644 --- a/tests/e2e/utils/payments.js +++ b/tests/e2e/utils/payments.js @@ -257,12 +257,14 @@ export async function setupProductCheckout( ) { const cartItemsCounter = '.cart-contents .count'; + console.log( 'productcheckout1' ); await shopper.goToShop(); // Get the current number of items in the cart let cartSize = await page.$eval( cartItemsCounter, ( e ) => Number( e.innerText.replace( /\D/g, '' ) ) ); + console.log( 'productcheckout2' ); // Add items to the cart for ( const line of lineItems ) { @@ -279,6 +281,7 @@ export async function setupProductCheckout( } } + console.log( 'productcheckout3' ); await setupCheckout( billingDetails ); }