From 3294b839d8ae0d93cfa954c679d0dff6fa8fc29f Mon Sep 17 00:00:00 2001 From: Veljko Date: Wed, 23 Aug 2023 08:31:47 +0200 Subject: [PATCH] Update click path and element to wait for be clickable [MAILPOET-5008] --- .../tests/acceptance/Subscriptions/WooCheckoutBlocksCest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailpoet/tests/acceptance/Subscriptions/WooCheckoutBlocksCest.php b/mailpoet/tests/acceptance/Subscriptions/WooCheckoutBlocksCest.php index bac9f3fe84..33bb511449 100644 --- a/mailpoet/tests/acceptance/Subscriptions/WooCheckoutBlocksCest.php +++ b/mailpoet/tests/acceptance/Subscriptions/WooCheckoutBlocksCest.php @@ -281,10 +281,10 @@ class WooCheckoutBlocksCest { private function placeOrder(\AcceptanceTester $i): void { // Add a note to order just to avoid flakiness due to race conditions - $i->click('Add a note to your order'); + $i->click(Locator::contains('label', 'Add a note to your order')); $i->fillField('.wc-block-components-textarea', 'This is a note'); $i->waitForText('Place Order'); - $i->waitForElementClickable(Locator::contains('button', 'Place Order')); + $i->waitForElementClickable('.wc-block-components-checkout-place-order-button'); $i->click(Locator::contains('button', 'Place Order')); $i->waitForText('Your order has been received'); }