From f3908c9fe97241285f2f60c1fe680034d2f3570f Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Thu, 3 Jun 2021 11:07:55 -0300 Subject: [PATCH] add wait between loading shop and add to cart (#30017) --- .../core-tests/specs/shopper/front-end-checkout-coupons.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/core-tests/specs/shopper/front-end-checkout-coupons.test.js b/tests/e2e/core-tests/specs/shopper/front-end-checkout-coupons.test.js index 8567c21ba39..e966a8a0ba1 100644 --- a/tests/e2e/core-tests/specs/shopper/front-end-checkout-coupons.test.js +++ b/tests/e2e/core-tests/specs/shopper/front-end-checkout-coupons.test.js @@ -9,6 +9,7 @@ const { uiUnblocked, applyCoupon, removeCoupon, + waitForSelectorWithoutThrow, } = require( '@woocommerce/e2e-utils' ); /** @@ -33,6 +34,7 @@ const runCheckoutApplyCouponsTest = () => { couponFixedProduct = await createCoupon('5', 'Fixed product discount'); await shopper.emptyCart(); await shopper.goToShop(); + await waitForSelectorWithoutThrow( '.add_to_cart_button' ); await shopper.addToCartFromShopPage('Simple product'); await uiUnblocked(); await shopper.goToCheckout();