From 236e05edf0efc418548df952a99634b19635bcd8 Mon Sep 17 00:00:00 2001 From: Timur Karimov Date: Tue, 9 Jan 2024 16:31:10 +0100 Subject: [PATCH] add more tests --- ...ferred-intent-creation-upe-enabled.spec.js | 83 ++++++++++--------- 1 file changed, 42 insertions(+), 41 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 7347abe0802..d05484e648c 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 @@ -17,8 +17,9 @@ 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(), 'EPS')]/preceding-sibling::span/input[@type='checkbox']", + "//label[contains(text(), 'iDEAL')]/preceding-sibling::span/input[@type='checkbox']", + "//label[contains(text(), 'Przelewy24')]/preceding-sibling::span/input[@type='checkbox']", // "//label[contains(text(), 'Sofort')]/preceding-sibling::span/input[@type='checkbox']", // '#inspector-checkbox-control-7', // giropay // '#inspector-checkbox-control-5', // Bancontact @@ -68,46 +69,46 @@ describe( 'Enabled UPE with deferred intent creation', () => { await expect( page ).toMatch( 'Order received' ); } ); - // it( 'should successfully place order with EPS', async() => { - // await shopperWCP.goToShopWithCurrency( 'EUR' ); - // await setupProductCheckout( - // config.get( 'addresses.customer.billing' ) - // ); - // await selectOnCheckout( 'eps', page ); - // await shopper.placeOrder(); - // await completeRedirectedPayment( page, 'success' ); - // await page.waitForNavigation( { - // waitUntil: 'networkidle0', - // } ); - // await expect( page ).toMatch( 'Order received' ); - // }); + it( 'should successfully place order with EPS', async () => { + await shopperWCP.goToShopWithCurrency( 'EUR' ); + await setupProductCheckout( + config.get( 'addresses.customer.billing' ) + ); + await selectOnCheckout( 'eps', page ); + await shopper.placeOrder(); + await completeRedirectedPayment( page, 'success' ); + await page.waitForNavigation( { + waitUntil: 'networkidle0', + } ); + await expect( page ).toMatch( 'Order received' ); + } ); - // it( 'should successfully place order with iDEAL', async() => { - // await shopperWCP.goToShopWithCurrency( 'EUR' ); - // await setupProductCheckout( - // config.get( 'addresses.customer.billing' ) - // ); - // await selectOnCheckout( 'ideal', page ); - // await shopper.placeOrder(); - // await completeRedirectedPayment( page, 'success' ); - // await page.waitForNavigation( { - // waitUntil: 'networkidle0', - // } ); - // await expect( page ).toMatch( 'Order received' ); - // }); + it( 'should successfully place order with iDEAL', async () => { + await shopperWCP.goToShopWithCurrency( 'EUR' ); + await setupProductCheckout( + config.get( 'addresses.customer.billing' ) + ); + await selectOnCheckout( 'ideal', page ); + await shopper.placeOrder(); + await completeRedirectedPayment( page, 'success' ); + await page.waitForNavigation( { + waitUntil: 'networkidle0', + } ); + await expect( page ).toMatch( 'Order received' ); + } ); - // it( 'should successfully place order with Przelewy24', async() => { - // await shopperWCP.goToShopWithCurrency( 'EUR' ); - // await setupProductCheckout( - // config.get( 'addresses.customer.billing' ) - // ); - // await selectOnCheckout( 'p24', page ); - // await shopper.placeOrder(); - // await completeRedirectedPayment( page, 'success' ); - // await page.waitForNavigation( { - // waitUntil: 'networkidle0', - // } ); - // await expect( page ).toMatch( 'Order received' ); - // }); + it( 'should successfully place order with Przelewy24', async () => { + await shopperWCP.goToShopWithCurrency( 'EUR' ); + await setupProductCheckout( + config.get( 'addresses.customer.billing' ) + ); + await selectOnCheckout( 'p24', page ); + await shopper.placeOrder(); + await completeRedirectedPayment( page, 'success' ); + await page.waitForNavigation( { + waitUntil: 'networkidle0', + } ); + await expect( page ).toMatch( 'Order received' ); + } ); } ); } );