diff --git a/tests/Playwright/tests/Shared/products.js b/tests/Playwright/tests/Shared/products.js index 04c27c83..097aef41 100644 --- a/tests/Playwright/tests/Shared/products.js +++ b/tests/Playwright/tests/Shared/products.js @@ -1,6 +1,6 @@ const allProducts = { surcharge: { - 'id': 16,//117, + 'id': 14,//117, "title": "Surcharge", 'link': '/product/surcharge/', 'sku': 'woo-surcharge', @@ -11,7 +11,7 @@ const allProducts = { 'downloadable': 'no', }, simple: { - 'id': 15,//11, + 'id': 13,//11, "title": "Beanie", 'link': '/product/beanie/', 'sku': 'woo-beanie', diff --git a/tests/Playwright/tests/surcharge/_mollie_settings_tab_payment_method_settings_surcharge.spec.js b/tests/Playwright/tests/surcharge/_mollie_settings_tab_payment_method_settings_surcharge.spec.js index 2d5bc455..60e3ef3d 100644 --- a/tests/Playwright/tests/surcharge/_mollie_settings_tab_payment_method_settings_surcharge.spec.js +++ b/tests/Playwright/tests/surcharge/_mollie_settings_tab_payment_method_settings_surcharge.spec.js @@ -334,13 +334,18 @@ for (const [testAction, testActionData] of Object.entries(testData)) { await updateMethodSetting(methodName, testActionData.payload); if(!beforeAllRan) { await emptyCart(baseURL); - await addProductToCart(baseURL, products.surcharge.id, testActionData.productQuantity); + let productQuantity = testActionData.productQuantity; + if(methodName === 'in3' || methodName === 'klarnasliceit'){ + productQuantity = 10; + } + await addProductToCart(baseURL, products.surcharge.id, productQuantity); const keys = Object.keys(testActionData.methods); randomMethod = keys[Math.floor(Math.random() * Object.entries(testActionData.methods).length)]; console.log('randomMethod', randomMethod) beforeAllRan = true; } await page.goto('/checkout/'); + await await selectPaymentMethodInCheckout(page, methodName); let totalAmount = await captureTotalAmountCheckout(page); totalAmount = parseTotalAmount(totalAmount);