Fix createOrder in tests to work with disabled opt-in checkbox
[MAILPOET-3657]
This commit is contained in:
committed by
Veljko V
parent
3cedca311d
commit
7b773e2acb
@@ -436,7 +436,7 @@ class AcceptanceTester extends \Codeception\Actor {
|
||||
*/
|
||||
public function optOutOfSubscription() {
|
||||
$i = $this;
|
||||
$checked = $i->executeJS('return document.getElementById("mailpoet_woocommerce_checkout_optin").checked');
|
||||
$checked = $i->executeJS('return document.getElementById("mailpoet_woocommerce_checkout_optin")?.checked');
|
||||
if ($checked) {
|
||||
$i->scrollTo(['css' => '[data-automation-id="woo-commerce-subscription-opt-in"]'], 0, -40);
|
||||
$i->waitForElementClickable('[data-automation-id="woo-commerce-subscription-opt-in"]');
|
||||
|
Reference in New Issue
Block a user