From f3d4461e8bf282b7ab1e9cc9c93f6207c02414dd Mon Sep 17 00:00:00 2001 From: Veljko Date: Fri, 18 Aug 2023 14:36:57 +0200 Subject: [PATCH] Include waitForNavigation in the test [MAILPOET-5539] --- mailpoet/tests/performance/tests/forms-adding.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mailpoet/tests/performance/tests/forms-adding.js b/mailpoet/tests/performance/tests/forms-adding.js index 97d283baf3..7853775cd1 100644 --- a/mailpoet/tests/performance/tests/forms-adding.js +++ b/mailpoet/tests/performance/tests/forms-adding.js @@ -51,14 +51,12 @@ export async function formsAdding() { await waitAndClick(page, '[data-automation-id="create_new_form"]'); // Choose the form template - await Promise.all([ - page.waitForNavigation(), - page - .locator('[data-automation-id="select_template_template_1_popup"]') - .click(), - ]); - - await page.waitForLoadState('networkidle'); + await page.waitForNavigation(); + await waitAndClick( + page, + '[data-automation-id="select_template_template_1_popup"]', + ); + await page.waitForNavigation(); // Try to close the tutorial video popup try {