diff --git a/tests/playwright/fixtures/USD.spec.mjs b/tests/playwright/fixtures/USD.spec.mjs index 7954ee190..78e127f39 100644 --- a/tests/playwright/fixtures/USD.spec.mjs +++ b/tests/playwright/fixtures/USD.spec.mjs @@ -78,7 +78,7 @@ for (const environment of environments) { await checkoutPage.expectRefusal(); }); - test.skip('PayPal Success @quick', async ({page}) => { + test('PayPal Success @quick', async ({page}) => { redirectShopper = new RedirectShopper(page); await redirectShopper.doPayPalPayment(false, false, true); await checkoutPage.expectSuccess(); @@ -93,7 +93,7 @@ for (const environment of environments) { await page.goto(`${environment.urlExtension}`); }); - test.skip('GiftCard Only Success @quick', async () => { + test('GiftCard Only Success @quick', async () => { await goToBillingWithFullCartGuestUser(); if (environment.name.indexOf('v5') !== -1) { await checkoutPage.setEmail(); @@ -103,7 +103,7 @@ for (const environment of environments) { await checkoutPage.expectSuccess(); }); - test.skip('GiftCard & Card Success @quick', async () => { + test('GiftCard & Card Success @quick', async () => { await goToBillingWithFullCartGuestUser(3); if (environment.name.indexOf('v5') !== -1) { await checkoutPage.setEmail(); @@ -164,7 +164,7 @@ for (const environment of environments) { await checkoutPage.expectRefusal(); }); - test.skip('CashApp Renders', async ({page}) => { + test('CashApp Renders', async ({page}) => { if (environment.name.indexOf('v5') !== -1) { await checkoutPage.setEmail(); } @@ -265,7 +265,7 @@ for (const environment of environments) { await redirectShopper.doPayPalPayment(true, false, true); if (environment.name.indexOf('v5') !== -1) { await page.locator("button[value='place-order']").click(); - await page.locator(".order-thank-you-msg").isVisible({timeout: 20000}); + await page.locator(".order-thank-you-msg").isVisible(); } else { await checkoutPage.expectSuccess(); } @@ -279,7 +279,7 @@ for (const environment of environments) { await redirectShopper.doPayPalPayment(true, true, true); if (environment.name.indexOf('v5') !== -1) { await page.locator("button[value='place-order']").click(); - await page.locator(".order-thank-you-msg").isVisible({timeout: 20000}); + await page.locator(".order-thank-you-msg").isVisible(); } else { await checkoutPage.expectSuccess(); } diff --git a/tests/playwright/fixtures/countriesEUR/DE.spec.mjs b/tests/playwright/fixtures/countriesEUR/DE.spec.mjs index 7dbc3a8dc..915f000d7 100644 --- a/tests/playwright/fixtures/countriesEUR/DE.spec.mjs +++ b/tests/playwright/fixtures/countriesEUR/DE.spec.mjs @@ -24,7 +24,7 @@ for (const environment of environments) { } }); - test.skip('Klarna Success @quick', async ({ page }) => { + test('Klarna Success @quick', async ({ page }) => { redirectShopper = new RedirectShopper(page); await redirectShopper.doKlarnaPayment(); await checkoutPage.completeCheckout(); diff --git a/tests/playwright/fixtures/countriesEUR/FR.spec.mjs b/tests/playwright/fixtures/countriesEUR/FR.spec.mjs index fb5411b51..e5b97714c 100644 --- a/tests/playwright/fixtures/countriesEUR/FR.spec.mjs +++ b/tests/playwright/fixtures/countriesEUR/FR.spec.mjs @@ -52,7 +52,7 @@ test.describe.parallel(`${environment.name} EUR FR`, () => { cards = new Cards(page); }); - test.skip('No 3DS Amazon Pay @quick', async ({ page }) => { + test('No 3DS Amazon Pay @quick', async ({ page }) => { await checkoutPage.goToCheckoutPageWithFullCart(regionsEnum.EU); await checkoutPage.setShopperDetails(shopperData.FR); if (environment.name.indexOf('v5') !== -1) { diff --git a/tests/playwright/package.json b/tests/playwright/package.json index 5218af6db..03eaaeec9 100644 --- a/tests/playwright/package.json +++ b/tests/playwright/package.json @@ -106,7 +106,7 @@ "yazl": "^2.5.1" }, "devDependencies": { - "@playwright/test": "^1.38.0" + "@playwright/test": "^1.42.1" }, "scripts": { "test": "npx playwright test", diff --git a/tests/playwright/pages/AccountPageSFRA.mjs b/tests/playwright/pages/AccountPageSFRA.mjs index 32fd561cb..819ba2118 100644 --- a/tests/playwright/pages/AccountPageSFRA.mjs +++ b/tests/playwright/pages/AccountPageSFRA.mjs @@ -28,7 +28,7 @@ export default class AccountPageSFRA { .locator('.input-field') .type(cardInput.cvc); } - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); await this.page.click('button[name="save"]'); }; @@ -41,7 +41,7 @@ export default class AccountPageSFRA { const cardElement = this.savedCardElementGenerator(cardData); const deleteButton = cardElement.locator('../../button'); - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); await deleteButton.click(); await this.page.click('.delete-confirmation-btn'); @@ -52,7 +52,6 @@ export default class AccountPageSFRA { await cardElement.waitFor({ state: 'visible', - timeout: 20000, }); }; @@ -65,7 +64,6 @@ export default class AccountPageSFRA { await cardElement.waitFor({ state: 'detached', - timeout: 20000, }); }; diff --git a/tests/playwright/pages/CheckoutPageSFRA5.mjs b/tests/playwright/pages/CheckoutPageSFRA5.mjs index b6733efb9..984f30348 100644 --- a/tests/playwright/pages/CheckoutPageSFRA5.mjs +++ b/tests/playwright/pages/CheckoutPageSFRA5.mjs @@ -88,7 +88,7 @@ export default class CheckoutPageSFRA5 { isPaymentModalShown = async (imgAltValue) => { await expect(this.paymentModal.locator(`img[alt='${imgAltValue}']`)) - .toBeVisible({ timeout: 20000 }); + .toBeVisible(); } navigateToCheckout = async (locale) => { @@ -101,7 +101,7 @@ export default class CheckoutPageSFRA5 { goToCheckoutPageWithFullCart = async (locale, itemCount = 1) => { await this.addProductToCart(locale, itemCount); - await this.successMessage.waitFor({ visible: true, timeout: 20000 }); + await this.successMessage.waitFor({ visible: true }); await this.navigateToCheckout(locale); await this.checkoutGuest.click(); @@ -166,20 +166,20 @@ export default class CheckoutPageSFRA5 { }; submitShipping = async () => { - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); await this.shippingSubmit.click(); - await this.page.waitForNavigation({ waitUntil: "networkidle", timeout: 20000 }); + await this.page.waitForNavigation({ waitUntil: "networkidle" }); // Ugly wait since the submit button takes time to mount. await new Promise(r => setTimeout(r, 2000)); }; submitPayment = async () => { - await this.page.waitForLoadState('load', { timeout: 30000 }); + await this.page.waitForLoadState('load'); await this.submitPaymentButton.click(); }; placeOrder = async () => { - await this.page.waitForLoadState('load', { timeout: 30000 }); + await this.page.waitForLoadState('load'); await this.placeOrderButton.click(); }; @@ -193,7 +193,7 @@ export default class CheckoutPageSFRA5 { }; goBackAndSubmitShipping = async () => { - await this.page.waitForNavigation('load', { timeout: 20000 }); + await this.page.waitForNavigation('load'); await this.navigateBack(); await this.submitShipping(); }; @@ -203,25 +203,25 @@ export default class CheckoutPageSFRA5 { url: /Order-Confirm/, timeout: 20000, }); - await expect(this.thankYouMessage).toBeVisible({ timeout: 20000 }); + await expect(this.thankYouMessage).toBeVisible(); }; expectNonRedirectSuccess = async () => { - await expect(this.thankYouMessage).toBeVisible({ timeout: 20000 }); + await expect(this.thankYouMessage).toBeVisible(); }; expectRefusal = async () => { - await expect(this.errorMessage).not.toBeEmpty({ timeout: 25000 }); + await expect(this.errorMessage).not.toBeEmpty(); }; expectVoucher = async () => { - await expect(this.voucherCode).toBeVisible({ timeout: 20000 }); + await expect(this.voucherCode).toBeVisible(); }; expectQRcode = async () => { - await this.qrLoader.waitFor({ state: 'attached', timeout: 20000 }); - await expect(this.qrLoaderAmount).toBeVisible({ timeout: 20000 }); - await expect(this.qrImg).toBeVisible({ timeout: 20000 }); + await this.qrLoader.waitFor({ state: 'attached'}); + await expect(this.qrLoaderAmount).toBeVisible(); + await expect(this.qrImg).toBeVisible(); }; expectGiftCardWarning = async () => { @@ -229,14 +229,14 @@ export default class CheckoutPageSFRA5 { }; getLocation = async () => { - await this.page.waitForLoadState('load', { timeout: 20000 }); + await this.page.waitForLoadState('load'); return await this.page.url(); }; navigateBack = async () => { - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); await this.page.goBack(); - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); }; loginUser = async (credentials) => { diff --git a/tests/playwright/pages/CheckoutPageSFRA6.mjs b/tests/playwright/pages/CheckoutPageSFRA6.mjs index dbe6c9730..35d8a9df1 100644 --- a/tests/playwright/pages/CheckoutPageSFRA6.mjs +++ b/tests/playwright/pages/CheckoutPageSFRA6.mjs @@ -57,7 +57,7 @@ export default class CheckoutPageSFRA { this.shippingSubmit = page.locator("button[value='submit-shipping']"); - this.submitPaymentButton = page.locator("button[value='submit-payment']"); + this.submitPaymentButton = page.locator('.submit-payment'); this.placeOrderButton = page.locator("button[value='place-order']"); this.errorMessage = page.locator('.error-message-text'); @@ -89,7 +89,7 @@ export default class CheckoutPageSFRA { isPaymentModalShown = async (imgAltValue) => { await expect(this.paymentModal.locator(`img[alt='${imgAltValue}']`)) - .toBeVisible({ timeout: 20000 }); + .toBeVisible(); } navigateToCheckout = async (locale) => { @@ -102,7 +102,7 @@ export default class CheckoutPageSFRA { goToCheckoutPageWithFullCart = async (locale, itemCount = 1, email) => { await this.addProductToCart(locale, itemCount); - await this.successMessage.waitFor({ visible: true, timeout: 20000 }); + await this.successMessage.waitFor({ visible: true }); await this.navigateToCheckout(locale); await this.setEmail(email); @@ -127,7 +127,7 @@ export default class CheckoutPageSFRA { }; setShopperDetails = async (shopperDetails) => { - await this.customerInfoSection.waitFor({ visible: true, timeout: 20000 }); + await this.customerInfoSection.waitFor({ visible: true }); await this.checkoutPageUserFirstNameInput.type( @@ -175,31 +175,26 @@ export default class CheckoutPageSFRA { }; submitShipping = async () => { - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); await this.shippingSubmit.click(); - await this.page.waitForNavigation({ waitUntil: "networkidle", timeout: 20000 }); + await this.page.waitForNavigation({ waitUntil: "networkidle" }); // Ugly wait since the submit button takes time to mount. await new Promise(r => setTimeout(r, 2000)); }; submitPayment = async () => { - await this.page.waitForLoadState('load', { timeout: 30000 }); - await this.submitPaymentButton.click(); + await this.page.waitForFunction(() => { + const button = document.querySelector('.submit-payment'); + return button && !button.disabled; + }); + + await this.submitPaymentButton.click(); }; placeOrder = async () => { - let retries = 3; - while (retries > 0) { - try { - await this.page.waitForLoadState('load', { timeout: 30000 }); - await this.placeOrderButton.click(); - break; // Break out of the loop if successful - } catch (error) { - retries--; - await this.page.reload(); - } - } + await this.page.waitForLoadState('load'); + await this.placeOrderButton.click(); }; completeCheckoutLoggedInUser = async () => { @@ -212,7 +207,7 @@ export default class CheckoutPageSFRA { }; goBackAndSubmitShipping = async () => { - await this.page.waitForNavigation('load', { timeout: 20000 }); + await this.page.waitForNavigation('load'); await this.navigateBack(); await this.submitShipping(); }; @@ -221,27 +216,26 @@ export default class CheckoutPageSFRA { expectSuccess = async () => { await this.page.waitForNavigation({ url: /Order-Confirm/, - timeout: 20000, }); - await expect(this.thankYouMessage).toBeVisible({ timeout: 20000 }); + await expect(this.thankYouMessage).toBeVisible(); }; expectNonRedirectSuccess = async () => { - await expect(this.thankYouMessage).toBeVisible({ timeout: 20000 }); + await expect(this.thankYouMessage).toBeVisible(); }; expectRefusal = async () => { - await expect(this.errorMessage).not.toBeEmpty({ timeout: 25000 }); + await expect(this.errorMessage).not.toBeEmpty(); }; expectVoucher = async () => { - await expect(this.voucherCode).toBeVisible({ timeout: 20000 }); + await expect(this.voucherCode).toBeVisible(); }; expectQRcode = async () => { - await this.qrLoader.waitFor({ state: 'attached', timeout: 20000 }); - await expect(this.qrLoaderAmount).toBeVisible({ timeout: 20000 }); - await expect(this.qrImg).toBeVisible({ timeout: 20000 }); + await this.qrLoader.waitFor({ state: 'attached' }); + await expect(this.qrLoaderAmount).toBeVisible(); + await expect(this.qrImg).toBeVisible(); }; expectGiftCardWarning = async () => { @@ -249,7 +243,7 @@ export default class CheckoutPageSFRA { }; getLocation = async () => { - await this.page.waitForLoadState('load', { timeout: 20000 }); + await this.page.waitForLoadState('load'); return await this.page.url(); }; diff --git a/tests/playwright/pages/PaymentMethodsPage.mjs b/tests/playwright/pages/PaymentMethodsPage.mjs index 6226dd6e3..cf5fded54 100644 --- a/tests/playwright/pages/PaymentMethodsPage.mjs +++ b/tests/playwright/pages/PaymentMethodsPage.mjs @@ -11,7 +11,7 @@ export default class PaymentMethodsPage { } getLocation = async () => { - await this.page.waitForNavigation('load', { timeout: 20000 }); + await this.page.waitForNavigation('load'); return await this.page.url(); }; @@ -36,24 +36,22 @@ export default class PaymentMethodsPage { // Paypal button locator on payment methods page const payPalButton = this.page .frameLocator('.adyen-checkout__paypal__button--paypal iframe.visible') - .locator('.paypal-button'); + .locator('.paypal-button-container'); + + const popupPromise = this.page.waitForEvent('popup'); // Click PayPal radio button if (!expressFlow) { await this.page.click('#rb_paypal'); + await this.page.waitForTimeout(5000); } - await expect(this.page.locator('.adyen-checkout__paypal__button--paypal iframe.visible'),).toBeVisible({ timeout: 20000 }); - // Capture popup for interaction - const [popup] = await Promise.all([ - this.page.waitForEvent('popup'), - payPalButton.click(), - ]); + await payPalButton.click(); + const popup = await popupPromise; // Wait for the page load await popup.waitForNavigation({ url: /.*sandbox.paypal.com*/, - timeout: 20000, }); // Paypal HPP selectors @@ -83,7 +81,7 @@ export default class PaymentMethodsPage { else { await this.cancelButton.click(); await this.page.goBack(); - await expect(this.page.locator('.add-to-cart'),).toBeVisible({ timeout: 20000 }); + await expect(this.page.locator('.add-to-cart'),).toBeVisible(); } }; @@ -95,7 +93,7 @@ export default class PaymentMethodsPage { if (normalFlow) { await this.page.click("#rb_amazonpay"); } - await this.page.waitForLoadState('domcontentloaded', { timeout: 20000 }); + await this.page.waitForLoadState('domcontentloaded'); await this.page.click(".adyen-checkout__amazonpay__button"); // Amazon Sandbox selectors @@ -111,7 +109,7 @@ export default class PaymentMethodsPage { await this.passwordInput.click(); await this.passwordInput.type(paymentData.AmazonPay.password); await this.loginButton.click(); - await this.page.waitForLoadState("networkidle", { timeout: 20000 }); + await this.page.waitForLoadState("networkidle"); if (await this.amazonCaptcha.isVisible()){ return false; @@ -133,7 +131,7 @@ export default class PaymentMethodsPage { await this.rejectionCard.click(); await this.confirmPaymentChangeButton.click(); } - await this.page.waitForLoadState("networkidle", { timeout: 20000 }); + await this.page.waitForLoadState("networkidle"); this.submitButton = this.page.locator('#a-autoid-0'); await this.submitButton.waitFor({ state: 'visible' }); await this.submitButton.click(); @@ -234,12 +232,13 @@ export default class PaymentMethodsPage { initiateGiftCardPayment = async (giftCardInput) => { const giftCardComponentWrapper = this.page.locator(".gift-card-selection"); + // Adding a timeout to ensure visibility + await new Promise(r => setTimeout(r, 2000)); await this.page.locator('#giftCardAddButton').click(); - await this.page.locator('#giftCardSelect').click() + await this.page.locator('.gift-card-select-wrapper').click() const giftCardBrand = this.page.locator(`li[data-brand=${giftCardInput.brand}]`) await this.page.locator("#giftCardUl").waitFor({ state: 'visible', - timeout: 20000, }); await giftCardBrand.click(); @@ -336,7 +335,6 @@ export default class PaymentMethodsPage { //Simulation of the redirect to the Oney page await this.page.waitForNavigation({ url: /.*staging.e-payments.oney/, - timeout: 20000, }); }; @@ -355,7 +353,6 @@ export default class PaymentMethodsPage { waitForKlarnaLoad = async () => { await this.page.waitForNavigation({ url: /.*playground.klarna/, - timeout: 25000, waitUntil: 'load', }); }; @@ -363,14 +360,13 @@ export default class PaymentMethodsPage { // Generic function to be used for simulating the redirect waitForRedirect = async () => { await this.page.waitForNavigation({ - timeout: 20000, waitUntil: 'load', }); }; async continueOnKlarna(skipModal) { await this.waitForKlarnaLoad(); - await this.page.waitForLoadState('networkidle', { timeout: 25000 }); + await this.page.waitForLoadState('networkidle'); this.klarnaIframe = this.page.frameLocator( '#klarna-apf-iframe', ); @@ -383,7 +379,6 @@ export default class PaymentMethodsPage { await this.klarnaContinueButton.click(); await this.klarnaVerificationCodeInput.waitFor({ state: 'visible', - timeout: 25000, }); await this.klarnaVerificationCodeInput.fill('123456'); if (this.klarnaSelectPlanButton.isVisible() && !skipModal) { @@ -392,7 +387,6 @@ export default class PaymentMethodsPage { } await this.klarnaBuyButton.waitFor({ state: 'visible', - timeout: 25000, }); await this.klarnaBuyButton.click(); } @@ -442,10 +436,10 @@ export default class PaymentMethodsPage { '#invoice_kp-invoice-payment-method', ); - await this.page.waitForNavigation('networkidle', { timeout: 20000 }); - await this.klarnaPaymentMethodGroup.waitFor('visible', { timeout: 20000 }); - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); - await this.klarnaBuyButton.waitFor('visible', { timeout: 20000 }); + await this.page.waitForNavigation('networkidle'); + await this.klarnaPaymentMethodGroup.waitFor('visible'); + await this.page.waitForLoadState('networkidle'); + await this.klarnaBuyButton.waitFor('visible'); await this.klarnaBuyButton.click(); await this.klarnaIdNumberField.fill('811228-9874'); @@ -454,7 +448,7 @@ export default class PaymentMethodsPage { cancelKlarnaPayment = async () => { await this.waitForKlarnaLoad(); - await this.page.waitForLoadState('networkidle', { timeout: 25000 }); + await this.page.waitForLoadState('networkidle'); this.cancelButton = this.page.locator("button[title='Close']"); await this.cancelButton.click(); await this.page.click("button[id='payment-cancel-dialog-express__confirm']"); @@ -466,8 +460,8 @@ export default class PaymentMethodsPage { const backButton = this.page.locator("button[name='backLink']"); await rejectCookies.click(); - await giroBankDropdown.waitFor({ state: 'visible', timeout: 20000 }); - await backButton.waitFor({ state: 'visible', timeout: 20000 }); + await giroBankDropdown.waitFor({ state: 'visible' }); + await backButton.waitFor({ state: 'visible' }); await backButton.click(); }; @@ -501,7 +495,6 @@ export default class PaymentMethodsPage { await this.page.click('#component_cashapp'); await this.page.locator("div[data-testid='qr-modal-body']").waitFor({ state: 'visible', - timeout: 20000, }); } @@ -523,12 +516,11 @@ export default class PaymentMethodsPage { confirmVippsPayment = async () => { await this.page.locator("div[class='payment-details']").waitFor({ state: 'visible', - timeout: 25000, }); }; cancelVippsPayment = async () => { - await expect(this.page.locator('.cancel-link')).toBeVisible({ timeout: 20000 }); + await expect(this.page.locator('.cancel-link')).toBeVisible(); await this.page.click('.cancel-link'); }; @@ -537,18 +529,15 @@ export default class PaymentMethodsPage { await this.page.click("button[data-testid='continue-button']"); await this.page.locator("div[data-testid='spinner']").waitFor({ state: 'visible', - timeout: 20000, }); await this.page.click("button[data-testid='continue-button']"); await this.page.locator('input[name="loginid"]').type('idabarese51'); await this.page.click("button[data-testid='continue-button']"); await this.page.locator("div[data-testid='spinner']").waitFor({ state: 'visible', - timeout: 20000, }); await this.page.locator("div[data-testid='spinner']").waitFor({ state: 'detached', - timeout: 20000, }); const oneTimeCodeLocator = await this.page.locator( @@ -620,14 +609,15 @@ export default class PaymentMethodsPage { MultiBancoVoucherExists = async () => { await expect( this.page.locator('.adyen-checkout__voucher-result--multibanco'), - ).toBeVisible({ timeout: 20000 }); + ).toBeVisible(); }; initiateSEPAPayment = async () => { - const nameInput = this.page.locator('//input[contains(@name,"ownerName")]'); - const ibanInput = this.page.locator('//input[contains(@name,"ibanNumber")]'); + const nameInput = this.page.locator('input[name="ownerName"]'); + const ibanInput = this.page.locator('input[name="ibanNumber"]'); await this.page.click('#rb_sepadirectdebit'); + await expect(ibanInput).toBeVisible(); await nameInput.fill(paymentData.SepaDirectDebit.accountName); await ibanInput.fill(paymentData.SepaDirectDebit.iban); }; diff --git a/tests/playwright/paymentFlows/pending.mjs b/tests/playwright/paymentFlows/pending.mjs index c521c6e36..ede89a886 100644 --- a/tests/playwright/paymentFlows/pending.mjs +++ b/tests/playwright/paymentFlows/pending.mjs @@ -39,7 +39,7 @@ export class PendingPayments { waitForThirdPartyPaymentLoader = async () => { const checkoutLoader = this.page.locator('.adyen-checkout__await'); - await checkoutLoader.waitFor({ state: 'attached', timeout: 20000 }); - await checkoutLoader.waitFor({ state: 'detached', timeout: 20000 }); + await checkoutLoader.waitFor({ state: 'attached' }); + await checkoutLoader.waitFor({ state: 'detached' }); }; } diff --git a/tests/playwright/paymentFlows/redirectShopper.mjs b/tests/playwright/paymentFlows/redirectShopper.mjs index 8038ea4ef..17edd86db 100644 --- a/tests/playwright/paymentFlows/redirectShopper.mjs +++ b/tests/playwright/paymentFlows/redirectShopper.mjs @@ -114,7 +114,7 @@ export class RedirectShopper { }; completeEPSRedirect = async (success) => { - await this.page.waitForLoadState('networkidle', { timeout: 20000 }); + await this.page.waitForLoadState('networkidle'); if (success) { await this.paymentMethodsPage.confirmSimulator(); } else { diff --git a/tests/playwright/sfcc.config.js b/tests/playwright/sfcc.config.js index b6c79157e..98c683201 100644 --- a/tests/playwright/sfcc.config.js +++ b/tests/playwright/sfcc.config.js @@ -17,7 +17,7 @@ const config = { * Maximum time expect() should wait for the condition to be met. * For example in `await expect(locator).toHaveText();` */ - timeout: 10000, + timeout: 30000, }, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -27,7 +27,7 @@ const config = { retries: process.env.CI ? 1 : 0, /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 3 : 1, + workers: process.env.CI ? 2 : 1, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', @@ -35,7 +35,7 @@ const config = { /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ - actionTimeout: 20000, + actionTimeout: 30000, /* Base URL to use in actions like `await page.goto('/')`. */ baseURL: `https://${process.env.SFCC_HOSTNAME}`,