Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Jan 9, 2024
1 parent a65f2b4 commit 236e05e
Showing 1 changed file with 42 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' );
} );
} );
} );

0 comments on commit 236e05e

Please sign in to comment.