From b388d2320c8d6c93a05fe56afd1c9ec91da58dd9 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 22 Mar 2023 11:29:58 +0200 Subject: [PATCH] Fix paypal login in playwright #email can be the field on the page before the login form --- tests/playwright/place-order.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/playwright/place-order.spec.js b/tests/playwright/place-order.spec.js index 843ef267d..c32596a13 100644 --- a/tests/playwright/place-order.spec.js +++ b/tests/playwright/place-order.spec.js @@ -41,14 +41,14 @@ test('PayPal button place order from Product page', async ({page}) => { page.frameLocator('.component-frame').locator('[data-funding-source="paypal"]').click(), ]); await popup.waitForLoadState(); - await popup.click("text=Log in"); - await popup.fill('#email', CUSTOMER_EMAIL); + await popup.fill('[name="login_email"]', CUSTOMER_EMAIL); await popup.locator('#btnNext').click(); - await popup.fill('#password', CUSTOMER_PASSWORD); + await popup.fill('[name="login_password"]', CUSTOMER_PASSWORD); await popup.locator('#btnLogin').click(); await popup.locator('#payment-submit-btn').click(); + await fillCheckoutForm(page); await Promise.all([