From 29f065842df8485c6300c4056eac134dfaa906c6 Mon Sep 17 00:00:00 2001 From: SaurabhKumar Date: Wed, 24 Aug 2022 19:39:45 +0530 Subject: [PATCH] AC-6385: Fixing Functional Tests --- .../Controller/Adminhtml/System/Config/Save.php | 13 ++++--------- ...kingCountryDropDownWithOneAllowedCountryTest.xml | 2 +- .../StorefrontFillBillingAddressActionGroup.xml | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index fd4f326f6b8d5..91f93e02dc651 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -223,21 +223,16 @@ public function execute() $configData = $this->filterNodes($configData); $groups = $this->getRequest()->getParam('groups'); - $europeanUnionCountriesSelectedValues = true; + if (isset($groups['country']['fields'])) { if (isset($groups['country']['fields']['eu_countries'])) { $countries = $groups['country']['fields']['eu_countries']; if (empty($countries['value']) && !isset($countries['inherit'])) { - $europeanUnionCountriesSelectedValues = false; + throw new LocalizedException( + __('Something went wrong while saving this configuration.') + ); } - } else { - $europeanUnionCountriesSelectedValues = false; - } - if (!$europeanUnionCountriesSelectedValues) { - throw new LocalizedException( - __('Something went wrong while saving this configuration.') - ); } } diff --git a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml index 987e199803594..f65f626f1a520 100644 --- a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml +++ b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml @@ -59,6 +59,6 @@ - + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillBillingAddressActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillBillingAddressActionGroup.xml index d97642e789a8a..b66c19610f574 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillBillingAddressActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillBillingAddressActionGroup.xml @@ -15,9 +15,9 @@ - +