From a46d9a2f87c7c193dd1de17e97bd96c95b946ec4 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Thu, 8 Aug 2024 14:28:11 -0300 Subject: [PATCH] Wait for the api call --- tests/cypress/integration/features/woocommerce.cy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cypress/integration/features/woocommerce.cy.js b/tests/cypress/integration/features/woocommerce.cy.js index 94d1968ef..2c7587545 100644 --- a/tests/cypress/integration/features/woocommerce.cy.js +++ b/tests/cypress/integration/features/woocommerce.cy.js @@ -183,7 +183,9 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => { if (wcVersion === '6.4.0') { cy.get('#place_order').click(); } else { + cy.intercept('/wp-json/wc/store/v1/checkout*').as('apiRequest'); cy.get('.wc-block-components-checkout-place-order-button').click(); + cy.wait('@apiRequest'); } });