From 40cdb9a766b2ee903547cbb5c1eec87b01c205c3 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Tue, 14 Feb 2023 10:56:09 +0100 Subject: [PATCH] Fix tracking settings configuration on WooCommerce setup wizard step When testing the woo wizard step i noticed that always set tracking to 'partial' even if the checkbox is checked. When debugging I found that the allowed value is not a string but boolean. I tested this in wizard and also on the WooCommerce setup page. I needed to update the acceptance test because it was clicking on 'no' and asserting the outcome as 'yes' was clicked. [MAILPOET-5059] --- mailpoet/assets/js/src/wizard/steps/woocommerce_step.tsx | 2 +- mailpoet/tests/acceptance/WelcomeWizard/WelcomeWizardCest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mailpoet/assets/js/src/wizard/steps/woocommerce_step.tsx b/mailpoet/assets/js/src/wizard/steps/woocommerce_step.tsx index 89a8eaa379..b8be303569 100644 --- a/mailpoet/assets/js/src/wizard/steps/woocommerce_step.tsx +++ b/mailpoet/assets/js/src/wizard/steps/woocommerce_step.tsx @@ -30,7 +30,7 @@ function WizardWooCommerceStep({ if (importType === null || allowed === null) { return false; } - submitForm(importType, allowed === 'true'); + submitForm(importType, allowed === true); return false; }; diff --git a/mailpoet/tests/acceptance/WelcomeWizard/WelcomeWizardCest.php b/mailpoet/tests/acceptance/WelcomeWizard/WelcomeWizardCest.php index 8fdcf52211..0a050f1026 100644 --- a/mailpoet/tests/acceptance/WelcomeWizard/WelcomeWizardCest.php +++ b/mailpoet/tests/acceptance/WelcomeWizard/WelcomeWizardCest.php @@ -51,7 +51,7 @@ class WelcomeWizardCest { // Third step of the wizard $i->waitForText('Power up your WooCommerce store'); - $i->click('.mailpoet-form-yesno-no'); + $i->click('.mailpoet-form-yesno-yes'); $i->click('.mailpoet-wizard-continue-button'); // Fourth step of the wizard