From 924c73c772e218d4346420f0348a7638c4712670 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 28 Aug 2024 10:46:03 +0530 Subject: [PATCH] Remove wait and add to block billing address. --- tests/e2e/specs/product.spec.js | 2 +- tests/e2e/utils/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/specs/product.spec.js b/tests/e2e/specs/product.spec.js index 5828410..7da86d0 100644 --- a/tests/e2e/specs/product.spec.js +++ b/tests/e2e/specs/product.spec.js @@ -145,7 +145,7 @@ test.describe('Product Tests', () => { const addToCardButton = await page.locator( '.single_add_to_cart_button' ); - await page.waitForTimeout(1000); + await expect( page.locator('.wc-bookings-booking-cost .booking-error') ).toContainText( diff --git a/tests/e2e/utils/index.js b/tests/e2e/utils/index.js index 73e1077..1ecf354 100644 --- a/tests/e2e/utils/index.js +++ b/tests/e2e/utils/index.js @@ -326,6 +326,7 @@ export async function addToCart(page) { * @param {Object} customerDetails Customer billing details */ export async function blockFillBillingDetails(page, customerDetails) { + await page.waitForTimeout(3000); const card = await page.locator('.wc-block-components-address-card'); if (await card.isVisible()) { await card.locator('.wc-block-components-address-card__edit').click();