From f178ea5f7abfe83efdc24b39f6c993bb50fcddab Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Tue, 24 May 2022 21:57:40 +0200 Subject: [PATCH] Fix ManageSubscriptionsLinkCest Clicking on Send button triggers ActionScheduler and it may take longer then 2 seconds. In such case the test ends up reloading on send page instead of newsletter listing page. This commit fixes the issue by adding wait for newsletter listing. [MAILPOET-4724] --- .../tests/acceptance/Subscribers/ManageSubscriptionLinkCest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mailpoet/tests/acceptance/Subscribers/ManageSubscriptionLinkCest.php b/mailpoet/tests/acceptance/Subscribers/ManageSubscriptionLinkCest.php index 40813341f8..7b89348db4 100644 --- a/mailpoet/tests/acceptance/Subscribers/ManageSubscriptionLinkCest.php +++ b/mailpoet/tests/acceptance/Subscribers/ManageSubscriptionLinkCest.php @@ -142,6 +142,8 @@ class ManageSubscriptionLinkCest { $i->selectOptionInSelect2($segmentName); $i->click('Send'); + $i->waitForElement('[data-automation-id="newsletters_listing_tabs"]'); + // Reloading page is faster than waiting for regular AJAX request to refresh it for ($index = 0; $index < 15; $index++) { try {