Update click path and element to wait for be clickable

[MAILPOET-5008]
This commit is contained in:
Veljko
2023-08-23 08:31:47 +02:00
committed by alex-mpoet
parent 95db4eb8a1
commit 3294b839d8

View File

@ -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');
}