diff --git a/app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml b/app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml
index 58bcacc190cff..e02c34fd8868e 100644
--- a/app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml
+++ b/app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml
@@ -21,6 +21,6 @@
-
+
\ No newline at end of file
diff --git a/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml b/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml
index 81ad2858d5901..77c8f02bfb777 100644
--- a/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml
+++ b/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml
index c742248b32cc3..ee25e80fcab30 100644
--- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php b/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php
new file mode 100644
index 0000000000000..8563ab6541a0c
--- /dev/null
+++ b/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php
@@ -0,0 +1,27 @@
+setUserId($userId);
$bulkSummary->setUserType($userType);
$bulkSummary->setOperationCount((int)$bulkSummary->getOperationCount() + count($operations));
-
$this->entityManager->save($bulkSummary);
$connection->commit();
diff --git a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
index 0e197fc811adc..4dcaf7279a570 100644
--- a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
+++ b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
@@ -16,6 +16,7 @@
use Magento\Framework\Bulk\BulkManagementInterface;
use Magento\Framework\DataObject\IdentityGeneratorInterface;
use Magento\Framework\Encryption\Encryptor;
+use Magento\AsynchronousOperations\Api\SaveMultipleOperationsInterface;
use Magento\Framework\Exception\BulkException;
use Magento\Framework\Exception\LocalizedException;
use Psr\Log\LoggerInterface;
@@ -67,6 +68,11 @@ class MassSchedule
*/
private $encryptor;
+ /**
+ * @var SaveMultipleOperationsInterface
+ */
+ private $saveMultipleOperations;
+
/**
* Initialize dependencies.
*
@@ -78,6 +84,7 @@ class MassSchedule
* @param OperationRepositoryInterface $operationRepository
* @param UserContextInterface $userContext
* @param Encryptor $encryptor
+ * @param SaveMultipleOperationsInterface $saveMultipleOperations
*/
public function __construct(
IdentityGeneratorInterface $identityService,
@@ -87,7 +94,8 @@ public function __construct(
LoggerInterface $logger,
OperationRepositoryInterface $operationRepository,
UserContextInterface $userContext,
- Encryptor $encryptor
+ Encryptor $encryptor,
+ SaveMultipleOperationsInterface $saveMultipleOperations
) {
$this->identityService = $identityService;
$this->itemStatusInterfaceFactory = $itemStatusInterfaceFactory;
@@ -97,6 +105,7 @@ public function __construct(
$this->operationRepository = $operationRepository;
$this->userContext = $userContext;
$this->encryptor = $encryptor;
+ $this->saveMultipleOperations = $saveMultipleOperations;
}
/**
@@ -159,6 +168,7 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $
}
}
+ $this->saveMultipleOperations->execute($operations);
if (!$this->bulkManagement->scheduleBulk($groupId, $operations, $bulkDescription, $userId)) {
throw new LocalizedException(
__('Something went wrong while processing the request.')
diff --git a/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php b/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
index f204f63ed032b..74740cba9a6d8 100644
--- a/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
+++ b/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
@@ -10,7 +10,7 @@
use Magento\Framework\EntityManager\EntityManager;
/**
- * Class OperationManagement
+ * Class for managing Bulk Operations
*/
class OperationManagement implements \Magento\Framework\Bulk\OperationManagementInterface
{
@@ -45,7 +45,7 @@ public function __construct(
$this->operationFactory = $operationFactory;
$this->logger = $logger;
}
-
+
/**
* @inheritDoc
*/
diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
index 061d0917e7ab0..0eaa5315af614 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
@@ -7,10 +7,14 @@
namespace Magento\AsynchronousOperations\Model\ResourceModel;
/**
- * Class Operation
+ * Resource class for Bulk Operations
*/
class Operation extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
+
+ public const TABLE_NAME = "magento_operation";
+ public const TABLE_PRIMARY_KEY = "id";
+
/**
* Initialize banner sales rule resource model
*
@@ -18,6 +22,6 @@ class Operation extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
*/
protected function _construct()
{
- $this->_init('magento_operation', 'id');
+ $this->_init(self::TABLE_NAME, self::TABLE_PRIMARY_KEY);
}
}
diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
index 5e42d0a2310b9..b189d81d31636 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
@@ -98,7 +98,7 @@ public function createByTopic($topicName, $entityParams, $groupId)
/** @var OperationInterface $operation */
$operation = $this->operationFactory->create($data);
- return $this->entityManager->save($operation);
+ return $operation;
}
/**
diff --git a/app/code/Magento/AsynchronousOperations/Model/SaveMultipleOperations.php b/app/code/Magento/AsynchronousOperations/Model/SaveMultipleOperations.php
new file mode 100644
index 0000000000000..88f44c64117f2
--- /dev/null
+++ b/app/code/Magento/AsynchronousOperations/Model/SaveMultipleOperations.php
@@ -0,0 +1,56 @@
+operationResource = $operationResource;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function execute(array $operations): void
+ {
+ try {
+ $operationsToInsert = array_map(function ($operation) {
+ return $operation->getData();
+ }, $operations);
+
+ $connection = $this->operationResource->getConnection();
+ $connection->insertMultiple(
+ $this->operationResource->getTable(OperationResource::TABLE_NAME),
+ $operationsToInsert
+ );
+ } catch (\Exception $exception) {
+ throw new CouldNotSaveException(__($exception->getMessage()));
+ }
+ }
+}
diff --git a/app/code/Magento/AsynchronousOperations/etc/di.xml b/app/code/Magento/AsynchronousOperations/etc/di.xml
index 0d8126358abf4..820bdd26e62b2 100644
--- a/app/code/Magento/AsynchronousOperations/etc/di.xml
+++ b/app/code/Magento/AsynchronousOperations/etc/di.xml
@@ -7,6 +7,7 @@
-->
+
diff --git a/app/code/Magento/Backend/README.md b/app/code/Magento/Backend/README.md
index 205051809328a..f70dc9f676236 100644
--- a/app/code/Magento/Backend/README.md
+++ b/app/code/Magento/Backend/README.md
@@ -16,7 +16,6 @@ Before disabling or uninstalling this module, note that the following modules de
- Magento_ReleaseNotification
- Magento_Search
- Magento_Security
-- Magento_Signifyd
- Magento_Swatches
- Magento_Ui
- Magento_User
diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminClickLogoActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminClickLogoActionGroup.xml
new file mode 100644
index 0000000000000..5fe89c3b8f6f4
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminClickLogoActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToSetupWizardPageActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToSetupWizardPageActionGroup.xml
new file mode 100644
index 0000000000000..5d5a233186c1f
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToSetupWizardPageActionGroup.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ Open Setup Wizard Page.
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminSetupWizardPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminSetupWizardPage.xml
new file mode 100644
index 0000000000000..40076ccd42b3a
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminSetupWizardPage.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
index 8498ad8c52e41..e6782dca897d7 100644
--- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
@@ -9,6 +9,7 @@
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml
index 851d2447dfc15..8ac7af096da0a 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest.xml
index 47b8715b5541c..cbe0f0b5f4fe9 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInProductionModeTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInProductionModeTest.xml
index 16bde998b9fb3..323ae324d4950 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInProductionModeTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInProductionModeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml
index 091e441559d78..8ae6d6de79c0b 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml
index 60118202dbef2..efcc6da30199a 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml
index 84e6b59e01504..0a54b3f66153a 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireAdminSessionTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireAdminSessionTest.xml
index 88d26c052b59b..2469151337bfe 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireAdminSessionTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireAdminSessionTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml
index d932da6ec0fad..0e3bf07d32441 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
index f75f3b2e3f15e..be734205e1f5b 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
index 0aa31bb21b6f7..d2c628ed13701 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml
index a9706d902ff34..b3797b0720400 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml
@@ -20,16 +20,16 @@
-
+
-
+
-
+
@@ -40,7 +40,7 @@
-
+
@@ -53,8 +53,9 @@
-
-
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
index db81a7829160d..812158948d85f 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminPrivacyPolicyTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminPrivacyPolicyTest.xml
index 4f215d20a7a36..b0fbdb8b5b596 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminPrivacyPolicyTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminPrivacyPolicyTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminRedirectToAdminPanelOnLogoClickFromWizardPageTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminRedirectToAdminPanelOnLogoClickFromWizardPageTest.xml
new file mode 100644
index 0000000000000..bf74674a2c9c8
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminRedirectToAdminPanelOnLogoClickFromWizardPageTest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml
index 0ff1e817ac0ea..97fdcdf9596a3 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml
index 94bf5c6b8993a..39b08eeb2e42a 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml
index 3aae643ccc36b..81fef1afc282c 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminUserLoginWithStoreCodeInUrlTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminUserLoginWithStoreCodeInUrlTest.xml
index df5ca6d037813..e9050fa3ccd6e 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminUserLoginWithStoreCodeInUrlTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminUserLoginWithStoreCodeInUrlTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml
index 77dc83eec1176..9334b3beaa4c1 100644
--- a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml
+++ b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml
@@ -23,7 +23,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml
index 85d17a69ebae0..743eed209ebf4 100644
--- a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml
+++ b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/PayPal/VaultDetailsHandlerTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/PayPal/VaultDetailsHandlerTest.php
index b3a7f8b9ee76a..657aa930a841f 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/PayPal/VaultDetailsHandlerTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/PayPal/VaultDetailsHandlerTest.php
@@ -8,8 +8,8 @@
use Braintree\Result\Successful;
use Braintree\Transaction;
use Braintree\Transaction\PayPalDetails;
-use Magento\Braintree\Gateway\SubjectReader;
use Magento\Braintree\Gateway\Response\PayPal\VaultDetailsHandler;
+use Magento\Braintree\Gateway\SubjectReader;
use Magento\Framework\Intl\DateTimeFactory;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Payment\Gateway\Data\PaymentDataObjectInterface;
@@ -99,7 +99,12 @@ protected function setUp()
->getMock();
$this->paymentExtensionMock = $this->getMockBuilder(OrderPaymentExtensionInterface::class)
- ->setMethods(['setVaultPaymentToken', 'getVaultPaymentToken'])
+ ->setMethods([
+ 'setVaultPaymentToken',
+ 'getVaultPaymentToken',
+ 'setNotificationMessage',
+ 'getNotificationMessage'
+ ])
->disableOriginalConstructor()
->getMock();
$this->paymentExtensionFactoryMock = $this->getMockBuilder(OrderPaymentExtensionInterfaceFactory::class)
@@ -119,7 +124,7 @@ protected function setUp()
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
-
+
$this->handler = new VaultDetailsHandler(
$this->paymentTokenFactoryMock,
$this->paymentExtensionFactoryMock,
@@ -139,7 +144,7 @@ public function testHandle()
->with($this->paymentTokenMock);
$this->paymentExtensionMock->method('getVaultPaymentToken')
->willReturn($this->paymentTokenMock);
-
+
$this->paymentDataObjectMock->method('getPayment')
->willReturn($this->paymentInfoMock);
@@ -154,7 +159,7 @@ public function testHandle()
$expirationDate = '2017-07-05 00:00:00';
$this->dateTimeFactoryMock->method('create')
->willReturn($dateTime);
-
+
$this->handler->handle($this->subject, $response);
$extensionAttributes = $this->paymentInfoMock->getExtensionAttributes();
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
index c8ec52560be29..131d94f3206c8 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/VaultDetailsHandlerTest.php
@@ -25,7 +25,7 @@
use PHPUnit_Framework_MockObject_MockObject as MockObject;
/**
- * VaultDetailsHandler Test
+ * Verify class VaultDetailsHandler
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
@@ -216,7 +216,12 @@ private function getConfigMock(): Config
private function initPaymentExtensionAttributesMock()
{
$this->paymentExtension = $this->getMockBuilder(OrderPaymentExtensionInterface::class)
- ->setMethods(['setVaultPaymentToken', 'getVaultPaymentToken'])
+ ->setMethods([
+ 'setVaultPaymentToken',
+ 'getVaultPaymentToken',
+ 'setNotificationMessage',
+ 'getNotificationMessage'
+ ])
->disableOriginalConstructor()
->getMock();
diff --git a/app/code/Magento/Braintree/view/adminhtml/web/js/braintree.js b/app/code/Magento/Braintree/view/adminhtml/web/js/braintree.js
index 845ed03725bfb..393b07fc30403 100644
--- a/app/code/Magento/Braintree/view/adminhtml/web/js/braintree.js
+++ b/app/code/Magento/Braintree/view/adminhtml/web/js/braintree.js
@@ -309,6 +309,7 @@ define([
self.hostedFieldsInstance.tokenize(function (err, payload) {
if (err) {
+ $('body').trigger('processStop');
self.error($t('Some payment input fields are invalid.'));
return false;
diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
index fa488b073f515..2e9b8ba413af3 100644
--- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
+++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
@@ -6,20 +6,30 @@
namespace Magento\Bundle\Block\Catalog\Product\View\Type;
use Magento\Bundle\Model\Option;
+use Magento\Bundle\Model\Product\Price;
+use Magento\Bundle\Model\Product\PriceFactory;
+use Magento\Bundle\Model\Product\Type;
+use Magento\Catalog\Block\Product\Context;
+use Magento\Catalog\Block\Product\View\AbstractView;
use Magento\Catalog\Model\Product;
+use Magento\Catalog\Pricing\Price\FinalPrice;
+use Magento\Catalog\Pricing\Price\RegularPrice;
+use Magento\CatalogRule\Model\ResourceModel\Product\CollectionProcessor;
+use Magento\Framework\App\ObjectManager;
use Magento\Framework\DataObject;
+use Magento\Framework\Json\EncoderInterface;
+use Magento\Framework\Locale\FormatInterface;
+use Magento\Framework\Stdlib\ArrayUtils;
/**
* Catalog bundle product info block
*
* @api
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @api
* @since 100.0.2
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
-class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
+class Bundle extends AbstractView
{
-
/**
* @var array
*/
@@ -33,17 +43,17 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
protected $catalogProduct;
/**
- * @var \Magento\Bundle\Model\Product\PriceFactory
+ * @var PriceFactory
*/
protected $productPriceFactory;
/**
- * @var \Magento\Framework\Json\EncoderInterface
+ * @var EncoderInterface
*/
protected $jsonEncoder;
/**
- * @var \Magento\Framework\Locale\FormatInterface
+ * @var FormatInterface
*/
protected $localeFormat;
@@ -63,22 +73,24 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
private $optionsPosition = [];
/**
- * @param \Magento\Catalog\Block\Product\Context $context
- * @param \Magento\Framework\Stdlib\ArrayUtils $arrayUtils
+ * @param Context $context
+ * @param ArrayUtils $arrayUtils
* @param \Magento\Catalog\Helper\Product $catalogProduct
- * @param \Magento\Bundle\Model\Product\PriceFactory $productPrice
- * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
- * @param \Magento\Framework\Locale\FormatInterface $localeFormat
+ * @param PriceFactory $productPrice
+ * @param EncoderInterface $jsonEncoder
+ * @param FormatInterface $localeFormat
* @param array $data
+ * @param CollectionProcessor|null $catalogRuleProcessor
*/
public function __construct(
- \Magento\Catalog\Block\Product\Context $context,
- \Magento\Framework\Stdlib\ArrayUtils $arrayUtils,
+ Context $context,
+ ArrayUtils $arrayUtils,
\Magento\Catalog\Helper\Product $catalogProduct,
- \Magento\Bundle\Model\Product\PriceFactory $productPrice,
- \Magento\Framework\Json\EncoderInterface $jsonEncoder,
- \Magento\Framework\Locale\FormatInterface $localeFormat,
- array $data = []
+ PriceFactory $productPrice,
+ EncoderInterface $jsonEncoder,
+ FormatInterface $localeFormat,
+ array $data = [],
+ ?CollectionProcessor $catalogRuleProcessor = null
) {
$this->catalogProduct = $catalogProduct;
$this->productPriceFactory = $productPrice;
@@ -89,22 +101,8 @@ public function __construct(
$arrayUtils,
$data
);
- }
-
- /**
- * Return catalog rule processor or creates processor if it does not exist
- *
- * @deprecated 100.2.0
- * @return \Magento\CatalogRule\Model\ResourceModel\Product\CollectionProcessor
- */
- private function getCatalogRuleProcessor()
- {
- if ($this->catalogRuleProcessor === null) {
- $this->catalogRuleProcessor = \Magento\Framework\App\ObjectManager::getInstance()
- ->get(\Magento\CatalogRule\Model\ResourceModel\Product\CollectionProcessor::class);
- }
-
- return $this->catalogRuleProcessor;
+ $this->catalogRuleProcessor = $catalogRuleProcessor ?? ObjectManager::getInstance()
+ ->get(CollectionProcessor::class);
}
/**
@@ -120,7 +118,7 @@ public function getOptions($stripSelection = false)
{
if (!$this->options) {
$product = $this->getProduct();
- /** @var \Magento\Bundle\Model\Product\Type $typeInstance */
+ /** @var Type $typeInstance */
$typeInstance = $product->getTypeInstance();
$typeInstance->setStoreFilter($product->getStoreId(), $product);
@@ -130,7 +128,7 @@ public function getOptions($stripSelection = false)
$typeInstance->getOptionsIds($product),
$product
);
- $this->getCatalogRuleProcessor()->addPriceData($selectionCollection);
+ $this->catalogRuleProcessor->addPriceData($selectionCollection);
$selectionCollection->addTierPriceData();
$this->options = $optionCollection->appendSelections(
@@ -151,10 +149,7 @@ public function getOptions($stripSelection = false)
public function hasOptions()
{
$this->getOptions();
- if (empty($this->options) || !$this->getProduct()->isSalable()) {
- return false;
- }
- return true;
+ return !(empty($this->options) || !$this->getProduct()->isSalable());
}
/**
@@ -255,7 +250,7 @@ private function getSelectionItemData(Product $product, Product $selection)
->getOptionSelectionAmount($selection)
->getValue();
- $selection = [
+ return [
'qty' => $qty,
'customQty' => $selection->getSelectionCanChangeQty(),
'optionId' => $selection->getId(),
@@ -275,8 +270,6 @@ private function getSelectionItemData(Product $product, Product $selection)
'name' => $selection->getName(),
'canApplyMsrp' => false,
];
-
- return $selection;
}
/**
@@ -371,16 +364,16 @@ private function getOptionItemData(Option $option, Product $product, $position)
*/
private function getConfigData(Product $product, array $options)
{
- $isFixedPrice = $this->getProduct()->getPriceType() == \Magento\Bundle\Model\Product\Price::PRICE_TYPE_FIXED;
+ $isFixedPrice = $this->getProduct()->getPriceType() == Price::PRICE_TYPE_FIXED;
$productAmount = $product
->getPriceInfo()
- ->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE)
+ ->getPrice(FinalPrice::PRICE_CODE)
->getPriceWithoutOption();
$baseProductAmount = $product
->getPriceInfo()
- ->getPrice(\Magento\Catalog\Pricing\Price\RegularPrice::PRICE_CODE)
+ ->getPrice(RegularPrice::PRICE_CODE)
->getAmount();
$config = [
diff --git a/app/code/Magento/Bundle/Model/LinkManagement.php b/app/code/Magento/Bundle/Model/LinkManagement.php
index 8c85c06c7342d..43a6532a16b2d 100644
--- a/app/code/Magento/Bundle/Model/LinkManagement.php
+++ b/app/code/Magento/Bundle/Model/LinkManagement.php
@@ -1,36 +1,49 @@
productRepository = $productRepository;
$this->linkFactory = $linkFactory;
@@ -79,15 +99,16 @@ public function __construct(
$this->optionCollection = $optionCollection;
$this->storeManager = $storeManager;
$this->dataObjectHelper = $dataObjectHelper;
+ $this->metadataPool = $metadataPool;
}
/**
- * {@inheritdoc}
+ * @inheritDoc
*/
public function getChildren($productSku, $optionId = null)
{
$product = $this->productRepository->get($productSku, true);
- if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
+ if ($product->getTypeId() != Product\Type::TYPE_BUNDLE) {
throw new InputException(__('This is implemented for bundle products only.'));
}
@@ -96,7 +117,7 @@ public function getChildren($productSku, $optionId = null)
if (!$option->getSelections() || ($optionId !== null && $option->getOptionId() != $optionId)) {
continue;
}
- /** @var \Magento\Catalog\Model\Product $selection */
+ /** @var Product $selection */
foreach ($option->getSelections() as $selection) {
$childrenList[] = $this->buildLink($selection, $product);
}
@@ -105,32 +126,33 @@ public function getChildren($productSku, $optionId = null)
}
/**
- * {@inheritdoc}
+ * @inheritDoc
*/
- public function addChildByProductSku($sku, $optionId, \Magento\Bundle\Api\Data\LinkInterface $linkedProduct)
+ public function addChildByProductSku($sku, $optionId, LinkInterface $linkedProduct)
{
- /** @var \Magento\Catalog\Model\Product $product */
+ /** @var Product $product */
$product = $this->productRepository->get($sku, true);
return $this->addChild($product, $optionId, $linkedProduct);
}
/**
- * {@inheritdoc}
+ * @inheritDoc
+ *
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
public function saveChild(
$sku,
- \Magento\Bundle\Api\Data\LinkInterface $linkedProduct
+ LinkInterface $linkedProduct
) {
$product = $this->productRepository->get($sku, true);
- if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
+ if ($product->getTypeId() != Product\Type::TYPE_BUNDLE) {
throw new InputException(
__('The product with the "%1" SKU isn\'t a bundle product.', [$product->getSku()])
);
}
- /** @var \Magento\Catalog\Model\Product $linkProductModel */
+ /** @var Product $linkProductModel */
$linkProductModel = $this->productRepository->get($linkedProduct->getSku());
if ($linkProductModel->isComposite()) {
throw new InputException(__('The bundle product can\'t contain another composite product.'));
@@ -140,7 +162,7 @@ public function saveChild(
throw new InputException(__('The product link needs an ID field entered. Enter and try again.'));
}
- /** @var \Magento\Bundle\Model\Selection $selectionModel */
+ /** @var Selection $selectionModel */
$selectionModel = $this->bundleSelection->create();
$selectionModel->load($linkedProduct->getId());
if (!$selectionModel->getId()) {
@@ -151,7 +173,7 @@ public function saveChild(
)
);
}
- $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
+ $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
$selectionModel = $this->mapProductLinkToSelectionModel(
$selectionModel,
$linkedProduct,
@@ -169,17 +191,21 @@ public function saveChild(
}
/**
- * @param \Magento\Bundle\Model\Selection $selectionModel
- * @param \Magento\Bundle\Api\Data\LinkInterface $productLink
+ * Fill selection model with product link data
+ *
+ * @param Selection $selectionModel
+ * @param LinkInterface $productLink
* @param string $linkedProductId
* @param string $parentProductId
- * @return \Magento\Bundle\Model\Selection
+ *
+ * @return Selection
+ *
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
protected function mapProductLinkToSelectionModel(
- \Magento\Bundle\Model\Selection $selectionModel,
- \Magento\Bundle\Api\Data\LinkInterface $productLink,
+ Selection $selectionModel,
+ LinkInterface $productLink,
$linkedProductId,
$parentProductId
) {
@@ -214,21 +240,22 @@ protected function mapProductLinkToSelectionModel(
}
/**
- * {@inheritdoc}
+ * @inheritDoc
+ *
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function addChild(
- \Magento\Catalog\Api\Data\ProductInterface $product,
+ ProductInterface $product,
$optionId,
- \Magento\Bundle\Api\Data\LinkInterface $linkedProduct
+ LinkInterface $linkedProduct
) {
- if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
+ if ($product->getTypeId() != Product\Type::TYPE_BUNDLE) {
throw new InputException(
__('The product with the "%1" SKU isn\'t a bundle product.', $product->getSku())
);
}
- $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
+ $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
$options = $this->optionCollection->create();
@@ -246,10 +273,10 @@ public function addChild(
);
}
- /* @var $resource \Magento\Bundle\Model\ResourceModel\Bundle */
+ /* @var $resource Bundle */
$resource = $this->bundleFactory->create();
$selections = $resource->getSelectionsData($product->getData($linkField));
- /** @var \Magento\Catalog\Model\Product $linkProductModel */
+ /** @var Product $linkProductModel */
$linkProductModel = $this->productRepository->get($linkedProduct->getSku());
if ($linkProductModel->isComposite()) {
throw new InputException(__('The bundle product can\'t contain another composite product.'));
@@ -267,9 +294,9 @@ public function addChild(
[$linkedProduct->getSku(), $product->getSku()]
)
);
- } else {
- return $this->bundleSelection->create()->load($linkProductModel->getEntityId());
}
+
+ return $this->bundleSelection->create()->load($linkProductModel->getEntityId());
}
}
}
@@ -294,13 +321,13 @@ public function addChild(
}
/**
- * {@inheritdoc}
+ * @inheritDoc
*/
public function removeChild($sku, $optionId, $childSku)
{
$product = $this->productRepository->get($sku, true);
- if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
+ if ($product->getTypeId() != Product\Type::TYPE_BUNDLE) {
throw new InputException(__('The product with the "%1" SKU isn\'t a bundle product.', $sku));
}
@@ -308,7 +335,7 @@ public function removeChild($sku, $optionId, $childSku)
$usedProductIds = [];
$removeSelectionIds = [];
foreach ($this->getOptions($product) as $option) {
- /** @var \Magento\Bundle\Model\Selection $selection */
+ /** @var Selection $selection */
foreach ($option->getSelections() as $selection) {
if ((strcasecmp($selection->getSku(), $childSku) == 0) && ($selection->getOptionId() == $optionId)) {
$removeSelectionIds[] = $selection->getSelectionId();
@@ -319,12 +346,12 @@ public function removeChild($sku, $optionId, $childSku)
}
}
if (empty($removeSelectionIds)) {
- throw new \Magento\Framework\Exception\NoSuchEntityException(
+ throw new NoSuchEntityException(
__("The bundle product doesn't exist. Review your request and try again.")
);
}
- $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
- /* @var $resource \Magento\Bundle\Model\ResourceModel\Bundle */
+ $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
+ /* @var $resource Bundle */
$resource = $this->bundleFactory->create();
$resource->dropAllUnneededSelections($product->getData($linkField), $excludeSelectionIds);
$resource->removeProductRelations($product->getData($linkField), array_unique($usedProductIds));
@@ -333,26 +360,29 @@ public function removeChild($sku, $optionId, $childSku)
}
/**
- * @param \Magento\Catalog\Model\Product $selection
- * @param \Magento\Catalog\Model\Product $product
- * @return \Magento\Bundle\Api\Data\LinkInterface
+ * Build bundle link between two products
+ *
+ * @param Product $selection
+ * @param Product $product
+ *
+ * @return LinkInterface
*/
- private function buildLink(\Magento\Catalog\Model\Product $selection, \Magento\Catalog\Model\Product $product)
+ private function buildLink(Product $selection, Product $product)
{
$selectionPriceType = $selectionPrice = null;
- /** @var \Magento\Bundle\Model\Selection $product */
+ /** @var Selection $product */
if ($product->getPriceType()) {
$selectionPriceType = $selection->getSelectionPriceType();
$selectionPrice = $selection->getSelectionPriceValue();
}
- /** @var \Magento\Bundle\Api\Data\LinkInterface $link */
+ /** @var LinkInterface $link */
$link = $this->linkFactory->create();
$this->dataObjectHelper->populateWithArray(
$link,
$selection->getData(),
- \Magento\Bundle\Api\Data\LinkInterface::class
+ LinkInterface::class
);
$link->setIsDefault($selection->getIsDefault())
->setId($selection->getSelectionId())
@@ -364,12 +394,15 @@ private function buildLink(\Magento\Catalog\Model\Product $selection, \Magento\C
}
/**
- * @param \Magento\Catalog\Api\Data\ProductInterface $product
- * @return \Magento\Bundle\Api\Data\OptionInterface[]
+ * Get bundle product options
+ *
+ * @param ProductInterface $product
+ *
+ * @return OptionInterface[]
*/
- private function getOptions(\Magento\Catalog\Api\Data\ProductInterface $product)
+ private function getOptions(ProductInterface $product)
{
- /** @var \Magento\Bundle\Model\Product\Type $productTypeInstance */
+ /** @var Type $productTypeInstance */
$productTypeInstance = $product->getTypeInstance();
$productTypeInstance->setStoreFilter(
$product->getStoreId(),
@@ -383,19 +416,6 @@ private function getOptions(\Magento\Catalog\Api\Data\ProductInterface $product)
$product
);
- $options = $optionCollection->appendSelections($selectionCollection, true);
- return $options;
- }
-
- /**
- * Get MetadataPool instance
- * @return MetadataPool
- */
- private function getMetadataPool()
- {
- if (!$this->metadataPool) {
- $this->metadataPool = ObjectManager::getInstance()->get(MetadataPool::class);
- }
- return $this->metadataPool;
+ return $optionCollection->appendSelections($selectionCollection, true);
}
}
diff --git a/app/code/Magento/Bundle/Model/Product/SaveHandler.php b/app/code/Magento/Bundle/Model/Product/SaveHandler.php
index 99e8188146bbb..8c2727a71aac1 100644
--- a/app/code/Magento/Bundle/Model/Product/SaveHandler.php
+++ b/app/code/Magento/Bundle/Model/Product/SaveHandler.php
@@ -3,58 +3,59 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\Product;
+use Magento\Bundle\Api\Data\OptionInterface;
use Magento\Bundle\Model\Option\SaveAction;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Bundle\Api\ProductOptionRepositoryInterface as OptionRepository;
use Magento\Bundle\Api\ProductLinkManagementInterface;
-use Magento\Framework\App\ObjectManager;
use Magento\Framework\EntityManager\MetadataPool;
use Magento\Framework\EntityManager\Operation\ExtensionInterface;
/**
- * Class SaveHandler
+ * Bundle product save handler
*/
class SaveHandler implements ExtensionInterface
{
/**
* @var OptionRepository
*/
- protected $optionRepository;
+ private $optionRepository;
/**
* @var ProductLinkManagementInterface
*/
- protected $productLinkManagement;
+ private $productLinkManagement;
/**
- * @var MetadataPool
+ * @var SaveAction
*/
- private $metadataPool;
+ private $optionSave;
/**
- * @var SaveAction
+ * @var MetadataPool
*/
- private $optionSave;
+ private $metadataPool;
/**
* @param OptionRepository $optionRepository
* @param ProductLinkManagementInterface $productLinkManagement
* @param SaveAction $optionSave
- * @param MetadataPool|null $metadataPool
+ * @param MetadataPool $metadataPool
*/
public function __construct(
OptionRepository $optionRepository,
ProductLinkManagementInterface $productLinkManagement,
SaveAction $optionSave,
- MetadataPool $metadataPool = null
+ MetadataPool $metadataPool
) {
$this->optionRepository = $optionRepository;
$this->productLinkManagement = $productLinkManagement;
$this->optionSave = $optionSave;
- $this->metadataPool = $metadataPool
- ?: ObjectManager::getInstance()->get(MetadataPool::class);
+ $this->metadataPool = $metadataPool;
}
/**
@@ -69,7 +70,7 @@ public function __construct(
*/
public function execute($entity, $arguments = [])
{
- /** @var \Magento\Bundle\Api\Data\OptionInterface[] $bundleProductOptions */
+ /** @var OptionInterface[] $bundleProductOptions */
$bundleProductOptions = $entity->getExtensionAttributes()->getBundleProductOptions() ?: [];
//Only processing bundle products.
if ($entity->getTypeId() !== Type::TYPE_CODE || empty($bundleProductOptions)) {
@@ -101,7 +102,8 @@ public function execute($entity, $arguments = [])
* Remove option product links
*
* @param string $entitySku
- * @param \Magento\Bundle\Api\Data\OptionInterface $option
+ * @param OptionInterface $option
+ *
* @return void
*/
protected function removeOptionLinks($entitySku, $option)
@@ -120,6 +122,7 @@ protected function removeOptionLinks($entitySku, $option)
* @param object $entity
* @param array $options
* @param array $newOptionsIds
+ *
* @return void
*/
private function saveOptions($entity, array $options, array $newOptionsIds = []): void
@@ -137,6 +140,7 @@ private function saveOptions($entity, array $options, array $newOptionsIds = [])
* Get options ids from array of the options entities.
*
* @param array $options
+ *
* @return array
*/
private function getOptionIds(array $options): array
@@ -144,7 +148,7 @@ private function getOptionIds(array $options): array
$optionIds = [];
if (!empty($options)) {
- /** @var \Magento\Bundle\Api\Data\OptionInterface $option */
+ /** @var OptionInterface $option */
foreach ($options as $option) {
if ($option->getOptionId()) {
$optionIds[] = $option->getOptionId();
@@ -161,6 +165,7 @@ private function getOptionIds(array $options): array
* @param ProductInterface $entity
* @param array $existingOptionsIds
* @param array $optionIds
+ *
* @return void
*/
private function processRemovedOptions(ProductInterface $entity, array $existingOptionsIds, array $optionIds): void
diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Stock.php b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Stock.php
index 803fbae067e9d..6808081506dd7 100644
--- a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Stock.php
+++ b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Stock.php
@@ -3,65 +3,65 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\ResourceModel\Indexer;
+use Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher;
use Magento\CatalogInventory\Model\Indexer\Stock\Action\Full;
-use Magento\Framework\App\ObjectManager;
+use Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\DefaultStock;
+use Magento\Eav\Model\Config;
+use Magento\Framework\App\Config\ScopeConfigInterface;
+use Magento\Framework\Indexer\Table\StrategyInterface;
+use Magento\Framework\Model\ResourceModel\Db\Context;
/**
* Bundle Stock Status Indexer Resource Model
*
- * @author Magento Core Team
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
-class Stock extends \Magento\CatalogInventory\Model\ResourceModel\Indexer\Stock\DefaultStock
+class Stock extends DefaultStock
{
/**
- * @var \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher
+ * @var ActiveTableSwitcher
*/
private $activeTableSwitcher;
/**
- * @var \Magento\Bundle\Model\ResourceModel\Indexer\StockStatusSelectBuilder
+ * @var StockStatusSelectBuilder
*/
private $stockStatusSelectBuilder;
/**
- * @var \Magento\Bundle\Model\ResourceModel\Indexer\BundleOptionStockDataSelectBuilder
+ * @var BundleOptionStockDataSelectBuilder
*/
private $bundleOptionStockDataSelectBuilder;
/**
- * Class constructor
- *
- * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
- * @param \Magento\Framework\Indexer\Table\StrategyInterface $tableStrategy
- * @param \Magento\Eav\Model\Config $eavConfig
- * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
- * @param null $connectionName
- * @param \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher|null $activeTableSwitcher
- * @param StockStatusSelectBuilder|null $stockStatusSelectBuilder
- * @param BundleOptionStockDataSelectBuilder|null $bundleOptionStockDataSelectBuilder
+ * @param Context $context
+ * @param StrategyInterface $tableStrategy
+ * @param Config $eavConfig
+ * @param ScopeConfigInterface $scopeConfig
+ * @param ActiveTableSwitcher $activeTableSwitcher
+ * @param StockStatusSelectBuilder $stockStatusSelectBuilder
+ * @param BundleOptionStockDataSelectBuilder $bundleOptionStockDataSelectBuilder
+ * @param string $connectionName
*/
public function __construct(
- \Magento\Framework\Model\ResourceModel\Db\Context $context,
- \Magento\Framework\Indexer\Table\StrategyInterface $tableStrategy,
- \Magento\Eav\Model\Config $eavConfig,
- \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
- $connectionName = null,
- \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher $activeTableSwitcher = null,
- StockStatusSelectBuilder $stockStatusSelectBuilder = null,
- BundleOptionStockDataSelectBuilder $bundleOptionStockDataSelectBuilder = null
+ Context $context,
+ StrategyInterface $tableStrategy,
+ Config $eavConfig,
+ ScopeConfigInterface $scopeConfig,
+ ActiveTableSwitcher $activeTableSwitcher,
+ StockStatusSelectBuilder $stockStatusSelectBuilder,
+ BundleOptionStockDataSelectBuilder $bundleOptionStockDataSelectBuilder,
+ $connectionName = null
) {
parent::__construct($context, $tableStrategy, $eavConfig, $scopeConfig, $connectionName);
- $this->activeTableSwitcher = $activeTableSwitcher ?: ObjectManager::getInstance()
- ->get(\Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher::class);
-
- $this->stockStatusSelectBuilder = $stockStatusSelectBuilder ?: ObjectManager::getInstance()
- ->get(StockStatusSelectBuilder::class);
-
- $this->bundleOptionStockDataSelectBuilder = $bundleOptionStockDataSelectBuilder ?: ObjectManager::getInstance()
- ->get(BundleOptionStockDataSelectBuilder::class);
+ $this->activeTableSwitcher = $activeTableSwitcher;
+ $this->stockStatusSelectBuilder = $stockStatusSelectBuilder;
+ $this->bundleOptionStockDataSelectBuilder = $bundleOptionStockDataSelectBuilder;
}
/**
@@ -79,6 +79,7 @@ protected function _getBundleOptionTable()
*
* @param int|array $entityIds
* @param bool $usePrimaryTable use primary or temporary index table
+ *
* @return $this
*/
protected function _prepareBundleOptionStockData($entityIds = null, $usePrimaryTable = false)
@@ -122,6 +123,7 @@ protected function _prepareBundleOptionStockData($entityIds = null, $usePrimaryT
*
* @param int|array $entityIds
* @param bool $usePrimaryTable use primary or temporary index table
+ *
* @return \Magento\Framework\DB\Select
*/
protected function _getStockStatusSelect($entityIds = null, $usePrimaryTable = false)
@@ -171,6 +173,7 @@ protected function _prepareIndexTable($entityIds = null)
* Update Stock status index by product ids
*
* @param array|int $entityIds
+ *
* @return $this
*/
protected function _updateIndex($entityIds)
diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Option.php b/app/code/Magento/Bundle/Model/ResourceModel/Option.php
index 7babd0b349f02..1260233b5bcb3 100644
--- a/app/code/Magento/Bundle/Model/ResourceModel/Option.php
+++ b/app/code/Magento/Bundle/Model/ResourceModel/Option.php
@@ -3,20 +3,26 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\ResourceModel;
+use Magento\Bundle\Model\Option\Validator;
use Magento\Catalog\Api\Data\ProductInterface;
-use Magento\Framework\EntityManager\MetadataPool;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\DataObject;
use Magento\Framework\EntityManager\EntityManager;
+use Magento\Framework\EntityManager\MetadataPool;
+use Magento\Framework\Model\AbstractModel;
+use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
+use Magento\Framework\Model\ResourceModel\Db\Context;
/**
* Bundle Option Resource Model
*/
-class Option extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
+class Option extends AbstractDb
{
/**
- * @var \Magento\Bundle\Model\Option\Validator
+ * @var Validator
*/
private $validator;
@@ -31,22 +37,23 @@ class Option extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
private $entityManager;
/**
- * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
- * @param \Magento\Bundle\Model\Option\Validator $validator
+ * @param Context $context
+ * @param Validator $validator
+ * @param MetadataPool $metadataPool
+ * @param EntityManager $entityManager
* @param string $connectionName
- * @param EntityManager|null $entityManager
*/
public function __construct(
- \Magento\Framework\Model\ResourceModel\Db\Context $context,
- \Magento\Bundle\Model\Option\Validator $validator,
- $connectionName = null,
- EntityManager $entityManager = null
+ Context $context,
+ Validator $validator,
+ MetadataPool $metadataPool,
+ EntityManager $entityManager,
+ $connectionName = null
) {
parent::__construct($context, $connectionName);
$this->validator = $validator;
-
- $this->entityManager = $entityManager
- ?: ObjectManager::getInstance()->get(EntityManager::class);
+ $this->metadataPool = $metadataPool;
+ $this->entityManager = $entityManager;
}
/**
@@ -60,7 +67,10 @@ protected function _construct()
}
/**
+ * Remove selections by option id
+ *
* @param int $optionId
+ *
* @return int
*/
public function removeOptionSelections($optionId)
@@ -74,10 +84,11 @@ public function removeOptionSelections($optionId)
/**
* After save process
*
- * @param \Magento\Framework\Model\AbstractModel $object
+ * @param AbstractModel $object
+ *
* @return $this
*/
- protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
+ protected function _afterSave(AbstractModel $object)
{
parent::_afterSave($object);
@@ -90,7 +101,7 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
$connection = $this->getConnection();
$connection->delete($this->getTable('catalog_product_bundle_option_value'), $condition);
- $data = new \Magento\Framework\DataObject();
+ $data = new DataObject();
$data->setOptionId($object->getId())
->setStoreId($object->getStoreId())
->setParentProductId($object->getParentId())
@@ -112,10 +123,10 @@ protected function _afterSave(\Magento\Framework\Model\AbstractModel $object)
/**
* After delete process
*
- * @param \Magento\Framework\Model\AbstractModel $object
+ * @param AbstractModel $object
* @return $this
*/
- protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
+ protected function _afterDelete(AbstractModel $object)
{
parent::_afterDelete($object);
@@ -136,6 +147,7 @@ protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
*
* @param int $productId
* @param int $storeId
+ *
* @return array
*/
public function getSearchableData($productId, $storeId)
@@ -148,7 +160,7 @@ public function getSearchableData($productId, $storeId)
'option_title_default.title'
);
$bind = ['store_id' => $storeId, 'product_id' => $productId];
- $linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
+ $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
$select = $connection->select()
->from(
['opt' => $this->getMainTable()],
@@ -180,7 +192,7 @@ public function getSearchableData($productId, $storeId)
}
/**
- * {@inheritdoc}
+ * @inheritDoc
*/
public function getValidationRulesBeforeSave()
{
@@ -188,21 +200,9 @@ public function getValidationRulesBeforeSave()
}
/**
- * Get MetadataPool instance
- * @return MetadataPool
- */
- private function getMetadataPool()
- {
- if (!$this->metadataPool) {
- $this->metadataPool = ObjectManager::getInstance()->get(MetadataPool::class);
- }
- return $this->metadataPool;
- }
-
- /**
- * {@inheritdoc}
+ * @inheritDoc
*/
- public function save(\Magento\Framework\Model\AbstractModel $object)
+ public function save(AbstractModel $object)
{
$this->entityManager->save($object);
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
index 30e37e54a21db..441bc0dd9de89 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
@@ -6,8 +6,14 @@
namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
use Magento\Catalog\Model\Product\Type\AbstractType;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filter\FilterManager;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\ResourceModel\AbstractResource;
+use Magento\Framework\Registry;
use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Tax\Helper\Data;
/**
* Order pdf items renderer
@@ -24,30 +30,28 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra
private $serializer;
/**
- * Constructor
- *
- * @param \Magento\Framework\Model\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param \Magento\Tax\Helper\Data $taxData
- * @param \Magento\Framework\Filesystem $filesystem
- * @param \Magento\Framework\Filter\FilterManager $filterManager
- * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
- * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
+ * @param Context $context
+ * @param Registry $registry
+ * @param Data $taxData
+ * @param Filesystem $filesystem
+ * @param FilterManager $filterManager
+ * @param Json $serializer
+ * @param AbstractResource $resource
+ * @param AbstractDb $resourceCollection
* @param array $data
- * @param \Magento\Framework\Serialize\Serializer\Json $serializer
*/
public function __construct(
- \Magento\Framework\Model\Context $context,
- \Magento\Framework\Registry $registry,
- \Magento\Tax\Helper\Data $taxData,
- \Magento\Framework\Filesystem $filesystem,
- \Magento\Framework\Filter\FilterManager $filterManager,
- \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
- \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
- array $data = [],
- Json $serializer = null
+ Context $context,
+ Registry $registry,
+ Data $taxData,
+ Filesystem $filesystem,
+ FilterManager $filterManager,
+ Json $serializer,
+ AbstractResource $resource = null,
+ AbstractDb $resourceCollection = null,
+ array $data = []
) {
- $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+ $this->serializer = $serializer;
parent::__construct(
$context,
$registry,
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
index 3d7d05396e0fc..1ed3fc76ddee0 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
@@ -3,10 +3,19 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filter\FilterManager;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\ResourceModel\AbstractResource;
+use Magento\Framework\Registry;
use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Stdlib\StringUtils;
+use Magento\Tax\Helper\Data;
/**
* Order creditmemo pdf default items renderer
@@ -16,36 +25,34 @@ class Creditmemo extends AbstractItems
/**
* Core string
*
- * @var \Magento\Framework\Stdlib\StringUtils
+ * @var StringUtils
*/
protected $string;
/**
- * Constructor
- *
- * @param \Magento\Framework\Model\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param \Magento\Tax\Helper\Data $taxData
- * @param \Magento\Framework\Filesystem $filesystem
- * @param \Magento\Framework\Filter\FilterManager $filterManager
- * @param \Magento\Framework\Stdlib\StringUtils $string
- * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
- * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
+ * @param Context $context
+ * @param Registry $registry
+ * @param Data $taxData
+ * @param Filesystem $filesystem
+ * @param FilterManager $filterManager
+ * @param Json $serializer
+ * @param StringUtils $string
+ * @param AbstractResource $resource
+ * @param AbstractDb $resourceCollection
* @param array $data
- * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Framework\Model\Context $context,
- \Magento\Framework\Registry $registry,
- \Magento\Tax\Helper\Data $taxData,
- \Magento\Framework\Filesystem $filesystem,
- \Magento\Framework\Filter\FilterManager $filterManager,
- \Magento\Framework\Stdlib\StringUtils $string,
- \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
- \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
- array $data = [],
- Json $serializer = null
+ Context $context,
+ Registry $registry,
+ Data $taxData,
+ Filesystem $filesystem,
+ FilterManager $filterManager,
+ Json $serializer,
+ StringUtils $string,
+ AbstractResource $resource = null,
+ AbstractDb $resourceCollection = null,
+ array $data = []
) {
$this->string = $string;
parent::__construct(
@@ -54,10 +61,10 @@ public function __construct(
$taxData,
$filesystem,
$filterManager,
+ $serializer,
$resource,
$resourceCollection,
- $data,
- $serializer
+ $data
);
}
@@ -98,19 +105,17 @@ public function draw()
}
// draw selection attributes
- if ($childItem->getOrderItem()->getParentItem()) {
- if ($prevOptionId != $attributes['option_id']) {
- $line[0] = [
- 'font' => 'italic',
- 'text' => $this->string->split($attributes['option_label'], 38, true, true),
- 'feed' => $x,
- ];
+ if ($childItem->getOrderItem()->getParentItem() && $prevOptionId != $attributes['option_id']) {
+ $line[0] = [
+ 'font' => 'italic',
+ 'text' => $this->string->split($attributes['option_label'], 38, true, true),
+ 'feed' => $x,
+ ];
- $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
+ $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
- $line = [];
- $prevOptionId = $attributes['option_id'];
- }
+ $line = [];
+ $prevOptionId = $attributes['option_id'];
}
// draw product titles
@@ -152,7 +157,7 @@ public function draw()
// draw QTY
$text = $childItem->getQty() * 1;
$line[] = [
- 'text' => $childItem->getQty() * 1,
+ 'text' => $text,
'feed' => $x,
'font' => 'bold',
'align' => 'center',
@@ -177,40 +182,34 @@ public function draw()
// custom options
$options = $item->getOrderItem()->getProductOptions();
- if ($options) {
- if (isset($options['options'])) {
- foreach ($options['options'] as $option) {
- $lines = [];
- $lines[][] = [
- 'text' => $this->string->split(
- $this->filterManager->stripTags($option['label']),
- 40,
- true,
- true
- ),
- 'font' => 'italic',
- 'feed' => $leftBound,
- ];
-
- if ($option['value']) {
- $text = [];
- $printValue = isset(
- $option['print_value']
- ) ? $option['print_value'] : $this->filterManager->stripTags(
- $option['value']
- );
- $values = explode(', ', $printValue);
- foreach ($values as $value) {
- foreach ($this->string->split($value, 30, true, true) as $subValue) {
- $text[] = $subValue;
- }
- }
+ if ($options && isset($options['options'])) {
+ foreach ($options['options'] as $option) {
+ $lines = [];
+ $lines[][] = [
+ 'text' => $this->string->split(
+ $this->filterManager->stripTags($option['label']),
+ 40,
+ true,
+ true
+ ),
+ 'font' => 'italic',
+ 'feed' => $leftBound,
+ ];
- $lines[][] = ['text' => $text, 'feed' => $leftBound + 5];
+ if ($option['value']) {
+ $text = [];
+ $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']);
+ $values = explode(', ', $printValue);
+ foreach ($values as $value) {
+ foreach ($this->string->split($value, 30, true, true) as $subValue) {
+ $text[] = $subValue;
+ }
}
- $drawItems[] = ['lines' => $lines, 'height' => 15];
+ $lines[][] = ['text' => $text, 'feed' => $leftBound + 5];
}
+
+ $drawItems[] = ['lines' => $lines, 'height' => 15];
}
}
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
index 1827c2249dda3..64e9f56dd65bc 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
@@ -3,10 +3,19 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filter\FilterManager;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\ResourceModel\AbstractResource;
+use Magento\Framework\Registry;
use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Stdlib\StringUtils;
+use Magento\Tax\Helper\Data;
/**
* Order invoice pdf default items renderer
@@ -14,36 +23,36 @@
class Invoice extends AbstractItems
{
/**
- * @var \Magento\Framework\Stdlib\StringUtils
+ * @var StringUtils
*/
protected $string;
/**
* Constructor
*
- * @param \Magento\Framework\Model\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param \Magento\Tax\Helper\Data $taxData
- * @param \Magento\Framework\Filesystem $filesystem
- * @param \Magento\Framework\Filter\FilterManager $filterManager
- * @param \Magento\Framework\Stdlib\StringUtils $coreString
- * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
- * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
+ * @param Context $context
+ * @param Registry $registry
+ * @param Data $taxData
+ * @param Filesystem $filesystem
+ * @param FilterManager $filterManager
+ * @param StringUtils $coreString
+ * @param Json $serializer
+ * @param AbstractResource $resource
+ * @param AbstractDb $resourceCollection
* @param array $data
- * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Framework\Model\Context $context,
- \Magento\Framework\Registry $registry,
- \Magento\Tax\Helper\Data $taxData,
- \Magento\Framework\Filesystem $filesystem,
- \Magento\Framework\Filter\FilterManager $filterManager,
- \Magento\Framework\Stdlib\StringUtils $coreString,
- \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
- \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
- array $data = [],
- Json $serializer = null
+ Context $context,
+ Registry $registry,
+ Data $taxData,
+ Filesystem $filesystem,
+ FilterManager $filterManager,
+ StringUtils $coreString,
+ Json $serializer,
+ AbstractResource $resource = null,
+ AbstractDb $resourceCollection = null,
+ array $data = []
) {
$this->string = $coreString;
parent::__construct(
@@ -52,10 +61,10 @@ public function __construct(
$taxData,
$filesystem,
$filterManager,
+ $serializer,
$resource,
$resourceCollection,
- $data,
- $serializer
+ $data
);
}
@@ -94,19 +103,17 @@ public function draw()
$drawItems[$optionId] = ['lines' => [], 'height' => 15];
}
- if ($childItem->getOrderItem()->getParentItem()) {
- if ($prevOptionId != $attributes['option_id']) {
- $line[0] = [
- 'font' => 'italic',
- 'text' => $this->string->split($attributes['option_label'], 45, true, true),
- 'feed' => 35,
- ];
+ if ($childItem->getOrderItem()->getParentItem() && $prevOptionId != $attributes['option_id']) {
+ $line[0] = [
+ 'font' => 'italic',
+ 'text' => $this->string->split($attributes['option_label'], 45, true, true),
+ 'feed' => 35,
+ ];
- $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
+ $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
- $line = [];
- $prevOptionId = $attributes['option_id'];
- }
+ $line = [];
+ $prevOptionId = $attributes['option_id'];
}
/* in case Product name is longer than 80 chars - it is written in a few lines */
@@ -146,40 +153,34 @@ public function draw()
// custom options
$options = $item->getOrderItem()->getProductOptions();
- if ($options) {
- if (isset($options['options'])) {
- foreach ($options['options'] as $option) {
- $lines = [];
- $lines[][] = [
- 'text' => $this->string->split(
- $this->filterManager->stripTags($option['label']),
- 40,
- true,
- true
- ),
- 'font' => 'italic',
- 'feed' => 35,
- ];
-
- if ($option['value']) {
- $text = [];
- $printValue = isset(
- $option['print_value']
- ) ? $option['print_value'] : $this->filterManager->stripTags(
- $option['value']
- );
- $values = explode(', ', $printValue);
- foreach ($values as $value) {
- foreach ($this->string->split($value, 30, true, true) as $subValue) {
- $text[] = $subValue;
- }
+ if ($options && isset($options['options'])) {
+ foreach ($options['options'] as $option) {
+ $lines = [];
+ $lines[][] = [
+ 'text' => $this->string->split(
+ $this->filterManager->stripTags($option['label']),
+ 40,
+ true,
+ true
+ ),
+ 'font' => 'italic',
+ 'feed' => 35,
+ ];
+
+ if ($option['value']) {
+ $text = [];
+ $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']);
+ $values = explode(', ', $printValue);
+ foreach ($values as $value) {
+ foreach ($this->string->split($value, 30, true, true) as $subValue) {
+ $text[] = $subValue;
}
-
- $lines[][] = ['text' => $text, 'feed' => 40];
}
- $drawItems[] = ['lines' => $lines, 'height' => 15];
+ $lines[][] = ['text' => $text, 'feed' => 40];
}
+
+ $drawItems[] = ['lines' => $lines, 'height' => 15];
}
}
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
index 08ccf0618d03e..8a293b63541a2 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
@@ -3,10 +3,19 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filter\FilterManager;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\ResourceModel\AbstractResource;
+use Magento\Framework\Registry;
use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Stdlib\StringUtils;
+use Magento\Tax\Helper\Data;
/**
* Order shipment pdf items renderer
@@ -14,36 +23,34 @@
class Shipment extends AbstractItems
{
/**
- * @var \Magento\Framework\Stdlib\StringUtils
+ * @var StringUtils
*/
protected $string;
/**
- * Constructor
- *
- * @param \Magento\Framework\Model\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param \Magento\Tax\Helper\Data $taxData
- * @param \Magento\Framework\Filesystem $filesystem
- * @param \Magento\Framework\Filter\FilterManager $filterManager
- * @param \Magento\Framework\Stdlib\StringUtils $string
- * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
- * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
+ * @param Context $context
+ * @param Registry $registry
+ * @param Data $taxData
+ * @param Filesystem $filesystem
+ * @param FilterManager $filterManager
+ * @param StringUtils $string
+ * @param Json $serializer
+ * @param AbstractResource $resource
+ * @param AbstractDb $resourceCollection
* @param array $data
- * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Framework\Model\Context $context,
- \Magento\Framework\Registry $registry,
- \Magento\Tax\Helper\Data $taxData,
- \Magento\Framework\Filesystem $filesystem,
- \Magento\Framework\Filter\FilterManager $filterManager,
- \Magento\Framework\Stdlib\StringUtils $string,
- \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
- \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
- array $data = [],
- Json $serializer = null
+ Context $context,
+ Registry $registry,
+ Data $taxData,
+ Filesystem $filesystem,
+ FilterManager $filterManager,
+ StringUtils $string,
+ Json $serializer,
+ AbstractResource $resource = null,
+ AbstractDb $resourceCollection = null,
+ array $data = []
) {
$this->string = $string;
parent::__construct(
@@ -52,10 +59,10 @@ public function __construct(
$taxData,
$filesystem,
$filterManager,
+ $serializer,
$resource,
$resourceCollection,
- $data,
- $serializer
+ $data
);
}
@@ -95,24 +102,22 @@ public function draw()
$drawItems[$optionId] = ['lines' => [], 'height' => 15];
}
- if ($childItem->getParentItem()) {
- if ($prevOptionId != $attributes['option_id']) {
- $line[0] = [
- 'font' => 'italic',
- 'text' => $this->string->split($attributes['option_label'], 60, true, true),
- 'feed' => 60,
- ];
+ if ($childItem->getParentItem() && $prevOptionId != $attributes['option_id']) {
+ $line[0] = [
+ 'font' => 'italic',
+ 'text' => $this->string->split($attributes['option_label'], 60, true, true),
+ 'feed' => 60,
+ ];
- $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
+ $drawItems[$optionId] = ['lines' => [$line], 'height' => 15];
- $line = [];
+ $line = [];
- $prevOptionId = $attributes['option_id'];
- }
+ $prevOptionId = $attributes['option_id'];
}
- if ($this->isShipmentSeparately() && $childItem->getParentItem() ||
- !$this->isShipmentSeparately() && !$childItem->getParentItem()
+ if (($this->isShipmentSeparately() && $childItem->getParentItem()) ||
+ (!$this->isShipmentSeparately() && !$childItem->getParentItem())
) {
if (isset($shipItems[$childItem->getId()])) {
$qty = $shipItems[$childItem->getId()]->getQty() * 1;
@@ -153,40 +158,34 @@ public function draw()
// custom options
$options = $item->getOrderItem()->getProductOptions();
- if ($options) {
- if (isset($options['options'])) {
- foreach ($options['options'] as $option) {
- $lines = [];
- $lines[][] = [
- 'text' => $this->string->split(
- $this->filterManager->stripTags($option['label']),
- 70,
- true,
- true
- ),
- 'font' => 'italic',
- 'feed' => 60,
- ];
-
- if ($option['value']) {
- $text = [];
- $printValue = isset(
- $option['print_value']
- ) ? $option['print_value'] : $this->filterManager->stripTags(
- $option['value']
- );
- $values = explode(', ', $printValue);
- foreach ($values as $value) {
- foreach ($this->string->split($value, 50, true, true) as $subValue) {
- $text[] = $subValue;
- }
+ if ($options && isset($options['options'])) {
+ foreach ($options['options'] as $option) {
+ $lines = [];
+ $lines[][] = [
+ 'text' => $this->string->split(
+ $this->filterManager->stripTags($option['label']),
+ 70,
+ true,
+ true
+ ),
+ 'font' => 'italic',
+ 'feed' => 60,
+ ];
+
+ if ($option['value']) {
+ $text = [];
+ $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']);
+ $values = explode(', ', $printValue);
+ foreach ($values as $value) {
+ foreach ($this->string->split($value, 50, true, true) as $subValue) {
+ $text[] = $subValue;
}
-
- $lines[][] = ['text' => $text, 'feed' => 65];
}
- $drawItems[] = ['lines' => $lines, 'height' => 15];
+ $lines[][] = ['text' => $text, 'feed' => 65];
}
+
+ $drawItems[] = ['lines' => $lines, 'height' => 15];
}
}
diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
index 04a6ee0bd459b..3051394eaf512 100644
--- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
+++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
@@ -3,14 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
namespace Magento\Bundle\Pricing\Adjustment;
+use Magento\Bundle\Model\Option;
use Magento\Bundle\Model\Product\Price;
use Magento\Bundle\Pricing\Price\BundleSelectionFactory;
+use Magento\Bundle\Pricing\Price\BundleSelectionPrice;
use Magento\Catalog\Model\Product;
use Magento\Framework\Pricing\Adjustment\Calculator as CalculatorBase;
use Magento\Framework\Pricing\Amount\AmountFactory;
+use Magento\Framework\Pricing\Amount\AmountInterface;
use Magento\Framework\Pricing\SaleableInterface;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Store\Model\Store;
@@ -51,7 +55,7 @@ class Calculator implements BundleCalculatorInterface
protected $priceCurrency;
/**
- * @var \Magento\Framework\Pricing\Amount\AmountInterface[]
+ * @var AmountInterface[]
*/
private $optionAmount = [];
@@ -66,7 +70,7 @@ class Calculator implements BundleCalculatorInterface
* @param BundleSelectionFactory $bundleSelectionFactory
* @param TaxHelper $taxHelper
* @param PriceCurrencyInterface $priceCurrency
- * @param SelectionPriceListProviderInterface|null $selectionPriceListProvider
+ * @param SelectionPriceListProviderInterface $selectionPriceListProvider
*/
public function __construct(
CalculatorBase $calculator,
@@ -74,7 +78,7 @@ public function __construct(
BundleSelectionFactory $bundleSelectionFactory,
TaxHelper $taxHelper,
PriceCurrencyInterface $priceCurrency,
- SelectionPriceListProviderInterface $selectionPriceListProvider = null
+ SelectionPriceListProviderInterface $selectionPriceListProvider
) {
$this->calculator = $calculator;
$this->amountFactory = $amountFactory;
@@ -91,7 +95,9 @@ public function __construct(
* @param SaleableInterface $saleableItem
* @param null|bool|string|array $exclude
* @param null|array $context
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ *
+ * @return AmountInterface
+ *
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function getAmount($amount, SaleableInterface $saleableItem, $exclude = null, $context = [])
@@ -105,7 +111,8 @@ public function getAmount($amount, SaleableInterface $saleableItem, $exclude = n
* @param float $amount
* @param Product $saleableItem
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ *
+ * @return AmountInterface
*/
public function getMinRegularAmount($amount, Product $saleableItem, $exclude = null)
{
@@ -118,7 +125,8 @@ public function getMinRegularAmount($amount, Product $saleableItem, $exclude = n
* @param float $amount
* @param Product $saleableItem
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ *
+ * @return AmountInterface
*/
public function getMaxAmount($amount, Product $saleableItem, $exclude = null)
{
@@ -131,7 +139,8 @@ public function getMaxAmount($amount, Product $saleableItem, $exclude = null)
* @param float $amount
* @param Product $saleableItem
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ *
+ * @return AmountInterface
*/
public function getMaxRegularAmount($amount, Product $saleableItem, $exclude = null)
{
@@ -146,7 +155,8 @@ public function getMaxRegularAmount($amount, Product $saleableItem, $exclude = n
* @param bool $searchMin
* @param float $baseAmount
* @param bool $useRegularPrice
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ *
+ * @return AmountInterface
*/
public function getOptionsAmount(
Product $saleableItem,
@@ -173,7 +183,8 @@ public function getOptionsAmount(
*
* @param float $amount
* @param Product $saleableItem
- * @return \Magento\Framework\Pricing\Amount\AmountInterface|void
+ *
+ * @return AmountInterface|void
*/
public function getAmountWithoutOption($amount, Product $saleableItem)
{
@@ -194,29 +205,13 @@ public function getAmountWithoutOption($amount, Product $saleableItem)
*/
protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useRegularPrice = false)
{
- return $this->getSelectionPriceListProvider()->getPriceList($bundleProduct, $searchMin, $useRegularPrice);
- }
-
- /**
- * Get selection price list provider.
- *
- * @return SelectionPriceListProviderInterface
- * @deprecated 100.2.0
- */
- private function getSelectionPriceListProvider()
- {
- if (null === $this->selectionPriceListProvider) {
- $this->selectionPriceListProvider = \Magento\Framework\App\ObjectManager::getInstance()
- ->get(SelectionPriceListProviderInterface::class);
- }
-
- return $this->selectionPriceListProvider;
+ return $this->selectionPriceListProvider->getPriceList($bundleProduct, $searchMin, $useRegularPrice);
}
/**
* Check this option if it should be skipped
*
- * @param \Magento\Bundle\Model\Option $option
+ * @param Option $option
* @param bool $canSkipRequiredOption
* @return bool
* @deprecated 100.2.0
@@ -265,9 +260,9 @@ protected function getBundleOptions(Product $saleableItem)
*
* @param float $basePriceValue
* @param Product $bundleProduct
- * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
+ * @param BundleSelectionPrice[] $selectionPriceList
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude = null)
{
@@ -282,14 +277,14 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio
*
* @param float $basePriceValue
* @param Product $bundleProduct
- * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
+ * @param BundleSelectionPrice[] $selectionPriceList
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude)
{
$fullAmount = $basePriceValue;
- /** @var $option \Magento\Bundle\Model\Option */
+ /** @var $option Option */
foreach ($selectionPriceList as $selectionPrice) {
$fullAmount += ($selectionPrice->getValue() * $selectionPrice->getQuantity());
}
@@ -301,9 +296,9 @@ protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $
*
* @param float $basePriceValue
* @param Product $bundleProduct
- * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
+ * @param BundleSelectionPrice[] $selectionPriceList
* @param null|bool|string|array $exclude
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude)
@@ -328,7 +323,7 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,
$store = $bundleProduct->getStore();
$roundingMethod = $this->taxHelper->getCalculationAlgorithm($store);
foreach ($amountList as $amountInfo) {
- /** @var \Magento\Framework\Pricing\Amount\AmountInterface $itemAmount */
+ /** @var AmountInterface $itemAmount */
$itemAmount = $amountInfo['amount'];
$qty = $amountInfo['quantity'];
@@ -366,10 +361,10 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,
/**
* Create selection price list for the retrieved options
*
- * @param \Magento\Bundle\Model\Option $option
+ * @param Option $option
* @param Product $bundleProduct
* @param bool $useRegularPrice
- * @return \Magento\Bundle\Pricing\Price\BundleSelectionPrice[]
+ * @return BundleSelectionPrice[]
*/
public function createSelectionPriceList($option, $bundleProduct, $useRegularPrice = false)
{
@@ -399,10 +394,10 @@ public function createSelectionPriceList($option, $bundleProduct, $useRegularPri
/**
* Find minimal or maximal price for existing options
*
- * @param \Magento\Bundle\Model\Option $option
- * @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
+ * @param Option $option
+ * @param BundleSelectionPrice[] $selectionPriceList
* @param bool $searchMin
- * @return \Magento\Bundle\Pricing\Price\BundleSelectionPrice[]
+ * @return BundleSelectionPrice[]
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function processOptions($option, $selectionPriceList, $searchMin = true)
diff --git a/app/code/Magento/Bundle/Pricing/Price/BundleOptionPrice.php b/app/code/Magento/Bundle/Pricing/Price/BundleOptionPrice.php
index 1c724caaa28d8..a76112da0ca4e 100644
--- a/app/code/Magento/Bundle/Pricing/Price/BundleOptionPrice.php
+++ b/app/code/Magento/Bundle/Pricing/Price/BundleOptionPrice.php
@@ -3,12 +3,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Pricing\Price;
+use Magento\Bundle\Model\ResourceModel\Option\Collection;
+use Magento\Bundle\Model\Selection;
use Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface;
use Magento\Catalog\Model\Product;
+use Magento\Framework\Pricing\Amount\AmountInterface;
use Magento\Framework\Pricing\Price\AbstractPrice;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
/**
* Bundle option price model with final price.
@@ -25,12 +30,6 @@ class BundleOptionPrice extends AbstractPrice implements BundleOptionPriceInterf
*/
protected $calculator;
- /**
- * @var BundleSelectionFactory
- * @deprecated
- */
- protected $selectionFactory;
-
/**
* @var float|bool|null
*/
@@ -45,26 +44,23 @@ class BundleOptionPrice extends AbstractPrice implements BundleOptionPriceInterf
* @param Product $saleableItem
* @param float $quantity
* @param BundleCalculatorInterface $calculator
- * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
- * @param BundleSelectionFactory $bundleSelectionFactory
- * @param BundleOptions|null $bundleOptions
+ * @param PriceCurrencyInterface $priceCurrency
+ * @param BundleOptions $bundleOptions
*/
public function __construct(
Product $saleableItem,
$quantity,
BundleCalculatorInterface $calculator,
- \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
- BundleSelectionFactory $bundleSelectionFactory,
- BundleOptions $bundleOptions = null
+ PriceCurrencyInterface $priceCurrency,
+ BundleOptions $bundleOptions
) {
- $this->selectionFactory = $bundleSelectionFactory;
parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
$this->product->setQty($this->quantity);
- $this->bundleOptions = $bundleOptions ?: ObjectManager::getInstance()->get(BundleOptions::class);
+ $this->bundleOptions = $bundleOptions;
}
/**
- * {@inheritdoc}
+ * @inheritDoc
*/
public function getValue()
{
@@ -75,25 +71,10 @@ public function getValue()
return $this->value;
}
- /**
- * Getter for maximal price of options.
- *
- * @return bool|float
- * @deprecated
- */
- public function getMaxValue()
- {
- if (null === $this->maximalPrice) {
- $this->maximalPrice = $this->bundleOptions->calculateOptions($this->product, false);
- }
-
- return $this->maximalPrice;
- }
-
/**
* Get Options with attached Selections collection.
*
- * @return \Magento\Bundle\Model\ResourceModel\Option\Collection
+ * @return Collection
*/
public function getOptions()
{
@@ -103,8 +84,9 @@ public function getOptions()
/**
* Get selection amount.
*
- * @param \Magento\Bundle\Model\Selection $selection
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @param Selection $selection
+ *
+ * @return AmountInterface
*/
public function getOptionSelectionAmount($selection)
{
@@ -119,6 +101,7 @@ public function getOptionSelectionAmount($selection)
* Calculate maximal or minimal options value.
*
* @param bool $searchMin
+ *
* @return bool|float
*/
protected function calculateOptions($searchMin = true)
@@ -129,7 +112,7 @@ protected function calculateOptions($searchMin = true)
/**
* Get minimal amount of bundle price with options
*
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function getAmount()
{
diff --git a/app/code/Magento/Bundle/Pricing/Price/FinalPrice.php b/app/code/Magento/Bundle/Pricing/Price/FinalPrice.php
index c41f6a4868ab1..66f618c0fcfa5 100644
--- a/app/code/Magento/Bundle/Pricing/Price/FinalPrice.php
+++ b/app/code/Magento/Bundle/Pricing/Price/FinalPrice.php
@@ -3,15 +3,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
namespace Magento\Bundle\Pricing\Price;
-use Magento\Catalog\Model\Product;
-use Magento\Framework\Pricing\Adjustment\CalculatorInterface;
-use Magento\Catalog\Pricing\Price\CustomOptionPrice;
use Magento\Bundle\Model\Product\Price;
-use Magento\Framework\App\ObjectManager;
use Magento\Catalog\Api\ProductCustomOptionRepositoryInterface;
+use Magento\Catalog\Model\Product;
+use Magento\Catalog\Pricing\Price\CustomOptionPrice;
+use Magento\Framework\Pricing\Adjustment\CalculatorInterface;
+use Magento\Framework\Pricing\Amount\AmountInterface;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
/**
* Final price model
@@ -19,27 +21,27 @@
class FinalPrice extends \Magento\Catalog\Pricing\Price\FinalPrice implements FinalPriceInterface
{
/**
- * @var \Magento\Framework\Pricing\Amount\AmountInterface
+ * @var AmountInterface
*/
protected $maximalPrice;
/**
- * @var \Magento\Framework\Pricing\Amount\AmountInterface
+ * @var AmountInterface
*/
protected $minimalPrice;
/**
- * @var \Magento\Framework\Pricing\Amount\AmountInterface
+ * @var AmountInterface
*/
protected $priceWithoutOption;
/**
- * @var \Magento\Bundle\Pricing\Price\BundleOptionPrice
+ * @var BundleOptionPrice
*/
protected $bundleOptionPrice;
/**
- * @var \Magento\Catalog\Api\ProductCustomOptionRepositoryInterface
+ * @var ProductCustomOptionRepositoryInterface
*/
private $productOptionRepository;
@@ -47,15 +49,18 @@ class FinalPrice extends \Magento\Catalog\Pricing\Price\FinalPrice implements Fi
* @param Product $saleableItem
* @param float $quantity
* @param CalculatorInterface $calculator
- * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
+ * @param PriceCurrencyInterface $priceCurrency
+ * @param ProductCustomOptionRepositoryInterface $productOptionRepository
*/
public function __construct(
Product $saleableItem,
$quantity,
CalculatorInterface $calculator,
- \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
+ PriceCurrencyInterface $priceCurrency,
+ ProductCustomOptionRepositoryInterface $productOptionRepository
) {
parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
+ $this->productOptionRepository = $productOptionRepository;
}
/**
@@ -65,49 +70,33 @@ public function __construct(
*/
public function getValue()
{
- return parent::getValue() +
- $this->getBundleOptionPrice()->getValue();
+ return parent::getValue() + $this->getBundleOptionPrice()->getValue();
}
/**
* Returns max price
*
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function getMaximalPrice()
{
if (!$this->maximalPrice) {
$price = $this->getBasePrice()->getValue();
if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) {
- /** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */
+ /** @var CustomOptionPrice $customOptionPrice */
$customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE);
$price += $customOptionPrice->getCustomOptionRange(false);
}
$this->maximalPrice = $this->calculator->getMaxAmount($price, $this->product);
}
- return $this->maximalPrice;
- }
- /**
- * Return ProductCustomOptionRepository
- *
- * @return ProductCustomOptionRepositoryInterface
- * @deprecated 100.1.0
- */
- private function getProductOptionRepository()
- {
- if (!$this->productOptionRepository) {
- $this->productOptionRepository = ObjectManager::getInstance()->get(
- ProductCustomOptionRepositoryInterface::class
- );
- }
- return $this->productOptionRepository;
+ return $this->maximalPrice;
}
/**
* Returns min price
*
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function getMinimalPrice()
{
@@ -117,7 +106,7 @@ public function getMinimalPrice()
/**
* Returns price amount
*
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function getAmount()
{
@@ -125,7 +114,7 @@ public function getAmount()
$price = parent::getValue();
if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) {
$this->loadProductCustomOptions();
- /** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */
+ /** @var CustomOptionPrice $customOptionPrice */
$customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE);
$price += $customOptionPrice->getCustomOptionRange(true);
}
@@ -143,7 +132,7 @@ private function loadProductCustomOptions()
{
if (!$this->product->getOptions()) {
$options = [];
- foreach ($this->getProductOptionRepository()->getProductOptions($this->product) as $option) {
+ foreach ($this->productOptionRepository->getProductOptions($this->product) as $option) {
$option->setProduct($this->product);
$options[] = $option;
}
@@ -152,9 +141,9 @@ private function loadProductCustomOptions()
}
/**
- * get bundle product price without any option
+ * Get bundle product price without any option
*
- * @return \Magento\Framework\Pricing\Amount\AmountInterface
+ * @return AmountInterface
*/
public function getPriceWithoutOption()
{
@@ -167,7 +156,7 @@ public function getPriceWithoutOption()
/**
* Returns option price
*
- * @return \Magento\Bundle\Pricing\Price\BundleOptionPrice
+ * @return BundleOptionPrice
*/
protected function getBundleOptionPrice()
{
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
index c67a207ebf0b1..0871a6723417f 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml
index aa06990f7af78..803beb30d677b 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
index 3770e47079c98..73ced5eaf1592 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
index baf9652522909..30922839a191d 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
@@ -46,7 +46,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
index c8977cbae1957..06a05e7a29cd9 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml
index fcfd80ac8533c..7b65b2db0f160 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductOptionsNegativeTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductOptionsNegativeTest.xml
index 8a8e9dd275ee4..82da228e040dc 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductOptionsNegativeTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductOptionsNegativeTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml
index 1a7117fbf4485..26d7dddbcc378 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml
index a98d544aad3b6..8dad41ca780af 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml
index a3e9a8af40a34..3ce398f9c33ba 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml
index 0c26fb1775bff..1f37468ea245c 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml
index fbb9dda50f0d9..2fe5981eb36c7 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminEditRelatedBundleProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml
index dea39fcb45908..f34ebd4b93cdc 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
index 28abd06253393..81bd46fdb5412 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
index 0af44f64f8df1..70fe7720f0d78 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
index 77be5b879b1c6..c292d831fac13 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
index 173319affe53b..4172611d99b88 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
@@ -46,7 +46,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
index 171ed1323a6b2..c14da7e1cbfd0 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml
index 91a2d15287033..d08ad8970e19f 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml
index 14753da609967..a3e5c988717a7 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
index f1124e5446b58..ceea9e47af7ee 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
index 4760570adfa2e..6310f6497ac1e 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
index 2b948ff02d38c..efef033f9d974 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml
index 296ba31baa589..7ded8b300f82d 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
index 7ff88c49f0bc7..1a40489387197 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
@@ -66,7 +66,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
index 22b746ce69046..dc5344e91ec82 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleAddToCartSuccessTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleAddToCartSuccessTest.xml
index 9fc19f5c5750f..85be636ec269c 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleAddToCartSuccessTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleAddToCartSuccessTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml
index ed4a592b0d71e..1adad0f1a4d80 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml
index 15d5ff7d3560b..80681704533fc 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml
index 78a039eccde2d..65b20ca1dd7c1 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml
index 30369d447ab15..753a36dc1e613 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml
index 613187a4c3856..a5e0c0cc4658a 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSelectAndSetBundleOptionsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
index d284ddf59ddcf..115b540e672f1 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml
index f0e16bbdd1b99..93554917b6783 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
index d388549745d51..ac2ab4806fd44 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/app/code/Magento/Bundle/Test/Unit/Model/LinkManagementTest.php b/app/code/Magento/Bundle/Test/Unit/Model/LinkManagementTest.php
index ccc8c52d5022f..b31b82a6a72bf 100644
--- a/app/code/Magento/Bundle/Test/Unit/Model/LinkManagementTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Model/LinkManagementTest.php
@@ -7,174 +7,198 @@
namespace Magento\Bundle\Test\Unit\Model;
+use Exception;
+use Magento\Bundle\Api\Data\LinkInterface;
+use Magento\Bundle\Api\Data\LinkInterfaceFactory;
use Magento\Bundle\Model\LinkManagement;
+use Magento\Bundle\Model\Option;
+use Magento\Bundle\Model\ResourceModel\Bundle;
+use Magento\Bundle\Model\ResourceModel\BundleFactory;
+use Magento\Bundle\Model\ResourceModel\Option\Collection as OptionCollection;
+use Magento\Bundle\Model\ResourceModel\Option\CollectionFactory as OptionCollectionFactory;
+use Magento\Bundle\Model\ResourceModel\Selection\Collection as SelectionCollection;
+use Magento\Bundle\Model\Selection;
+use Magento\Bundle\Model\SelectionFactory;
+use Magento\Catalog\Api\Data\ProductInterface;
+use Magento\Catalog\Model\Product;
+use Magento\Catalog\Model\Product\Type;
+use Magento\Catalog\Model\ProductRepository;
+use Magento\Framework\Api\DataObjectHelper;
+use Magento\Framework\EntityManager\EntityMetadata;
+use Magento\Framework\EntityManager\MetadataPool;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Store\Model\Store;
+use Magento\Store\Model\StoreManagerInterface;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
/**
- * Class LinkManagementTest
+ * Test class for \Magento\Bundle\Model\LinkManagement
*
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
-class LinkManagementTest extends \PHPUnit\Framework\TestCase
+class LinkManagementTest extends TestCase
{
/**
- * @var \Magento\Bundle\Model\LinkManagement
+ * @var LinkManagement
*/
- protected $model;
+ private $model;
/**
- * @var \Magento\Catalog\Model\ProductRepository|\PHPUnit_Framework_MockObject_MockObject
+ * @var ProductRepository|MockObject
*/
- protected $productRepository;
+ private $productRepository;
/**
- * @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject
+ * @var Product|MockObject
*/
- protected $product;
+ private $product;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var LinkInterfaceFactory|MockObject
*/
- protected $linkFactory;
+ private $linkFactory;
/**
- * @var \Magento\Catalog\Model\Product\Type\Interceptor|\PHPUnit_Framework_MockObject_MockObject
+ * @var Type|MockObject
*/
- protected $productType;
+ private $productType;
/**
- * @var \Magento\Bundle\Model\ResourceModel\Option\Collection|\PHPUnit_Framework_MockObject_MockObject
+ * @var OptionCollection|MockObject
*/
- protected $optionCollection;
+ private $optionCollection;
/**
- * @var \Magento\Bundle\Model\ResourceModel\Selection\Collection|\PHPUnit_Framework_MockObject_MockObject
+ * @var SelectionCollection|MockObject
*/
- protected $selectionCollection;
+ private $selectionCollection;
/**
- * @var \Magento\Bundle\Model\Option|\PHPUnit_Framework_MockObject_MockObject
+ * @var Option|MockObject
*/
- protected $option;
+ private $option;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Bundle\Model\SelectionFactory
+ * @var SelectionFactory|MockObject
*/
- protected $bundleSelectionMock;
+ private $bundleSelectionMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Bundle\Model\ResourceModel\BundleFactory
+ * @var BundleFactory|MockObject
*/
- protected $bundleFactoryMock;
+ private $bundleFactoryMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Bundle\Model\ResourceModel\Option\CollectionFactory
+ * @var OptionCollectionFactory|MockObject
*/
- protected $optionCollectionFactoryMock;
+ private $optionCollectionFactoryMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Store\Model\StoreManagerInterface
+ * @var StoreManagerInterface|MockObject
*/
- protected $storeManagerMock;
+ private $storeManagerMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var LinkInterface|MockObject
*/
- protected $link;
+ private $link;
/**
- * @var int
+ * @var MockObject
*/
- protected $storeId = 2;
+ private $dataObjectHelperMock;
/**
- * @var array
+ * @var MetadataPool|MockObject
*/
- protected $optionIds = [1, 2, 3];
+ private $metadataPoolMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var EntityMetadata|MockObject
*/
- protected $dataObjectHelperMock;
+ private $metadataMock;
/**
- * @var \Magento\Framework\EntityManager\MetadataPool|\PHPUnit_Framework_MockObject_MockObject
+ * @var int
*/
- protected $metadataPoolMock;
+ private $storeId = 2;
/**
- * @var \Magento\Framework\EntityManager\EntityMetadata|\PHPUnit_Framework_MockObject_MockObject
+ * @var array
*/
- protected $metadataMock;
+ private $optionIds = [1, 2, 3];
/**
* @var string
*/
- protected $linkField = 'product_id';
+ private $linkField = 'product_id';
+ /**
+ * @inheritDoc
+ */
protected function setUp()
{
$helper = new ObjectManager($this);
- $this->productRepository = $this->getMockBuilder(\Magento\Catalog\Model\ProductRepository::class)
+ $this->productRepository = $this->getMockBuilder(ProductRepository::class)
->setMethods(['get'])
->disableOriginalConstructor()
->getMock();
- $this->productType = $this->getMockBuilder(\Magento\Bundle\Model\Product\Type\Interceptor::class)
+ $this->productType = $this->getMockBuilder(\Magento\Bundle\Model\Product\Type::class)
->setMethods(['getOptionsCollection', 'setStoreFilter', 'getSelectionsCollection', 'getOptionsIds'])
->disableOriginalConstructor()
->getMock();
- $this->option = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)
+ $this->option = $this->getMockBuilder(Option::class)
->setMethods(['getSelections', 'getOptionId', '__wakeup'])
->disableOriginalConstructor()
->getMock();
- $this->optionCollection = $this->getMockBuilder(\Magento\Bundle\Model\ResourceModel\Option\Collection::class)
+ $this->optionCollection = $this->getMockBuilder(OptionCollection::class)
->setMethods(['appendSelections'])
->disableOriginalConstructor()
->getMock();
$this->selectionCollection = $this->getMockBuilder(
- \Magento\Bundle\Model\ResourceModel\Selection\Collection::class
+ SelectionCollection::class
)->disableOriginalConstructor()->getMock();
- $this->product = $this->getMockBuilder(\Magento\Catalog\Model\Product::class)
+ $this->product = $this->getMockBuilder(Product::class)
->setMethods(['getTypeInstance', 'getStoreId', 'getTypeId', '__wakeup', 'getId', 'getData'])
->disableOriginalConstructor()
->getMock();
- $this->link = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $this->link = $this->getMockBuilder(LinkInterface::class)
->disableOriginalConstructor()
->getMock();
- $this->linkFactory = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterfaceFactory::class)
+ $this->linkFactory = $this->getMockBuilder(LinkInterfaceFactory::class)
->setMethods(['create'])
->disableOriginalConstructor()
->getMock();
$this->bundleSelectionMock = $this->createPartialMock(
- \Magento\Bundle\Model\SelectionFactory::class,
+ SelectionFactory::class,
['create']
);
$this->bundleFactoryMock = $this->createPartialMock(
- \Magento\Bundle\Model\ResourceModel\BundleFactory::class,
+ BundleFactory::class,
['create']
);
$this->optionCollectionFactoryMock = $this->createPartialMock(
- \Magento\Bundle\Model\ResourceModel\Option\CollectionFactory::class,
+ OptionCollectionFactory::class,
['create']
);
- $this->storeManagerMock = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class);
- $this->metadataPoolMock = $this->getMockBuilder(\Magento\Framework\EntityManager\MetadataPool::class)
+ $this->storeManagerMock = $this->createMock(StoreManagerInterface::class);
+ $this->metadataPoolMock = $this->getMockBuilder(MetadataPool::class)
->disableOriginalConstructor()
->getMock();
- $this->metadataMock = $this->getMockBuilder(\Magento\Framework\EntityManager\EntityMetadata::class)
+ $this->metadataMock = $this->getMockBuilder(EntityMetadata::class)
->disableOriginalConstructor()
->getMock();
- $this->metadataPoolMock->expects($this->any())->method('getMetadata')
- ->with(\Magento\Catalog\Api\Data\ProductInterface::class)
+ $this->metadataPoolMock->method('getMetadata')
+ ->with(ProductInterface::class)
->willReturn($this->metadataMock);
- $this->dataObjectHelperMock = $this->getMockBuilder(\Magento\Framework\Api\DataObjectHelper::class)
+ $this->dataObjectHelperMock = $this->getMockBuilder(DataObjectHelper::class)
->disableOriginalConstructor()
->getMock();
$this->model = $helper->getObject(
-
LinkManagement::class,
[
'productRepository' => $this->productRepository,
@@ -184,12 +208,9 @@ protected function setUp()
'optionCollection' => $this->optionCollectionFactoryMock,
'storeManager' => $this->storeManagerMock,
'dataObjectHelper' => $this->dataObjectHelperMock,
+ 'metadataPool' => $this->metadataPoolMock
]
);
- $refClass = new \ReflectionClass(LinkManagement::class);
- $refProperty = $refClass->getProperty('metadataPool');
- $refProperty->setAccessible(true);
- $refProperty->setValue($this->model, $this->metadataPoolMock);
}
public function testGetChildren()
@@ -198,31 +219,45 @@ public function testGetChildren()
$this->getOptions();
- $this->productRepository->expects($this->any())->method('get')->with($this->equalTo($productSku))
- ->will($this->returnValue($this->product));
+ $this->productRepository->method('get')
+ ->with($this->equalTo($productSku))
+ ->willReturn($this->product);
- $this->product->expects($this->once())->method('getTypeId')->will($this->returnValue('bundle'));
+ $this->product->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn('bundle');
- $this->productType->expects($this->once())->method('setStoreFilter')->with(
- $this->equalTo($this->storeId),
- $this->product
- );
- $this->productType->expects($this->once())->method('getSelectionsCollection')
- ->with($this->equalTo($this->optionIds), $this->equalTo($this->product))
- ->will($this->returnValue($this->selectionCollection));
- $this->productType->expects($this->once())->method('getOptionsIds')->with($this->equalTo($this->product))
- ->will($this->returnValue($this->optionIds));
+ $this->productType->expects($this->once())
+ ->method('setStoreFilter')
+ ->with(
+ $this->equalTo($this->storeId),
+ $this->product
+ );
+ $this->productType->expects($this->once())
+ ->method('getSelectionsCollection')
+ ->with(
+ $this->equalTo($this->optionIds),
+ $this->equalTo($this->product)
+ )
+ ->willReturn($this->selectionCollection);
+ $this->productType->expects($this->once())
+ ->method('getOptionsIds')
+ ->with($this->equalTo($this->product))
+ ->willReturn($this->optionIds);
- $this->optionCollection->expects($this->once())->method('appendSelections')
+ $this->optionCollection->expects($this->once())
+ ->method('appendSelections')
->with($this->equalTo($this->selectionCollection))
- ->will($this->returnValue([$this->option]));
+ ->willReturn([$this->option]);
- $this->option->expects($this->any())->method('getSelections')->willReturn([$this->product]);
- $this->product->expects($this->any())->method('getData')->willReturn([]);
+ $this->option->method('getSelections')
+ ->willReturn([$this->product]);
+ $this->product->method('getData')
+ ->willReturn([]);
$this->dataObjectHelperMock->expects($this->once())
->method('populateWithArray')
- ->with($this->link, $this->anything(), \Magento\Bundle\Api\Data\LinkInterface::class)
+ ->with($this->link, $this->anything(), LinkInterface::class)
->willReturnSelf();
$this->link->expects($this->once())->method('setIsDefault')->willReturnSelf();
$this->link->expects($this->once())->method('setQty')->willReturnSelf();
@@ -241,27 +276,42 @@ public function testGetChildrenWithOptionId()
$this->getOptions();
- $this->productRepository->expects($this->any())->method('get')->with($this->equalTo($productSku))
- ->will($this->returnValue($this->product));
+ $this->productRepository->method('get')
+ ->with($this->equalTo($productSku))
+ ->willReturn($this->product);
- $this->product->expects($this->once())->method('getTypeId')->will($this->returnValue('bundle'));
+ $this->product->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn('bundle');
- $this->productType->expects($this->once())->method('setStoreFilter')->with(
- $this->equalTo($this->storeId),
- $this->product
- );
- $this->productType->expects($this->once())->method('getSelectionsCollection')
- ->with($this->equalTo($this->optionIds), $this->equalTo($this->product))
- ->will($this->returnValue($this->selectionCollection));
- $this->productType->expects($this->once())->method('getOptionsIds')->with($this->equalTo($this->product))
- ->will($this->returnValue($this->optionIds));
+ $this->productType->expects($this->once())
+ ->method('setStoreFilter')
+ ->with(
+ $this->equalTo($this->storeId),
+ $this->product
+ );
+ $this->productType->expects($this->once())
+ ->method('getSelectionsCollection')
+ ->with(
+ $this->equalTo($this->optionIds),
+ $this->equalTo($this->product)
+ )
+ ->willReturn($this->selectionCollection);
+ $this->productType->expects($this->once())
+ ->method('getOptionsIds')
+ ->with($this->equalTo($this->product))
+ ->willReturn($this->optionIds);
- $this->optionCollection->expects($this->once())->method('appendSelections')
+ $this->optionCollection->expects($this->once())
+ ->method('appendSelections')
->with($this->equalTo($this->selectionCollection))
- ->will($this->returnValue([$this->option]));
+ ->willReturn([$this->option]);
- $this->option->expects($this->any())->method('getOptionId')->will($this->returnValue(10));
- $this->option->expects($this->once())->method('getSelections')->willReturn([1, 2]);
+ $this->option->method('getOptionId')
+ ->willReturn(10);
+ $this->option->expects($this->once())
+ ->method('getSelections')
+ ->willReturn([1, 2]);
$this->dataObjectHelperMock->expects($this->never())->method('populateWithArray');
@@ -275,10 +325,14 @@ public function testGetChildrenException()
{
$productSku = 'productSku';
- $this->productRepository->expects($this->once())->method('get')->with($this->equalTo($productSku))
- ->will($this->returnValue($this->product));
+ $this->productRepository->expects($this->once())
+ ->method('get')
+ ->with($this->equalTo($productSku))
+ ->willReturn($this->product);
- $this->product->expects($this->once())->method('getTypeId')->will($this->returnValue('simple'));
+ $this->product->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn('simple');
$this->assertEquals([$this->link], $this->model->getChildren($productSku));
}
@@ -288,13 +342,14 @@ public function testGetChildrenException()
*/
public function testAddChildToNotBundleProduct()
{
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getOptionId')
+ ->willReturn(1);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
- ));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_SIMPLE);
$this->model->addChild($productMock, 1, $productLink);
}
@@ -303,37 +358,35 @@ public function testAddChildToNotBundleProduct()
*/
public function testAddChildNonExistingOption()
{
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getOptionId')->willReturn(1);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())->method('getTypeId')->willReturn(Type::TYPE_BUNDLE);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')->willReturn($store);
+ $store->method('getId')->willReturn(0);
- $emptyOption = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)->disableOriginalConstructor()
+ $emptyOption = $this->getMockBuilder(Option::class)->disableOriginalConstructor()
->setMethods(['getId', '__wakeup'])
->getMock();
$emptyOption->expects($this->once())
->method('getId')
- ->will($this->returnValue(null));
+ ->willReturn(null);
- $optionsCollectionMock = $this->createMock(\Magento\Bundle\Model\ResourceModel\Option\Collection::class);
+ $optionsCollectionMock = $this->createMock(OptionCollection::class);
$optionsCollectionMock->expects($this->once())
->method('setIdFilter')
->with($this->equalTo(1))
- ->will($this->returnSelf());
+ ->willReturnSelf();
$optionsCollectionMock->expects($this->once())
->method('getFirstItem')
- ->will($this->returnValue($emptyOption));
+ ->willReturn($emptyOption);
- $this->optionCollectionFactoryMock->expects($this->any())->method('create')->will(
- $this->returnValue($optionsCollectionMock)
- );
+ $this->optionCollectionFactoryMock
+ ->method('create')
+ ->willReturn($optionsCollectionMock);
$this->model->addChild($productMock, 1, $productLink);
}
@@ -343,53 +396,55 @@ public function testAddChildNonExistingOption()
*/
public function testAddChildLinkedProductIsComposite()
{
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getOptionId')->willReturn(1);
$this->metadataMock->expects($this->once())->method('getLinkField')->willReturn($this->linkField);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
- $productMock->expects($this->any())
- ->method('getData')
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
+ $productMock->method('getData')
->with($this->linkField)
->willReturn($this->linkField);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getId')->will($this->returnValue(13));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(true));
- $this->productRepository
- ->expects($this->once())
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getId')->willReturn(13);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(true);
+ $this->productRepository->expects($this->once())
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock
+ ->method('getStore')
+ ->willReturn($store);
+ $store->method('getId')
+ ->willReturn(0);
- $option = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)->disableOriginalConstructor()
+ $option = $this->getMockBuilder(Option::class)->disableOriginalConstructor()
->setMethods(['getId', '__wakeup'])
->getMock();
- $option->expects($this->once())->method('getId')->will($this->returnValue(1));
+ $option->expects($this->once())->method('getId')->willReturn(1);
- $optionsCollectionMock = $this->createMock(\Magento\Bundle\Model\ResourceModel\Option\Collection::class);
+ $optionsCollectionMock = $this->createMock(OptionCollection::class);
$optionsCollectionMock->expects($this->once())
->method('setIdFilter')
->with($this->equalTo('1'))
- ->will($this->returnSelf());
+ ->willReturnSelf();
$optionsCollectionMock->expects($this->once())
->method('getFirstItem')
- ->will($this->returnValue($option));
- $this->optionCollectionFactoryMock->expects($this->any())->method('create')->will(
- $this->returnValue($optionsCollectionMock)
- );
+ ->willReturn($option);
+ $this->optionCollectionFactoryMock->method('create')
+ ->willReturn($optionsCollectionMock);
- $bundle = $this->createMock(\Magento\Bundle\Model\ResourceModel\Bundle::class);
+ $bundle = $this->createMock(Bundle::class);
$bundle->expects($this->once())->method('getSelectionsData')->with($this->linkField)->willReturn([]);
- $this->bundleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($bundle));
+ $this->bundleFactoryMock->expects($this->once())->method('create')->willReturn($bundle);
$this->model->addChild($productMock, 1, $productLink);
}
@@ -398,68 +453,74 @@ public function testAddChildLinkedProductIsComposite()
*/
public function testAddChildProductAlreadyExistsInOption()
{
- $productLink = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $productLink = $this->getMockBuilder(LinkInterface::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId'])
->disableOriginalConstructor()
->getMockForAbstractClass();
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
- $productLink->expects($this->any())->method('getSelectionId')->will($this->returnValue(1));
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getOptionId')->willReturn(1);
+ $productLink->method('getSelectionId')->willReturn(1);
$this->metadataMock->expects($this->once())->method('getLinkField')->willReturn($this->linkField);
$productMock = $this->createPartialMock(
- \Magento\Catalog\Model\Product::class,
+ Product::class,
['getTypeId', 'getCopyFromView', 'getData', 'getTypeInstance', 'getSku']
);
$productMock->expects($this->once())->method('getTypeId')->willReturn(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
+ Type::TYPE_BUNDLE
);
- $productMock->expects($this->any())
- ->method('getData')
+ $productMock->method('getData')
->with($this->linkField)
->willReturn($this->linkField);
- $productMock->expects($this->any())->method('getCopyFromView')->will($this->returnValue(false));
-
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getEntityId')->will($this->returnValue(13));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
- $this->productRepository
- ->expects($this->once())
+ $productMock->method('getCopyFromView')
+ ->willReturn(false);
+
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getEntityId')
+ ->willReturn(13);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(false);
+ $this->productRepository->expects($this->once())
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')->willReturn($store);
+ $store->method('getId')->willReturn(0);
- $option = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)->disableOriginalConstructor()
+ $option = $this->getMockBuilder(Option::class)->disableOriginalConstructor()
->setMethods(['getId', '__wakeup'])
->getMock();
- $option->expects($this->once())->method('getId')->will($this->returnValue(1));
+ $option->expects($this->once())
+ ->method('getId')
+ ->willReturn(1);
- $optionsCollectionMock = $this->createMock(\Magento\Bundle\Model\ResourceModel\Option\Collection::class);
+ $optionsCollectionMock = $this->createMock(OptionCollection::class);
$optionsCollectionMock->expects($this->once())
->method('setIdFilter')
->with($this->equalTo(1))
- ->will($this->returnSelf());
+ ->willReturnSelf();
$optionsCollectionMock->expects($this->once())
->method('getFirstItem')
- ->will($this->returnValue($option));
- $this->optionCollectionFactoryMock->expects($this->any())->method('create')->will(
- $this->returnValue($optionsCollectionMock)
- );
+ ->willReturn($option);
+ $this->optionCollectionFactoryMock->method('create')
+ ->willReturn($optionsCollectionMock);
$selections = [
['option_id' => 1, 'product_id' => 12, 'parent_product_id' => 'product_id'],
['option_id' => 1, 'product_id' => 13, 'parent_product_id' => 'product_id'],
];
- $bundle = $this->createMock(\Magento\Bundle\Model\ResourceModel\Bundle::class);
- $bundle->expects($this->once())->method('getSelectionsData')
+ $bundle = $this->createMock(Bundle::class);
+ $bundle->expects($this->once())
+ ->method('getSelectionsData')
->with($this->linkField)
- ->will($this->returnValue($selections));
- $this->bundleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($bundle));
+ ->willReturn($selections);
+ $this->bundleFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($bundle);
$this->model->addChild($productMock, 1, $productLink);
}
@@ -468,141 +529,141 @@ public function testAddChildProductAlreadyExistsInOption()
*/
public function testAddChildCouldNotSave()
{
- $productLink = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $productLink = $this->getMockBuilder(LinkInterface::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId'])
->disableOriginalConstructor()
->getMockForAbstractClass();
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
- $productLink->expects($this->any())->method('getSelectionId')->will($this->returnValue(1));
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getOptionId')->willReturn(1);
+ $productLink->method('getSelectionId')->willReturn(1);
$this->metadataMock->expects($this->once())->method('getLinkField')->willReturn($this->linkField);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
- $productMock->expects($this->any())
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
+ $productMock
->method('getData')
->with($this->linkField)
->willReturn($this->linkField);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getId')->will($this->returnValue(13));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getId')->willReturn(13);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(false);
$this->productRepository
->expects($this->once())
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')->willReturn($store);
+ $store->method('getId')->willReturn(0);
- $option = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)->disableOriginalConstructor()
+ $option = $this->getMockBuilder(Option::class)->disableOriginalConstructor()
->setMethods(['getId', '__wakeup'])
->getMock();
- $option->expects($this->once())->method('getId')->will($this->returnValue(1));
+ $option->expects($this->once())->method('getId')->willReturn(1);
- $optionsCollectionMock = $this->createMock(\Magento\Bundle\Model\ResourceModel\Option\Collection::class);
+ $optionsCollectionMock = $this->createMock(OptionCollection::class);
$optionsCollectionMock->expects($this->once())
->method('setIdFilter')
->with($this->equalTo(1))
- ->will($this->returnSelf());
+ ->willReturnSelf();
$optionsCollectionMock->expects($this->once())
->method('getFirstItem')
- ->will($this->returnValue($option));
- $this->optionCollectionFactoryMock->expects($this->any())->method('create')->will(
- $this->returnValue($optionsCollectionMock)
- );
+ ->willReturn($option);
+ $this->optionCollectionFactoryMock->method('create')
+ ->willReturn($optionsCollectionMock);
$selections = [
['option_id' => 1, 'product_id' => 11],
['option_id' => 1, 'product_id' => 12],
];
- $bundle = $this->createMock(\Magento\Bundle\Model\ResourceModel\Bundle::class);
+ $bundle = $this->createMock(Bundle::class);
$bundle->expects($this->once())->method('getSelectionsData')
->with($this->linkField)
- ->will($this->returnValue($selections));
- $this->bundleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($bundle));
+ ->willReturn($selections);
+ $this->bundleFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($bundle);
- $selection = $this->createPartialMock(\Magento\Bundle\Model\Selection::class, ['save']);
+ $selection = $this->createPartialMock(Selection::class, ['save']);
$selection->expects($this->once())->method('save')
- ->will(
- $this->returnCallback(
- function () {
- throw new \Exception('message');
- }
- )
+ ->willReturnCallback(
+ static function () {
+ throw new Exception('message');
+ }
);
- $this->bundleSelectionMock->expects($this->once())->method('create')->will($this->returnValue($selection));
+ $this->bundleSelectionMock->expects($this->once())
+ ->method('create')
+ ->willReturn($selection);
$this->model->addChild($productMock, 1, $productLink);
}
public function testAddChild()
{
- $productLink = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $productLink = $this->getMockBuilder(LinkInterface::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId'])
->disableOriginalConstructor()
->getMockForAbstractClass();
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue(1));
- $productLink->expects($this->any())->method('getSelectionId')->will($this->returnValue(1));
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getOptionId')->willReturn(1);
+ $productLink->method('getSelectionId')->willReturn(1);
$this->metadataMock->expects($this->once())->method('getLinkField')->willReturn($this->linkField);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
- $productMock->expects($this->any())
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())->method('getTypeId')->willReturn(Type::TYPE_BUNDLE);
+ $productMock
->method('getData')
->with($this->linkField)
->willReturn($this->linkField);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getId')->will($this->returnValue(13));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getId')->willReturn(13);
+ $linkedProductMock->expects($this->once())->method('isComposite')->willReturn(false);
$this->productRepository
->expects($this->once())
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')->willReturn($store);
+ $store->method('getId')->willReturn(0);
- $option = $this->getMockBuilder(\Magento\Bundle\Model\Option::class)->disableOriginalConstructor()
+ $option = $this->getMockBuilder(Option::class)->disableOriginalConstructor()
->setMethods(['getId', '__wakeup'])
->getMock();
- $option->expects($this->once())->method('getId')->will($this->returnValue(1));
+ $option->expects($this->once())->method('getId')->willReturn(1);
- $optionsCollectionMock = $this->createMock(\Magento\Bundle\Model\ResourceModel\Option\Collection::class);
+ $optionsCollectionMock = $this->createMock(OptionCollection::class);
$optionsCollectionMock->expects($this->once())
->method('setIdFilter')
->with($this->equalTo(1))
- ->will($this->returnSelf());
+ ->willReturnSelf();
$optionsCollectionMock->expects($this->once())
->method('getFirstItem')
- ->will($this->returnValue($option));
- $this->optionCollectionFactoryMock->expects($this->any())->method('create')->will(
- $this->returnValue($optionsCollectionMock)
- );
+ ->willReturn($option);
+ $this->optionCollectionFactoryMock->method('create')
+ ->willReturn($optionsCollectionMock);
$selections = [
['option_id' => 1, 'product_id' => 11],
['option_id' => 1, 'product_id' => 12],
];
- $bundle = $this->createMock(\Magento\Bundle\Model\ResourceModel\Bundle::class);
+ $bundle = $this->createMock(Bundle::class);
$bundle->expects($this->once())->method('getSelectionsData')
->with($this->linkField)
- ->will($this->returnValue($selections));
- $this->bundleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($bundle));
+ ->willReturn($selections);
+ $this->bundleFactoryMock->expects($this->once())->method('create')->willReturn($bundle);
- $selection = $this->createPartialMock(\Magento\Bundle\Model\Selection::class, ['save', 'getId']);
+ $selection = $this->createPartialMock(Selection::class, ['save', 'getId']);
$selection->expects($this->once())->method('save');
- $selection->expects($this->once())->method('getId')->will($this->returnValue(42));
- $this->bundleSelectionMock->expects($this->once())->method('create')->will($this->returnValue($selection));
+ $selection->expects($this->once())->method('getId')->willReturn(42);
+ $this->bundleSelectionMock->expects($this->once())->method('create')->willReturn($selection);
$result = $this->model->addChild($productMock, 1, $productLink);
$this->assertEquals(42, $result);
}
@@ -621,51 +682,51 @@ public function testSaveChild()
$parentProductId = 32;
$bundleProductSku = 'bundleProductSku';
- $productLink = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $productLink = $this->getMockBuilder(LinkInterface::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId'])
->disableOriginalConstructor()
->getMockForAbstractClass();
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getId')->will($this->returnValue($id));
- $productLink->expects($this->any())->method('getOptionId')->will($this->returnValue($optionId));
- $productLink->expects($this->any())->method('getPosition')->will($this->returnValue($position));
- $productLink->expects($this->any())->method('getQty')->will($this->returnValue($qty));
- $productLink->expects($this->any())->method('getPriceType')->will($this->returnValue($priceType));
- $productLink->expects($this->any())->method('getPrice')->will($this->returnValue($price));
- $productLink->expects($this->any())->method('getCanChangeQuantity')
- ->will($this->returnValue($canChangeQuantity));
- $productLink->expects($this->any())->method('getIsDefault')->will($this->returnValue($isDefault));
- $productLink->expects($this->any())->method('getSelectionId')->will($this->returnValue($optionId));
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getId')->willReturn($id);
+ $productLink->method('getOptionId')->willReturn($optionId);
+ $productLink->method('getPosition')->willReturn($position);
+ $productLink->method('getQty')->willReturn($qty);
+ $productLink->method('getPriceType')->willReturn($priceType);
+ $productLink->method('getPrice')->willReturn($price);
+ $productLink->method('getCanChangeQuantity')
+ ->willReturn($canChangeQuantity);
+ $productLink->method('getIsDefault')->willReturn($isDefault);
+ $productLink->method('getSelectionId')->willReturn($optionId);
$this->metadataMock->expects($this->once())->method('getLinkField')->willReturn($this->linkField);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
- $productMock->expects($this->any())
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())->method('getTypeId')->willReturn(Type::TYPE_BUNDLE);
+ $productMock
->method('getData')
->with($this->linkField)
->willReturn($parentProductId);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getId')->will($this->returnValue($linkProductId));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getId')->willReturn($linkProductId);
+ $linkedProductMock->expects($this->once())->method('isComposite')->willReturn(false);
$this->productRepository
->expects($this->at(0))
->method('get')
->with($bundleProductSku)
- ->will($this->returnValue($productMock));
+ ->willReturn($productMock);
$this->productRepository
->expects($this->at(1))
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')->willReturn($store);
+ $store->method('getId')->willReturn(0);
- $selection = $this->createPartialMock(\Magento\Bundle\Model\Selection::class, [
+ $selection = $this->createPartialMock(
+ Selection::class,
+ [
'save',
'getId',
'load',
@@ -678,10 +739,11 @@ public function testSaveChild()
'setSelectionPriceValue',
'setSelectionCanChangeQty',
'setIsDefault'
- ]);
+ ]
+ );
$selection->expects($this->once())->method('save');
- $selection->expects($this->once())->method('load')->with($id)->will($this->returnSelf());
- $selection->expects($this->any())->method('getId')->will($this->returnValue($id));
+ $selection->expects($this->once())->method('load')->with($id)->willReturnSelf();
+ $selection->method('getId')->willReturn($id);
$selection->expects($this->once())->method('setProductId')->with($linkProductId);
$selection->expects($this->once())->method('setParentProductId')->with($parentProductId);
$selection->expects($this->once())->method('setOptionId')->with($optionId);
@@ -692,7 +754,7 @@ public function testSaveChild()
$selection->expects($this->once())->method('setSelectionCanChangeQty')->with($canChangeQuantity);
$selection->expects($this->once())->method('setIsDefault')->with($isDefault);
- $this->bundleSelectionMock->expects($this->once())->method('create')->will($this->returnValue($selection));
+ $this->bundleSelectionMock->expects($this->once())->method('create')->willReturn($selection);
$this->assertTrue($this->model->saveChild($bundleProductSku, $productLink));
}
@@ -705,40 +767,45 @@ public function testSaveChildFailedToSave()
$linkProductId = 45;
$parentProductId = 32;
- $productLink = $this->getMockBuilder(\Magento\Bundle\Api\Data\LinkInterface::class)
+ $productLink = $this->getMockBuilder(LinkInterface::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId'])
->disableOriginalConstructor()
->getMockForAbstractClass();
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue('linked_product_sku'));
- $productLink->expects($this->any())->method('getId')->will($this->returnValue($id));
- $productLink->expects($this->any())->method('getSelectionId')->will($this->returnValue(1));
+ $productLink->method('getSku')->willReturn('linked_product_sku');
+ $productLink->method('getId')->willReturn($id);
+ $productLink->method('getSelectionId')->willReturn(1);
$bundleProductSku = 'bundleProductSku';
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
- $productMock->expects($this->any())->method('getId')->will($this->returnValue($parentProductId));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
+ $productMock->method('getId')
+ ->willReturn($parentProductId);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->any())->method('getId')->will($this->returnValue($linkProductId));
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
- $this->productRepository
- ->expects($this->at(0))
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->method('getId')->willReturn($linkProductId);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(false);
+ $this->productRepository->expects($this->at(0))
->method('get')
->with($bundleProductSku)
- ->will($this->returnValue($productMock));
- $this->productRepository
- ->expects($this->at(1))
+ ->willReturn($productMock);
+ $this->productRepository->expects($this->at(1))
->method('get')
->with('linked_product_sku')
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $store = $this->createMock(\Magento\Store\Model\Store::class);
- $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store));
- $store->expects($this->any())->method('getId')->will($this->returnValue(0));
+ $store = $this->createMock(Store::class);
+ $this->storeManagerMock->method('getStore')
+ ->willReturn($store);
+ $store->method('getId')
+ ->willReturn(0);
- $selection = $this->createPartialMock(\Magento\Bundle\Model\Selection::class, [
+ $selection = $this->createPartialMock(
+ Selection::class,
+ [
'save',
'getId',
'load',
@@ -752,14 +819,25 @@ public function testSaveChildFailedToSave()
'setSelectionPriceValue',
'setSelectionCanChangeQty',
'setIsDefault'
- ]);
- $mockException = $this->createMock(\Exception::class);
- $selection->expects($this->once())->method('save')->will($this->throwException($mockException));
- $selection->expects($this->once())->method('load')->with($id)->will($this->returnSelf());
- $selection->expects($this->any())->method('getId')->will($this->returnValue($id));
- $selection->expects($this->once())->method('setProductId')->with($linkProductId);
-
- $this->bundleSelectionMock->expects($this->once())->method('create')->will($this->returnValue($selection));
+ ]
+ );
+ $mockException = $this->createMock(Exception::class);
+ $selection->expects($this->once())
+ ->method('save')
+ ->willThrowException($mockException);
+ $selection->expects($this->once())
+ ->method('load')
+ ->with($id)
+ ->willReturnSelf();
+ $selection->method('getId')
+ ->willReturn($id);
+ $selection->expects($this->once())
+ ->method('setProductId')
+ ->with($linkProductId);
+
+ $this->bundleSelectionMock->expects($this->once())
+ ->method('create')
+ ->willReturn($selection);
$this->model->saveChild($bundleProductSku, $productLink);
}
@@ -768,29 +846,29 @@ public function testSaveChildFailedToSave()
*/
public function testSaveChildWithoutId()
{
- $bundleProductSku = "bundleSku";
+ $bundleProductSku = 'bundleSku';
$linkedProductSku = 'simple';
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getId')->will($this->returnValue(null));
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue($linkedProductSku));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getId')->willReturn(null);
+ $productLink->method('getSku')->willReturn($linkedProductSku);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
- $this->productRepository
- ->expects($this->at(0))
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(false);
+ $this->productRepository->expects($this->at(0))
->method('get')
->with($bundleProductSku)
- ->will($this->returnValue($productMock));
- $this->productRepository
- ->expects($this->at(1))
+ ->willReturn($productMock);
+ $this->productRepository->expects($this->at(1))
->method('get')
->with($linkedProductSku)
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
$this->model->saveChild($bundleProductSku, $productLink);
}
@@ -803,37 +881,45 @@ public function testSaveChildWithInvalidId()
{
$id = 12345;
$linkedProductSku = 'simple';
- $bundleProductSku = "bundleProductSku";
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getId')->will($this->returnValue($id));
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue($linkedProductSku));
-
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
-
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(false));
- $this->productRepository
- ->expects($this->at(0))
+ $bundleProductSku = 'bundleProductSku';
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getId')->willReturn($id);
+ $productLink->method('getSku')->willReturn($linkedProductSku);
+
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())
+ ->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
+
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->expects($this->once())
+ ->method('isComposite')
+ ->willReturn(false);
+ $this->productRepository->expects($this->at(0))
->method('get')
->with($bundleProductSku)
- ->will($this->returnValue($productMock));
- $this->productRepository
- ->expects($this->at(1))
+ ->willReturn($productMock);
+ $this->productRepository->expects($this->at(1))
->method('get')
->with($linkedProductSku)
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
- $selection = $this->createPartialMock(\Magento\Bundle\Model\Selection::class, [
+ $selection = $this->createPartialMock(
+ Selection::class,
+ [
'getId',
'load',
- ]);
- $selection->expects($this->once())->method('load')->with($id)->will($this->returnSelf());
- $selection->expects($this->any())->method('getId')->will($this->returnValue(null));
+ ]
+ );
+ $selection->expects($this->once())
+ ->method('load')
+ ->with($id)
+ ->willReturnSelf();
+ $selection->method('getId')->willReturn(null);
- $this->bundleSelectionMock->expects($this->once())->method('create')->will($this->returnValue($selection));
+ $this->bundleSelectionMock->expects($this->once())
+ ->method('create')
+ ->willReturn($selection);
$this->model->saveChild($bundleProductSku, $productLink);
}
@@ -843,30 +929,26 @@ public function testSaveChildWithInvalidId()
*/
public function testSaveChildWithCompositeProductLink()
{
- $bundleProductSku = "bundleProductSku";
+ $bundleProductSku = 'bundleProductSku';
$id = 12;
$linkedProductSku = 'simple';
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getId')->will($this->returnValue($id));
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue($linkedProductSku));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getId')->willReturn($id);
+ $productLink->method('getSku')->willReturn($linkedProductSku);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
- ));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())->method('getTypeId')->willReturn(Type::TYPE_BUNDLE);
- $linkedProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $linkedProductMock->expects($this->once())->method('isComposite')->will($this->returnValue(true));
- $this->productRepository
- ->expects($this->at(0))
+ $linkedProductMock = $this->createMock(Product::class);
+ $linkedProductMock->expects($this->once())->method('isComposite')->willReturn(true);
+ $this->productRepository->expects($this->at(0))
->method('get')
->with($bundleProductSku)
- ->will($this->returnValue($productMock));
- $this->productRepository
- ->expects($this->at(1))
+ ->willReturn($productMock);
+ $this->productRepository->expects($this->at(1))
->method('get')
->with($linkedProductSku)
- ->will($this->returnValue($linkedProductMock));
+ ->willReturn($linkedProductMock);
$this->model->saveChild($bundleProductSku, $productLink);
}
@@ -878,18 +960,18 @@ public function testSaveChildWithSimpleProduct()
{
$id = 12;
$linkedProductSku = 'simple';
- $bundleProductSku = "bundleProductSku";
+ $bundleProductSku = 'bundleProductSku';
- $productLink = $this->createMock(\Magento\Bundle\Api\Data\LinkInterface::class);
- $productLink->expects($this->any())->method('getId')->will($this->returnValue($id));
- $productLink->expects($this->any())->method('getSku')->will($this->returnValue($linkedProductSku));
+ $productLink = $this->createMock(LinkInterface::class);
+ $productLink->method('getId')->willReturn($id);
+ $productLink->method('getSku')->willReturn($linkedProductSku);
- $productMock = $this->createMock(\Magento\Catalog\Model\Product::class);
- $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue(
- \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE
- ));
+ $productMock = $this->createMock(Product::class);
+ $productMock->expects($this->once())->method('getTypeId')->willReturn(Type::TYPE_SIMPLE);
- $this->productRepository->expects($this->once())->method('get')->with($bundleProductSku)
+ $this->productRepository->expects($this->once())
+ ->method('get')
+ ->with($bundleProductSku)
->willReturn($productMock);
$this->model->saveChild($bundleProductSku, $productLink);
@@ -897,34 +979,33 @@ public function testSaveChildWithSimpleProduct()
public function testRemoveChild()
{
- $this->productRepository->expects($this->any())->method('get')->will($this->returnValue($this->product));
- $bundle = $this->createMock(\Magento\Bundle\Model\ResourceModel\Bundle::class);
- $this->bundleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($bundle));
+ $this->productRepository->method('get')->willReturn($this->product);
+ $bundle = $this->createMock(Bundle::class);
+ $this->bundleFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($bundle);
$productSku = 'productSku';
$optionId = 1;
$productId = 1;
$childSku = 'childSku';
- $this->product
- ->expects($this->any())
- ->method('getTypeId')
- ->will($this->returnValue(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE));
+ $this->product->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
$this->getRemoveOptions();
- $selection = $this->getMockBuilder(\Magento\Bundle\Model\Selection::class)
+ $selection = $this->getMockBuilder(Selection::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId', 'getProductId', '__wakeup'])
->disableOriginalConstructor()
->getMock();
- $selection->expects($this->any())->method('getSku')->will($this->returnValue($childSku));
- $selection->expects($this->any())->method('getOptionId')->will($this->returnValue($optionId));
- $selection->expects($this->any())->method('getSelectionId')->will($this->returnValue(55));
- $selection->expects($this->any())->method('getProductId')->willReturn($productId);
-
- $this->option->expects($this->any())->method('getSelections')->will($this->returnValue([$selection]));
- $this->metadataMock->expects($this->any())->method('getLinkField')->willReturn($this->linkField);
- $this->product->expects($this->any())
- ->method('getData')
+ $selection->method('getSku')->willReturn($childSku);
+ $selection->method('getOptionId')->willReturn($optionId);
+ $selection->method('getSelectionId')->willReturn(55);
+ $selection->method('getProductId')->willReturn($productId);
+
+ $this->option->method('getSelections')->willReturn([$selection]);
+ $this->metadataMock->method('getLinkField')->willReturn($this->linkField);
+ $this->product->method('getData')
->with($this->linkField)
->willReturn(3);
@@ -939,14 +1020,12 @@ public function testRemoveChild()
*/
public function testRemoveChildForbidden()
{
- $this->productRepository->expects($this->any())->method('get')->will($this->returnValue($this->product));
+ $this->productRepository->method('get')->willReturn($this->product);
$productSku = 'productSku';
$optionId = 1;
$childSku = 'childSku';
- $this->product
- ->expects($this->any())
- ->method('getTypeId')
- ->will($this->returnValue(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE));
+ $this->product->method('getTypeId')
+ ->willReturn(Type::TYPE_SIMPLE);
$this->model->removeChild($productSku, $optionId, $childSku);
}
@@ -955,28 +1034,26 @@ public function testRemoveChildForbidden()
*/
public function testRemoveChildInvalidOptionId()
{
- $this->productRepository->expects($this->any())->method('get')->will($this->returnValue($this->product));
+ $this->productRepository->method('get')->willReturn($this->product);
$productSku = 'productSku';
$optionId = 1;
$childSku = 'childSku';
- $this->product
- ->expects($this->any())
- ->method('getTypeId')
- ->will($this->returnValue(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE));
+ $this->product->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
$this->getRemoveOptions();
- $selection = $this->getMockBuilder(\Magento\Bundle\Model\Selection::class)
+ $selection = $this->getMockBuilder(Selection::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId', 'getProductId', '__wakeup'])
->disableOriginalConstructor()
->getMock();
- $selection->expects($this->any())->method('getSku')->will($this->returnValue($childSku));
- $selection->expects($this->any())->method('getOptionId')->will($this->returnValue($optionId + 1));
- $selection->expects($this->any())->method('getSelectionId')->will($this->returnValue(55));
- $selection->expects($this->any())->method('getProductId')->will($this->returnValue(1));
+ $selection->method('getSku')->willReturn($childSku);
+ $selection->method('getOptionId')->willReturn($optionId + 1);
+ $selection->method('getSelectionId')->willReturn(55);
+ $selection->method('getProductId')->willReturn(1);
- $this->option->expects($this->any())->method('getSelections')->will($this->returnValue([$selection]));
+ $this->option->method('getSelections')->willReturn([$selection]);
$this->model->removeChild($productSku, $optionId, $childSku);
}
@@ -985,61 +1062,71 @@ public function testRemoveChildInvalidOptionId()
*/
public function testRemoveChildInvalidChildSku()
{
- $this->productRepository->expects($this->any())->method('get')->will($this->returnValue($this->product));
+ $this->productRepository->method('get')->willReturn($this->product);
$productSku = 'productSku';
$optionId = 1;
$childSku = 'childSku';
- $this->product
- ->expects($this->any())
- ->method('getTypeId')
- ->will($this->returnValue(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE));
+ $this->product->method('getTypeId')
+ ->willReturn(Type::TYPE_BUNDLE);
$this->getRemoveOptions();
- $selection = $this->getMockBuilder(\Magento\Bundle\Model\Selection::class)
+ $selection = $this->getMockBuilder(Selection::class)
->setMethods(['getSku', 'getOptionId', 'getSelectionId', 'getProductId', '__wakeup'])
->disableOriginalConstructor()
->getMock();
- $selection->expects($this->any())->method('getSku')->will($this->returnValue($childSku . '_invalid'));
- $selection->expects($this->any())->method('getOptionId')->will($this->returnValue($optionId));
- $selection->expects($this->any())->method('getSelectionId')->will($this->returnValue(55));
- $selection->expects($this->any())->method('getProductId')->will($this->returnValue(1));
+ $selection->method('getSku')->willReturn($childSku . '_invalid');
+ $selection->method('getOptionId')->willReturn($optionId);
+ $selection->method('getSelectionId')->willReturn(55);
+ $selection->method('getProductId')->willReturn(1);
- $this->option->expects($this->any())->method('getSelections')->will($this->returnValue([$selection]));
+ $this->option->method('getSelections')
+ ->willReturn([$selection]);
$this->model->removeChild($productSku, $optionId, $childSku);
}
private function getOptions()
{
- $this->product->expects($this->any())->method('getTypeInstance')->will($this->returnValue($this->productType));
- $this->product->expects($this->once())->method('getStoreId')->will($this->returnValue($this->storeId));
- $this->productType->expects($this->once())->method('setStoreFilter')
+ $this->product->method('getTypeInstance')
+ ->willReturn($this->productType);
+ $this->product->expects($this->once())
+ ->method('getStoreId')
+ ->willReturn($this->storeId);
+ $this->productType->expects($this->once())
+ ->method('setStoreFilter')
->with($this->equalTo($this->storeId), $this->equalTo($this->product));
- $this->productType->expects($this->once())->method('getOptionsCollection')
+ $this->productType->expects($this->once())
+ ->method('getOptionsCollection')
->with($this->equalTo($this->product))
- ->will($this->returnValue($this->optionCollection));
+ ->willReturn($this->optionCollection);
}
public function getRemoveOptions()
{
- $this->product->expects($this->any())->method('getTypeInstance')->will($this->returnValue($this->productType));
- $this->product->expects($this->once())->method('getStoreId')->will($this->returnValue(1));
+ $this->product->method('getTypeInstance')
+ ->willReturn($this->productType);
+ $this->product->expects($this->once())
+ ->method('getStoreId')
+ ->willReturn(1);
$this->productType->expects($this->once())->method('setStoreFilter');
$this->productType->expects($this->once())->method('getOptionsCollection')
->with($this->equalTo($this->product))
- ->will($this->returnValue($this->optionCollection));
+ ->willReturn($this->optionCollection);
- $this->productType->expects($this->once())->method('getOptionsIds')->with($this->equalTo($this->product))
- ->will($this->returnValue([1, 2, 3]));
+ $this->productType->expects($this->once())
+ ->method('getOptionsIds')
+ ->with($this->equalTo($this->product))
+ ->willReturn([1, 2, 3]);
- $this->productType->expects($this->once())->method('getSelectionsCollection')
- ->will($this->returnValue([]));
+ $this->productType->expects($this->once())
+ ->method('getSelectionsCollection')
+ ->willReturn([]);
- $this->optionCollection->expects($this->any())->method('appendSelections')
+ $this->optionCollection->method('appendSelections')
->with($this->equalTo([]), true)
- ->will($this->returnValue([$this->option]));
+ ->willReturn([$this->option]);
}
}
diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
index 3e9aeaed5c5b4..3c4dbf2e85274 100644
--- a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
@@ -3,50 +3,71 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Bundle\Test\Unit\Model\Sales\Order\Pdf\Items;
-class AbstractItemsTest extends \PHPUnit\Framework\TestCase
+use Magento\Bundle\Model\Sales\Order\Pdf\Items\Shipment;
+use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Sales\Model\Order\Creditmemo;
+use Magento\Sales\Model\Order\Invoice;
+use Magento\Sales\Model\Order\Item;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+
+class AbstractItemsTest extends TestCase
{
- /** @var \Magento\Sales\Model\Order\Item|\PHPUnit_Framework_MockObject_MockObject */
- protected $orderItem;
+ /**
+ * @var Shipment
+ */
+ private $model;
- /** @var \Magento\Bundle\Model\Sales\Order\Pdf\Items\Shipment $model */
- protected $model;
+ /**
+ * @var Json|MockObject
+ */
+ private $serializerMock;
- /** @var \Magento\Framework\Serialize\Serializer\Json $serializer */
- protected $serializer;
+ /**
+ * @var Item|MockObject
+ */
+ private $orderItemMock;
protected function setUp()
{
- $this->orderItem = $this->createPartialMock(
- \Magento\Sales\Model\Order\Item::class,
+ $this->orderItemMock = $this->createPartialMock(
+ Item::class,
['getProductOptions', '__wakeup', 'getParentItem', 'getOrderItem', 'getOrderItemId', 'getId']
);
- $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
- $this->serializer = $this->createMock(\Magento\Framework\Serialize\Serializer\Json::class);
+ $objectManager = new ObjectManager($this);
+ $this->serializerMock = $this->createMock(Json::class);
$this->model = $objectManager->getObject(
- \Magento\Bundle\Model\Sales\Order\Pdf\Items\Shipment::class,
+ Shipment::class,
[
- 'serializer' => $this->serializer
+ 'serializer' => $this->serializerMock
]
);
}
/**
* @dataProvider getChildrenEmptyItemsDataProvider
+ *
+ * @param string $class
+ * @param string $method
+ * @param string $returnClass
*/
public function testGetChildrenEmptyItems($class, $method, $returnClass)
{
$salesModel = $this->createPartialMock($returnClass, ['getAllItems', '__wakeup']);
- $salesModel->expects($this->once())->method('getAllItems')->will($this->returnValue([]));
+ $salesModel->expects($this->once())->method('getAllItems')->willReturn([]);
$item = $this->createPartialMock($class, [$method, 'getOrderItem', '__wakeup']);
- $item->expects($this->once())->method($method)->will($this->returnValue($salesModel));
- $item->expects($this->once())->method('getOrderItem')->will($this->returnValue($this->orderItem));
- $this->orderItem->expects($this->any())->method('getId')->will($this->returnValue(1));
+ $item->expects($this->once())->method($method)->willReturn($salesModel);
+ $item->expects($this->once())->method('getOrderItem')->willReturn($this->orderItemMock);
+ $this->orderItemMock->method('getId')->willReturn(1);
- $this->assertSame(null, $this->model->getChildren($item));
+ $this->assertNull($this->model->getChildren($item));
}
/**
@@ -56,9 +77,9 @@ public function getChildrenEmptyItemsDataProvider()
{
return [
[
- \Magento\Sales\Model\Order\Invoice\Item::class,
+ Invoice\Item::class,
'getInvoice',
- \Magento\Sales\Model\Order\Invoice::class
+ Invoice::class
],
[
\Magento\Sales\Model\Order\Shipment\Item::class,
@@ -66,38 +87,40 @@ public function getChildrenEmptyItemsDataProvider()
\Magento\Sales\Model\Order\Shipment::class
],
[
- \Magento\Sales\Model\Order\Creditmemo\Item::class,
+ Creditmemo\Item::class,
'getCreditmemo',
- \Magento\Sales\Model\Order\Creditmemo::class
+ Creditmemo::class
]
];
}
/**
* @dataProvider getChildrenDataProvider
+ *
+ * @param bool $parentItem
*/
public function testGetChildren($parentItem)
{
if ($parentItem) {
- $parentItem = $this->createPartialMock(\Magento\Sales\Model\Order\Item::class, ['getId', '__wakeup']);
- $parentItem->expects($this->any())->method('getId')->will($this->returnValue(1));
+ $parentItem = $this->createPartialMock(Item::class, ['getId', '__wakeup']);
+ $parentItem->method('getId')->willReturn(1);
}
- $this->orderItem->expects($this->any())->method('getOrderItem')->will($this->returnSelf());
- $this->orderItem->expects($this->any())->method('getParentItem')->will($this->returnValue($parentItem));
- $this->orderItem->expects($this->any())->method('getOrderItemId')->will($this->returnValue(2));
- $this->orderItem->expects($this->any())->method('getId')->will($this->returnValue(1));
+ $this->orderItemMock->method('getOrderItem')->willReturnSelf();
+ $this->orderItemMock->method('getParentItem')->willReturn($parentItem);
+ $this->orderItemMock->method('getOrderItemId')->willReturn(2);
+ $this->orderItemMock->method('getId')->willReturn(1);
- $salesModel = $this->createPartialMock(\Magento\Sales\Model\Order\Invoice::class, ['getAllItems', '__wakeup']);
- $salesModel->expects($this->once())->method('getAllItems')->will($this->returnValue([$this->orderItem]));
+ $salesModel = $this->createPartialMock(Invoice::class, ['getAllItems', '__wakeup']);
+ $salesModel->expects($this->once())->method('getAllItems')->willReturn([$this->orderItemMock]);
$item = $this->createPartialMock(
- \Magento\Sales\Model\Order\Invoice\Item::class,
+ Invoice\Item::class,
['getInvoice', 'getOrderItem', '__wakeup']
);
- $item->expects($this->once())->method('getInvoice')->will($this->returnValue($salesModel));
- $item->expects($this->any())->method('getOrderItem')->will($this->returnValue($this->orderItem));
+ $item->expects($this->once())->method('getInvoice')->willReturn($salesModel);
+ $item->method('getOrderItem')->willReturn($this->orderItemMock);
- $this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
+ $this->assertSame([2 => $this->orderItemMock], $this->model->getChildren($item));
}
/**
@@ -113,11 +136,14 @@ public function getChildrenDataProvider()
/**
* @dataProvider isShipmentSeparatelyWithoutItemDataProvider
+ *
+ * @param array $productOptions
+ * @param bool $result
*/
public function testIsShipmentSeparatelyWithoutItem($productOptions, $result)
{
- $this->model->setItem($this->orderItem);
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $this->model->setItem($this->orderItemMock);
+ $this->orderItemMock->method('getProductOptions')->willReturn($productOptions);
$this->assertSame($result, $this->model->isShipmentSeparately());
}
@@ -136,23 +162,27 @@ public function isShipmentSeparatelyWithoutItemDataProvider()
/**
* @dataProvider isShipmentSeparatelyWithItemDataProvider
+ *
+ * @param array $productOptions
+ * @param bool $result
+ * @param bool $parentItem
*/
public function testIsShipmentSeparatelyWithItem($productOptions, $result, $parentItem)
{
if ($parentItem) {
$parentItem = $this->createPartialMock(
- \Magento\Sales\Model\Order\Item::class,
+ Item::class,
['getProductOptions', '__wakeup']
);
- $parentItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $parentItem->method('getProductOptions')->willReturn($productOptions);
} else {
- $this->orderItem->expects($this->any())->method('getProductOptions')
- ->will($this->returnValue($productOptions));
+ $this->orderItemMock->method('getProductOptions')
+ ->willReturn($productOptions);
}
- $this->orderItem->expects($this->any())->method('getParentItem')->will($this->returnValue($parentItem));
- $this->orderItem->expects($this->any())->method('getOrderItem')->will($this->returnSelf());
+ $this->orderItemMock->method('getParentItem')->willReturn($parentItem);
+ $this->orderItemMock->method('getOrderItem')->willReturnSelf();
- $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem));
+ $this->assertSame($result, $this->model->isShipmentSeparately($this->orderItemMock));
}
/**
@@ -170,11 +200,14 @@ public function isShipmentSeparatelyWithItemDataProvider()
/**
* @dataProvider isChildCalculatedWithoutItemDataProvider
+ *
+ * @param array $productOptions
+ * @param bool $result
*/
public function testIsChildCalculatedWithoutItem($productOptions, $result)
{
- $this->model->setItem($this->orderItem);
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $this->model->setItem($this->orderItemMock);
+ $this->orderItemMock->method('getProductOptions')->willReturn($productOptions);
$this->assertSame($result, $this->model->isChildCalculated());
}
@@ -193,23 +226,27 @@ public function isChildCalculatedWithoutItemDataProvider()
/**
* @dataProvider isChildCalculatedWithItemDataProvider
+ *
+ * @param array $productOptions
+ * @param bool $result
+ * @param bool $parentItem
*/
public function testIsChildCalculatedWithItem($productOptions, $result, $parentItem)
{
if ($parentItem) {
$parentItem = $this->createPartialMock(
- \Magento\Sales\Model\Order\Item::class,
+ Item::class,
['getProductOptions', '__wakeup']
);
- $parentItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $parentItem->method('getProductOptions')->willReturn($productOptions);
} else {
- $this->orderItem->expects($this->any())->method('getProductOptions')
- ->will($this->returnValue($productOptions));
+ $this->orderItemMock->method('getProductOptions')
+ ->willReturn($productOptions);
}
- $this->orderItem->expects($this->any())->method('getParentItem')->will($this->returnValue($parentItem));
- $this->orderItem->expects($this->any())->method('getOrderItem')->will($this->returnSelf());
+ $this->orderItemMock->method('getParentItem')->willReturn($parentItem);
+ $this->orderItemMock->method('getOrderItem')->willReturnSelf();
- $this->assertSame($result, $this->model->isChildCalculated($this->orderItem));
+ $this->assertSame($result, $this->model->isChildCalculated($this->orderItemMock));
}
/**
@@ -227,11 +264,13 @@ public function isChildCalculatedWithItemDataProvider()
/**
* @dataProvider getBundleOptionsDataProvider
+ * @param array $productOptions
+ * @param array|string $result
*/
public function testGetBundleOptions($productOptions, $result)
{
- $this->model->setItem($this->orderItem);
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $this->model->setItem($this->orderItemMock);
+ $this->orderItemMock->method('getProductOptions')->willReturn($productOptions);
$this->assertSame($result, $this->model->getBundleOptions());
}
@@ -248,8 +287,8 @@ public function getBundleOptionsDataProvider()
public function testGetSelectionAttributes()
{
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue([]));
- $this->assertNull($this->model->getSelectionAttributes($this->orderItem));
+ $this->orderItemMock->method('getProductOptions')->willReturn([]);
+ $this->assertNull($this->model->getSelectionAttributes($this->orderItemMock));
}
public function testGetSelectionAttributesWithBundle()
@@ -258,13 +297,12 @@ public function testGetSelectionAttributesWithBundle()
$options = ['bundle_selection_attributes' => $bundleAttributes];
$unserializedResult = 'result of "bundle_selection_attributes" unserialization';
- $this->serializer->expects($this->any())
- ->method('unserialize')
+ $this->serializerMock->method('unserialize')
->with($bundleAttributes)
- ->will($this->returnValue($unserializedResult));
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($options));
+ ->willReturn($unserializedResult);
+ $this->orderItemMock->method('getProductOptions')->willReturn($options);
- $this->assertEquals($unserializedResult, $this->model->getSelectionAttributes($this->orderItem));
+ $this->assertEquals($unserializedResult, $this->model->getSelectionAttributes($this->orderItemMock));
}
public function testGetOrderOptions()
@@ -274,28 +312,32 @@ public function testGetOrderOptions()
'additional_options' => ['additional_options'],
'attributes_info' => ['attributes_info'],
];
- $this->model->setItem($this->orderItem);
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $this->model->setItem($this->orderItemMock);
+ $this->orderItemMock->method('getProductOptions')->willReturn($productOptions);
$this->assertEquals(['attributes_info', 'options', 'additional_options'], $this->model->getOrderOptions());
}
public function testGetOrderItem()
{
- $this->model->setItem($this->orderItem);
- $this->assertSame($this->orderItem, $this->model->getOrderItem());
+ $this->model->setItem($this->orderItemMock);
+ $this->assertSame($this->orderItemMock, $this->model->getOrderItem());
}
/**
* @dataProvider canShowPriceInfoDataProvider
+ *
+ * @param bool $parentItem
+ * @param array $productOptions
+ * @param bool $result
*/
public function testCanShowPriceInfo($parentItem, $productOptions, $result)
{
- $this->model->setItem($this->orderItem);
- $this->orderItem->expects($this->any())->method('getOrderItem')->will($this->returnSelf());
- $this->orderItem->expects($this->any())->method('getParentItem')->will($this->returnValue($parentItem));
- $this->orderItem->expects($this->any())->method('getProductOptions')->will($this->returnValue($productOptions));
+ $this->model->setItem($this->orderItemMock);
+ $this->orderItemMock->method('getOrderItem')->willReturnSelf();
+ $this->orderItemMock->method('getParentItem')->willReturn($parentItem);
+ $this->orderItemMock->method('getProductOptions')->willReturn($productOptions);
- $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem));
+ $this->assertSame($result, $this->model->canShowPriceInfo($this->orderItemMock));
}
/**
diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php
index 37973b9b8ae28..d795af793675b 100644
--- a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleOptionsTest.php
@@ -7,23 +7,24 @@
namespace Magento\Bundle\Test\Unit\Pricing\Price;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
-use PHPUnit_Framework_MockObject_MockObject as MockObject;
-use Magento\Framework\Pricing\Amount\AmountFactory;
-use Magento\Framework\Pricing\Adjustment\Calculator as AdjustmentCalculator;
-use Magento\Framework\Pricing\PriceInfo\Base as BasePriceInfo;
-use Magento\Framework\Pricing\PriceCurrencyInterface;
-use Magento\Framework\Pricing\Amount\AmountInterface;
-use Magento\Framework\Pricing\Amount\Base as BaseAmount;
-use Magento\Bundle\Pricing\Price\BundleOptions;
-use Magento\Bundle\Pricing\Price\BundleSelectionPrice;
-use Magento\Bundle\Pricing\Price\BundleSelectionFactory;
-use Magento\Bundle\Pricing\Adjustment\Calculator as BundleAdjustmentCalculator;
use Magento\Bundle\Model\Option as BundleOption;
use Magento\Bundle\Model\Product\Type as BundleProductType;
use Magento\Bundle\Model\ResourceModel\Option\Collection as BundleOptionCollection;
+use Magento\Bundle\Pricing\Adjustment\Calculator as BundleAdjustmentCalculator;
+use Magento\Bundle\Pricing\Adjustment\SelectionPriceListProviderInterface;
+use Magento\Bundle\Pricing\Price\BundleOptions;
+use Magento\Bundle\Pricing\Price\BundleSelectionFactory;
+use Magento\Bundle\Pricing\Price\BundleSelectionPrice;
use Magento\Catalog\Model\Product;
+use Magento\Framework\Pricing\Adjustment\Calculator as AdjustmentCalculator;
+use Magento\Framework\Pricing\Amount\AmountFactory;
+use Magento\Framework\Pricing\Amount\AmountInterface;
+use Magento\Framework\Pricing\Amount\Base as BaseAmount;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Framework\Pricing\PriceInfo\Base as BasePriceInfo;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
use Magento\Tax\Helper\Data as TaxHelperData;
+use PHPUnit_Framework_MockObject_MockObject as MockObject;
/**
* Test for Magento\Bundle\Pricing\Price\BundleOptions
@@ -71,6 +72,11 @@ class BundleOptionsTest extends \PHPUnit\Framework\TestCase
*/
private $priceInfoMock;
+ /**
+ * @var SelectionPriceListProviderInterface
+ */
+ private $selectionPriceListProviderMock;
+
protected function setUp()
{
$this->priceInfoMock = $this->getMockBuilder(BasePriceInfo::class)
@@ -102,9 +108,20 @@ function ($fullAmount, $adjustments) {
->disableOriginalConstructor()
->getMock();
+ $this->selectionPriceListProviderMock = $this->getMockBuilder(SelectionPriceListProviderInterface::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
$this->bundleCalculatorMock = $this->getMockBuilder(BundleAdjustmentCalculator::class)
->setConstructorArgs(
- [$this->baseCalculator, $this->amountFactory, $this->selectionFactoryMock, $taxData, $priceCurrency]
+ [
+ $this->baseCalculator,
+ $this->amountFactory,
+ $this->selectionFactoryMock,
+ $taxData,
+ $priceCurrency,
+ $this->selectionPriceListProviderMock
+ ]
)
->setMethods(['getOptionsAmount'])
->getMock();
diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/FinalPriceTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/FinalPriceTest.php
index 4463709391102..d21971b821691 100644
--- a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/FinalPriceTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/FinalPriceTest.php
@@ -3,121 +3,156 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
namespace Magento\Bundle\Test\Unit\Pricing\Price;
+use Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface;
use Magento\Bundle\Pricing\Price\BundleOptionPrice;
+use Magento\Bundle\Pricing\Price\FinalPrice;
+use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
+use Magento\Catalog\Model\Product;
+use Magento\Catalog\Pricing\Price\BasePrice;
use Magento\Catalog\Pricing\Price\CustomOptionPrice;
use Magento\Bundle\Model\Product\Price;
use Magento\Catalog\Api\ProductCustomOptionRepositoryInterface;
use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Framework\Pricing\PriceInfo\Base;
+use Magento\Framework\Pricing\SaleableInterface;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
/**
- * @SuppressWarnings(PHPMD)
+ * Test class for \Magento\Bundle\Pricing\Price\FinalPrice
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
-class FinalPriceTest extends \PHPUnit\Framework\TestCase
+class FinalPriceTest extends TestCase
{
- /** @var \Magento\Bundle\Pricing\Price\FinalPrice */
- protected $finalPrice;
+ /**
+ * @var FinalPrice
+ */
+ private $finalPrice;
- /** @var ObjectManagerHelper */
- protected $objectManagerHelper;
+ /**
+ * @var ObjectManagerHelper
+ */
+ private $objectManagerHelper;
- /** @var \Magento\Framework\Pricing\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */
- protected $saleableInterfaceMock;
+ /**
+ * @var SaleableInterface|MockObject
+ */
+ private $saleableInterfaceMock;
- /** @var float */
- protected $quantity = 1.;
+ /**
+ * @var float
+ */
+ private $quantity = 1.;
- /** @var float*/
- protected $baseAmount;
+ /**
+ * @var BundleCalculatorInterface|MockObject
+ */
+ private $bundleCalculatorMock;
- /** @var \Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface|\PHPUnit_Framework_MockObject_MockObject */
- protected $bundleCalculatorMock;
+ /**
+ * @var PriceCurrencyInterface|MockObject
+ */
+ private $priceCurrencyMock;
- /** @var \Magento\Framework\Pricing\PriceInfo\Base |\PHPUnit_Framework_MockObject_MockObject */
- protected $priceInfoMock;
+ /**
+ * @var ProductCustomOptionRepositoryInterface|MockObject
+ */
+ private $productOptionRepositoryMock;
- /** @var \Magento\Catalog\Pricing\Price\BasePrice|\PHPUnit_Framework_MockObject_MockObject */
- protected $basePriceMock;
+ /**
+ * @var float
+ */
+ private $baseAmount;
- /** @var BundleOptionPrice|\PHPUnit_Framework_MockObject_MockObject */
- protected $bundleOptionMock;
+ /**
+ * @var Base|MockObject
+ */
+ private $priceInfoMock;
- /** @var CustomOptionPrice|\PHPUnit_Framework_MockObject_MockObject */
- protected $customOptionPriceMock;
+ /**
+ * @var BasePrice|MockObject
+ */
+ private $basePriceMock;
/**
- * @var PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var BundleOptionPrice|MockObject
*/
- protected $priceCurrencyMock;
+ private $bundleOptionMock;
/**
- * @var ProductCustomOptionRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
+ * @var CustomOptionPrice|MockObject
*/
- private $productOptionRepositoryMock;
+ private $customOptionPriceMock;
/**
* @return void
*/
protected function prepareMock()
{
- $this->saleableInterfaceMock = $this->getMockBuilder(\Magento\Catalog\Model\Product::class)
+ $this->saleableInterfaceMock = $this->getMockBuilder(Product::class)
->disableOriginalConstructor()
->setMethods(['getPriceType', 'getPriceInfo'])
->getMock();
$this->bundleCalculatorMock = $this->createMock(
- \Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface::class
+ BundleCalculatorInterface::class
);
- $this->basePriceMock = $this->createMock(\Magento\Catalog\Pricing\Price\BasePrice::class);
- $this->basePriceMock->expects($this->any())
- ->method('getValue')
- ->will($this->returnValue($this->baseAmount));
+ $this->basePriceMock = $this->createMock(BasePrice::class);
+ $this->basePriceMock->method('getValue')
+ ->willReturn($this->baseAmount);
- $this->bundleOptionMock = $this->getMockBuilder(\Magento\Bundle\Pricing\Price\BundleOptionPrice::class)
+ $this->bundleOptionMock = $this->getMockBuilder(BundleOptionPrice::class)
->disableOriginalConstructor()
->getMock();
- $this->customOptionPriceMock = $this->getMockBuilder(\Magento\Catalog\Pricing\Price\CustomOptionPrice::class)
+ $this->customOptionPriceMock = $this->getMockBuilder(CustomOptionPrice::class)
->disableOriginalConstructor()
->getMock();
- $this->priceInfoMock = $this->createMock(\Magento\Framework\Pricing\PriceInfo\Base::class);
+ $this->priceInfoMock = $this->createMock(Base::class);
$this->priceInfoMock->expects($this->atLeastOnce())
->method('getPrice')
- ->will($this->returnValueMap([
- [\Magento\Catalog\Pricing\Price\BasePrice::PRICE_CODE, $this->basePriceMock],
- [BundleOptionPrice::PRICE_CODE, $this->bundleOptionMock],
- [CustomOptionPrice::PRICE_CODE, $this->customOptionPriceMock],
- ]));
+ ->willReturnMap(
+ [
+ [BasePrice::PRICE_CODE, $this->basePriceMock],
+ [BundleOptionPrice::PRICE_CODE, $this->bundleOptionMock],
+ [CustomOptionPrice::PRICE_CODE, $this->customOptionPriceMock],
+ ]
+ );
$this->saleableInterfaceMock->expects($this->once())
->method('getPriceInfo')
- ->will($this->returnValue($this->priceInfoMock));
-
- $this->priceCurrencyMock = $this->createMock(\Magento\Framework\Pricing\PriceCurrencyInterface::class);
-
- $this->objectManagerHelper = new ObjectManagerHelper($this);
- $this->finalPrice = new \Magento\Bundle\Pricing\Price\FinalPrice(
- $this->saleableInterfaceMock,
- $this->quantity,
- $this->bundleCalculatorMock,
- $this->priceCurrencyMock
- );
+ ->willReturn($this->priceInfoMock);
+ $this->priceCurrencyMock = $this->createMock(PriceCurrencyInterface::class);
$this->productOptionRepositoryMock = $this->getMockForAbstractClass(
ProductCustomOptionRepositoryInterface::class
);
- $reflection = new \ReflectionClass(get_class($this->finalPrice));
- $reflectionProperty = $reflection->getProperty('productOptionRepository');
- $reflectionProperty->setAccessible(true);
- $reflectionProperty->setValue($this->finalPrice, $this->productOptionRepositoryMock);
+
+ $this->objectManagerHelper = new ObjectManagerHelper($this);
+ $this->finalPrice = $this->objectManagerHelper->getObject(
+ FinalPrice::class,
+ [
+ 'saleableItem' => $this->saleableInterfaceMock,
+ 'quantity' => $this->quantity,
+ 'calculator' => $this->bundleCalculatorMock,
+ 'priceCurrency' => $this->priceCurrencyMock,
+ 'productOptionRepository' => $this->productOptionRepositoryMock
+ ]
+ );
}
/**
+ * @param $baseAmount
+ * @param $optionsValue
+ * @param $result
* @dataProvider getValueDataProvider
*/
public function testGetValue($baseAmount, $optionsValue, $result)
@@ -126,7 +161,7 @@ public function testGetValue($baseAmount, $optionsValue, $result)
$this->prepareMock();
$this->bundleOptionMock->expects($this->once())
->method('getValue')
- ->will($this->returnValue($optionsValue));
+ ->willReturn($optionsValue);
$this->assertSame($result, $this->finalPrice->getValue());
}
@@ -144,6 +179,7 @@ public function getValueDataProvider()
}
/**
+ * @param $baseAmount
* @dataProvider getValueDataProvider
*/
public function testGetMaximalPrice($baseAmount)
@@ -155,7 +191,7 @@ public function testGetMaximalPrice($baseAmount)
$this->bundleCalculatorMock->expects($this->once())
->method('getMaxAmount')
->with($this->equalTo($this->baseAmount), $this->equalTo($this->saleableInterfaceMock))
- ->will($this->returnValue($result));
+ ->willReturn($result);
$this->assertSame($result, $this->finalPrice->getMaximalPrice());
//The second call should use cached value
$this->assertSame($result, $this->finalPrice->getMaximalPrice());
@@ -179,7 +215,7 @@ public function testGetMaximalPriceFixedBundleWithOption()
$this->bundleCalculatorMock->expects($this->once())
->method('getMaxAmount')
->with($this->equalTo($this->baseAmount + $optionMaxPrice), $this->equalTo($this->saleableInterfaceMock))
- ->will($this->returnValue($result));
+ ->willReturn($result);
$this->assertSame($result, $this->finalPrice->getMaximalPrice());
//The second call should use cached value
$this->assertSame($result, $this->finalPrice->getMaximalPrice());
@@ -192,7 +228,7 @@ public function testGetMinimalPriceFixedBundleWithOption()
$result = 7;
$this->prepareMock();
$customOptions = [
- $this->getMockBuilder(\Magento\Catalog\Api\Data\ProductCustomOptionInterface::class)
+ $this->getMockBuilder(ProductCustomOptionInterface::class)
->setMethods(['setProduct'])
->getMockForAbstractClass()
];
@@ -213,7 +249,7 @@ public function testGetMinimalPriceFixedBundleWithOption()
$this->bundleCalculatorMock->expects($this->once())
->method('getAmount')
->with($this->equalTo($this->baseAmount + $optionMaxPrice), $this->equalTo($this->saleableInterfaceMock))
- ->will($this->returnValue($result));
+ ->willReturn($result);
$this->assertSame($result, $this->finalPrice->getMinimalPrice());
//The second call should use cached value
$this->assertSame($result, $this->finalPrice->getMinimalPrice());
@@ -231,7 +267,7 @@ public function testGetMinimalPrice($baseAmount)
$this->bundleCalculatorMock->expects($this->once())
->method('getAmount')
->with($this->equalTo($this->baseAmount), $this->equalTo($this->saleableInterfaceMock))
- ->will($this->returnValue($result));
+ ->willReturn($result);
$this->assertSame($result, $this->finalPrice->getMinimalPrice());
//The second call should use cached value
$this->assertSame($result, $this->finalPrice->getMinimalPrice());
@@ -244,7 +280,7 @@ public function testGetPriceWithoutOption()
$this->bundleCalculatorMock->expects($this->once())
->method('getAmountWithoutOption')
->with($this->equalTo($this->baseAmount), $this->equalTo($this->saleableInterfaceMock))
- ->will($this->returnValue($result));
+ ->willReturn($result);
$this->assertSame($result, $this->finalPrice->getPriceWithoutOption());
//The second call should use cached value
$this->assertSame($result, $this->finalPrice->getPriceWithoutOption());
diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml b/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
index 45b4c4f5ededd..23d24369cad4a 100644
--- a/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
+++ b/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
@@ -18,7 +18,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
index e5ee55910df65..962b788aa80bb 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
@@ -31,18 +31,21 @@
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaFormsDisplayingTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaFormsDisplayingTest.xml
index ee71a243a769d..3aa57917c43a8 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaFormsDisplayingTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaFormsDisplayingTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml
index 16f2774e22ccd..59f1c13621982 100644
--- a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml
+++ b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Row.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Row.php
index 64a7c4be4e03c..5ea2b636933a3 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Row.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Row.php
@@ -85,10 +85,16 @@ public function execute($id = null)
$ids = [$id];
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
+ $storeIds = $this->getAssignedStoreIdsOfProduct($id);
+
$stores = $this->_storeManager->getStores();
foreach ($stores as $store) {
$tableExists = $this->_isFlatTableExists($store->getId());
if ($tableExists) {
+ if (!in_array($store->getId(), $storeIds)) {
+ $this->flatItemEraser->deleteProductsFromStore($id, $store->getId());
+ continue;
+ }
$this->flatItemEraser->removeDeletedProducts($ids, $store->getId());
$this->flatItemEraser->removeDisabledProducts($ids, $store->getId());
}
@@ -129,4 +135,23 @@ public function execute($id = null)
return $this;
}
+
+ /**
+ * Get list store id where the product is enable
+ *
+ * @param int $productId
+ * @return array
+ */
+ private function getAssignedStoreIdsOfProduct($productId)
+ {
+ $select = $this->_connection->select();
+ $select->from(['e' => $this->_productIndexerHelper->getTable('store')], ['e.store_id'])
+ ->where('c.product_id = ' . $productId)
+ ->joinLeft(
+ ['c' => $this->_productIndexerHelper->getTable('catalog_product_website')],
+ 'e.website_id = c.website_id',
+ []
+ );
+ return $this->_connection->fetchCol($select);
+ }
}
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
index 1a46c38d04319..41b3f9781c8a0 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
@@ -1717,7 +1717,10 @@ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
// optimize if using cat index
$filters = $this->_productLimitationFilters;
if (isset($filters['category_id']) || isset($filters['visibility'])) {
- $this->getSelect()->order(['cat_index.position ' . $dir, 'e.entity_id ' . $dir]);
+ $this->getSelect()->order([
+ 'cat_index.position ' . $dir,
+ 'e.entity_id ' . \Magento\Framework\DB\Select::SQL_DESC
+ ]);
} else {
$this->getSelect()->order('e.entity_id ' . $dir);
}
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesExpandAllActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesExpandAllActionGroup.xml
new file mode 100644
index 0000000000000..aa4a69f8abf62
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesExpandAllActionGroup.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenCategoryActionGroup.xml
new file mode 100644
index 0000000000000..3903615597eb3
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenCategoryActionGroup.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenContentSectionActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenContentSectionActionGroup.xml
new file mode 100644
index 0000000000000..edc3d11bebe66
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesOpenContentSectionActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetDisplayModeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetDisplayModeActionGroup.xml
new file mode 100644
index 0000000000000..7e3877bb76ffc
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetDisplayModeActionGroup.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetStaticBlockActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetStaticBlockActionGroup.xml
new file mode 100644
index 0000000000000..1d5308a639d72
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoriesSetStaticBlockActionGroup.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenCategoriesPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenCategoriesPageActionGroup.xml
new file mode 100644
index 0000000000000..7f41a0c4eb1a3
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenCategoriesPageActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveCategoryActionGroup.xml
new file mode 100644
index 0000000000000..535a08382aabb
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveCategoryActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
index 777bbcbcf37aa..e42dd8b8ab12e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml
index a7c0575e0cc96..83a05fef83607 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml
index ce8ce5ead1153..92f24fe76502d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml
index 367827f8c0c28..7cf388914207b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultVideoSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultVideoSimpleProductTest.xml
index adf13e4e31435..61d197d34a31d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultVideoSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultVideoSimpleProductTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml
index 690f2440b2f3b..dcb900164eba7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
index 9ee5e9138d764..4aa96c91eb299 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductTest.xml
index 016d11f8e660a..b2181164070dc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductTest.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductWithPercentageDiscountTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductWithPercentageDiscountTest.xml
index 848fb7d1155f3..fd8c0ba29fdfa 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductWithPercentageDiscountTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest/AdminApplyTierPriceToProductWithPercentageDiscountTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml
index 980760699dc71..e3fa3dada5b22 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml
index 03331b0d75cc5..72ffcad4a9dfc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml
index 23c9513c7ab49..acd662401399e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml
index 2e55d9fbfa4bc..3b8c2cb736721 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml
index 9821acc4b9e5d..39351539d14a6 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
index 8eec2ed40c8cb..51d9e26ebd2cb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
index 9b95ef726a617..f076f4fa407b4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml
index 3f180939bc7ea..8a0b1977bf901 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
index 3edd82e060e2e..e832f2baf24a2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml
index 7d27bfb3a058b..dfde5779637a4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckNewCategoryLevelAddedViaApiTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckNewCategoryLevelAddedViaApiTest.xml
index 427ef6551ce9b..e707c15bccdf1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckNewCategoryLevelAddedViaApiTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckNewCategoryLevelAddedViaApiTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml
index 9b7ef4077f906..a94610abf0918 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
index 433289f59f21b..e64707a895fd4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml
index c1f310575de2f..278a1fdc7ad9c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml
index f2d6d9442fb18..c389d447feeba 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml
index 4ea294e3a3f36..ff1e65bca9acc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml
index 86ab49d6f69c1..d3140dba85752 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminConfigureProductImagePlaceholderTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminConfigureProductImagePlaceholderTest.xml
index b5ab36729c7fe..a4414901517b9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminConfigureProductImagePlaceholderTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminConfigureProductImagePlaceholderTest.xml
@@ -63,7 +63,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml
index 9cb709a8c7e62..0525e7543accb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml
index 43fce1cfdd329..ce3dd8fa0873c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToVirtualTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToVirtualTest.xml
index fde018ddc181a..65e67020e4532 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToVirtualTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToVirtualTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAttributeSetEntityTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAttributeSetEntityTest.xml
index aba7bf6073117..04d032511ded0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAttributeSetEntityTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAttributeSetEntityTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml
index ef21b53c7613b..b94c12d1d7a39 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml
index a4fe694ea65a7..e0fa4a3c3410c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest.xml
index e6a2030e37d86..e8b13afc7138e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCreateCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCreateCategoryTest.xml
index b6d1d4b81fffb..8ad76bdde7306 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCreateCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCreateCategoryTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
index 8900e85ca3431..7deb79c66ff6d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml
index ac237fbe49978..71167882d135d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml
index bc60f21b5d214..c1df630685949 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml
index ca2b15658f02e..34714db67fbd6 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml
index f6b0a0a321c5d..a11717c04ea8c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml
index 5342dec6b1ebb..ec3c7a26723c2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml
index 9a580df52259b..99d0f88cf0e9a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml
index 110f52aaeb40a..871dd606c14db 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml
index 06d7d1081d058..7b2c67b205ea8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml
index e32aad76c9b28..37dc7de910917 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml
index 348c973b4de82..88b1c874caadc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
index 4d2250d650da2..fef69edde23e8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml
index 4c91c6bac0e1a..a34712397e830 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml
index c6703a1109345..cc76304bc5ebc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
index bff43cf65faf6..c3b86c99bbd67 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
index 9ef3659cb5ab1..affdbaf7b0eb7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
index 4623f9ad4005b..10e4d9f434be0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
index b5b5fa3b12dc7..caacfde89d1cb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml
index 4ffb81d9a1d67..e99643deed11d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml
index 18fbcadf985c3..7c8ce1455fc37 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml
index 6cd4ce6ac47c4..573fc1f83a5a8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
index ae4720e19118d..7fdab11d0a050 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml
index a75cb093ec8ee..274a560d343d8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml
index 2fbd1ac2cf321..d2278f3ddae1d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateProductTest.xml
index 3fb3db231c29c..91ea74f1089ca 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateProductTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateUrlkeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateUrlkeyTest.xml
index 2ccec016b8e15..c461aa8bfcf18 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateUrlkeyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateUrlkeyTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml
index 2352e231e66a4..9a0ff1d02c153 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml
@@ -20,7 +20,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductNotVisibleIndividuallyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductNotVisibleIndividuallyTest.xml
index 4188fc628064a..12cd5454ea8e2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductNotVisibleIndividuallyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductNotVisibleIndividuallyTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminConfigDefaultProductLayoutFromConfigurationSettingTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminConfigDefaultProductLayoutFromConfigurationSettingTest.xml
index f1bb67bf66784..7317f2f7214f0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminConfigDefaultProductLayoutFromConfigurationSettingTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminConfigDefaultProductLayoutFromConfigurationSettingTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml
index c3b74eb128ef6..a8cc66243d73e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductTest.xml
index 1a95824014deb..3e5ccfd8bf3b9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductZeroPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductZeroPriceTest.xml
index a0e51faf0897f..f4878f2948e9d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductZeroPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductZeroPriceTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml
index 967babc617ce9..c378ca5b2c27a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
index 9660a46d43dba..8de84867241a8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml
index bad620b3dab99..fd6db45b1716b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml
index 6d39455e4a31b..9d3a47cd115aa 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml
index df46983b361c6..842f93b49c14a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
index 899f3af02c78e..8bb3391b5240b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml
index 84cba791c6629..9305e9ed3fd49 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
index ea73de1cab15d..d8eaed92de4cf 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml
index 685db6db90a10..3b5a8d8e753da 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml
index bb4ff7acaa4a7..3dfeea2c33af0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml
index 069789738d11f..7748d4bf4db6f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml
index 9d52399f15a96..841b08e70fb4f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml
index 20d2a924954cb..c0cbb44ebc681 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml
index 834da3f4d4f9b..22e1d7d7c5d9e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
index 386077396e4a7..0b857c6d3bbaf 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml
index 77ebf77f05e58..0396ab743c745 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml
index 4974b983beeb9..0a41842d5709c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml
index 48422d9ba2025..6ae00d213bf77 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml
index b5d7f413730aa..390002f5d9498 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml
index be54262987b05..22c6bf061f274 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml
index 3d6eca36ec06d..36001bd0b570a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml
index 642fb1c1f7ba0..f49e1142315eb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml
index 8ce478ff48469..f2a7ffcce0eb0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml
index 7f973c99b39a5..843221782ebd9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml
index a0dbb7cea5e16..89b3b2cb6fb41 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml
index a42fe576751f7..f6b2a74eca0f0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
index cc21740cbc59f..c319116bf075c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml
index 6896b11196cf2..0214f9141b903 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
index f803050b7a59b..e8e0d449aee4e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
index 0fbbca2602e86..31b5961edaaaa 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml
index a4c8f5e8cff6c..e4d69e9169613 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeMysqlTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeMysqlTest.xml
index ffaf8501ea71f..7cdfd6dabed47 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeMysqlTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeMysqlTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeTest.xml
index 308a240eda184..08b2d924e2a5e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest/AdminMassUpdateProductAttributesStoreViewScopeTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml
index 820a578e0252f..72092af331974 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
index 2122d73ca7e62..1ea1f60f52a2c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
index ac766feef1742..39040c7e88205 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
@@ -18,7 +18,7 @@
-
+
true
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
index 393d0c49c2e93..7fdc6e7b9cf8f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml
index f49b9b5b5d3e3..2909d17b1541b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
index d3d435b7451c3..50c7fa38d881e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
@@ -19,7 +19,7 @@
-
+
@@ -163,7 +163,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml
index d0e466114a1d4..659521ed9e467 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml
@@ -74,7 +74,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml
index 4a4a4a6833b33..b8e7bdae0df2b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
index c62c6b4b4c6a9..ee34d8286fe32 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml
index 5593e8b56422f..9536ee030cdf8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml
index 8c334cb84be01..d47730a99308b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml
index f32845072ec02..35632f4fa6311 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml
index 5f089aad256b7..ae63158990b96 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToDownloadableProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToDownloadableProductTest.xml
index 4966e94463e98..12d654508d7d7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToDownloadableProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToDownloadableProductTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml
index f46a3aea0ef81..96ee795998459 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml
index 3b750c2cdb21c..00eaa623e2bca 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml
index 6a68928be8c70..6cc1b256e5ec9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultVideoSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultVideoSimpleProductTest.xml
index baa952f6bcf45..60c32004e3ca8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultVideoSimpleProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultVideoSimpleProductTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
index 5e29bf30b4bf2..6cd76c4cc06b8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml
index b3e5900c9bb76..ee8636dece808 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml
index d2822a53b1a73..0281fded3a8e4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml
index 5f489e337b01a..e89e89205f3f5 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml
@@ -20,7 +20,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
@@ -75,8 +75,9 @@
-
-
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml
index 190a051c16d44..00b9e77d5fe5e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductEditUiTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductEditUiTest.xml
index c0f121edcf6bd..3ee8d0e3c2571 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductEditUiTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductEditUiTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
index 8bb65045fdde9..9819890ed3751 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml
index 53ccb0257aa19..ec82bdcf5bc94 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml
index 80e245818e216..51a91a17ff41a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleSetEditRelatedProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleSetEditRelatedProductsTest.xml
index 76e0bdd5d46ad..534924e0f70c9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleSetEditRelatedProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleSetEditRelatedProductsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
index 16bc76cb6446a..71e827a64ae2d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml
index 544ab05d8783b..c1538cf8c5329 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml
index 37571d7b44635..e0a2c4272372a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml
index 0ce506fe1918d..9838283bbfb96 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml
index 307eceddae3ef..5fe71ce0a1e5d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml
index 4b1cd1f674425..f3225bcd7fe3d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml
index 4eab0ca8f0694..2865e9bc87dd3 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml
index 51d8b9e1eaf37..3c3baf3524e87 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml
index 3c99e86dba2c9..8b57c2e371355 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml
index 6ecb7e09d5a2c..117019da38ffa 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml
index d6c581b18beff..9663632e6dc36 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
index 6dde1567b68f8..ccab2f9e96ce7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
index 8a31145f7349d..512df79cb7c9c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
index 6575fd1f1c977..f444e741fea0e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
index 2c356636df56c..2b9cbf379c5e6 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml
index 2c45e957d801c..6edffb923d540 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml
index 4e80f95bbf390..e954de90ef542 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
index 7096e547c5aa7..f5b0fb8054dc1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml
index d0935948e88bd..d20594461173b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml
index e9c2ed1511ce3..5fa7acbeb8de9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml
index 17a91ed2cf4f4..259eb01d9bc5d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml
index 84f2c4552ae6c..45f8918100083 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
index 423a7d23d7d4a..58db163bed720 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
index 29a4c5e009d07..5e9a48f659d6b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml
index 5c196744f0181..3d37b54dfa439 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml
index 00b6a5def6169..c924c94a9aba8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml
index ec19a2a496f9f..af836efcf6be6 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml
index f499d87c84682..db8b808e74f76 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml
index eabedebaeab83..c5757a6428e8d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml
index bd1a5aaf9ed42..9146ee4d4d579 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
index a667d08b8e25f..5115399db9e3b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
index 50ca013050ea7..cacf4f3f4c9f5 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
index 1fe42a331c80c..d89ffa0055d3b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml
index 850c0e98c45f3..e50c124f7cfd9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
index 6ee37221acc93..437532b9baebf 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml
index dc38062a99c53..580a5bd4939bb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml
index b8b2224abf5a1..e24bf0d7b1115 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml
index 50606994cace8..0a84d9af3c918 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml
index f1a19a9ece8d5..97eff20b2d560 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml
index 3495069face61..c0cff7b0b2bc9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
index 604c01f05b838..f70979285446a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml
index 026f3ce7067f6..d2b9fba0895ea 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml
@@ -59,7 +59,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
index 5a57bd844aa8d..f6ede46578f33 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml
index 43208f336dbcd..151046f0474e0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml
index 79fe21e0c0d77..916bcd7405ecf 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml
@@ -18,7 +18,7 @@
-
+
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
index 783054c3ffb5a..b206a33ebde88 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml
index f5ac8b243979f..7b2e004495fea 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
index 9690246bbe68c..ea7912613f7f2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
@@ -16,10 +16,10 @@
+
+
-
-
@@ -64,51 +64,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -118,7 +106,6 @@
-
@@ -126,71 +113,65 @@
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
+
-
+
-
+
-
+
@@ -201,11 +182,11 @@
-
+
-
+
@@ -214,7 +195,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
index d84e2283b2dd4..16f3c6ae25436 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
@@ -18,7 +18,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
index d454a3d24e273..9fbdde86bb5ee 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
@@ -18,7 +18,7 @@
-
+
@@ -63,7 +63,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest.xml
index d642f16160c5b..c38ea2de558e1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontSimpleProductWithSpecialAndTierDiscountPriceTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml
index 2f4b6a90bd1e5..2a59be6306a30 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml
index 00f9608d07c3e..b6ba5245645eb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
index aacce53819178..b13c3827c6727 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml
index 059b90532f8f9..c22f91b5394ea 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml
@@ -19,7 +19,7 @@
-
+
@@ -162,7 +162,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml
index be063d2387b25..8acc6272d5da4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml
@@ -52,7 +52,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml
index 68d847907a448..df1eb0c502e18 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
index 5c13e5a47973a..bcd5d7b851db3 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml
index 40733b120f1e8..a311b63418a69 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml
index 849de20991c62..c7817ed181ae0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml
index a8ab4cca1ac78..5659f053613c2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml
@@ -32,7 +32,7 @@
100
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml
index 066337bf25cb6..09b596f298e0f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml
@@ -128,7 +128,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml
index b8aed7f0ac2ad..3c1dc2bc844cf 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml
@@ -96,7 +96,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml
index 5bc8427db022f..0dccc409a1032 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/TieredPricingAndQuantityIncrementsWorkWithDecimalinventoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/TieredPricingAndQuantityIncrementsWorkWithDecimalinventoryTest.xml
index 0413018128491..26cebae318cd9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/TieredPricingAndQuantityIncrementsWorkWithDecimalinventoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/TieredPricingAndQuantityIncrementsWorkWithDecimalinventoryTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
index c30c750fec10c..b4514c9b53736 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
@@ -49,7 +49,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml
index 2a6a05c8ffeab..94b16ac8bddce 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/Action/RowTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/Action/RowTest.php
index 11d07872fef91..61fad897c6418 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/Action/RowTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/Action/RowTest.php
@@ -160,8 +160,24 @@ public function testExecuteWithExistingFlatTablesCreatesTables()
->willReturn('store_flat_table');
$this->connection->expects($this->any())->method('isTableExists')->with('store_flat_table')
->willReturn(true);
+ $this->connection->expects($this->any())->method('fetchCol')
+ ->willReturn(['store_id_1']);
$this->flatItemEraser->expects($this->once())->method('removeDeletedProducts');
$this->flatTableBuilder->expects($this->never())->method('build')->with('store_id_1', ['product_id_1']);
$this->model->execute('product_id_1');
}
+
+ public function testExecuteWithExistingFlatTablesRemoveProductFromStore()
+ {
+ $this->productIndexerHelper->expects($this->any())->method('getFlatTableName')
+ ->willReturn('store_flat_table');
+ $this->connection->expects($this->any())->method('isTableExists')->with('store_flat_table')
+ ->willReturn(true);
+ $this->connection->expects($this->any())->method('fetchCol')
+ ->willReturn([1]);
+ $this->flatItemEraser->expects($this->once())->method('deleteProductsFromStore');
+ $this->flatItemEraser->expects($this->never())->method('removeDeletedProducts');
+ $this->flatTableBuilder->expects($this->never())->method('build')->with('store_id_1', ['product_id_1']);
+ $this->model->execute('product_id_1');
+ }
}
diff --git a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
index 382b4ef98532b..7d3e4b3280473 100644
--- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
+++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
@@ -8,8 +8,9 @@ define([
'mage/translate',
'underscore',
'Magento_Catalog/js/product/view/product-ids-resolver',
+ 'Magento_Catalog/js/product/view/product-info-resolver',
'jquery-ui-modules/widget'
-], function ($, $t, _, idsResolver) {
+], function ($, $t, _, idsResolver, productInfoResolver) {
'use strict';
$.widget('mage.catalogAddToCart', {
@@ -24,7 +25,8 @@ define([
addToCartButtonDisabledClass: 'disabled',
addToCartButtonTextWhileAdding: '',
addToCartButtonTextAdded: '',
- addToCartButtonTextDefault: ''
+ addToCartButtonTextDefault: '',
+ productInfoResolver: productInfoResolver
},
/** @inheritdoc */
@@ -90,6 +92,7 @@ define([
ajaxSubmit: function (form) {
var self = this,
productIds = idsResolver(form),
+ productInfo = self.options.productInfoResolver(form),
formData;
$(self.options.minicartSelector).trigger('contentLoading');
@@ -119,6 +122,7 @@ define([
$(document).trigger('ajax:addToCart', {
'sku': form.data().productSku,
'productIds': productIds,
+ 'productInfo': productInfo,
'form': form,
'response': res
});
@@ -172,6 +176,7 @@ define([
$(document).trigger('ajax:addToCart:error', {
'sku': form.data().productSku,
'productIds': productIds,
+ 'productInfo': productInfo,
'form': form,
'response': res
});
diff --git a/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info-resolver.js b/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info-resolver.js
new file mode 100644
index 0000000000000..f58f0ba2dfa68
--- /dev/null
+++ b/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info-resolver.js
@@ -0,0 +1,35 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+define([
+ 'underscore',
+ 'Magento_Catalog/js/product/view/product-info'
+], function (_, productInfo) {
+ 'use strict';
+
+ /**
+ * Returns info about products in form.
+ *
+ * @param {jQuery} $form
+ * @return {Array}
+ */
+ return function ($form) {
+ var product = _.findWhere($form.serializeArray(), {
+ name: 'product'
+ });
+
+ if (!_.isUndefined(product)) {
+ productInfo().push(
+ {
+ 'id': product.value
+ }
+ );
+ }
+
+ return _.uniq(productInfo(), function (item) {
+ return item.id;
+ });
+ };
+});
+
diff --git a/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info.js b/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info.js
new file mode 100644
index 0000000000000..2198b7b8e48b0
--- /dev/null
+++ b/app/code/Magento/Catalog/view/frontend/web/js/product/view/product-info.js
@@ -0,0 +1,12 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'ko'
+], function (ko) {
+ 'use strict';
+
+ return ko.observableArray([]);
+});
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
index 6dab378fe6456..2b4609f1219df 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
@@ -85,7 +85,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index 8f9e1bd49af0e..3449a39679666 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -53,7 +53,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
index 6b6ee2e0fcc58..64b1680d2e9a1 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
@@ -127,7 +127,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
index 1168033172d23..ac730a6c6a7cc 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
@@ -78,7 +78,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index cc25baee2c9f4..a0a3efdedadc8 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -94,7 +94,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index 13a0f92076a57..f9669dfbdac27 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -76,7 +76,7 @@
-
+
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
index cd65416460ce6..2e8e62667b314 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php
index 7a46780f2d783..f104552b4e0fc 100644
--- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php
+++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php
@@ -118,6 +118,10 @@ public function initialize(
$product->getStore()->getWebsiteId()
);
+ if ($result->getHasError() === true && in_array($result->getErrorCode(), ['qty_available', 'out_stock'])) {
+ $quoteItem->setHasError(true);
+ }
+
/* We need to ensure that any possible plugin will not erase the data */
$backOrdersQty = $this->stockStateProvider->checkQuoteItemQty($stockItem, $rowQty, $qtyForCheck, $qty)
->getItemBackorders();
diff --git a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php
index 6851b05aa56a6..b57518b681aa2 100644
--- a/app/code/Magento/CatalogInventory/Model/StockStateProvider.php
+++ b/app/code/Magento/CatalogInventory/Model/StockStateProvider.php
@@ -14,7 +14,7 @@
use Magento\Framework\Math\Division as MathDivision;
/**
- * Interface StockStateProvider
+ * Provider stocks state
*/
class StockStateProvider implements StockStateProviderInterface
{
@@ -156,6 +156,7 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQ
if (!$stockItem->getIsInStock()) {
$result->setHasError(true)
+ ->setErrorCode('out_stock')
->setMessage(__('This product is out of stock.'))
->setQuoteMessage(__('Some of the products are out of stock.'))
->setQuoteMessageIndex('stock');
@@ -165,7 +166,11 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQ
if (!$this->checkQty($stockItem, $summaryQty) || !$this->checkQty($stockItem, $qty)) {
$message = __('The requested qty is not available');
- $result->setHasError(true)->setMessage($message)->setQuoteMessage($message)->setQuoteMessageIndex('qty');
+ $result->setHasError(true)
+ ->setErrorCode('qty_available')
+ ->setMessage($message)
+ ->setQuoteMessage($message)
+ ->setQuoteMessageIndex('qty');
return $result;
} else {
if ($stockItem->getQty() - $summaryQty < 0) {
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml
index edbf7451c6b6b..9db6f250dc114 100644
--- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml
+++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml
index b1ab6a598eb88..b291fb46ae71c 100644
--- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml
+++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml
@@ -113,7 +113,7 @@
-
+
diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
index 4d90b2159d852..065d9c1878849 100644
--- a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
+++ b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
@@ -14,11 +14,6 @@
-
-
- false
-
-
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
index b2ce64fe651c0..4d97338333be8 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
index f8b477e796c9d..9cc0090fef756 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
index d033e03bb4916..8c3d1dad1b2a3 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
index 93291104e7fc9..65ef23de65380 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleWithInvalidDataTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleWithInvalidDataTest.xml
index a4a7ba012ac98..90a0835508b06 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleWithInvalidDataTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleWithInvalidDataTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml
index 4211f0fc76508..1d4b21cb04a60 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
index 93797bcda5411..5fb33c9482709 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
@@ -75,7 +75,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
index 91ccfb458e98f..fc37fc893f871 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
index dfb846e90b669..c6b3569f3b597 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
index fdd9b4788d315..973d73da2ab6a 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml
index 2a45de28db199..60b16276f6c17 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
index 400b03c9af21e..0747d42dc8737 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
index d79a3805d79a4..101883f5ea9f2 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
index 0149a2d0a6abb..552a6dc48eb7f 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
index c70a72d725489..6e8cb01f64ea2 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
index 9ebab2d28249a..aa20a1d72d063 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
index c752ce5c07636..6ac9f713e2844 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
index cf34a01498e6f..46ba6e30100b1 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml
index aa2b41b96979f..48f53da8e2a2e 100644
--- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml
+++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml
@@ -144,7 +144,7 @@
-
+
diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml
index ff0c9058037df..e4dd65479b784 100644
--- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml
+++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml
@@ -145,7 +145,7 @@
-
+
diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml
index b011719495d2b..350f896606c19 100644
--- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml
+++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml
@@ -92,7 +92,7 @@
-
+
diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml
index b7cae5980239b..8ed9c6ad09dad 100644
--- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml
+++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml
@@ -93,7 +93,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml
index 2ab87b3ceb967..7ac06c0342229 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml
index 6be63541f3c27..a0abefebcb6b4 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml
index e1a965bd08e0b..42c6d13784a98 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml
index 6ae215f821a0b..437357ba861f2 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
index f6cd95b4f5a3d..49fce41fddf05 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
@@ -37,7 +37,7 @@
10
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
index 844c100830bc2..4b0a5c84ac360 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
@@ -48,7 +48,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
index e4918536245cf..35db90363b1ae 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
index 0d062c832090c..cf30e4d06e8e7 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchTwoProductsWithSameWeightTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchTwoProductsWithSameWeightTest.xml
index 0d2009f21aac1..00a7ffa3fc142 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchTwoProductsWithSameWeightTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchTwoProductsWithSameWeightTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
index f032a97ac297c..968435747bdbb 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
index 954f53814f3c3..6f510fa315d7d 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
index 502301939f71a..3c0c7cf53d0a1 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
@@ -48,7 +48,7 @@
-
+
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml
index 5d02e2075430e..7d75364cc9b50 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
index db4811273a5cc..e8a1ee850cd74 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
@@ -17,7 +17,7 @@
-
+
@@ -30,7 +30,7 @@
-
+
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
index 62ef26145619b..456458a4fad40 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml
index d61a4bd077d9c..8764555f94357 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml
index 8d4e97420dd0b..288134a889db0 100644
--- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml
+++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml
index ea6a3a73522e7..fd87d58e47125 100644
--- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml
+++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml
@@ -37,7 +37,7 @@
30
-
+
diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml
index 74e1110c95636..5590aa1cdcefa 100644
--- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml
+++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
index a9c3d20c447a9..ab0453e1faa18 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
@@ -75,7 +75,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml
index 294fc2c562491..58a44f5b89f90 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml
index 899688c80764e..016616a27a05a 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml
index c88025feba3d4..3215503b3205a 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml
@@ -82,7 +82,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml
index 4065b3691b250..76a998fec8adc 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml
@@ -95,7 +95,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml
index 571fb8c4cf3a5..340ff4159900a 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml
@@ -83,7 +83,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml
index 6b7feb485c812..1c03808ac71cf 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml
@@ -76,7 +76,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
index d362f83043c2a..e678bb0d2a87b 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
@@ -195,7 +195,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
index d0fb6babb22fa..bd81a1cfab604 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
@@ -54,7 +54,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
index ba26b44c11ba3..57ed8e442af7c 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
@@ -20,7 +20,7 @@
-
+
1
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml
index 58cc137efd7b3..e4eb53a1f1925 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml
@@ -77,7 +77,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
index 7405a3100728f..444ebf653b94f 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
@@ -61,7 +61,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
index 80da3fb70f944..ce7c5c3b29353 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
@@ -19,7 +19,7 @@
-
+
50.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml
index 85e6a6b9c434c..16c7a0609a6ff 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml
@@ -18,7 +18,7 @@
-
+
50.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
index dee2bb16a63d0..787d8f58891d0 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
@@ -18,7 +18,7 @@
-
+
10.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutDisabledProductAndCouponTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutDisabledProductAndCouponTest.xml
index f8e1f32e93f52..b962d80a4d88b 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutDisabledProductAndCouponTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutDisabledProductAndCouponTest.xml
@@ -67,7 +67,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml
index f0907e89f00da..5fbfdb5a07678 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
index 8c58827812d99..b5f573aba7561 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
@@ -60,7 +60,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
index 0edc919920103..4c3c1561a2445 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml
index c616faf716f03..0f82302260995 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml
index c66c6371ae595..0c762519e9083 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml
index f43cadabfd611..9152949fbf2a1 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
index 1690612fa3242..fe320fb276c8a 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
index 92e185d1bbb00..eb8b047b57288 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
index a60fe104ce14b..3c234602df17a 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml
index 992d3eab9b563..b460bc2bb3446 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml
@@ -19,7 +19,7 @@
-
+
10.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml
index a6ac6d40a0ce0..643c6d8c14dd7 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml
@@ -19,7 +19,7 @@
-
+
10.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml
index 9e0f59f8a0e77..a7bb3d927f620 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml
@@ -19,7 +19,7 @@
-
+
10.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
index 05a136e4c312a..5c06f9ed55067 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
@@ -56,7 +56,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
index 7f4e6f0201ce5..2787627b935c1 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml
index c217eca5053c1..b63766e0cd374 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml
@@ -18,7 +18,7 @@
-
+
50.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml
index 71c6c7863f07c..e6e5c4f1a9299 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml
index 44e12d1ea4039..146db30aa7c86 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml
index 90896c3eb403e..43b2262265841 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml
index 293abcb8197e1..849b586594955 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml
@@ -109,7 +109,7 @@
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml
index 04ee2e2adbf28..ec99bb0e46722 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml
@@ -18,7 +18,7 @@
-
+
10.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml
index bb3bd50072f23..642814ded6e3e 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml
@@ -18,7 +18,7 @@
-
+
50.00
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
index e3a5546311f3b..12e2820821c87 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
@@ -22,7 +22,7 @@
100
-
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml
index 781253a707271..542c0ed6586e9 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
index 6fc5ef9d2a574..a7ccb217fa102 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
@@ -260,7 +260,12 @@ define([
if (!_.isUndefined(productData)) {
$(document).trigger('ajax:removeFromCart', {
- productIds: [productData['product_id']]
+ productIds: [productData['product_id']],
+ productInfo: [
+ {
+ 'id': productData['product_id']
+ }
+ ]
});
if (window.location.href.indexOf(this.shoppingCartUrl) === 0) {
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermInGridActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermAbsentInGridActionGroup.xml
similarity index 79%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermInGridActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermAbsentInGridActionGroup.xml
index 9a855c6f8b5e9..9e95f27c47287 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermInGridActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermAbsentInGridActionGroup.xml
@@ -8,7 +8,7 @@
-
+
@@ -16,6 +16,6 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/DeleteTermActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml
similarity index 55%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/DeleteTermActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml
index 13163e90efdbc..9489fece37008 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/DeleteTermActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml
@@ -8,16 +8,7 @@
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml
new file mode 100644
index 0000000000000..8f2e65415ac22
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ Filters Terms and Conditions grid and opens the first result Edit page
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/CreateNewTermActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFillTermEditFormActionGroup.xml
similarity index 75%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/CreateNewTermActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFillTermEditFormActionGroup.xml
index d420cc155a77c..f32f1b11926a3 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/CreateNewTermActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFillTermEditFormActionGroup.xml
@@ -8,12 +8,11 @@
-
+
-
-
+
@@ -21,7 +20,5 @@
-
-
-
\ No newline at end of file
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFilterGridByNameActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFilterGridByNameActionGroup.xml
new file mode 100644
index 0000000000000..2290d8152473c
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFilterGridByNameActionGroup.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ Filters Terms and Conditions grid for name
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenGridActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenGridActionGroup.xml
new file mode 100644
index 0000000000000..98a0a04e501fc
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenGridActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenNewTermPageActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenNewTermPageActionGroup.xml
new file mode 100644
index 0000000000000..a6aa97dd269d4
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsOpenNewTermPageActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsSaveTermActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsSaveTermActionGroup.xml
new file mode 100644
index 0000000000000..457c4495c28e3
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsSaveTermActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsUpdateTermActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsUpdateTermActionGroup.xml
new file mode 100644
index 0000000000000..b7f92093356fa
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsUpdateTermActionGroup.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertAdminTermsConditionsInGridActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertAdminTermsConditionsInGridActionGroup.xml
new file mode 100644
index 0000000000000..37f2761bf8e9a
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertAdminTermsConditionsInGridActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermAbsentInCheckoutActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermAbsentInCheckoutActionGroup.xml
similarity index 96%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermAbsentInCheckoutActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermAbsentInCheckoutActionGroup.xml
index 7be17d8ca69d0..bf0c4f4b5a2c5 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermAbsentInCheckoutActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermAbsentInCheckoutActionGroup.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermInCheckoutActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermInCheckoutActionGroup.xml
similarity index 96%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermInCheckoutActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermInCheckoutActionGroup.xml
index 0cf745ce4e04f..bef0591a6e311 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermInCheckoutActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermInCheckoutActionGroup.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermRequireMessageInMultishippingCheckoutActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermRequireMessageInMultishippingCheckoutActionGroup.xml
similarity index 97%
rename from app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermRequireMessageInMultishippingCheckoutActionGroup.xml
rename to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermRequireMessageInMultishippingCheckoutActionGroup.xml
index 35ac4826ccfef..c8f49adc30067 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontAssertTermRequireMessageInMultishippingCheckoutActionGroup.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AssertStorefrontTermRequireMessageInMultishippingCheckoutActionGroup.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml
index f34aa52d1ebe3..0172ffc771384 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml
@@ -35,4 +35,13 @@
test_checkbox
TestMessage
+
+ name
+ Disabled
+ HTML
+ Manually
+ Default Store View
+ test_checkbox
+ <html>
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml
index 1e87d73c26205..c597d3d660dc8 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml
@@ -21,32 +21,44 @@
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
+
+
-
+
+
-
+
+
+
+
+
+
-
+
-
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml
index 2db3377e0e89e..a90c3536ec744 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml
@@ -8,7 +8,7 @@
-
+
@@ -19,33 +19,19 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
-
+
-
-
-
-
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml
index df666ecab817b..3c0c171fdfe9e 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml
@@ -21,32 +21,44 @@
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
+
+
-
+
+
-
+
+
+
+
+
+
-
+
-
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml
index fec2365431862..c60ef95c8edce 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml
@@ -21,27 +21,36 @@
-
+
-
-
+
+
+
+
-
-
+
+
+
+
+
+
-
+
+
+
+
@@ -51,7 +60,7 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminDeleteActiveTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminDeleteActiveTextTermEntityTest.xml
new file mode 100644
index 0000000000000..1e17dcc675573
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminDeleteActiveTextTermEntityTest.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml
index 7ffabcfa51215..3e680ce83f00e 100644
--- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledHtmlTermEntityTest.xml
new file mode 100644
index 0000000000000..f9d60796d0424
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledHtmlTermEntityTest.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledTextTermEntityTest.xml
new file mode 100644
index 0000000000000..198a9fe3fc7b4
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateDisabledTextTermEntityTest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateEnabledTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateEnabledTextTermEntityTest.xml
new file mode 100644
index 0000000000000..f82840bc07c7d
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminUpdateEnabledTextTermEntityTest.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockDisabledActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockDisabledActionGroup.xml
new file mode 100644
index 0000000000000..5c02822bedd4a
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockDisabledActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockEnabledActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockEnabledActionGroup.xml
new file mode 100644
index 0000000000000..4ba17decb82ab
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSetCMSBlockEnabledActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontNoTextOnCategoryPageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontNoTextOnCategoryPageActionGroup.xml
new file mode 100644
index 0000000000000..8ca93004c4e1d
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontNoTextOnCategoryPageActionGroup.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontTextOnCategoryPageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontTextOnCategoryPageActionGroup.xml
new file mode 100644
index 0000000000000..aa761854a10fa
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertStorefrontTextOnCategoryPageActionGroup.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection/BlockNewPageBasicFieldsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection/BlockNewPageBasicFieldsSection.xml
index 9b358dcb25769..9b6b00602b753 100644
--- a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection/BlockNewPageBasicFieldsSection.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection/BlockNewPageBasicFieldsSection.xml
@@ -13,5 +13,6 @@
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml
index a577f9853ea1d..7c2aedceb9b7e 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml
index 3c6d70dc53418..446ef1b9f3b93 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml
index 036efab75f963..e3fe278c4449e 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml
index 1b3a7e74af08f..4bb56dddec963 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml
index a097a6d11403e..596503cd8faab 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml
index 9c2f1abc4d522..aac56e16a53c4 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest.xml
index 8114310e46f73..0644542ccc0f3 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml
index 4c9ef31b0d202..9a02104d8d6ef 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateAndDisableTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateAndDisableTest.xml
new file mode 100644
index 0000000000000..24d61311e8951
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateAndDisableTest.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateTest.xml
new file mode 100644
index 0000000000000..6e05828726e7d
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageUpdateTest.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml
index 99990595fca95..0eac31c891e64 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml
index bb15904540be4..7d3946ea86c92 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml
index c7726e7e427ce..bd24e4b082edc 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockWithMarginalSpaceTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockWithMarginalSpaceTest.xml
index 07f033b18ea39..f2c84dea13f97 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockWithMarginalSpaceTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockWithMarginalSpaceTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDisabledCmsBlockEntityAndAssignToCategoryTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDisabledCmsBlockEntityAndAssignToCategoryTest.xml
new file mode 100644
index 0000000000000..51fbbf8020545
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDisabledCmsBlockEntityAndAssignToCategoryTest.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateEnabledCmsBlockEntityAndAssignToCategoryTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateEnabledCmsBlockEntityAndAssignToCategoryTest.xml
new file mode 100644
index 0000000000000..5ccd8fa713cc0
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateEnabledCmsBlockEntityAndAssignToCategoryTest.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml
index e2800c2ac3094..b1073c1a0f41d 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml
index 58adae02298b7..c69cd620b1d72 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
index 8d4326040c919..fe3e69880fc5c 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml
index a73e41de6b861..2fd31fffa838d 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
index 32fa1d13023de..9e05f4819cd73 100644
--- a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
+++ b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml
index 9700d8024ce8f..d4fcbb06ea2d3 100644
--- a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml
+++ b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml
index 9e96b5847b8e7..0d83cc6610194 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml
index 07d9719b24d96..72ebd7962f420 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml
index a6c3794a2d622..d58e7cfab1350 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml
index c6a277295632b..8962efbb8dd26 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml
index 21619ca911d8a..7d75f5d53c1f4 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml
@@ -69,7 +69,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml
index 2a2ef1947fdab..dc8c09864d0ab 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminConfigurableProductCreateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminConfigurableProductCreateTest.xml
index 9bd4161a80cf7..59da88874f5b2 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminConfigurableProductCreateTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminConfigurableProductCreateTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminCreateConfigurableProductAfterGettingIncorrectSKUMessageTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminCreateConfigurableProductAfterGettingIncorrectSKUMessageTest.xml
index ab0336637c12c..274a75aedbc5f 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminCreateConfigurableProductAfterGettingIncorrectSKUMessageTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest/AdminCreateConfigurableProductAfterGettingIncorrectSKUMessageTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductBulkDeleteTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductBulkDeleteTest.xml
index 7c474a135c334..a7615d5565828 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductBulkDeleteTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductBulkDeleteTest.xml
@@ -120,7 +120,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductDeleteTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductDeleteTest.xml
index de904cf854171..807ea69bb3958 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductDeleteTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest/AdminConfigurableProductDeleteTest.xml
@@ -80,7 +80,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
index 9d01438a3c423..10cdcea2855d6 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductChildrenOutOfStockTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductChildrenOutOfStockTest.xml
index a5d7e97c33b66..8d2f80ef262fd 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductChildrenOutOfStockTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductChildrenOutOfStockTest.xml
@@ -72,7 +72,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockAndDeleteCombinationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockAndDeleteCombinationTest.xml
index d0f686f9cbc0a..3121725c23fe9 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockAndDeleteCombinationTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockAndDeleteCombinationTest.xml
@@ -72,7 +72,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockTestDeleteChildrenTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockTestDeleteChildrenTest.xml
index e9fc3443a9d56..2e8bf8ff66933 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockTestDeleteChildrenTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockTestDeleteChildrenTest.xml
@@ -72,7 +72,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductFilterByTypeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductFilterByTypeTest.xml
index 4dd73ea3ce562..a35ef058dfd80 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductFilterByTypeTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductFilterByTypeTest.xml
@@ -63,7 +63,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductSearchTest.xml
index d2d5aa969bd50..6d9015b5d1cbf 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductSearchTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest/AdminConfigurableProductSearchTest.xml
@@ -63,7 +63,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateAttributeTest.xml
index 4f1ab935a84d6..4b6baf8c58493 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateAttributeTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateAttributeTest.xml
@@ -91,7 +91,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateChildAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateChildAttributeTest.xml
index 8b7fc64d265a0..56f53519e69af 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateChildAttributeTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest/AdminConfigurableProductUpdateChildAttributeTest.xml
@@ -76,7 +76,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductAddConfigurationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductAddConfigurationTest.xml
index a6301978dc96f..589f20d0d544c 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductAddConfigurationTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductAddConfigurationTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
index b2a2c1300d00a..bd409d0e4bfde 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductDisableAnOptionTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductDisableAnOptionTest.xml
index bd1b17ca46099..1eb3df993dd1c 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductDisableAnOptionTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductDisableAnOptionTest.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveAnOptionTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveAnOptionTest.xml
index 09407c40db8a1..00b17fda944f1 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveAnOptionTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveAnOptionTest.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveConfigurationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveConfigurationTest.xml
index 68d6423b43c07..bef7d26c5007f 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveConfigurationTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductRemoveConfigurationTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml
index 6f5e8ddd54759..796a4628393bb 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateDownloadableProductSwitchToConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateDownloadableProductSwitchToConfigurableTest.xml
index 7593242c4f716..db5c824341c57 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateDownloadableProductSwitchToConfigurableTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateDownloadableProductSwitchToConfigurableTest.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml
index 41ba0fc048120..78cbca2d4c099 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
index cef95ec7835d0..3913139c9b7e6 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
index 261b307a0718c..3bf5666d5a997 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
index 7d863b299f384..fa8866fa7d91c 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
@@ -42,7 +42,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
index 14304d93b3c28..e76d14f3a6aae 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
@@ -57,7 +57,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
index c6bb6fdf7e7e8..9516216d4a62e 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
@@ -57,7 +57,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml
index 96ffecaf337ae..660eb82a9eacb 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml
@@ -50,7 +50,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
index 4c39b0c2a54fb..f57fc81294cbc 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
index 31851fc78968b..977eb2bdba0fe 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml
index 68f86a7d07890..e625a1cf6f2be 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
index e7006591c2a8f..c5fdbfb36490a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToConfigurableProductTest.xml
index 43f00fcef9993..90a396b970c3a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToConfigurableProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml
index d9300ad1b290b..b6b3d21c8a626 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml
@@ -78,7 +78,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml
index a1a1bb5c8a35a..86d4070a9a2c8 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductAttributeNameDesignTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductAttributeNameDesignTest.xml
index bb16d04dfc94a..e064e635de1cd 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductAttributeNameDesignTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductAttributeNameDesignTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
index 23c3de4675718..a34dfd06ce844 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
@@ -64,7 +64,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml
index 18993269ab0b1..c2ac4dde21c35 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
index e0263c5c011b9..54e23470ae786 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
@@ -20,7 +20,7 @@
-
+
@@ -161,7 +161,12 @@
-
-
+
+
+
+
+
+
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml
index a2cfd47eb3402..355c4fa049f01 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
index d52cf1978d7fe..10ea3a7e400c4 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
@@ -114,7 +114,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductBasicInfoTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductBasicInfoTest.xml
index fa635dfb94e78..317563a468d74 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductBasicInfoTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductBasicInfoTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCanAddToCartTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCanAddToCartTest.xml
index a9e3d725bb079..9fc6dce10c21a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCanAddToCartTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCanAddToCartTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCantAddToCartTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCantAddToCartTest.xml
index 154fcca60ed6b..01859f995b00b 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCantAddToCartTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCantAddToCartTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductOptionsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductOptionsTest.xml
index 88171e3668119..1aef8c33785ca 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductOptionsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductOptionsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductVariationsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductVariationsTest.xml
index 4dc6030e2ce4c..e51250c76bfe7 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductVariationsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductVariationsTest.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductAddToCartTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductAddToCartTest.xml
index d1768783e46e6..1fee355ad5e44 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductAddToCartTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductAddToCartTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
index 009a5008875e5..ca0426f1b97d5 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductListViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductListViewTest.xml
index 7097641c67530..619e50acba848 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductListViewTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductListViewTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml
index 4de8dedefab48..ac14b9b299b98 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithSeveralAttributesPrependMediaTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithSeveralAttributesPrependMediaTest.xml
index 9d48546e1ad3a..a50d1e32d3614 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithSeveralAttributesPrependMediaTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithSeveralAttributesPrependMediaTest.xml
@@ -42,7 +42,7 @@
-
+
@@ -158,7 +158,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithVisualSwatchAttributePrependMediaTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithVisualSwatchAttributePrependMediaTest.xml
index ac3c2497d9dfb..be81b64c7ed25 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithVisualSwatchAttributePrependMediaTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithVisualSwatchAttributePrependMediaTest.xml
@@ -36,7 +36,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
index ddb8190c076ee..7662779a6955f 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
@@ -84,7 +84,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
index 308a56860a661..ef9f71da0ebca 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
@@ -90,7 +90,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
index 618881906c47d..7acece767760d 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
index aa9b0ac01872a..6126338461fdd 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js b/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js
index c25096121be5d..b2208686e7fab 100644
--- a/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js
+++ b/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js
@@ -8,5 +8,12 @@ var config = {
'*': {
configurable: 'Magento_ConfigurableProduct/js/configurable'
}
+ },
+ config: {
+ mixins: {
+ 'Magento_Catalog/js/catalog-add-to-cart': {
+ 'Magento_ConfigurableProduct/js/catalog-add-to-cart-mixin': true
+ }
+ }
}
};
diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart-mixin.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart-mixin.js
new file mode 100644
index 0000000000000..88bb2ab75dc1d
--- /dev/null
+++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart-mixin.js
@@ -0,0 +1,33 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+define([
+ 'underscore',
+ 'jquery',
+ 'Magento_ConfigurableProduct/js/product/view/product-info-resolver'
+], function (_, $, productInfoResolver) {
+ 'use strict';
+
+ return function (widget) {
+
+ $.widget('mage.catalogAddToCart', widget, {
+ /**
+ * @param {jQuery} form
+ */
+ ajaxSubmit: function (form) {
+ var isConfigurable = !!_.find(form.serializeArray(), function (item) {
+ return item.name.indexOf('super_attribute') !== -1;
+ });
+
+ if (isConfigurable) {
+ this.options.productInfoResolver = productInfoResolver;
+ }
+
+ return this._super(form);
+ }
+ });
+
+ return $.mage.catalogAddToCart;
+ };
+});
diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/product/view/product-info-resolver.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/product/view/product-info-resolver.js
new file mode 100644
index 0000000000000..679632606c72d
--- /dev/null
+++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/product/view/product-info-resolver.js
@@ -0,0 +1,47 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+define([
+ 'underscore',
+ 'Magento_Catalog/js/product/view/product-info'
+], function (_, productInfo) {
+ 'use strict';
+
+ /**
+ * Returns info about configurable products in form.
+ *
+ * @param {jQuery} $form
+ * @return {Array}
+ */
+ return function ($form) {
+ var optionValues = [],
+ product = _.findWhere($form.serializeArray(), {
+ name: 'product'
+ }),
+ productId;
+
+ if (!_.isUndefined(product)) {
+ productId = product.value;
+ _.each($form.serializeArray(), function (item) {
+ if (item.name.indexOf('super_attribute') !== -1) {
+ optionValues.push(item.value);
+ }
+ });
+ optionValues.sort();
+ productInfo().push(
+ {
+ 'id': productId,
+ 'optionValues': optionValues
+ }
+ );
+ }
+
+ return _.uniq(productInfo(), function (item) {
+ var optionValuesStr = item.optionValues ? item.optionValues.join() : '';
+
+ return item.id + optionValuesStr;
+ });
+ };
+});
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
index eb3ca4f977c65..5d6d05ebfead4 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml
index 7e1cb41871d43..f4d6180bae88a 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml
index 8f87246bcf018..ce9b05882d494 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml
index 8c61bd4434fff..146671e36af68 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml
index a5781698deed4..95f1eebee6c87 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml
index 65afd4e2e744a..254b0fc6058f8 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php
index e020de79a3a60..90ce9ba210ed2 100644
--- a/app/code/Magento/Customer/Block/Widget/Dob.php
+++ b/app/code/Magento/Customer/Block/Widget/Dob.php
@@ -9,7 +9,7 @@
use Magento\Framework\Api\ArrayObjectSearch;
/**
- * Class Dob
+ * Customer date of birth attribute block
*
* @SuppressWarnings(PHPMD.DepthOfInheritance)
*/
@@ -267,7 +267,9 @@ public function getHtmlExtraParams()
$validators['validate-date'] = [
'dateFormat' => $this->getDateFormat()
];
- $validators['validate-dob'] = true;
+ $validators['validate-dob'] = [
+ 'dateFormat' => $this->getDateFormat()
+ ];
return 'data-validate="' . $this->_escaper->escapeHtml(json_encode($validators)) . '"';
}
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerShowDateOfBirthActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerShowDateOfBirthActionGroup.xml
new file mode 100644
index 0000000000000..009c37c568c44
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerShowDateOfBirthActionGroup.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ Goes to the customer configuration. Set "Show Date of Birth" with provided value.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupEditPageFromGridActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupEditPageFromGridActionGroup.xml
new file mode 100644
index 0000000000000..f27f418496204
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupEditPageFromGridActionGroup.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupsGridPageActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupsGridPageActionGroup.xml
new file mode 100644
index 0000000000000..d6fd64426e3cf
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminOpenCustomerGroupsGridPageActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertDeleteCustomerGroupButtonMissingActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertDeleteCustomerGroupButtonMissingActionGroup.xml
new file mode 100644
index 0000000000000..e45490e6330e5
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertDeleteCustomerGroupButtonMissingActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertStorefrontAccountPasswordFieldsNotAvailableActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertStorefrontAccountPasswordFieldsNotAvailableActionGroup.xml
new file mode 100644
index 0000000000000..1e828414935da
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertStorefrontAccountPasswordFieldsNotAvailableActionGroup.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerChangePasswordActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerChangePasswordActionGroup.xml
new file mode 100644
index 0000000000000..802b75213825b
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerChangePasswordActionGroup.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerCreateAccountWithDateOfBirthActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerCreateAccountWithDateOfBirthActionGroup.xml
new file mode 100644
index 0000000000000..22af2752ed1a5
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerCreateAccountWithDateOfBirthActionGroup.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ EXTENDS: SignUpNewUserFromStorefrontActionGroup. Fills birthday field.
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontNavigateToAccountInformationChangeActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontNavigateToAccountInformationChangeActionGroup.xml
new file mode 100644
index 0000000000000..68ab140ff0899
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontNavigateToAccountInformationChangeActionGroup.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AdminCustomerConfigData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AdminCustomerConfigData.xml
new file mode 100644
index 0000000000000..53963b1e95fbd
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Data/AdminCustomerConfigData.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ No
+ Optional
+ Required
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Data/DateData.xml b/app/code/Magento/Customer/Test/Mftf/Data/DateData.xml
new file mode 100644
index 0000000000000..5fbb1c279e38e
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Data/DateData.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 9/21/93
+ 9/21/1993
+ Sep 21, 1993
+ September 21, 1993
+ Tuesday, September 21, 1993
+
+
+ 21/09/1993
+ 21/09/1993
+ 21 sept. 1993
+ 21 septembre 1993
+ mardi 21 septembre 1993
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerConfigSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerConfigSection.xml
index a934d71397b8c..f8a441e40a792 100644
--- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerConfigSection.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerConfigSection.xml
@@ -11,5 +11,7 @@
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerGroupSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerGroupSection.xml
new file mode 100644
index 0000000000000..917af88338d24
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerGroupSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection/StorefrontCustomerCreateFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection/StorefrontCustomerCreateFormSection.xml
index 0fb05c319c90a..6b65ef861472c 100644
--- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection/StorefrontCustomerCreateFormSection.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection/StorefrontCustomerCreateFormSection.xml
@@ -11,6 +11,7 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml
index 59326317e74b1..b061b6a256471 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml
index 30c441796c435..423954a7d9bf7 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml
index 908977da25d36..a7383af2d7eea 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
index aa23fc0670a88..ab5e332aeed64 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
index d7c4fb2d68772..0bf221d49ab74 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml
index dd065adc7f417..c660ce031422e 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml
index 436d7838fc6b7..3488d2c94dd69 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
index 1cf73e97f91df..64e8520323184 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml
index 3482f150ebaad..5f496e2c5fba3 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml
index 7d19f2fcf096b..da2eed2006434 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
index e16a01bc3222b..52a2483096aaf 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml
index 6b2655b5deaaf..591cb2dd2845a 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml
index 7889f2be57a4c..081695f7ebe1e 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
index 3810da9d62427..5440339e3a95e 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml
index 116ba3773efff..8fe6e220c4aed 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml
index 49d23c7787554..da25139ee8e60 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml
index e0c1c0012f5bc..e8198cb79262e 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml
index d89b755492cec..3416c64a7e9d7 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
index 06c0593ad00c4..affcf6ddbe6ca 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml
index d4551c0cd0af9..4850a6faf438a 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml
index 7c1a0722ef912..bc0c3e00d75aa 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersDeleteSystemCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersDeleteSystemCustomerGroupTest.xml
new file mode 100644
index 0000000000000..124f086044f76
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersDeleteSystemCustomerGroupTest.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml
index 828fc60f0b77f..8d5535a48f8a3 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
index b21f2a795bde7..8494a94f0c122 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
index 05926e7aefc92..340295df04da2 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml
index 14a89df5eb0a5..03691eb7e7b72 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
index 98a9414f29885..1630743da4922 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml
index c998babacb575..6e44fe96b0d7b 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml
index 1822f427ec389..ea4b3645d371f 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml
@@ -23,7 +23,7 @@
"Jane Doe"
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml
index 0eeab8cb36c2e..77422c6e8da3f 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml
index 3e65c688e3474..4c4175bb32198 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
index afe8dbef99916..5721c46d5e4b9 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
index 6be675140c555..10da9284d45dc 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml
index 96a614da0b379..5ce96a8dcab3c 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml
index ae26519d9618e..a9832c86562f1 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
index b344458363999..c9805ebcc90ed 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
index a6ccfda4939f9..0d550416167aa 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml
index 72661e4505322..72064617ef33b 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml
index 41efec9d87b18..d78d676a822d9 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml
index e9b0e1723c6ba..2aa85f8c966a9 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest/ChangingSingleCustomerGroupViaGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest/ChangingSingleCustomerGroupViaGridTest.xml
index ce6ba7ce05e16..0edadb86888f5 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest/ChangingSingleCustomerGroupViaGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest/ChangingSingleCustomerGroupViaGridTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml
index b03478c5be684..e32ae04495fe5 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
index 501baca64318f..86218647778e6 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
@@ -24,10 +24,10 @@
-
+
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml
index 0d9f17096b26e..d4351c8bcdc84 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml
index d154893f70588..9b4e7716f4a25 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
index 6c6ce5c8619e8..317f2c2825ca7 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
@@ -106,7 +106,7 @@
-
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml
new file mode 100644
index 0000000000000..8cd35f4147636
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
index 1fd7fc340e542..59660ec345814 100644
--- a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php
@@ -29,6 +29,7 @@
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
class DobTest extends TestCase
{
@@ -542,18 +543,30 @@ public function testGetMaxDateRangeWithException()
*/
public function testGetHtmlExtraParamsWithoutRequiredOption()
{
+ $validation = json_encode(
+ [
+ 'validate-date' => [
+ 'dateFormat' => self::DATE_FORMAT
+ ],
+ 'validate-dob' => [
+ 'dateFormat' => self::DATE_FORMAT
+ ],
+ ]
+ );
$this->escaper->expects($this->any())
->method('escapeHtml')
- ->with('{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}')
- ->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}'));
+ ->with($validation)
+ ->will(
+ $this->returnValue($validation)
+ );
$this->attribute->expects($this->once())
->method("isRequired")
->willReturn(false);
$this->assertEquals(
- $this->_block->getHtmlExtraParams(),
- 'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}"'
+ "data-validate=\"$validation\"",
+ $this->_block->getHtmlExtraParams()
);
}
@@ -562,22 +575,31 @@ public function testGetHtmlExtraParamsWithoutRequiredOption()
*/
public function testGetHtmlExtraParamsWithRequiredOption()
{
+ $validation = json_encode(
+ [
+ 'required' => true,
+ 'validate-date' => [
+ 'dateFormat' => self::DATE_FORMAT
+ ],
+ 'validate-dob' => [
+ 'dateFormat' => self::DATE_FORMAT
+ ],
+ ]
+ );
$this->attribute->expects($this->once())
->method("isRequired")
->willReturn(true);
$this->escaper->expects($this->any())
->method('escapeHtml')
- ->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}')
+ ->with($validation)
->will(
- $this->returnValue(
- '{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}'
- )
+ $this->returnValue($validation)
);
$this->context->expects($this->any())->method('getEscaper')->will($this->returnValue($this->escaper));
$this->assertEquals(
- 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}"',
+ "data-validate=\"$validation\"",
$this->_block->getHtmlExtraParams()
);
}
diff --git a/app/code/Magento/Customer/Test/Unit/ViewModel/Customer/WebsiteTest.php b/app/code/Magento/Customer/Test/Unit/ViewModel/Customer/WebsiteTest.php
new file mode 100644
index 0000000000000..50862fa36f0f9
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Unit/ViewModel/Customer/WebsiteTest.php
@@ -0,0 +1,105 @@
+systemStore = $this->createMock(SystemStore::class);
+ $this->scopeConfig = $this->createMock(ScopeConfigInterface::class);
+ $this->objectManagerHelper = new ObjectManagerHelper($this);
+ $this->customerWebsite = $this->objectManagerHelper->getObject(
+ CustomerWebsite::class,
+ [
+ 'systemStore' => $this->systemStore,
+ 'scopeConfig' => $this->scopeConfig
+ ]
+ );
+ }
+
+ /**
+ * Test that method return correct array of options
+ *
+ * @param array $options
+ * @dataProvider dataProviderOptionsArray
+ * @return void
+ */
+ public function testToOptionArray(array $options): void
+ {
+ $this->scopeConfig->method('getValue')
+ ->willReturn(1);
+
+ $this->systemStore->method('getWebsiteValuesForForm')
+ ->willReturn([
+ [
+ 'label' => 'Main Website',
+ 'value' => '1',
+ ],
+ [
+ 'label' => 'Second Website',
+ 'value' => '2',
+ ],
+ ]);
+
+ $this->assertEquals($options, $this->customerWebsite->toOptionArray());
+ }
+
+ /**
+ * Data provider for testToOptionArray test
+ *
+ * @return array
+ */
+ public function dataProviderOptionsArray(): array
+ {
+ return [
+ [
+ 'options' => [
+ [
+ 'label' => 'Main Website',
+ 'value' => '1',
+ 'group_id' => '1',
+ ],
+ [
+ 'label' => 'Second Website',
+ 'value' => '2',
+ 'group_id' => '1',
+ ],
+ ],
+ ],
+ ];
+ }
+}
diff --git a/app/code/Magento/Customer/ViewModel/Customer/Website.php b/app/code/Magento/Customer/ViewModel/Customer/Website.php
new file mode 100644
index 0000000000000..bb25f4766aa77
--- /dev/null
+++ b/app/code/Magento/Customer/ViewModel/Customer/Website.php
@@ -0,0 +1,74 @@
+systemStore = $systemStore;
+ $this->scopeConfig = $scopeConfig;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function toOptionArray(): array
+ {
+ return $this->getWebsiteOptions();
+ }
+
+ /**
+ * Adding group ID to options list
+ *
+ * @return array
+ */
+ private function getWebsiteOptions(): array
+ {
+ $options = $this->systemStore->getWebsiteValuesForForm();
+ foreach ($options as $key => $option) {
+ $websiteId = $option['value'];
+ $groupId = $this->scopeConfig->getValue(
+ GroupManagement::XML_PATH_DEFAULT_ID,
+ ScopeInterface::SCOPE_WEBSITE,
+ $websiteId
+ );
+ $options[$key]['group_id'] = $groupId;
+ }
+
+ return $options;
+ }
+}
diff --git a/app/code/Magento/Customer/view/adminhtml/web/js/form/element/website.js b/app/code/Magento/Customer/view/adminhtml/web/js/form/element/website.js
new file mode 100644
index 0000000000000..7c2f6489a51d3
--- /dev/null
+++ b/app/code/Magento/Customer/view/adminhtml/web/js/form/element/website.js
@@ -0,0 +1,30 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'Magento_Ui/js/form/element/website',
+ 'uiRegistry'
+], function (Website, registry) {
+ 'use strict';
+
+ return Website.extend({
+ /**
+ * On value change handler.
+ *
+ * @param {String} value
+ */
+ onUpdate: function (value) {
+ var groupIdFieldKey = 'group_id',
+ groupId = registry.get('index = ' + groupIdFieldKey),
+ option = this.getOption(value);
+
+ if (groupId) {
+ groupId.value(option[groupIdFieldKey]);
+ }
+
+ return this._super();
+ }
+ });
+});
diff --git a/app/code/Magento/Customer/view/base/ui_component/customer_form.xml b/app/code/Magento/Customer/view/base/ui_component/customer_form.xml
index d5c7154a30f54..b9487037da2cc 100644
--- a/app/code/Magento/Customer/view/base/ui_component/customer_form.xml
+++ b/app/code/Magento/Customer/view/base/ui_component/customer_form.xml
@@ -117,7 +117,7 @@
false
-
+
-
- customer
@@ -136,6 +136,13 @@
${ $.provider }:data.customer.entity_id
+
+
+
diff --git a/app/code/Magento/Customer/view/frontend/web/js/validation.js b/app/code/Magento/Customer/view/frontend/web/js/validation.js
index 573556f0f33a2..1f7f24d5ac031 100644
--- a/app/code/Magento/Customer/view/frontend/web/js/validation.js
+++ b/app/code/Magento/Customer/view/frontend/web/js/validation.js
@@ -1,20 +1,23 @@
define([
'jquery',
'moment',
+ 'mageUtils',
'jquery/validate',
'validation',
'mage/translate'
-], function ($, moment) {
+], function ($, moment, utils) {
'use strict';
$.validator.addMethod(
'validate-dob',
- function (value) {
+ function (value, element, params) {
+ var dateFormat = utils.convertToMomentFormat(params.dateFormat);
+
if (value === '') {
return true;
}
- return moment(value).isBefore(moment());
+ return moment(value, dateFormat).isBefore(moment());
},
$.mage.__('The Date of Birth should not be greater than today.')
);
diff --git a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml
index 51fd2facab3b0..5f3504fe0921e 100644
--- a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml
+++ b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml
index e5633707824dd..c634a8426eac0 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml
index 8a0c6d478ecfc..650cfd5ba8198 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml
index 9a1f1273a41fd..c4d1f57e10aea 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml
index 8e08ae813faed..f1ea344d4e45c 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
index 865f392f7c841..850a73cd354a5 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml
index 7fcb70b169ab7..ba2e5e89005cf 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml
index 6ec42335e60e3..9ae046210181b 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml
index e9a6efc49b635..0ff7c9bab26ca 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml
index 16d88c16073cb..5615c66762c52 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml
index 307eb43273dbd..f1d00d83b6666 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml
index 092129dc1ba1e..fb0532d9d1fbe 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml
index 63796a197e586..50a2215d441ad 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml
index 3d01168613ecc..7062b15aeedbf 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToDownloadableProductTest.xml
index a9ceb5e057c3f..aa94de681de1d 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToDownloadableProductTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml
index e4a3be9494268..27d3d3d10a0b7 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml
index 3d9229a4b0854..30e31be6c8ec4 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml
index 7eea3926f450c..4a7f1dde227da 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml
index 2ce0272852711..0ed826e944a4f 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
index 919fe4b3c645e..1529750cbb293 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml
@@ -84,7 +84,7 @@
-
+
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml
index 4b959b043be2b..99dd88ec6fc56 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml
@@ -36,7 +36,7 @@
-
+
@@ -56,6 +56,6 @@
-
+
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
index 532975eddabbe..a94a6a2e3d133 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
index c48f0d63b06ca..fc66db636bb17 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
@@ -46,7 +46,7 @@
-
+
@@ -57,7 +57,7 @@
-
+
diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
index 9ffd69b65ea19..2bdbe58ecd97e 100644
--- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
+++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml
index 49aef41d7f31c..93a2938d86f26 100644
--- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml
+++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml b/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml
index 92f4b79b09be2..0d9ca6a2c195a 100644
--- a/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml
+++ b/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml b/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml
index 28e77ee399737..2dace58274e29 100644
--- a/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml
+++ b/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml
index 04430661a62a4..0d73802268ad1 100644
--- a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml
+++ b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml
index 0674fd12ebead..427be2edd1184 100644
--- a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml
+++ b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
index dd4512c969453..3850bfabc0c34 100644
--- a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
+++ b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml b/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml
index bc1983344ce88..3010c32cd3ed8 100644
--- a/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml
+++ b/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml
index d71ee505f8356..04b704b9193ca 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
index d23013a6157c9..bd6785eb5e41b 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml
index c6228e674aa34..b842dad9c8c4e 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml
index ebcdc0623cd75..b88f909d977ab 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml
index 7657c9a86a62b..6514b5ddc5f78 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml
index 452b55b835739..053949fa20fb2 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml
index dd4619c5c2ce1..7f03765720069 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/GroupedProduct/view/frontend/web/js/product-ids-resolver.js b/app/code/Magento/GroupedProduct/view/frontend/web/js/product-ids-resolver.js
index e6294d8043a50..ea5f841d738a3 100644
--- a/app/code/Magento/GroupedProduct/view/frontend/web/js/product-ids-resolver.js
+++ b/app/code/Magento/GroupedProduct/view/frontend/web/js/product-ids-resolver.js
@@ -4,8 +4,9 @@
*/
define([
'jquery',
- 'Magento_Catalog/js/product/view/product-ids'
-], function ($, productIds) {
+ 'Magento_Catalog/js/product/view/product-ids',
+ 'Magento_Catalog/js/product/view/product-info'
+], function ($, productIds, productInfo) {
'use strict';
/**
@@ -18,6 +19,11 @@ define([
return function (config, element) {
$(element).find('div[data-product-id]').each(function () {
productIds.push($(this).data('productId').toString());
+ productInfo.push(
+ {
+ 'id': $(this).data('productId').toString()
+ }
+ );
});
return productIds();
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml
index 2d891982e8306..a45783767e6a2 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml
index eba744e551037..98df7b8d8900e 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml
index b52d8ec729fc0..0c5bf2d3fcee3 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml
index 92f93736f237a..58ff334ee9f93 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml
index 91d1209f1f1b8..111ba187c6f26 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml
index 0bd447905fb47..583ceb0b2496f 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml
index 800e8203d19ce..503037401b9f7 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml
@@ -34,7 +34,7 @@
Api Downloadable Product for Test
Api Downloadable Product for Test
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml
index 1d3a45b79dc74..3c208eabc9558 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml
index c5926428daaa7..209bb3b48834f 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml
index e176052d7a280..b9b61a2ae28ee 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml
index 249f3b28f7a56..69fb7598848aa 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml
index b23e3703b5cfd..99622caf0697e 100644
--- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml
+++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
index f966ffc0b9158..84619a5213128 100644
--- a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
+++ b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
@@ -25,14 +25,14 @@
-
+
-
+
diff --git a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml
index cbe5161e40ee8..4c0c4940ec130 100644
--- a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml
+++ b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml
index 60598fdd27612..f55e4e37585ba 100644
--- a/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml
+++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml
index d1850fdc989fb..eb6c946a03bb5 100644
--- a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml
+++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml
index 483afc62c9808..41f7f3225255d 100644
--- a/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml
+++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
index b5fc483e251eb..6f2de31548ce0 100644
--- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
index 104850dea4403..2bfb1239cba60 100644
--- a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
+++ b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml
index 811af2baef56f..7ae23e8f871eb 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml
index de52d20542ce8..27876df8caefe 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml
index 90cc8b3952dde..f21a8d32d8841 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml
index 8f27fa35bde02..312fa95bf77af 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
index 5890ab49b2587..a49a37e475409 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
index 9a3d622b2e264..80407a219a841 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
index f37b45c639263..2925f2c5b1690 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml b/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml
index 5b4b92559f355..9b210db497e9a 100644
--- a/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml
+++ b/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml
index c094117870712..81fb69f557dfd 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml
index a5046b6fa4b71..9908e4a115820 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml
index 4c12765ebc2a0..bac6023b80446 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml
index 9765a65cd60db..441deff9a5cf9 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
index 4dbaa93b1d134..c8a846cb2a758 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
@@ -6,10 +6,10 @@
namespace Magento\Newsletter\Test\Unit\Model\Plugin;
use Magento\Customer\Api\CustomerRepositoryInterface;
+use Magento\Customer\Api\Data\CustomerExtensionInterface;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Model\Config\Share;
use Magento\Customer\Model\ResourceModel\CustomerRepository;
-use Magento\Customer\Api\Data\CustomerExtensionInterface;
use Magento\Framework\Api\ExtensionAttributesFactory;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Newsletter\Model\Plugin\CustomerPlugin;
@@ -134,7 +134,13 @@ public function testAfterSave(?int $originalStatus, ?bool $newValue, ?bool $expe
}
$this->subscriberFactory->method('create')->willReturn($subscriber);
- $customerExtension = $this->createPartialMock(CustomerExtensionInterface::class, ['getIsSubscribed']);
+ $customerExtension = $this->createPartialMock(
+ CustomerExtensionInterface::class,
+ [
+ 'getIsSubscribed',
+ 'CustomerExtensionInterface'
+ ]
+ );
$customerExtension->method('getIsSubscribed')->willReturn($newValue);
/** @var CustomerInterface|MockObject $customer */
$customer = $this->createMock(CustomerInterface::class);
@@ -152,7 +158,14 @@ public function testAfterSave(?int $originalStatus, ?bool $newValue, ?bool $expe
$this->subscriptionManager->expects($this->never())->method('subscribeCustomer');
$this->subscriptionManager->expects($this->never())->method('unsubscribeCustomer');
}
- $resultExtension = $this->createPartialMock(CustomerExtensionInterface::class, ['setIsSubscribed']);
+ $resultExtension = $this->createPartialMock(
+ CustomerExtensionInterface::class,
+ [
+ 'setIsSubscribed',
+ 'getIsSubscribed',
+ 'CustomerExtensionInterface'
+ ]
+ );
$resultExtension->expects($this->once())->method('setIsSubscribed')->with($resultIsSubscribed);
/** @var CustomerInterface|MockObject $result */
$result = $this->createMock(CustomerInterface::class);
@@ -291,7 +304,7 @@ public function testAfterGetByIdCreatesExtensionAttributes(): void
$customerExtension = $this->createPartialMock(
CustomerExtensionInterface::class,
- ['getIsSubscribed', 'setIsSubscribed']
+ ['getIsSubscribed', 'setIsSubscribed','CustomerExtensionInterface']
);
$customerExtension->expects($this->once())->method('setIsSubscribed')->with($subscribed);
$this->extensionFactory->expects($this->once())->method('create')->willReturn($customerExtension);
diff --git a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
index c94eed9dc6a57..d2c738398aae1 100644
--- a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
+++ b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
@@ -58,7 +58,7 @@
-
+
diff --git a/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml b/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml
index bd6f7ba362bf4..3b93ec1796838 100644
--- a/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml
+++ b/app/code/Magento/PageCache/Test/Mftf/Test/FlushStaticFilesCacheButtonVisibilityTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/SmartButton.php b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/SmartButton.php
index c6a17fa5efb9f..a4732a8b4c579 100644
--- a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/SmartButton.php
+++ b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/SmartButton.php
@@ -27,6 +27,8 @@ class SmartButton extends Template implements ShortcutInterface
{
private const ALIAS_ELEMENT_INDEX = 'alias';
+ const PAYPAL_BUTTON_ID = 'paypal-express-in-context-checkout-main';
+
/**
* @var Config
*/
diff --git a/app/code/Magento/Paypal/Controller/Hostedpro/Cancel.php b/app/code/Magento/Paypal/Controller/Hostedpro/Cancel.php
index 629431e13879c..981d63b88225c 100644
--- a/app/code/Magento/Paypal/Controller/Hostedpro/Cancel.php
+++ b/app/code/Magento/Paypal/Controller/Hostedpro/Cancel.php
@@ -1,15 +1,24 @@
_redirect('checkout', ['_fragment' => 'payment']);
}
+
+ /**
+ * @inheritDoc
+ */
+ public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
+ {
+ return null;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function validateForCsrf(RequestInterface $request): ?bool
+ {
+ return true;
+ }
}
diff --git a/app/code/Magento/Paypal/Controller/Hostedpro/ReturnAction.php b/app/code/Magento/Paypal/Controller/Hostedpro/ReturnAction.php
index 1643f480d25e9..bb8b5f8fa0b46 100644
--- a/app/code/Magento/Paypal/Controller/Hostedpro/ReturnAction.php
+++ b/app/code/Magento/Paypal/Controller/Hostedpro/ReturnAction.php
@@ -1,12 +1,23 @@
_redirect('checkout/onepage/success');
}
}
+
+ /**
+ * @inheritDoc
+ */
+ public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
+ {
+ return null;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function validateForCsrf(RequestInterface $request): ?bool
+ {
+ return true;
+ }
}
diff --git a/app/code/Magento/Paypal/Model/Ipn.php b/app/code/Magento/Paypal/Model/Ipn.php
index 0d7d5518f9c7d..4c128adfbd00e 100644
--- a/app/code/Magento/Paypal/Model/Ipn.php
+++ b/app/code/Magento/Paypal/Model/Ipn.php
@@ -8,6 +8,7 @@
use Exception;
use Magento\Framework\Exception\LocalizedException;
+use Magento\Sales\Model\Order;
use Magento\Sales\Model\Order\Email\Sender\CreditmemoSender;
use Magento\Sales\Model\Order\Email\Sender\OrderSender;
@@ -301,6 +302,9 @@ protected function _registerPaymentCapture($skipFraudDetection = false)
$payment->setParentTransactionId($parentTransactionId);
$payment->setShouldCloseParentTransaction('Completed' === $this->getRequestData('auth_status'));
$payment->setIsTransactionClosed(0);
+ if ($this->_order->getState() === Order::STATE_PENDING_PAYMENT) {
+ $this->_order->setState(Order::STATE_PROCESSING);
+ }
$payment->registerCaptureNotification(
$this->getRequestData('mc_gross'),
$skipFraudDetection && $parentTransactionId
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest/AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest/AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest.xml
index 1d2e8ce4ae156..ebdfb9e91ecf1 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest/AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest/AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml
index 62d77d8aae6f8..11b2c1e97b02f 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml
index ede251ddee647..c35e5dbe05e76 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml
index d2cdec73551d0..a18717344c7a3 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml
index 2f0013c43fd9e..140d2bcef28ae 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php b/app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php
index 53022e2db93f5..3de60edf1e648 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php
@@ -53,6 +53,7 @@ protected function setUp()
'getEmailSent',
'save',
'getState',
+ 'setState',
];
$this->_orderMock = $this->createPartialMock(\Magento\Sales\Model\OrderFactory::class, $methods);
$this->_orderMock->expects($this->any())->method('create')->will($this->returnSelf());
@@ -149,9 +150,12 @@ public function testPaymentReviewRegisterPaymentFraud()
->will($this->returnValue(true));
$this->_orderMock->expects($this->any())->method('getPayment')->will($this->returnValue($paymentMock));
$this->_orderMock->expects($this->any())->method('canFetchPaymentReviewUpdate')->will($this->returnValue(true));
- $this->_orderMock->expects($this->once())->method('getState')->will(
+ $this->_orderMock->expects($this->any())->method('getState')->will(
$this->returnValue(Order::STATE_PENDING_PAYMENT)
);
+ $this->_orderMock->expects($this->once())
+ ->method('setState')
+ ->with(Order::STATE_PROCESSING);
$this->_paypalInfo->expects($this->once())
->method('importToPayment')
->with(
diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
index ba98f5caeb15a..c102b21830de8 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
@@ -3,12 +3,12 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-use Magento\Paypal\Block\Express\InContext\Minicart\Button;
+use Magento\Paypal\Block\Express\InContext\Minicart\SmartButton;
/** @var \Magento\Paypal\Block\Express\InContext\Component $block */
$configuration = [
- 'id' => Button::PAYPAL_BUTTON_ID,
+ 'id' => SmartButton::PAYPAL_BUTTON_ID,
'path' => $block->getUrl(
'paypal/express/gettoken',
[
@@ -21,17 +21,18 @@ $configuration = [
'locale' => $block->getLocale(),
'environment' => $block->getEnvironment(),
'button' => [
- Button::PAYPAL_BUTTON_ID,
+ SmartButton::PAYPAL_BUTTON_ID,
]
]
];
?>
-
+
diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml
index 2aa43e9ef828d..dd24c6ae4279d 100644
--- a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml
+++ b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml
@@ -38,7 +38,7 @@
-
+
diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml
index 1f84200f856d9..461304ef7aeaa 100644
--- a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml
+++ b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml b/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml
index 440846e073f1b..96aa49a53081b 100644
--- a/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml
+++ b/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml b/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml
index dc9b74a8be36b..92ea0aa86000f 100644
--- a/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml
+++ b/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php b/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php
index 2c487cdea63fa..8f7e6504cb7d8 100644
--- a/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php
+++ b/app/code/Magento/Quote/Model/Cart/CartTotalRepository.php
@@ -3,6 +3,9 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+
+declare(strict_types=1);
+
namespace Magento\Quote\Model\Cart;
use Magento\Quote\Api;
@@ -12,9 +15,11 @@
use Magento\Framework\Api\ExtensibleDataInterface;
use Magento\Quote\Model\Cart\Totals\ItemConverter;
use Magento\Quote\Api\CouponManagementInterface;
+use Magento\Quote\Api\Data\TotalsInterface as QuoteTotalsInterface;
/**
* Cart totals data object.
+ *
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CartTotalRepository implements CartTotalRepositoryInterface
@@ -79,11 +84,8 @@ public function __construct(
/**
* @inheritdoc
- *
- * @param int $cartId The cart ID.
- * @return Totals Quote totals data.
*/
- public function get($cartId)
+ public function get($cartId): QuoteTotalsInterface
{
/** @var \Magento\Quote\Model\Quote $quote */
$quote = $this->quoteRepository->getActive($cartId);
@@ -96,17 +98,14 @@ public function get($cartId)
}
unset($addressTotalsData[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
- /** @var \Magento\Quote\Api\Data\TotalsInterface $quoteTotals */
+ /** @var QuoteTotalsInterface $quoteTotals */
$quoteTotals = $this->totalsFactory->create();
$this->dataObjectHelper->populateWithArray(
$quoteTotals,
$addressTotalsData,
- \Magento\Quote\Api\Data\TotalsInterface::class
+ QuoteTotalsInterface::class
);
- $items = [];
- foreach ($quote->getAllVisibleItems() as $index => $item) {
- $items[$index] = $this->itemConverter->modelToDataObject($item);
- }
+ $items = array_map([$this->itemConverter, 'modelToDataObject'], $quote->getAllVisibleItems());
$calculatedTotals = $this->totalsConverter->process($addressTotals);
$quoteTotals->setTotalSegments($calculatedTotals);
diff --git a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
index 5f5138d6b9495..12427c2caec25 100644
--- a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
+++ b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
@@ -103,7 +103,7 @@
-
+
diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php
index 804f0863d2d2a..8c67ff4314b17 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php
@@ -4,73 +4,104 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+
+declare(strict_types=1);
+
namespace Magento\Quote\Test\Unit\Model\Cart;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\Api\DataObjectHelper;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Quote\Api\CartRepositoryInterface;
+use Magento\Quote\Api\CouponManagementInterface;
+use Magento\Quote\Api\Data\TotalSegmentInterface;
+use Magento\Quote\Model\Cart\CartTotalRepository;
+use Magento\Quote\Model\Cart\Totals\ItemConverter;
+use Magento\Quote\Model\Quote;
+use Magento\Quote\Model\Quote\Address;
+use Magento\Quote\Model\Quote\Item as QuoteItem;
+use Magento\Quote\Model\Cart\TotalsConverter;
+use Magento\Quote\Api\Data\TotalsInterfaceFactory;
+use Magento\Quote\Api\Data\TotalsInterface as QuoteTotalsInterface;
+use PHPUnit\Framework\TestCase;
+use PHPUnit\Framework\MockObject\MockObject;
/**
+ * Test Cart totals object for class \Magento\Quote\Model\Cart\CartTotalRepository
+ *
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
-class CartTotalRepositoryTest extends \PHPUnit\Framework\TestCase
+class CartTotalRepositoryTest extends TestCase
{
+ private const STUB_CART_ID = 12;
+
+ private const STUB_ITEMS_QTY = 100;
+
+ private const STUB_CURRENCY_CODE = 'en_US';
+
+ private const STUB_COUPON = 'coupon';
+
/**
- * @var ObjectManager
+ * @var ObjectManagerHelper
*/
protected $objectManager;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var ItemConverter|MockObject
*/
protected $converterMock;
/**
- * @var \Magento\Quote\Model\Cart\CartTotalRepository
+ * @var CartTotalRepository
*/
protected $model;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var CartRepositoryInterface|MockObject
*/
private $quoteRepositoryMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var MockObject
*/
private $quoteMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var TotalsInterfaceFactory|MockObject
*/
private $totalsFactoryMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var MockObject
*/
protected $addressMock;
/**
- * @var \Magento\Framework\Api\DataObjectHelper|\PHPUnit_Framework_MockObject_MockObject
+ * @var DataObjectHelper|MockObject
*/
protected $dataObjectHelperMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var CouponManagementInterface|MockObject
*/
protected $couponServiceMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var TotalsConverter|MockObject
*/
protected $totalsConverterMock;
protected function setUp()
{
- $this->objectManager = new ObjectManager($this);
+ $this->objectManager = new ObjectManagerHelper($this);
$this->totalsFactoryMock = $this->createPartialMock(
- \Magento\Quote\Api\Data\TotalsInterfaceFactory::class,
- ['create']
+ TotalsInterfaceFactory::class,
+ [
+ 'create'
+ ]
);
- $this->quoteMock = $this->createPartialMock(\Magento\Quote\Model\Quote::class, [
+ $this->quoteMock = $this->createPartialMock(
+ Quote::class,
+ [
'isVirtual',
'getShippingAddress',
'getBillingAddress',
@@ -79,21 +110,33 @@ protected function setUp()
'getQuoteCurrencyCode',
'getItemsQty',
'collectTotals'
- ]);
- $this->quoteRepositoryMock = $this->createMock(\Magento\Quote\Api\CartRepositoryInterface::class);
+ ]
+ );
+ $this->quoteRepositoryMock = $this->createMock(
+ CartRepositoryInterface::class
+ );
$this->addressMock = $this->createPartialMock(
- \Magento\Quote\Model\Quote\Address::class,
- ['getData', 'getTotals']
+ Address::class,
+ [
+ 'getData',
+ 'getTotals'
+ ]
+ );
+ $this->dataObjectHelperMock = $this->getMockBuilder(
+ DataObjectHelper::class
+ )->disableOriginalConstructor()->getMock();
+ $this->converterMock = $this->createMock(
+ ItemConverter::class
);
- $this->dataObjectHelperMock = $this->getMockBuilder(\Magento\Framework\Api\DataObjectHelper::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->converterMock = $this->createMock(\Magento\Quote\Model\Cart\Totals\ItemConverter::class);
- $this->couponServiceMock = $this->createMock(\Magento\Quote\Api\CouponManagementInterface::class);
- $this->totalsConverterMock = $this->createMock(\Magento\Quote\Model\Cart\TotalsConverter::class);
+ $this->couponServiceMock = $this->createMock(
+ CouponManagementInterface::class
+ );
+ $this->totalsConverterMock = $this->createMock(
+ TotalsConverter::class
+ );
- $this->model = new \Magento\Quote\Model\Cart\CartTotalRepository(
+ $this->model = new CartTotalRepository(
$this->totalsFactoryMock,
$this->quoteRepositoryMock,
$this->dataObjectHelperMock,
@@ -104,17 +147,18 @@ protected function setUp()
}
/**
+ * Test get cart total
+ *
* @param bool $isVirtual
* @param string $getAddressType
* @dataProvider getDataProvider
+ *
+ * @return void
*/
- public function testGet($isVirtual, $getAddressType)
+ public function testGetCartTotal($isVirtual, $getAddressType): void
{
- $cartId = 12;
- $itemsQty = 100;
- $coupon = 'coupon';
$addressTotals = ['address' => 'totals'];
- $itemMock = $this->createMock(\Magento\Quote\Model\Quote\Item::class);
+ $itemMock = $this->createMock(QuoteItem::class);
$visibleItems = [
11 => $itemMock,
];
@@ -122,52 +166,95 @@ public function testGet($isVirtual, $getAddressType)
'name' => 'item',
'options' => [ 4 => ['label' => 'justLabel']],
];
- $currencyCode = 'US';
-
$this->quoteRepositoryMock->expects($this->once())
->method('getActive')
- ->with($cartId)
+ ->with(self::STUB_CART_ID)
->willReturn($this->quoteMock);
- $this->quoteMock->expects($this->once())->method('isVirtual')->willReturn($isVirtual);
- $this->quoteMock->expects($this->exactly(2))->method($getAddressType)->willReturn($this->addressMock);
- $this->quoteMock->expects($this->once())->method('getAllVisibleItems')->willReturn($visibleItems);
- $this->quoteMock->expects($this->once())->method('getBaseCurrencyCode')->willReturn($currencyCode);
- $this->quoteMock->expects($this->once())->method('getQuoteCurrencyCode')->willReturn($currencyCode);
- $this->quoteMock->expects($this->once())->method('getItemsQty')->willReturn($itemsQty);
- $this->addressMock->expects($this->any())->method('getData')->willReturn($addressTotals);
- $this->addressMock->expects($this->once())->method('getTotals')->willReturn($addressTotals);
-
- $totalsMock = $this->createMock(\Magento\Quote\Api\Data\TotalsInterface::class);
- $this->totalsFactoryMock->expects($this->once())->method('create')->willReturn($totalsMock);
+ $this->quoteMock->expects($this->once())
+ ->method('isVirtual')
+ ->willReturn($isVirtual);
+ $this->quoteMock->expects($this->exactly(2))
+ ->method($getAddressType)
+ ->willReturn($this->addressMock);
+ $this->quoteMock->expects($this->once())
+ ->method('getAllVisibleItems')
+ ->willReturn($visibleItems);
+ $this->quoteMock->expects($this->once())
+ ->method('getBaseCurrencyCode')
+ ->willReturn(self::STUB_CURRENCY_CODE);
+ $this->quoteMock->expects($this->once())
+ ->method('getQuoteCurrencyCode')
+ ->willReturn(self::STUB_CURRENCY_CODE);
+ $this->quoteMock->expects($this->once())
+ ->method('getItemsQty')
+ ->willReturn(self::STUB_ITEMS_QTY);
+ $this->addressMock->expects($this->any())
+ ->method('getData')
+ ->willReturn($addressTotals);
+ $this->addressMock->expects($this->once())
+ ->method('getTotals')
+ ->willReturn($addressTotals);
+
+ $totalsMock = $this->createMock(QuoteTotalsInterface::class);
+ $this->totalsFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($totalsMock);
$this->dataObjectHelperMock->expects($this->once())->method('populateWithArray');
$this->converterMock->expects($this->once())
->method('modelToDataObject')
->with($itemMock)
->willReturn($itemArray);
- $totalSegmentsMock = $this->createMock(\Magento\Quote\Api\Data\TotalSegmentInterface::class);
+ $totalSegmentsMock = $this->createMock(TotalSegmentInterface::class);
$this->totalsConverterMock->expects($this->once())
->method('process')
->with($addressTotals)
->willReturn($totalSegmentsMock);
- $this->couponServiceMock->expects($this->once())->method('get')->with($cartId)->willReturn($coupon);
+ $this->couponServiceMock
+ ->expects($this->once())
+ ->method('get')
+ ->with(self::STUB_CART_ID)
+ ->willReturn(self::STUB_COUPON);
- $totalsMock->expects($this->once())->method('setItems')->with([11 => $itemArray])->willReturnSelf();
- $totalsMock->expects($this->once())->method('setTotalSegments')->with($totalSegmentsMock)->willReturnSelf();
- $totalsMock->expects($this->once())->method('setCouponCode')->with($coupon)->willReturnSelf();
- $totalsMock->expects($this->once())->method('setGrandTotal')->willReturnSelf();
- $totalsMock->expects($this->once())->method('setItemsQty')->with($itemsQty)->willReturnSelf();
- $totalsMock->expects($this->once())->method('setBaseCurrencyCode')->with($currencyCode)->willReturnSelf();
- $totalsMock->expects($this->once())->method('setQuoteCurrencyCode')->with($currencyCode)->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setItems')
+ ->with([11 => $itemArray])
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setTotalSegments')
+ ->with($totalSegmentsMock)
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setCouponCode')
+ ->with(self::STUB_COUPON)
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setGrandTotal')
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setItemsQty')
+ ->with(self::STUB_ITEMS_QTY)
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setBaseCurrencyCode')
+ ->with(self::STUB_CURRENCY_CODE)
+ ->willReturnSelf();
+ $totalsMock->expects($this->once())
+ ->method('setQuoteCurrencyCode')
+ ->with(self::STUB_CURRENCY_CODE)
+ ->willReturnSelf();
- $this->assertEquals($totalsMock, $this->model->get($cartId));
+ $this->assertEquals($totalsMock, $this->model->get(self::STUB_CART_ID));
}
/**
+ * Provide data for test different cases
+ *
+ * @param void
* @return array
*/
- public function getDataProvider()
+ public function getDataProvider(): array
{
return [
'Virtual Quote' => [
diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php b/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php
index f0b69885b6e40..c68b987fe8a96 100644
--- a/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php
+++ b/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php
@@ -8,9 +8,9 @@
namespace Magento\QuoteGraphQl\Model\Cart;
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
-use Magento\GraphQl\Model\Query\ContextInterface;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
+use Magento\GraphQl\Model\Query\ContextInterface;
use Magento\Quote\Model\Quote\Address;
/**
diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php
index e600965923c14..497819cbeec3b 100644
--- a/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php
+++ b/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php
@@ -56,23 +56,18 @@ public function execute(ContextInterface $context, CartInterface $cart, array $b
{
$customerAddressId = $billingAddressInput['customer_address_id'] ?? null;
$addressInput = $billingAddressInput['address'] ?? null;
+
+ if (!$customerAddressId && !isset($billingAddressInput['address']['save_in_address_book']) && $addressInput) {
+ $addressInput['save_in_address_book'] = true;
+ }
+
// Need to keep this for BC of `use_for_shipping` field
$sameAsShipping = isset($billingAddressInput['use_for_shipping'])
? (bool)$billingAddressInput['use_for_shipping'] : false;
$sameAsShipping = isset($billingAddressInput['same_as_shipping'])
? (bool)$billingAddressInput['same_as_shipping'] : $sameAsShipping;
- if (null === $customerAddressId && null === $addressInput) {
- throw new GraphQlInputException(
- __('The billing address must contain either "customer_address_id" or "address".')
- );
- }
-
- if ($customerAddressId && $addressInput) {
- throw new GraphQlInputException(
- __('The billing address cannot contain "customer_address_id" and "address" at the same time.')
- );
- }
+ $this->checkForInputExceptions($billingAddressInput);
$addresses = $cart->getAllShippingAddresses();
if ($sameAsShipping && count($addresses) > 1) {
@@ -86,6 +81,31 @@ public function execute(ContextInterface $context, CartInterface $cart, array $b
$this->assignBillingAddressToCart->execute($cart, $billingAddress, $sameAsShipping);
}
+ /**
+ * Check for the input exceptions
+ *
+ * @param array $billingAddressInput
+ * @throws GraphQlInputException
+ */
+ private function checkForInputExceptions(
+ ?array $billingAddressInput
+ ) {
+ $customerAddressId = $billingAddressInput['customer_address_id'] ?? null;
+ $addressInput = $billingAddressInput['address'] ?? null;
+
+ if (null === $customerAddressId && null === $addressInput) {
+ throw new GraphQlInputException(
+ __('The billing address must contain either "customer_address_id" or "address".')
+ );
+ }
+
+ if ($customerAddressId && $addressInput) {
+ throw new GraphQlInputException(
+ __('The billing address cannot contain "customer_address_id" and "address" at the same time.')
+ );
+ }
+ }
+
/**
* Create billing address
*
diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php
index e058913dde1d3..f73daa715c1df 100644
--- a/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php
+++ b/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php
@@ -10,7 +10,6 @@
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\GraphQl\Model\Query\ContextInterface;
use Magento\Quote\Api\Data\CartInterface;
-use Magento\Quote\Model\Quote\Address;
/**
* Set single shipping address for a specified shopping cart
@@ -49,7 +48,12 @@ public function execute(ContextInterface $context, CartInterface $cart, array $s
__('You cannot specify multiple shipping addresses.')
);
}
- $shippingAddressInput = current($shippingAddressesInput);
+ $shippingAddressInput = current($shippingAddressesInput) ?? [];
+ $customerAddressId = $shippingAddressInput['customer_address_id'] ?? null;
+
+ if (!$customerAddressId && !isset($shippingAddressInput['address']['save_in_address_book'])) {
+ $shippingAddressInput['address']['save_in_address_book'] = true;
+ }
$shippingAddress = $this->getShippingAddress->execute($context, $shippingAddressInput);
diff --git a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls
index d334d56c85aac..1ca00d5ef7bdc 100644
--- a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls
+++ b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls
@@ -112,7 +112,7 @@ input CartAddressInput {
postcode: String
country_code: String!
telephone: String!
- save_in_address_book: Boolean
+ save_in_address_book: Boolean @doc(description: "Determines whether to save the address in the customer's address book. The default value is true")
}
input SetShippingMethodsOnCartInput {
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml
index b044b7a9b1f79..6daf322dd5b10 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml
index 2c78a9568325b..546b7ad167c25 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml
index ff3372285b211..14db012e76888 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml
index 05ee0a8032fb5..fe578210d13a7 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml
index f28ffc700c34a..e9ed4caa7ef03 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml
index 841ba89b643bf..c74e4651346d0 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml
@@ -15,14 +15,14 @@
-
+
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml
index 986101a8c0db8..ce2c3f5084a21 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml
index dd97d092041ca..3b308edffeb2b 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml
index 638cc30279966..9a3f7ae5cee33 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml
index c1c8256e3d331..be8fc67317be0 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml
index 52c0e49ee9291..6d0b335ac7094 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml
index 9053fb35150b6..40e1005ec7c8c 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml
index 77fd6c46196af..ed7eff4430030 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml
index 00b93b0a93180..0ae7b79f2458d 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml
index 94290b918969d..d8bc9d1a4444a 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml
index 6b34f51c39d88..f8091d4f63101 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml
index ff259cc5870ff..0002050bff957 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml
index 41b917c4c1371..e572febec5a5c 100644
--- a/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml
+++ b/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterCustomerReviewActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterCustomerReviewActionGroup.xml
new file mode 100644
index 0000000000000..971ec2dae2072
--- /dev/null
+++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterCustomerReviewActionGroup.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml
index f1bba674ac5eb..5ff1ed0a1062b 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml
@@ -16,10 +16,10 @@
-
+
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml
index 5f0bf53012126..5198949a61024 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml
index bc8b5655ad537..c6ef740f69e8f 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml
index cab50343efb54..97d0498c5fd22 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml
index 050f30d6ca65f..0809ad0fa8541 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml
@@ -15,11 +15,11 @@
-
+
-
+
@@ -38,7 +38,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml
index ad211a2ee0ec8..ea03f557962ad 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml
index f6e80119610c0..e9a08a3e196f5 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml
index 5c4a455dde9ae..55e709f08d77d 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/StoreFrontReviewByCustomerReportTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StoreFrontReviewByCustomerReportTest.xml
new file mode 100644
index 0000000000000..b70000ed3f3b0
--- /dev/null
+++ b/app/code/Magento/Review/Test/Mftf/Test/StoreFrontReviewByCustomerReportTest.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml
index c76c30b47ac51..81f5db6d2fd10 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml
@@ -18,7 +18,7 @@
-
+
addMessages($this->messageManager->getMessages(true));
+ $itemsBlock = $this->getLayout()->getBlock(self::ITEMS_GRID);
+ if (!$itemsBlock) {
+ return;
+ }
+ $items = $itemsBlock->getItems();
+ foreach ($items as $item) {
+ if ($item->getHasError()) {
+ $messageCollection = $this->getMessageCollection();
+ foreach ($messageCollection->getItems() as $blockMessage) {
+ if ($item->getMessage(true) === $blockMessage->getText()) {
+ /* Remove duplicated messages.*/
+ $messageCollection->deleteMessageByIdentifier($blockMessage->getIdentifier());
+ }
+ }
+ $this->setMessages($messageCollection);
+ }
+ }
+
parent::_prepareLayout();
}
}
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml
index 1c6c2d1494e2c..6f4073bf70f46 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml
@@ -91,7 +91,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml
index e6bcbc3b08028..d8a9effa56dac 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml
@@ -52,7 +52,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml
index ca74eca88308a..452fd511f2ce2 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml
@@ -23,12 +23,12 @@
-
+
-
+
@@ -72,7 +72,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
index 9b12f1c951991..11a9957fe0041 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml
index 4646f6cf2e5a0..bb1940357a7f4 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml
index 7f162ca4e2a6a..dafd00ff60b29 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
index 7d6ce40659b1f..c0ebbe450119e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml
index ee69d9fd1ca46..256417c0d0d10 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
index ce653b11f854b..477676085cf2e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml
index 095bd9af2c1b1..d22e11bca3d0e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml
index c8b2b66a758eb..b2bfa93678dfd 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml
index 34a415ccf03ad..37a4782ce2e73 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml
index 979e2cef3ff28..ca3733d5f0b96 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
index c9f878a716ae8..69e3ade9231d0 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml
index a20e9efd614fd..2935a56a6c0a1 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml
index 5839ff4b3dfe2..ab3a2cc647740 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml
@@ -83,7 +83,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml
index df1a541eeb94c..564cde1151660 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml
index e0e7234fc9d24..45eefbcc3f97d 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml
index b2e0d788a24e2..7974d594eb99c 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml
index 9a635df80f108..1411f7b292757 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml
@@ -59,7 +59,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml
index 072522452e7b9..baef605ad52af 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml
index a7112776bf157..ab5c089dfcc30 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml
@@ -26,7 +26,7 @@
5
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml
index 72080c3170c48..2f89573b00101 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml
index bbb0489b6c9a4..23dca916781f1 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml
index 23bf293f67a81..d3cd3e8b8549c 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml
index 03acf2194c64d..a30040045a4ca 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml
index f439d792c9330..1401930131b13 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml
@@ -76,7 +76,7 @@
2
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
index bb1f5840ed6bf..0be7e20be5aea 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
@@ -23,7 +23,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml
index c689869d35c30..b0926948f2bf6 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml
index da427c9085084..ade1f783c1309 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml
index 841db82adefb7..6e8ec14fc67cb 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml
index d1417ba1bc267..82e9606175764 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml
index cc709dc6e16eb..1c8cf2219f13b 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml
@@ -26,7 +26,7 @@
5
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
index 01a27a6191d74..1c59f6f936cef 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml
index a5cbb15faf2d7..8d328beab1adc 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml
index ca2a35eef5ae6..a89e9f7ce6ebe 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml
index c11ea49893734..45cbe23042e03 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml
index f583f46f19c7c..22b2d69a73090 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml
index f334a77da6550..4b690a00ee9ed 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml
index 437487e3d7e40..e1d934f794142 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml
index 87d3a864e0820..86a3e381cb237 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml
index 9eaa3a87e873a..bfd75a69b81d6 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml
index eb9d48cbbd567..338975d3c1f25 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
index 2eb7e8ec33d92..0a4445f338960 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml
index 424b931314b01..39b5cabdadd72 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml
index 89d4cc4c7371f..567a0466d12e0 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml
index 6d765537494ed..4023be10f390e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml
index 05f15ad76b07c..07d75664f1fda 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml
index 17f0bad87037e..544bb5adf57cd 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml
index 7884926946178..d521c3dc647e2 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml
index 8ab26c04d5d6d..54ae549967a3b 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml
@@ -87,7 +87,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml
index 5981c49345aa0..85665dfc1b00e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml
index d28b636770856..7615cc219d430 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml
index d44cb829bc205..fd26ca1ca601e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml
index bd43937e6f24e..692f293ef3a75 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml
index af07d50bcc8c7..f0f4cf9d1a468 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml
index dbe012f17176d..df6a797372e62 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml
@@ -49,7 +49,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml
index 73f3b5310731e..d8a3db76da05e 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml
index 3ae4007ac211d..c58b95a41b157 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml
index 540af6958d54c..1c92c2dae3712 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml
index 8fd751f96914e..b562073a1276f 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
index e8eea2019c941..776d84ac230b8 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml
index 97d9ad9dbeb59..09197963434eb 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml
@@ -92,7 +92,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml
index 1f655f319076b..c3058ca6ede87 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml
@@ -130,7 +130,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml
index f9215ff5019ff..c635e6b0ad6b2 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml
index 4596faedbbe6c..eb28ebfd068da 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
index bf78012926a7b..f374741c247d4 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml
index 4fafd3d163930..0e021600ab3e3 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml
index 9ee96e2b64678..176fb05bc74b3 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml
@@ -68,7 +68,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
index f68a36b29af4f..5cc4fae330d05 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml
index 9319022a96b20..20261de502ea3 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
index 468abf8fb8b81..00117c56de439 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml
index 49dcc47e14779..1433d660d3535 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml
@@ -28,7 +28,7 @@
500
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml
index 3f063b5869129..ed2dd16b7df9d 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml
index 0e1a4d7c186aa..9ac73ceae586e 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml
index 64443c717ac33..67e75d63e016e 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml
index f33eb187e4cc8..2bf96cf0377d4 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
index 4b793dbf8583f..9833231f8ed84 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml
index f6d61f62c1f54..0d98abfba3f62 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml
index cb3e6c517e1ec..bc4139435ab55 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml
index 3bbacf912e5d6..56c4506196d24 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml
index 902c118129bab..23e472518ba84 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml
index aed9d71c306ae..3aacc176acdc5 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml
index fc9a92765c2d0..8c02f401992ee 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml
index 6de5f127a296c..18183085060d2 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml
index 58d7ea7c1bad8..d001ac98eefeb 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml
index 22dff89ebe8a6..bc608c0e06086 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml
@@ -77,7 +77,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml
index f99b19f4a6289..91fe4f142d570 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
index 96ba6208a7518..09b45cd554056 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml
index 1406d4dfbde67..4cc331eebc4ee 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml
index aade41b30284c..4d987c00884e1 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml
index 283d22351b1f1..ff0e011210785 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml
index fafede4120573..036844562af50 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml
index 7d343cd6dafd8..efd82316f0b0a 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml
index 12c278d1e7b63..7d266e2cdd6f1 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml
@@ -86,7 +86,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
index 80b0747a3bf72..172f6b6ba24c6 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml
index b43fd095b5556..85a30b3a3a2b4 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml
index 13c1100bd21f6..d63df5fe50a6d 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml
@@ -62,7 +62,7 @@
-
+
diff --git a/app/code/Magento/Search/Controller/Term/Popular.php b/app/code/Magento/Search/Controller/Term/Popular.php
index 0573fe6a81a12..2b3ac5c73c9dd 100644
--- a/app/code/Magento/Search/Controller/Term/Popular.php
+++ b/app/code/Magento/Search/Controller/Term/Popular.php
@@ -3,59 +3,78 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Search\Controller\Term;
-use Magento\Framework\App\Action\Action;
-use Magento\Framework\App\Action\Context;
+use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
-use Magento\Framework\App\RequestInterface;
+use Magento\Framework\Controller\Result\ForwardFactory as ResultForwardFactory;
+use Magento\Framework\View\Result\PageFactory as ResultPageFactory;
use Magento\Store\Model\ScopeInterface;
-use Magento\Framework\Controller\ResultFactory;
-class Popular extends Action
+/**
+ * Popular search terms page
+ */
+class Popular implements HttpGetActionInterface
{
+ private const XML_PATH_SEO_SEARCH_TERMS = 'catalog/seo/search_terms';
+
/**
- * @var \Magento\Framework\App\Config\ScopeConfigInterface
+ * @var ResultForwardFactory
*/
- protected $scopeConfig;
+ private $resultForwardFactory;
/**
- * @param \Magento\Framework\App\Action\Context $context
- * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
+ * @var ResultPageFactory
*/
- public function __construct(Context $context, ScopeConfigInterface $scopeConfig)
- {
+ private $resultPageFactory;
+
+ /**
+ * @var ScopeConfigInterface
+ */
+ private $scopeConfig;
+
+ /**
+ * @param ResultForwardFactory $resultForwardFactory
+ * @param ResultPageFactory $resultPageFactory
+ * @param ScopeConfigInterface $scopeConfig
+ */
+ public function __construct(
+ ResultForwardFactory $resultForwardFactory,
+ ResultPageFactory $resultPageFactory,
+ ScopeConfigInterface $scopeConfig
+ ) {
+ $this->resultForwardFactory = $resultForwardFactory;
+ $this->resultPageFactory = $resultPageFactory;
$this->scopeConfig = $scopeConfig;
- parent::__construct($context);
}
/**
- * Dispatch request
- *
- * @param \Magento\Framework\App\RequestInterface $request
- * @return \Magento\Framework\App\ResponseInterface
- * @throws \Magento\Framework\Exception\NotFoundException
+ * @inheritDoc
*/
- public function dispatch(RequestInterface $request)
+ public function execute()
{
- $searchTerms = $this->scopeConfig->getValue(
- 'catalog/seo/search_terms',
- ScopeInterface::SCOPE_STORE
- );
- if (!$searchTerms) {
- $this->_redirect('noroute');
- $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true);
+ if (!$this->checkEnabledSearchTerms()) {
+ $resultForward = $this->resultForwardFactory->create();
+ $resultForward->forward('noroute');
+
+ return $resultForward;
}
- return parent::dispatch($request);
+
+ return $this->resultPageFactory->create();
}
/**
- * @return \Magento\Framework\View\Result\Page
+ * Check if search terms are enabled
+ *
+ * @return bool
*/
- public function execute()
+ private function checkEnabledSearchTerms(): bool
{
- /** @var \Magento\Framework\View\Result\Page $resultPage */
- $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
- return $resultPage;
+ return $this->scopeConfig->isSetFlag(
+ self::XML_PATH_SEO_SEARCH_TERMS,
+ ScopeInterface::SCOPE_STORE
+ );
}
}
diff --git a/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml b/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml
index 6ff7a34a03b8a..82ec95b24d3ca 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml b/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml
index 2b7a4e7f5e5cb..9ff088fb25b82 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
index 4cdd8e6992367..18f623288621d 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
index 5030484434925..3bfa777ac27d8 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
index 1d312959a4a00..93a3c8ca8e4a2 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
index 3ae29f60a8e86..ebe3b6c129721 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
index e14cbbb85a0e7..e72f614593cfe 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchTermEntityRedirectTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchTermEntityRedirectTest.xml
index 5f21d4364736b..6ff4b7de5559d 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchTermEntityRedirectTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchTermEntityRedirectTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Search/Test/Unit/Controller/Term/PopularTest.php b/app/code/Magento/Search/Test/Unit/Controller/Term/PopularTest.php
new file mode 100644
index 0000000000000..590d959b95ff3
--- /dev/null
+++ b/app/code/Magento/Search/Test/Unit/Controller/Term/PopularTest.php
@@ -0,0 +1,103 @@
+resultForwardFactoryMock = $this->getMockBuilder(ResultForwardFactory::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->resultPageFactoryMock = $this->getMockBuilder(ResultPageFactory::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class)
+ ->getMockForAbstractClass();
+
+ $objectManager = new ObjectManager($this);
+ $this->action = $objectManager->getObject(
+ Popular::class,
+ [
+ 'resultForwardFactory' => $this->resultForwardFactoryMock,
+ 'resultPageFactory' => $this->resultPageFactoryMock,
+ 'scopeConfig' => $this->scopeConfigMock
+ ]
+ );
+ }
+
+ public function testResult()
+ {
+ $this->scopeConfigMock->expects($this->once())
+ ->method('isSetFlag')
+ ->with(static::XML_PATH_SEO_SEARCH_TERMS, ScopeInterface::SCOPE_STORE)
+ ->willReturn(true);
+ $resultPageMock = $this->getMockBuilder(ResultPage::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->resultPageFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($resultPageMock);
+
+ $this->assertSame($resultPageMock, $this->action->execute());
+ }
+
+ public function testResultWithDisabledPage()
+ {
+ $this->scopeConfigMock->expects($this->once())
+ ->method('isSetFlag')
+ ->with(static::XML_PATH_SEO_SEARCH_TERMS, ScopeInterface::SCOPE_STORE)
+ ->willReturn(false);
+ $resultForwardMock = $this->getMockBuilder(ResultForward::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->resultForwardFactoryMock->expects($this->once())
+ ->method('create')
+ ->willReturn($resultForwardMock);
+ $resultForwardMock->expects($this->once())
+ ->method('forward')
+ ->with('noroute');
+
+ $this->assertSame($resultForwardMock, $this->action->execute());
+ }
+}
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithInvalidExpirationTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithInvalidExpirationTest.xml
index 02a8170b308d3..fc91c8caddf71 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithInvalidExpirationTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithInvalidExpirationTest.xml
@@ -19,10 +19,10 @@
-
+
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithValidExpirationTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithValidExpirationTest.xml
index dc971f2044760..cd67bf4612520 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithValidExpirationTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminCreateNewUserWithValidExpirationTest.xml
@@ -18,10 +18,10 @@
-
+
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
index c3945fe0199b6..a75f65dffeca3 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
@@ -23,7 +23,7 @@
-
+
@@ -94,7 +94,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
index bf13ab6b5c6aa..3d04f3eed4daf 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
@@ -23,7 +23,7 @@
-
+
@@ -92,7 +92,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithInvalidExpiration.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithInvalidExpiration.xml
index bdea845c81a56..130dacfbc2237 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithInvalidExpiration.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithInvalidExpiration.xml
@@ -21,7 +21,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -43,7 +43,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithValidExpiration.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithValidExpiration.xml
index 12bba27f21269..39e4a3b56ca13 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithValidExpiration.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLoginAdminUserWithValidExpiration.xml
@@ -21,10 +21,10 @@
-
+
-
+
@@ -35,15 +35,15 @@
-
+
-
-
+
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminNavigateWhileUserExpiredTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminNavigateWhileUserExpiredTest.xml
index c4603a88c56c4..1c251ea2b9ec2 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminNavigateWhileUserExpiredTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminNavigateWhileUserExpiredTest.xml
@@ -20,10 +20,10 @@
-
+
-
+
@@ -37,7 +37,7 @@
-
+
@@ -51,7 +51,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenCreatingNewUserTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenCreatingNewUserTest.xml
index 4ceffd676313d..c130de5d8699f 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenCreatingNewUserTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenCreatingNewUserTest.xml
@@ -21,7 +21,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml
index 47a0224a1c4db..5b4f38ae30566 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml
@@ -22,12 +22,12 @@
-
+
-
+
@@ -92,7 +92,7 @@
-
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/StorefrontAccountPasswordFieldsNotAvailableTest.xml b/app/code/Magento/Security/Test/Mftf/Test/StorefrontAccountPasswordFieldsNotAvailableTest.xml
new file mode 100644
index 0000000000000..fd7ef0261cd26
--- /dev/null
+++ b/app/code/Magento/Security/Test/Mftf/Test/StorefrontAccountPasswordFieldsNotAvailableTest.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTest.xml b/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTest.xml
new file mode 100644
index 0000000000000..242bad033ed47
--- /dev/null
+++ b/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTestWithIncorrectDataTest.xml b/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTestWithIncorrectDataTest.xml
new file mode 100644
index 0000000000000..f08db36e7e20c
--- /dev/null
+++ b/app/code/Magento/Security/Test/Mftf/Test/StorefrontChangeCustomerPasswordTestWithIncorrectDataTest.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Security/Test/Mftf/Test/StorefrontSecureChangingCustomerEmailTest.xml b/app/code/Magento/Security/Test/Mftf/Test/StorefrontSecureChangingCustomerEmailTest.xml
new file mode 100644
index 0000000000000..020e1965ddf71
--- /dev/null
+++ b/app/code/Magento/Security/Test/Mftf/Test/StorefrontSecureChangingCustomerEmailTest.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml
index 08064ae59d793..188b12c6a91c3 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml
index bacfaf15f99d7..fea499954896d 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
index a4c155e9d3753..0e69dba36d41c 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
index 64d0932e9272d..5e57224bfee48 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
index 0985aea2e502c..6b388ae31e45e 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml
index 7df8f08e79530..0d709e1d08006 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml
index 81c76ec916f7e..5fd9a6a29c0e3 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml
index 3a375be6533db..0f2f7ed26f1e1 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/Signifyd/Api/CaseCreationServiceInterface.php b/app/code/Magento/Signifyd/Api/CaseCreationServiceInterface.php
deleted file mode 100644
index f7611660b93a1..0000000000000
--- a/app/code/Magento/Signifyd/Api/CaseCreationServiceInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-caseManagement = $caseManagement;
-
- parent::__construct($context, $data);
- }
-
- /**
- * Gets case entity associated with order id.
- *
- * @return CaseInterface|null
- */
- private function getCaseEntity()
- {
- if ($this->caseEntity === false) {
- $this->caseEntity = $this->caseManagement->getByOrderId(
- $this->getOrderId()
- );
- }
-
- return $this->caseEntity;
- }
-
- /**
- * Default getter for case properties
- *
- * @param mixed $defaultValue
- * @param callable $callback
- * @return mixed
- */
- private function getCaseProperty($defaultValue, callable $callback)
- {
- return $this->isEmptyCase() ? $defaultValue : call_user_func($callback);
- }
-
- /**
- * Checks if case is exists for order
- *
- * @return bool
- * @since 100.2.0
- */
- public function isEmptyCase()
- {
- return $this->getCaseEntity() === null;
- }
-
- /**
- * Gets case guarantee disposition status.
- *
- * @return string
- * @since 100.2.0
- */
- public function getCaseGuaranteeDisposition()
- {
- return $this->getCaseProperty('', function () {
- $guaranteeStatusMap = [
- CaseInterface::GUARANTEE_APPROVED => __('Approved'),
- CaseInterface::GUARANTEE_DECLINED => __('Declined'),
- CaseInterface::GUARANTEE_PENDING => __('Pending'),
- CaseInterface::GUARANTEE_CANCELED => __('Canceled'),
- CaseInterface::GUARANTEE_IN_REVIEW => __('In Review'),
- CaseInterface::GUARANTEE_UNREQUESTED => __('Unrequested')
- ];
-
- $status = isset($guaranteeStatusMap[$this->getCaseEntity()->getGuaranteeDisposition()]) ?
- $guaranteeStatusMap[$this->getCaseEntity()->getGuaranteeDisposition()] :
- '';
-
- return $status;
- });
- }
-
- /**
- * Retrieves current order Id.
- *
- * @return integer
- */
- private function getOrderId()
- {
- return (int) $this->getRequest()->getParam('order_id');
- }
-}
diff --git a/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Field/WebhookUrl.php b/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Field/WebhookUrl.php
deleted file mode 100644
index 7964d6b1af397..0000000000000
--- a/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Field/WebhookUrl.php
+++ /dev/null
@@ -1,60 +0,0 @@
-getOriginalData();
- if (!empty($originalData['handler_url'])) {
- $url = $this->getStoreUrl();
- $url .= $originalData['handler_url'];
- }
-
- return '' . $this->escapeHtml($url) . '
';
- }
-
- /**
- * @inheritdoc
- */
- protected function _isInheritCheckboxRequired(AbstractElement $element)
- {
- return false;
- }
-
- /**
- * Return base store URL.
- *
- * @return string
- */
- private function getStoreUrl()
- {
- $website = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'));
-
- $isSecure = $this->_scopeConfig->isSetFlag(
- Store::XML_PATH_SECURE_IN_FRONTEND,
- ScopeInterface::SCOPE_WEBSITE,
- $website->getCode()
- );
-
- $configPath = $isSecure ? Store::XML_PATH_SECURE_BASE_LINK_URL : Store::XML_PATH_UNSECURE_BASE_LINK_URL;
-
- return $this->_scopeConfig->getValue($configPath, ScopeInterface::SCOPE_WEBSITE, $website->getCode());
- }
-}
diff --git a/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Fieldset/Info.php b/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Fieldset/Info.php
deleted file mode 100644
index c18c3dc596e21..0000000000000
--- a/app/code/Magento/Signifyd/Block/Adminhtml/System/Config/Fieldset/Info.php
+++ /dev/null
@@ -1,31 +0,0 @@
-getGroup();
-
- if (!empty($groupConfig['more_url']) && !empty($element->getComment())) {
- $comment = $element->getComment();
- $comment .= '' .
- $this->escapeHtml(__('Learn more')) . '
';
- $element->setComment($comment);
- }
-
- return parent::_getHeaderCommentHtml($element);
- }
-}
diff --git a/app/code/Magento/Signifyd/Block/Fingerprint.php b/app/code/Magento/Signifyd/Block/Fingerprint.php
deleted file mode 100644
index f43bffce1fc1a..0000000000000
--- a/app/code/Magento/Signifyd/Block/Fingerprint.php
+++ /dev/null
@@ -1,92 +0,0 @@
-signifydOrderSessionId = $signifydOrderSessionId;
- $this->config = $config;
- $this->quoteSession = $quoteSession;
- }
-
- /**
- * Returns a unique Signifyd order session id.
- *
- * @return string
- * @since 100.2.0
- */
- public function getSignifydOrderSessionId()
- {
- $quoteId = $this->quoteSession->getQuote()->getId();
-
- return $this->signifydOrderSessionId->get($quoteId);
- }
-
- /**
- * Checks if module is enabled.
- *
- * @return boolean
- * @since 100.2.0
- */
- public function isModuleActive()
- {
- $storeId = $this->quoteSession->getQuote()->getStoreId();
-
- return $this->config->isActive($storeId);
- }
-}
diff --git a/app/code/Magento/Signifyd/Controller/Webhooks/Handler.php b/app/code/Magento/Signifyd/Controller/Webhooks/Handler.php
deleted file mode 100644
index 2dee31f4048b9..0000000000000
--- a/app/code/Magento/Signifyd/Controller/Webhooks/Handler.php
+++ /dev/null
@@ -1,157 +0,0 @@
-webhookRequest = $webhookRequest;
- $this->logger = $logger;
- $this->webhookMessageReader = $webhookMessageReader;
- $this->caseUpdatingServiceFactory = $caseUpdatingServiceFactory;
- $this->webhookRequestValidator = $webhookRequestValidator;
- $this->caseRepository = $caseRepository;
- $this->config = $config;
- }
-
- /**
- * Processes webhook request data and updates case entity
- *
- * @return void
- */
- public function execute()
- {
- if ($this->config->isDebugModeEnabled()) {
- $this->logger->debug($this->webhookRequest->getEventTopic() . '|' . $this->webhookRequest->getBody());
- }
-
- if (!$this->webhookRequestValidator->validate($this->webhookRequest)) {
- $this->_redirect('noroute');
- return;
- }
-
- $webhookMessage = $this->webhookMessageReader->read($this->webhookRequest);
- if ($webhookMessage->getEventTopic() === self::$eventTopicTest) {
- return;
- }
-
- $data = $webhookMessage->getData();
- if (empty($data['caseId'])) {
- $this->_redirect('noroute');
- return;
- }
-
- $case = $this->caseRepository->getByCaseId($data['caseId']);
- if ($case === null) {
- $this->_redirect('noroute');
- return;
- }
-
- $caseUpdatingService = $this->caseUpdatingServiceFactory->create($webhookMessage->getEventTopic());
- try {
- $caseUpdatingService->update($case, $data);
- } catch (LocalizedException $e) {
- $this->getResponse()->setHttpResponseCode(400);
- $this->logger->critical($e);
- }
- }
-
- /**
- * @inheritDoc
- */
- public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
- {
- return null;
- }
-
- /**
- * @inheritDoc
- */
- public function validateForCsrf(RequestInterface $request): ?bool
- {
- return true;
- }
-}
diff --git a/app/code/Magento/Signifyd/LICENSE.txt b/app/code/Magento/Signifyd/LICENSE.txt
deleted file mode 100644
index 49525fd99da9c..0000000000000
--- a/app/code/Magento/Signifyd/LICENSE.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Open Software License ("OSL") v. 3.0
-
-This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
-Licensed under the Open Software License version 3.0
-
- 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
- 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
-
- 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
-
- 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
-
- 4. to perform the Original Work publicly; and
-
- 5. to display the Original Work publicly.
-
- 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
- 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
- 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
- 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
- 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
- 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
- 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
- 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
- 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
- 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
- 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
- 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
- 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
- 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
-
- 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
\ No newline at end of file
diff --git a/app/code/Magento/Signifyd/LICENSE_AFL.txt b/app/code/Magento/Signifyd/LICENSE_AFL.txt
deleted file mode 100644
index f39d641b18a19..0000000000000
--- a/app/code/Magento/Signifyd/LICENSE_AFL.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Academic Free License ("AFL") v. 3.0
-
-This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
-Licensed under the Academic Free License version 3.0
-
- 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
- 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
-
- 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
-
- 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
-
- 4. to perform the Original Work publicly; and
-
- 5. to display the Original Work publicly.
-
- 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
- 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
- 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
- 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
- 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
- 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
- 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
- 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
- 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
- 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
- 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
- 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
- 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
- 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
-
- 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
diff --git a/app/code/Magento/Signifyd/Model/CaseEntity.php b/app/code/Magento/Signifyd/Model/CaseEntity.php
deleted file mode 100644
index c11c72db79f16..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseEntity.php
+++ /dev/null
@@ -1,249 +0,0 @@
-serializer = $serializer;
- parent::__construct($context, $registry, $resource, $resourceCollection, $data);
- }
-
- /**
- * @inheritdoc
- */
- protected function _construct()
- {
- $this->_init(ResourceModel\CaseEntity::class);
- }
-
- /**
- * @inheritdoc
- */
- public function getEntityId()
- {
- return (int) $this->getData('entity_id');
- }
-
- /**
- * @inheritdoc
- */
- public function setEntityId($id)
- {
- $this->setData('entity_id', (int) $id);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getCaseId()
- {
- return (int) $this->getData('case_id');
- }
-
- /**
- * @inheritdoc
- */
- public function setCaseId($id)
- {
- $this->setData('case_id', (int) $id);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function isGuaranteeEligible()
- {
- $value = $this->getData('guarantee_eligible');
- return ($value === null) ? $value : (bool) $value;
- }
-
- /**
- * @inheritdoc
- */
- public function setGuaranteeEligible($guaranteeEligible)
- {
- $this->setData('guarantee_eligible', $guaranteeEligible);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getGuaranteeDisposition()
- {
- return (string) $this->getData('guarantee_disposition');
- }
-
- /**
- * @inheritdoc
- */
- public function setGuaranteeDisposition($disposition)
- {
- $this->setData('guarantee_disposition', (string) $disposition);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getStatus()
- {
- return (string) $this->getData('status');
- }
-
- /**
- * @inheritdoc
- */
- public function setStatus($status)
- {
- $this->setData('status', (string) $status);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getScore()
- {
- return (int) $this->getData('score');
- }
-
- /**
- * @inheritdoc
- */
- public function setScore($score)
- {
- $this->setData('score', (int) $score);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getOrderId()
- {
- return (int) $this->getData('order_id');
- }
-
- /**
- * @inheritdoc
- */
- public function setOrderId($orderId)
- {
- $this->setData('order_id', (int) $orderId);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getAssociatedTeam()
- {
- $teamData = $this->getData('associated_team');
- return empty($teamData) ? [] : $this->serializer->unserialize($teamData);
- }
-
- /**
- * @inheritdoc
- */
- public function setAssociatedTeam(array $team)
- {
- $this->setData('associated_team', $this->serializer->serialize($team));
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getReviewDisposition()
- {
- return (string) $this->getData('review_disposition');
- }
-
- /**
- * @inheritdoc
- */
- public function setReviewDisposition($disposition)
- {
- $this->setData('review_disposition', (string) $disposition);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getCreatedAt()
- {
- return $this->getData('created_at');
- }
-
- /**
- * @inheritdoc
- */
- public function setCreatedAt($datetime)
- {
- $this->setData('created_at', $datetime);
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getUpdatedAt()
- {
- return $this->getData('updated_at');
- }
-
- /**
- * @inheritdoc
- */
- public function setUpdatedAt($datetime)
- {
- $this->setData('updated_at', $datetime);
- return $this;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseManagement.php b/app/code/Magento/Signifyd/Model/CaseManagement.php
deleted file mode 100644
index 1913f1e7a17b3..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseManagement.php
+++ /dev/null
@@ -1,93 +0,0 @@
-caseRepository = $caseRepository;
- $this->caseFactory = $caseFactory;
- $this->searchCriteriaBuilder = $searchCriteriaBuilder;
- $this->filterBuilder = $filterBuilder;
- }
-
- /**
- * @inheritdoc
- */
- public function create($orderId)
- {
- /** @var \Magento\Signifyd\Api\Data\CaseInterface $case */
- $case = $this->caseFactory->create();
- $case->setOrderId($orderId)
- ->setStatus(CaseInterface::STATUS_PENDING)
- ->setGuaranteeDisposition(CaseInterface::GUARANTEE_PENDING);
- try {
- return $this->caseRepository->save($case);
- } catch (DuplicateException $e) {
- throw new AlreadyExistsException(__('This order already has associated case entity'), $e);
- }
- }
-
- /**
- * @inheritdoc
- */
- public function getByOrderId($orderId)
- {
- $filters = [
- $this->filterBuilder->setField('order_id')
- ->setValue($orderId)
- ->create()
- ];
- $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)->create();
- $items = $this->caseRepository->getList($searchCriteria)->getItems();
- return !empty($items) ? array_pop($items) : null;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseRepository.php b/app/code/Magento/Signifyd/Model/CaseRepository.php
deleted file mode 100644
index ea3ea3e67aafd..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseRepository.php
+++ /dev/null
@@ -1,134 +0,0 @@
-collectionProcessor = $collectionProcessor;
- $this->collectionFactory = $collectionFactory;
- $this->searchResultsFactory = $searchResultsFactory;
- $this->caseFactory = $caseFactory;
- $this->resourceModel = $resourceModel;
- }
-
- /**
- * @inheritdoc
- */
- public function save(CaseInterface $case)
- {
- /** @var CaseEntity $case */
- $this->resourceModel->save($case);
-
- return $case;
- }
-
- /**
- * @inheritdoc
- */
- public function getById($id)
- {
- /** @var CaseEntity $case */
- $case = $this->caseFactory->create();
- $this->resourceModel->load($case, $id);
-
- return $case;
- }
-
- /**
- * @inheritdoc
- */
- public function getByCaseId($caseId)
- {
- /** @var CaseEntity $case */
- $case = $this->caseFactory->create();
- $this->resourceModel->load($case, $caseId, 'case_id');
-
- return $case->getEntityId() ? $case : null;
- }
-
- /**
- * @inheritdoc
- */
- public function delete(CaseInterface $case)
- {
- $this->resourceModel->delete($case);
-
- return true;
- }
-
- /**
- * @inheritdoc
- */
- public function getList(SearchCriteriaInterface $searchCriteria)
- {
- /** @var Collection $collection */
- $collection = $this->collectionFactory->create();
- $this->collectionProcessor->process($searchCriteria, $collection);
-
- /** @var CaseSearchResultsInterface $searchResults */
- $searchResults = $this->searchResultsFactory->create();
- $searchResults->setSearchCriteria($searchCriteria);
- $searchResults->setItems($collection->getItems());
-
- return $searchResults;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseSearchResults.php b/app/code/Magento/Signifyd/Model/CaseSearchResults.php
deleted file mode 100644
index ff1ab8839f6cd..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseSearchResults.php
+++ /dev/null
@@ -1,18 +0,0 @@
-caseManagement = $caseManagement;
- $this->signifydGateway = $signifydGateway;
- $this->logger = $logger;
- $this->caseRepository = $caseRepository;
- $this->orderGridUpdater = $orderGridUpdater;
- $this->orderStateService = $orderStateService;
- }
-
- /**
- * {@inheritdoc}
- */
- public function createForOrder($orderId)
- {
- $case = $this->caseManagement->create($orderId);
- $this->orderGridUpdater->update($orderId);
-
- try {
- $caseId = $this->signifydGateway->createCase($orderId);
- } catch (GatewayException $e) {
- $this->logger->error($e->getMessage());
- return true;
- }
-
- $case->setCaseId($caseId);
- $this->caseRepository->save($case);
- $this->orderStateService->updateByCase($case);
-
- return true;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseServices/StubUpdatingService.php b/app/code/Magento/Signifyd/Model/CaseServices/StubUpdatingService.php
deleted file mode 100644
index 295d7f13fb0ac..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseServices/StubUpdatingService.php
+++ /dev/null
@@ -1,23 +0,0 @@
-messageGenerator = $messageGenerator;
- $this->caseRepository = $caseRepository;
- $this->commentsHistoryUpdater = $commentsHistoryUpdater;
- $this->orderGridUpdater = $orderGridUpdater;
- $this->orderStateService = $orderStateService;
- }
-
- /**
- * Updates Signifyd Case entity by received data.
- *
- * @param CaseInterface $case
- * @param array $data
- * @return void
- * @throws LocalizedException
- */
- public function update(CaseInterface $case, array $data)
- {
- if (empty($case->getEntityId()) || empty($case->getCaseId())) {
- throw new LocalizedException(__('The case entity should not be empty.'));
- }
-
- try {
- $previousDisposition = $case->getGuaranteeDisposition();
- $this->setCaseData($case, $data);
- $orderHistoryComment = $this->messageGenerator->generate($data);
- $case = $this->caseRepository->save($case);
- $this->orderGridUpdater->update($case->getOrderId());
- $this->commentsHistoryUpdater->addComment($case, $orderHistoryComment);
- if ($case->getGuaranteeDisposition() !== $previousDisposition) {
- $this->orderStateService->updateByCase($case);
- }
- } catch (\Exception $e) {
- throw new LocalizedException(__('Cannot update Case entity.'), $e);
- }
- }
-
- /**
- * Sets data to case entity.
- *
- * @param CaseInterface $case
- * @param array $data
- * @return void
- */
- private function setCaseData(CaseInterface $case, array $data)
- {
- // list of keys which should not be replaced, like order id
- $notResolvedKeys = [
- 'orderId'
- ];
- foreach ($data as $key => $value) {
- $methodName = 'set' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key);
- if (!in_array($key, $notResolvedKeys) && method_exists($case, $methodName)) {
- call_user_func([$case, $methodName], $value);
- }
- }
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceFactory.php b/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceFactory.php
deleted file mode 100644
index 5415044b5edc4..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceFactory.php
+++ /dev/null
@@ -1,78 +0,0 @@
-objectManager = $objectManager;
- $this->generatorFactory = $generatorFactory;
- $this->config = $config;
- }
-
- /**
- * Creates instance of service updating case.
- * As param retrieves type of message generator.
- *
- * @param string $type
- * @return UpdatingServiceInterface
- * @throws \InvalidArgumentException
- */
- public function create($type)
- {
- if (!$this->config->isActive() || $type === self::$caseTest) {
- return $this->objectManager->create(StubUpdatingService::class);
- }
-
- $messageGenerator = $this->generatorFactory->create($type);
- $service = $this->objectManager->create(UpdatingService::class, [
- 'messageGenerator' => $messageGenerator
- ]);
-
- return $service;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceInterface.php b/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceInterface.php
deleted file mode 100644
index daa7b40bfd674..0000000000000
--- a/app/code/Magento/Signifyd/Model/CaseServices/UpdatingServiceInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-historyFactory = $historyFactory;
- $this->historyRepository = $historyRepository;
- }
-
- /**
- * Adds comment to case related order.
- * Throws an exception if cannot save history comment.
- *
- * @param CaseInterface $case
- * @param Phrase $message
- * @param string $status
- * @return void
- */
- public function addComment(CaseInterface $case, Phrase $message, $status = '')
- {
- if (!$message->getText()) {
- return;
- }
-
- /** @var \Magento\Sales\Api\Data\OrderStatusHistoryInterface $history */
- $history = $this->historyFactory->create();
- $history->setParentId($case->getOrderId())
- ->setComment($message)
- ->setEntityName('order')
- ->setStatus($status);
- $this->historyRepository->save($history);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/Config.php b/app/code/Magento/Signifyd/Model/Config.php
deleted file mode 100644
index 15d3608bd38c4..0000000000000
--- a/app/code/Magento/Signifyd/Model/Config.php
+++ /dev/null
@@ -1,101 +0,0 @@
-scopeConfig = $scopeConfig;
- }
-
- /**
- * If this config option set to false no Signifyd integration should be available
- * (only possibility to configure Signifyd setting in admin)
- *
- * @param int|null $storeId
- * @return bool
- */
- public function isActive($storeId = null): bool
- {
- $enabled = $this->scopeConfig->isSetFlag(
- 'fraud_protection/signifyd/active',
- ScopeInterface::SCOPE_STORE,
- $storeId
- );
- return $enabled;
- }
-
- /**
- * Signifyd API Key used for authentication.
- *
- * @see https://www.signifyd.com/docs/api/#/introduction/authentication
- * @see https://app.signifyd.com/settings
- *
- * @param int|null $storeId
- * @return string
- */
- public function getApiKey($storeId = null): string
- {
- $apiKey = $this->scopeConfig->getValue(
- 'fraud_protection/signifyd/api_key',
- ScopeInterface::SCOPE_STORE,
- $storeId
- );
- return $apiKey;
- }
-
- /**
- * Base URL to Signifyd REST API.
- * Usually equals to https://api.signifyd.com/v2 and should not be changed
- *
- * @param int|null $storeId
- * @return string
- */
- public function getApiUrl($storeId = null): string
- {
- $apiUrl = $this->scopeConfig->getValue(
- 'fraud_protection/signifyd/api_url',
- ScopeInterface::SCOPE_STORE,
- $storeId
- );
- return $apiUrl;
- }
-
- /**
- * If is "true" extra information about interaction with Signifyd API are written to debug.log file
- *
- * @param int|null $storeId
- * @return bool
- */
- public function isDebugModeEnabled($storeId = null): bool
- {
- $debugModeEnabled = $this->scopeConfig->isSetFlag(
- 'fraud_protection/signifyd/debug',
- ScopeInterface::SCOPE_STORE,
- $storeId
- );
- return $debugModeEnabled;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/CustomerOrders.php b/app/code/Magento/Signifyd/Model/CustomerOrders.php
deleted file mode 100644
index c326cf06424c0..0000000000000
--- a/app/code/Magento/Signifyd/Model/CustomerOrders.php
+++ /dev/null
@@ -1,173 +0,0 @@
-searchCriteriaBuilder = $searchCriteriaBuilder;
- $this->filterBuilder = $filterBuilder;
- $this->orderRepository = $orderRepository;
- $this->currencyFactory = $currencyFactory;
- $this->logger = $logger;
- }
-
- /**
- * Returns aggregated customer orders count and total amount in USD.
- *
- * Returned array contains next keys:
- * aggregateOrderCount - total count of orders placed by this account since it was created, including the current
- * aggregateOrderDollars - total amount spent by this account since it was created, including the current order
- *
- * @param int $customerId
- * @return array
- */
- public function getAggregatedOrdersInfo($customerId)
- {
- $result = [
- 'aggregateOrderCount' => null,
- 'aggregateOrderDollars' => null
- ];
-
- $customerOrders = $this->getCustomerOrders($customerId);
- if (!empty($customerOrders)) {
- try {
- $orderTotalDollars = 0.0;
- foreach ($customerOrders as $order) {
- $orderTotalDollars += $this->getUsdOrderTotal(
- $order->getBaseGrandTotal(),
- $order->getBaseCurrencyCode()
- );
- }
- $result = [
- 'aggregateOrderCount' => count($customerOrders),
- 'aggregateOrderDollars' => $orderTotalDollars
- ];
- } catch (Exception $e) {
- $this->logger->error($e->getMessage());
- }
- }
-
- return $result;
- }
-
- /**
- * Returns customer orders.
- *
- * @param int $customerId
- * @return OrderInterface[]
- */
- private function getCustomerOrders($customerId)
- {
- $filters = [
- $this->filterBuilder->setField(OrderInterface::CUSTOMER_ID)->setValue($customerId)->create()
- ];
- $this->searchCriteriaBuilder->addFilters($filters);
- $searchCriteria = $this->searchCriteriaBuilder->create();
- $searchResults = $this->orderRepository->getList($searchCriteria);
-
- return $searchResults->getItems();
- }
-
- /**
- * Returns amount in USD.
- *
- * @param float $amount
- * @param string $currency
- * @return float
- */
- private function getUsdOrderTotal($amount, $currency)
- {
- if ($currency === self::$usdCurrencyCode) {
- return $amount;
- }
-
- $operationCurrency = $this->getCurrencyByCode($currency);
-
- return $operationCurrency->convert($amount, self::$usdCurrencyCode);
- }
-
- /**
- * Returns currency by currency code.
- *
- * @param string|null $currencyCode
- * @return Currency
- */
- private function getCurrencyByCode($currencyCode)
- {
- if (isset($this->currencies[$currencyCode])) {
- return $this->currencies[$currencyCode];
- }
-
- /** @var Currency $currency */
- $currency = $this->currencyFactory->create();
- $this->currencies[$currencyCode] = $currency->load($currencyCode);
-
- return $this->currencies[$currencyCode];
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/Guarantee/CancelGuaranteeAbility.php b/app/code/Magento/Signifyd/Model/Guarantee/CancelGuaranteeAbility.php
deleted file mode 100644
index 65bede6f0cea5..0000000000000
--- a/app/code/Magento/Signifyd/Model/Guarantee/CancelGuaranteeAbility.php
+++ /dev/null
@@ -1,84 +0,0 @@
-caseManagement = $caseManagement;
- $this->orderRepository = $orderRepository;
- }
-
- /**
- * Checks if it is possible to create Guarantee for order and case.
- *
- * @param int $orderId
- * @return bool
- */
- public function isAvailable($orderId)
- {
- $case = $this->caseManagement->getByOrderId($orderId);
- if ($case === null) {
- return false;
- }
-
- if (in_array($case->getGuaranteeDisposition(), [null, $case::GUARANTEE_CANCELED])) {
- return false;
- }
-
- $order = $this->getOrder($orderId);
- if (null === $order) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns order by id
- *
- * @param int $orderId
- * @return OrderInterface|null
- */
- private function getOrder($orderId)
- {
- try {
- $order = $this->orderRepository->get($orderId);
- } catch (InputException $e) {
- return null;
- } catch (NoSuchEntityException $e) {
- return null;
- }
-
- return $order;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/Guarantee/CancelingService.php b/app/code/Magento/Signifyd/Model/Guarantee/CancelingService.php
deleted file mode 100644
index b30efac8c2190..0000000000000
--- a/app/code/Magento/Signifyd/Model/Guarantee/CancelingService.php
+++ /dev/null
@@ -1,94 +0,0 @@
-caseManagement = $caseManagement;
- $this->serviceFactory = $serviceFactory;
- $this->gateway = $gateway;
- $this->cancelGuaranteeAbility = $cancelGuaranteeAbility;
- $this->logger = $logger;
- }
-
- /**
- * @inheritdoc
- */
- public function cancelForOrder($orderId)
- {
- if (!$this->cancelGuaranteeAbility->isAvailable($orderId)) {
- return false;
- }
-
- $caseEntity = $this->caseManagement->getByOrderId($orderId);
-
- try {
- $disposition = $this->gateway->cancelGuarantee($caseEntity->getCaseId());
- } catch (GatewayException $e) {
- $this->logger->error($e->getMessage());
- return false;
- }
-
- $updatingService = $this->serviceFactory->create('guarantees/cancel');
- $data = [
- 'guaranteeDisposition' => $disposition
- ];
- $updatingService->update($caseEntity, $data);
-
- return true;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/Guarantee/CreateGuaranteeAbility.php b/app/code/Magento/Signifyd/Model/Guarantee/CreateGuaranteeAbility.php
deleted file mode 100644
index 15addba3ec4fd..0000000000000
--- a/app/code/Magento/Signifyd/Model/Guarantee/CreateGuaranteeAbility.php
+++ /dev/null
@@ -1,124 +0,0 @@
-caseManagement = $caseManagement;
- $this->orderRepository = $orderRepository;
- $this->dateTimeFactory = $dateTimeFactory;
- }
-
- /**
- * Checks if it is possible to create Guarantee for order and case.
- *
- * @param int $orderId
- * @return bool
- */
- public function isAvailable($orderId)
- {
- $case = $this->caseManagement->getByOrderId($orderId);
- if (null === $case) {
- return false;
- }
-
- if ($case->isGuaranteeEligible() === false) {
- return false;
- }
-
- $order = $this->getOrder($orderId);
- if (null === $order) {
- return false;
- }
-
- if (in_array($order->getState(), [Order::STATE_CANCELED, Order::STATE_CLOSED])) {
- return false;
- }
-
- if ($this->isOrderOlderThen(static::$guarantyEligibleDays, $order)) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Checks if Guarantee submit is applicable for order.
- *
- * @param OrderInterface $order
- * @param int $days number of days from the order creation date to submit a case for Guarantee.
- * @return bool
- */
- private function isOrderOlderThen($days, OrderInterface $order)
- {
- $orderCreateDate = $this->dateTimeFactory->create($order->getCreatedAt(), new \DateTimeZone('UTC'));
- $currentDate = $this->dateTimeFactory->create('now', new \DateTimeZone('UTC'));
-
- return $orderCreateDate->diff($currentDate)->days >= $days;
- }
-
- /**
- * Returns order by id
- *
- * @param int $orderId
- * @return OrderInterface|null
- */
- private function getOrder($orderId)
- {
- try {
- $order = $this->orderRepository->get($orderId);
- } catch (InputException $e) {
- return null;
- } catch (NoSuchEntityException $e) {
- return null;
- }
-
- return $order;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/Guarantee/CreationService.php b/app/code/Magento/Signifyd/Model/Guarantee/CreationService.php
deleted file mode 100644
index 4080aee453f18..0000000000000
--- a/app/code/Magento/Signifyd/Model/Guarantee/CreationService.php
+++ /dev/null
@@ -1,97 +0,0 @@
-caseManagement = $caseManagement;
- $this->caseUpdatingServiceFactory = $caseUpdatingServiceFactory;
- $this->gateway = $gateway;
- $this->createGuaranteeAbility = $createGuaranteeAbility;
- $this->logger = $logger;
- }
-
- /**
- * @inheritdoc
- */
- public function createForOrder($orderId)
- {
- if (!$this->createGuaranteeAbility->isAvailable($orderId)) {
- return false;
- }
-
- $caseEntity = $this->caseManagement->getByOrderId($orderId);
-
- try {
- $disposition = $this->gateway->submitCaseForGuarantee($caseEntity->getCaseId());
- } catch (GatewayException $e) {
- $this->logger->error($e->getMessage());
- return false;
- }
-
- $updatingService = $this->caseUpdatingServiceFactory->create('guarantees/creation');
- $data = [
- 'caseId' => $caseEntity->getCaseId(),
- 'guaranteeDisposition' => $disposition
- ];
- $updatingService->update($caseEntity, $data);
-
- return true;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/MessageGenerators/CaseRescore.php b/app/code/Magento/Signifyd/Model/MessageGenerators/CaseRescore.php
deleted file mode 100644
index d0e89854e3909..0000000000000
--- a/app/code/Magento/Signifyd/Model/MessageGenerators/CaseRescore.php
+++ /dev/null
@@ -1,51 +0,0 @@
-caseRepository = $caseRepository;
- }
-
- /**
- * @inheritdoc
- */
- public function generate(array $data)
- {
- if (empty($data['caseId'])) {
- throw new GeneratorException(__('The "%1" should not be empty.', 'caseId'));
- }
-
- $caseEntity = $this->caseRepository->getByCaseId($data['caseId']);
-
- if ($caseEntity === null) {
- throw new GeneratorException(__('Case entity not found.'));
- }
-
- return __(
- 'Case Update: New score for the order is %1. Previous score was %2.',
- !empty($data['score']) ? $data['score'] : 0,
- $caseEntity->getScore()
- );
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorException.php b/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorException.php
deleted file mode 100644
index 103cb9fc1e2d3..0000000000000
--- a/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-objectManager = $objectManager;
- }
-
- /**
- * Creates instance of message generator.
- * Throws exception if type of message generator does not have implementations.
- *
- * @param string $type
- * @return GeneratorInterface
- * @throws \InvalidArgumentException
- */
- public function create($type)
- {
- $className = PatternGenerator::class;
- switch ($type) {
- case self::$caseCreation:
- $classConfig = [
- 'template' => 'Signifyd Case %1 has been created for order.',
- 'requiredParams' => ['caseId']
- ];
- break;
- case self::$caseRescore:
- $classConfig = [];
- $className = CaseRescore::class;
- break;
- case self::$caseReview:
- $classConfig = [
- 'template' => 'Case Update: Case Review was completed. Review Deposition is %1.',
- 'requiredParams' => ['reviewDisposition']
- ];
- break;
- case self::$guaranteeCompletion:
- $classConfig = [
- 'template' => 'Case Update: Guarantee Disposition is %1.',
- 'requiredParams' => ['guaranteeDisposition']
- ];
- break;
- case self::$guaranteeCreation:
- $classConfig = [
- 'template' => 'Case Update: Case is submitted for guarantee.'
- ];
- break;
- case self::$guaranteeCancel:
- $classConfig = [
- 'template' => 'Case Update: Case guarantee has been cancelled.'
- ];
- break;
- default:
- throw new \InvalidArgumentException('Specified message type does not supported.');
- }
-
- return $this->objectManager->create($className, $classConfig);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorInterface.php b/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorInterface.php
deleted file mode 100644
index 385cbe35f05ac..0000000000000
--- a/app/code/Magento/Signifyd/Model/MessageGenerators/GeneratorInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-template = $template;
- $this->requiredParams = $requiredParams;
- }
-
- /**
- * @inheritdoc
- */
- public function generate(array $data)
- {
- $placeholders = [];
- foreach ($this->requiredParams as $param) {
- if (empty($data[$param])) {
- throw new GeneratorException(__('The "%1" should not be empty.', $param));
- }
- $placeholders[] = $data[$param];
- }
- return __($this->template, ...$placeholders);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/OrderStateService.php b/app/code/Magento/Signifyd/Model/OrderStateService.php
deleted file mode 100644
index 2b3f0e155981e..0000000000000
--- a/app/code/Magento/Signifyd/Model/OrderStateService.php
+++ /dev/null
@@ -1,119 +0,0 @@
-orderFactory = $orderFactory;
- $this->orderManagement = $orderManagement;
- $this->commentsHistoryUpdater = $commentsHistoryUpdater;
- }
-
- /**
- * Updates order state depending on case guarantee disposition status.
- *
- * @param CaseInterface $case
- * @return void
- */
- public function updateByCase(CaseInterface $case)
- {
- $orderId = $case->getOrderId();
-
- switch ($case->getGuaranteeDisposition()) {
- case CaseInterface::GUARANTEE_APPROVED:
- $this->unHold($orderId);
- break;
- case CaseInterface::GUARANTEE_DECLINED:
- $this->hold($orderId);
- break;
- case CaseInterface::GUARANTEE_PENDING:
- if ($this->hold($orderId)) {
- $this->commentsHistoryUpdater->addComment(
- $case,
- __('Awaiting the Signifyd guarantee disposition.'),
- Order::STATE_HOLDED
- );
- }
- break;
- }
- }
-
- /**
- * Tries to unhold the order.
- *
- * @param int $orderId
- * @return bool
- */
- private function unHold($orderId)
- {
- $order = $this->getOrder($orderId);
- if ($order->canUnhold()) {
- return $this->orderManagement->unHold($orderId);
- }
-
- return false;
- }
-
- /**
- * Tries to hold the order.
- *
- * @param int $orderId
- * @return bool
- */
- private function hold($orderId)
- {
- $order = $this->getOrder($orderId);
- if ($order->canHold()) {
- return $this->orderManagement->hold($orderId);
- }
-
- return false;
- }
-
- /**
- * Returns the order.
- *
- * @param int $orderId
- * @return Order
- */
- private function getOrder($orderId)
- {
- return $this->orderFactory->create()->load($orderId);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/PaymentMethodMapper/PaymentMethodMapper.php b/app/code/Magento/Signifyd/Model/PaymentMethodMapper/PaymentMethodMapper.php
deleted file mode 100644
index cdf9041510b45..0000000000000
--- a/app/code/Magento/Signifyd/Model/PaymentMethodMapper/PaymentMethodMapper.php
+++ /dev/null
@@ -1,40 +0,0 @@
-paymentMethodMapping = $paymentMapping;
- }
-
- /**
- * Gets the Sygnifyd payment method by the order's payment method.
- *
- * @param string $paymentMethod
- * @return string
- */
- public function getSignifydPaymentMethodCode($paymentMethod)
- {
- return $this->paymentMethodMapping->get($paymentMethod, '');
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/PaymentMethodMapper/XmlToArrayConfigConverter.php b/app/code/Magento/Signifyd/Model/PaymentMethodMapper/XmlToArrayConfigConverter.php
deleted file mode 100644
index 5c3f23bb92729..0000000000000
--- a/app/code/Magento/Signifyd/Model/PaymentMethodMapper/XmlToArrayConfigConverter.php
+++ /dev/null
@@ -1,88 +0,0 @@
-getElementsByTagName(self::$paymentMethodNodeType);
- $paymentsList = [];
- foreach ($paymentMethods as $paymentMethod) {
- $paymentsList += $this->getPaymentMethodMapping($paymentMethod);
- }
-
- return $paymentsList;
- }
-
- /**
- * Adds a payment method as key and a Sygnifyd payment method as value
- * in the payment list array
- *
- * @param \DOMElement $payment
- * @return array
- * @throws ValidationSchemaException
- */
- private function getPaymentMethodMapping(\DOMElement $payment)
- {
- $paymentMethodCode = $this->readSubnodeValue($payment, self::$magentoCodeNodeType);
- $signifyPaymentMethodCode = $this->readSubnodeValue($payment, self::$signifydCodeNodeType);
-
- return [$paymentMethodCode => $signifyPaymentMethodCode];
- }
-
- /**
- * Reads node value by node type
- *
- * @param \DOMElement $element
- * @param string $subNodeType
- * @return mixed
- * @throws ValidationSchemaException
- */
- private function readSubnodeValue(\DOMElement $element, $subNodeType)
- {
- $domList = $element->getElementsByTagName($subNodeType);
- if (empty($domList[0])) {
- throw new ValidationSchemaException(__('Only single entrance of "%1" node is required.', $subNodeType));
- }
-
- $subNodeValue = trim($domList[0]->nodeValue);
- if (!$subNodeValue) {
- throw new ValidationSchemaException(__('Not empty value for "%1" node is required.', $subNodeType));
- }
-
- return $subNodeValue;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/PaymentVerificationFactory.php b/app/code/Magento/Signifyd/Model/PaymentVerificationFactory.php
deleted file mode 100644
index 5be5ccbc5e55a..0000000000000
--- a/app/code/Magento/Signifyd/Model/PaymentVerificationFactory.php
+++ /dev/null
@@ -1,109 +0,0 @@
-config = $config;
- $this->objectManager = $objectManager;
- $this->avsDefaultAdapter = $avsDefaultAdapter;
- $this->cvvDefaultAdapter = $cvvDefaultAdapter;
- }
-
- /**
- * Creates instance of CVV code verification.
- * Exception will be thrown if CVV mapper does not implement PaymentVerificationInterface.
- *
- * @param string $paymentCode
- * @return PaymentVerificationInterface
- * @throws ConfigurationMismatchException
- */
- public function createPaymentCvv($paymentCode)
- {
- return $this->create($this->cvvDefaultAdapter, $paymentCode, 'cvv_ems_adapter');
- }
-
- /**
- * Creates instance of AVS code verification.
- * Exception will be thrown if AVS mapper does not implement PaymentVerificationInterface.
- *
- * @param string $paymentCode
- * @return PaymentVerificationInterface
- * @throws ConfigurationMismatchException
- */
- public function createPaymentAvs($paymentCode)
- {
- return $this->create($this->avsDefaultAdapter, $paymentCode, 'avs_ems_adapter');
- }
-
- /**
- * Creates instance of PaymentVerificationInterface.
- * Default implementation will be returned if payment method does not implement PaymentVerificationInterface.
- *
- * @param PaymentVerificationInterface $defaultAdapter
- * @param string $paymentCode
- * @param string $configKey
- * @return PaymentVerificationInterface
- * @throws ConfigurationMismatchException If payment verification instance
- * does not implement PaymentVerificationInterface.
- */
- private function create(PaymentVerificationInterface $defaultAdapter, $paymentCode, $configKey)
- {
- $this->config->setMethodCode($paymentCode);
- $verificationClass = $this->config->getValue($configKey);
- if ($verificationClass === null) {
- return $defaultAdapter;
- }
- $mapper = $this->objectManager->create($verificationClass);
- if (!$mapper instanceof PaymentVerificationInterface) {
- throw new ConfigurationMismatchException(
- __('%1 must implement %2', $verificationClass, PaymentVerificationInterface::class)
- );
- }
- return $mapper;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/PredefinedVerificationCode.php b/app/code/Magento/Signifyd/Model/PredefinedVerificationCode.php
deleted file mode 100644
index 618d74b2a52e9..0000000000000
--- a/app/code/Magento/Signifyd/Model/PredefinedVerificationCode.php
+++ /dev/null
@@ -1,37 +0,0 @@
-code = $code;
- }
-
- /**
- * @inheritdoc
- */
- public function getCode(OrderPaymentInterface $orderPayment)
- {
- return $this->code;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/QuoteSession/Adminhtml/BackendSession.php b/app/code/Magento/Signifyd/Model/QuoteSession/Adminhtml/BackendSession.php
deleted file mode 100644
index 9be02719545c7..0000000000000
--- a/app/code/Magento/Signifyd/Model/QuoteSession/Adminhtml/BackendSession.php
+++ /dev/null
@@ -1,40 +0,0 @@
-backendQuoteSession = $backendQuoteSession;
- }
-
- /**
- * @inheritdoc
- */
- public function getQuote()
- {
- return $this->backendQuoteSession->getQuote();
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/QuoteSession/FrontendSession.php b/app/code/Magento/Signifyd/Model/QuoteSession/FrontendSession.php
deleted file mode 100644
index 44c226ae4a47e..0000000000000
--- a/app/code/Magento/Signifyd/Model/QuoteSession/FrontendSession.php
+++ /dev/null
@@ -1,39 +0,0 @@
-checkoutSession = $checkoutSession;
- }
-
- /**
- * @inheritdoc
- */
- public function getQuote()
- {
- return $this->checkoutSession->getQuote();
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/QuoteSession/QuoteSessionInterface.php b/app/code/Magento/Signifyd/Model/QuoteSession/QuoteSessionInterface.php
deleted file mode 100644
index 14958ac65a6ee..0000000000000
--- a/app/code/Magento/Signifyd/Model/QuoteSession/QuoteSessionInterface.php
+++ /dev/null
@@ -1,19 +0,0 @@
-_init('signifyd_case', 'entity_id');
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/ResourceModel/CaseEntity/Collection.php b/app/code/Magento/Signifyd/Model/ResourceModel/CaseEntity/Collection.php
deleted file mode 100644
index 92e233dd42dbc..0000000000000
--- a/app/code/Magento/Signifyd/Model/ResourceModel/CaseEntity/Collection.php
+++ /dev/null
@@ -1,24 +0,0 @@
-_init(CaseEntity::class, CaseResourceModel::class);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SalesOrderGrid/NotSyncedOrderIdListProvider.php b/app/code/Magento/Signifyd/Model/SalesOrderGrid/NotSyncedOrderIdListProvider.php
deleted file mode 100644
index 360225ae37b7b..0000000000000
--- a/app/code/Magento/Signifyd/Model/SalesOrderGrid/NotSyncedOrderIdListProvider.php
+++ /dev/null
@@ -1,54 +0,0 @@
-caseEntity = $caseEntity;
- }
-
- /**
- * @inheritdoc
- */
- public function getIds($mainTableName, $gridTableName)
- {
- $connection = $this->caseEntity->getConnection();
- $select = $connection->select()
- ->from($this->caseEntity->getMainTable(), ['order_id'])
- ->joinLeft(
- [$gridTableName => $connection->getTableName($gridTableName)],
- sprintf(
- '%s.%s = %s.%s',
- $this->caseEntity->getMainTable(),
- 'order_id',
- $gridTableName,
- 'entity_id'
- ),
- []
- )
- ->where('guarantee_disposition != signifyd_guarantee_status');
-
- return $connection->fetchAll($select, [], \Zend_Db::FETCH_COLUMN);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SalesOrderGrid/OrderGridUpdater.php b/app/code/Magento/Signifyd/Model/SalesOrderGrid/OrderGridUpdater.php
deleted file mode 100644
index fff42b300be58..0000000000000
--- a/app/code/Magento/Signifyd/Model/SalesOrderGrid/OrderGridUpdater.php
+++ /dev/null
@@ -1,55 +0,0 @@
-globalConfig = $globalConfig;
- $this->entityGrid = $entityGrid;
- }
-
- /**
- * Handles synchronous updating order entity in grid.
- *
- * Works only if asynchronous grid indexing is disabled
- * in global settings.
- *
- * @param int $orderId
- * @return void
- */
- public function update($orderId)
- {
- if (!$this->globalConfig->getValue('dev/grid/async_indexing')) {
- $this->entityGrid->refresh($orderId);
- }
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/ApiCallException.php b/app/code/Magento/Signifyd/Model/SignifydGateway/ApiCallException.php
deleted file mode 100644
index 73338c8ea4d62..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/ApiCallException.php
+++ /dev/null
@@ -1,39 +0,0 @@
-requestData = $requestData;
- parent::__construct($message, $code, $previous);
- }
-
- /**
- * Gets request data for unsuccessful request in JSON format
- * @return string
- */
- public function getRequestData()
- {
- return $this->requestData;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/ApiClient.php b/app/code/Magento/Signifyd/Model/SignifydGateway/ApiClient.php
deleted file mode 100644
index 2d6d57a510ae3..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/ApiClient.php
+++ /dev/null
@@ -1,49 +0,0 @@
-requestBuilder = $requestBuilder;
- }
-
- /**
- * Perform call to Signifyd API.
- *
- * Method returns associative array that corresponds to successful result.
- * Current implementation do not expose details in case of failure.
- *
- * @param string $url
- * @param string $method
- * @param array $params
- * @param int|null $storeId
- * @return array
- */
- public function makeApiCall($url, $method, array $params = [], $storeId = null): array
- {
- $result = $this->requestBuilder->doRequest($url, $method, $params, $storeId);
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/HttpClientFactory.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Client/HttpClientFactory.php
deleted file mode 100644
index 2a9b933b98b5d..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/HttpClientFactory.php
+++ /dev/null
@@ -1,146 +0,0 @@
-config = $config;
- $this->clientFactory = $clientFactory;
- $this->dataEncoder = $dataEncoder;
- }
-
- /**
- * Creates and configures HTTP client.
- *
- * @param string $url
- * @param string $method
- * @param array $params
- * @param int|null $storeId
- * @return ZendClient
- */
- public function create($url, $method, array $params = [], $storeId = null): ZendClient
- {
- $apiKey = $this->getApiKey($storeId);
- $apiUrl = $this->buildFullApiUrl($url, $storeId);
-
- $client = $this->createNewClient();
- $client->setHeaders(
- self::$authorizationType,
- sprintf('Basic %s', base64_encode($apiKey))
- );
- if (!empty($params)) {
- $encodedData = $this->dataEncoder->encode($params);
- $client->setRawData($encodedData, self::$jsonDataType);
- }
- $client->setMethod($method);
- $client->setUri($apiUrl);
-
- return $client;
- }
-
- /**
- * @return ZendClient
- */
- private function createNewClient()
- {
- return $this->clientFactory->create();
- }
-
- /**
- * Signifyd API key for merchant account.
- *
- * @see https://www.signifyd.com/docs/api/#/introduction/authentication
- * @param int|null $storeId
- * @return string
- */
- private function getApiKey($storeId): string
- {
- return $this->config->getApiKey($storeId);
- }
-
- /**
- * Full URL for Singifyd API based on relative URL.
- *
- * @param string $url
- * @param int|null $storeId
- * @return string
- */
- private function buildFullApiUrl($url, $storeId): string
- {
- $baseApiUrl = $this->getBaseApiUrl($storeId);
- $fullUrl = $baseApiUrl . self::$urlSeparator . ltrim($url, self::$urlSeparator);
-
- return $fullUrl;
- }
-
- /**
- * Base Sigifyd API URL without trailing slash.
- *
- * @param int|null $storeId
- * @return string
- */
- private function getBaseApiUrl($storeId): string
- {
- $baseApiUrl = $this->config->getApiUrl($storeId);
-
- return rtrim($baseApiUrl, self::$urlSeparator);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestBuilder.php
deleted file mode 100644
index ee079a74d345f..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestBuilder.php
+++ /dev/null
@@ -1,63 +0,0 @@
-clientCreator = $clientCreator;
- $this->requestSender = $requestSender;
- $this->responseHandler = $responseHandler;
- }
-
- /**
- * Creates HTTP client for API call.
- *
- * @param string $url
- * @param string $method
- * @param array $params
- * @param int|null $storeId
- * @return array
- */
- public function doRequest($url, $method, array $params = [], $storeId = null): array
- {
- $client = $this->clientCreator->create($url, $method, $params, $storeId);
- $response = $this->requestSender->send($client, $storeId);
- $result = $this->responseHandler->handle($response);
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestSender.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestSender.php
deleted file mode 100644
index a63331e055c1c..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/RequestSender.php
+++ /dev/null
@@ -1,74 +0,0 @@
-debuggerFactory = $debuggerFactory;
- }
-
- /**
- * Sends HTTP request to Signifyd API with configured client.
- *
- * Each request/response pair is handled by debugger.
- * If debug mode for Signifyd integration enabled in configuration
- * debug information is recorded to debug.log.
- *
- * @param ZendClient $client
- * @param int|null $storeId
- * @return \Zend_Http_Response
- * @throws ApiCallException
- */
- public function send(ZendClient $client, $storeId = null): \Zend_Http_Response
- {
- try {
- $response = $client->request();
-
- $this->debuggerFactory->create($storeId)->success(
- $client->getUri(true),
- $client->getLastRequest(),
- $response->getStatus() . ' ' . $response->getMessage(),
- $response->getBody()
- );
-
- return $response;
- } catch (\Exception $e) {
- $this->debuggerFactory->create($storeId)->failure(
- $client->getUri(true),
- $client->getLastRequest(),
- $e
- );
-
- throw new ApiCallException(
- 'Unable to process Signifyd API: ' . $e->getMessage(),
- $e->getCode(),
- $e,
- $client->getLastRequest()
- );
- }
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/ResponseHandler.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Client/ResponseHandler.php
deleted file mode 100644
index 614e59b7c29a2..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Client/ResponseHandler.php
+++ /dev/null
@@ -1,124 +0,0 @@
- 'Bad Request - The request could not be parsed. Response: %s',
- 401 => 'Unauthorized - user is not logged in, could not be authenticated. Response: %s',
- 403 => 'Forbidden - Cannot access resource. Response: %s',
- 404 => 'Not Found - resource does not exist. Response: %s',
- 409 => 'Conflict - with state of the resource on server. Can occur with (too rapid) PUT requests. Response: %s',
- 500 => 'Server error. Response: %s'
- ];
-
- /**
- * Unexpected Signifyd API response message.
- *
- * @var string
- */
- private static $unexpectedResponse = 'Unexpected Signifyd API response code "%s" with content "%s".';
-
- /**
- * @var DecoderInterface
- */
- private $dataDecoder;
-
- /**
- * ResponseHandler constructor.
- *
- * @param DecoderInterface $dataDecoder
- */
- public function __construct(
- DecoderInterface $dataDecoder
- ) {
- $this->dataDecoder = $dataDecoder;
- }
-
- /**
- * Reads result of successful operation and throws exception in case of any failure.
- *
- * @param \Zend_Http_Response $response
- * @return array
- * @throws ApiCallException
- */
- public function handle(\Zend_Http_Response $response)
- {
- $responseCode = $response->getStatus();
-
- if (!in_array($responseCode, self::$successResponseCodes)) {
- $errorMessage = $this->buildApiCallFailureMessage($response);
- throw new ApiCallException($errorMessage);
- }
-
- $responseBody = (string)$response->getBody();
-
- if (self::$phpVersionId < 70000 && empty($responseBody)) {
- /*
- * Only since PHP 7.0 empty string treated as JSON syntax error
- * http://php.net/manual/en/function.json-decode.php
- */
- throw new ApiCallException('Response is not valid JSON: Decoding failed: Syntax error');
- }
-
- try {
- $decodedResponseBody = $this->dataDecoder->decode($responseBody);
- } catch (\Exception $e) {
- throw new ApiCallException(
- 'Response is not valid JSON: ' . $e->getMessage(),
- $e->getCode(),
- $e
- );
- }
-
- return $decodedResponseBody;
- }
-
- /**
- * Error message for request rejected by Signify.
- *
- * @param \Zend_Http_Response $response
- * @return string
- */
- private function buildApiCallFailureMessage(\Zend_Http_Response $response)
- {
- $responseBody = $response->getBody();
-
- if (key_exists($response->getStatus(), self::$failureResponses)) {
- return sprintf(self::$failureResponses[$response->getStatus()], $responseBody);
- }
-
- return sprintf(
- self::$unexpectedResponse,
- $response->getStatus(),
- $responseBody
- );
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/BlackHole.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/BlackHole.php
deleted file mode 100644
index 7057313b5e415..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/BlackHole.php
+++ /dev/null
@@ -1,33 +0,0 @@
- Configuration > Sales > Fraud Detection > Signifyd > Debug)
- */
-class DebuggerFactory
-{
- /**
- * @var ObjectManagerInterface
- */
- private $objectManager;
-
- /**
- * @var Config
- */
- private $config;
-
- /**
- * DebuggerFactory constructor.
- *
- * @param ObjectManagerInterface $objectManager
- * @param Config $config
- */
- public function __construct(
- ObjectManagerInterface $objectManager,
- Config $config
- ) {
- $this->objectManager = $objectManager;
- $this->config = $config;
- }
-
- /**
- * Create debugger instance
- *
- * @param int|null $storeId
- * @return DebuggerInterface
- */
- public function create($storeId = null): DebuggerInterface
- {
- if (!$this->config->isDebugModeEnabled($storeId)) {
- return $this->objectManager->get(BlackHole::class);
- }
-
- return $this->objectManager->get(Log::class);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/DebuggerInterface.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/DebuggerInterface.php
deleted file mode 100644
index f4a2f9cc56a8f..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Debugger/DebuggerInterface.php
+++ /dev/null
@@ -1,35 +0,0 @@
-logger = $logger;
- }
-
- /**
- * {@inheritdoc}
- */
- public function success($requestUrl, $requestData, $responseStatus, $responseBody)
- {
- $requestInfo = $this->buildRequestInfo($requestUrl, $requestData);
- $responseInfo = $this->buildResponseInfo($responseStatus, $responseBody);
-
- $info = $requestInfo
- . $responseInfo;
-
- $this->writeToLog($info);
- }
-
- /**
- * {@inheritdoc}
- */
- public function failure($requestUrl, $requestData, Exception $exception)
- {
- $requestInfo = $this->buildRequestInfo($requestUrl, $requestData);
- $exceptionInfo = $this->buildExceptionInfo($exception);
-
- $info = $requestInfo
- . $exceptionInfo;
-
- $this->writeToLog($info);
- }
-
- /**
- * Build string with request URL and body
- *
- * @param string $requestUrl
- * @param string $requestData
- * @return string
- */
- private function buildRequestInfo($requestUrl, $requestData)
- {
- $infoContent = $this->buildInfoSection('URL', $requestUrl)
- . $this->buildInfoSection('Body', $requestData);
-
- $info = $this->buildInfoSection('Request', $infoContent);
- return $info;
- }
-
- /**
- * Build string with response status code and body
- *
- * @param string $responseStatus
- * @param string $responseBody
- * @return string
- */
- private function buildResponseInfo($responseStatus, $responseBody)
- {
- $infoContent = $this->buildInfoSection('Status', $responseStatus)
- . $this->buildInfoSection('Body', $responseBody);
-
- $info = $this->buildInfoSection('Response', $infoContent);
- return $info;
- }
-
- /**
- * Build string with exception information
- *
- * @param Exception $exception
- * @return string
- */
- private function buildExceptionInfo(Exception $exception)
- {
- $infoContent = (string)$exception;
- $info = $this->buildInfoSection('Exception', $infoContent);
- return $info;
- }
-
- /**
- * Write debug information to log file (var/log/debug.log by default)
- *
- * @param string $info
- * @return void
- */
- private function writeToLog($info)
- {
- $logMessage = $this->buildInfoSection('Signifyd API integration debug info', $info);
- $this->logger->debug($logMessage);
- }
-
- /**
- * Build unified debug section string
- *
- * @param string $title
- * @param string $content
- * @return string
- */
- private function buildInfoSection($title, $content)
- {
- $formattedInfo = $title . ":\n"
- . $this->addIndent($content) . "\n";
- return $formattedInfo;
- }
-
- /**
- * Add indent to each line in content
- *
- * @param string $content
- * @param string $indent
- * @return string
- */
- private function addIndent($content, $indent = ' ')
- {
- $contentLines = explode("\n", $content);
- $contentLinesWithIndent = array_map(function ($line) use ($indent) {
- return $indent . $line;
- }, $contentLines);
- $content = implode("\n", $contentLinesWithIndent);
- return $content;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Gateway.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Gateway.php
deleted file mode 100644
index 9f7a053c58724..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Gateway.php
+++ /dev/null
@@ -1,225 +0,0 @@
-createCaseBuilder = $createCaseBuilder;
- $this->apiClient = $apiClient;
- $this->orderRepository = $orderRepository;
- $this->caseRepository = $caseRepository;
- }
-
- /**
- * Returns id of created case (investigation) on Signifyd service
- * @see https://www.signifyd.com/docs/api/#/reference/cases/create-a-case
- *
- * @param int $orderId
- * @return int Signifyd case (investigation) identifier
- * @throws GatewayException
- */
- public function createCase($orderId)
- {
- $caseParams = $this->createCaseBuilder->build($orderId);
- $storeId = $this->getStoreIdFromOrder($orderId);
-
- $caseCreationResult = $this->apiClient->makeApiCall(
- '/cases',
- 'POST',
- $caseParams,
- $storeId
- );
-
- if (!isset($caseCreationResult['investigationId'])) {
- throw new GatewayException('Expected field "investigationId" missed.');
- }
-
- return (int)$caseCreationResult['investigationId'];
- }
-
- /**
- * Returns guaranty decision result
- * @see https://www.signifyd.com/docs/api/#/reference/guarantees/submit-a-case-for-guarantee
- *
- * @param int $signifydCaseId
- * @return string
- * @throws GatewayException
- */
- public function submitCaseForGuarantee($signifydCaseId)
- {
- $storeId = $this->getStoreIdFromCase($signifydCaseId);
- $guaranteeCreationResult = $this->apiClient->makeApiCall(
- '/guarantees',
- 'POST',
- [
- 'caseId' => $signifydCaseId,
- ],
- $storeId
- );
-
- $disposition = $this->processDispositionResult($guaranteeCreationResult);
- return $disposition;
- }
-
- /**
- * Sends request to cancel guarantee and returns disposition.
- *
- * @see https://www.signifyd.com/docs/api/#/reference/guarantees/submit-a-case-for-guarantee/cancel-guarantee
- * @param int $caseId
- * @return string
- * @throws GatewayException
- */
- public function cancelGuarantee($caseId)
- {
- $storeId = $this->getStoreIdFromCase($caseId);
- $result = $this->apiClient->makeApiCall(
- '/cases/' . $caseId . '/guarantee',
- 'PUT',
- [
- 'guaranteeDisposition' => self::GUARANTEE_CANCELED
- ],
- $storeId
- );
-
- $disposition = $this->processDispositionResult($result);
- if ($disposition !== self::GUARANTEE_CANCELED) {
- throw new GatewayException("API returned unexpected disposition: $disposition.");
- }
-
- return $disposition;
- }
-
- /**
- * Processes result from Signifyd API.
- * Throws the GatewayException is result does not contain guarantee disposition in response or
- * disposition has unknown status.
- *
- * @param array $result
- * @return string
- * @throws GatewayException
- */
- private function processDispositionResult(array $result)
- {
- if (!isset($result['disposition'])) {
- throw new GatewayException('Expected field "disposition" missed.');
- }
-
- $disposition = strtoupper($result['disposition']);
-
- if (!in_array($disposition, [
- self::GUARANTEE_APPROVED,
- self::GUARANTEE_DECLINED,
- self::GUARANTEE_PENDING,
- self::GUARANTEE_CANCELED,
- self::GUARANTEE_IN_REVIEW,
- self::GUARANTEE_UNREQUESTED
- ])) {
- throw new GatewayException(
- sprintf('API returns unknown guaranty disposition "%s".', $disposition)
- );
- }
-
- return $disposition;
- }
-
- /**
- * Returns store id by case.
- *
- * @param int $caseId
- * @return int|null
- */
- private function getStoreIdFromCase(int $caseId)
- {
- $case = $this->caseRepository->getByCaseId($caseId);
- $orderId = $case->getOrderId();
-
- return $this->getStoreIdFromOrder($orderId);
- }
-
- /**
- * Returns store id from order.
- *
- * @param int $orderId
- * @return int|null
- */
- private function getStoreIdFromOrder(int $orderId)
- {
- $order = $this->orderRepository->get($orderId);
-
- return $order->getStoreId();
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/GatewayException.php b/app/code/Magento/Signifyd/Model/SignifydGateway/GatewayException.php
deleted file mode 100644
index 666217f8ccc85..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/GatewayException.php
+++ /dev/null
@@ -1,14 +0,0 @@
- $this->getStreetLine(1, $address->getStreet()),
- 'unit' => $this->getStreetLine(2, $address->getStreet()),
- 'city' => $address->getCity(),
- 'provinceCode' => $address->getRegionCode(),
- 'postalCode' => $address->getPostcode(),
- 'countryCode' => $address->getCountryId()
- ];
- }
-
- /**
- * Get street line by number
- *
- * @param int $number
- * @param string[]|null $street
- * @return string
- */
- private function getStreetLine($number, $street)
- {
- $lines = is_array($street) ? $street : [];
-
- return $lines[$number - 1] ?? '';
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CardBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CardBuilder.php
deleted file mode 100644
index 5e3a1a83e7aeb..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CardBuilder.php
+++ /dev/null
@@ -1,56 +0,0 @@
-addressBuilder = $addressBuilder;
- }
-
- /**
- * Returns card data params based on payment and billing address info
- *
- * @param Order $order
- * @return array
- */
- public function build(Order $order)
- {
- $result = [];
- $address = $order->getBillingAddress();
- if ($address === null) {
- return $result;
- }
-
- $payment = $order->getPayment();
- $result = [
- 'card' => [
- 'cardHolderName' => $address->getFirstname() . ' ' . $address->getLastname(),
- 'last4' => $payment->getCcLast4(),
- 'expiryMonth' => $payment->getCcExpMonth(),
- 'expiryYear' => $payment->getCcExpYear(),
- 'billingAddress' => $this->addressBuilder->build($address)
- ]
- ];
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/ClientVersionBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/ClientVersionBuilder.php
deleted file mode 100644
index 8db06473b96d8..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/ClientVersionBuilder.php
+++ /dev/null
@@ -1,50 +0,0 @@
-productMetadata = $productMetadata;
- }
-
- /**
- * Returns version info
- *
- * @return array
- */
- public function build()
- {
- return [
- 'platformAndClient' => [
- 'storePlatform' => $this->productMetadata->getName() . ' ' . $this->productMetadata->getEdition(),
- 'storePlatformVersion' => $this->productMetadata->getVersion(),
- 'signifydClientApp' => $this->productMetadata->getName(),
- 'signifydClientAppVersion' => self::$clientVersion,
- ]
- ];
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilder.php
deleted file mode 100644
index 3e41003d47842..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilder.php
+++ /dev/null
@@ -1,131 +0,0 @@
-orderFactory = $orderFactory;
- $this->purchaseBuilder = $purchaseBuilder;
- $this->cardBuilder = $cardBuilder;
- $this->recipientBuilder = $recipientBuilder;
- $this->sellerBuilder = $sellerBuilder;
- $this->clientVersionBuilder = $clientVersionBuilder;
- $this->userAccountBuilder = $userAccountBuilder;
- }
-
- /**
- * @inheritdoc
- */
- public function build($orderId)
- {
- /* @var $order \Magento\Sales\Model\Order */
- $order = $this->orderFactory->create()->load($orderId);
-
- return $this->removeEmptyValues(
- array_merge(
- $this->purchaseBuilder->build($order),
- $this->cardBuilder->build($order),
- $this->recipientBuilder->build($order),
- $this->userAccountBuilder->build($order),
- $this->sellerBuilder->build($order),
- $this->clientVersionBuilder->build()
- )
- );
- }
-
- /**
- * Remove empty and null values.
- *
- * @param array $data
- * @return array
- */
- private function removeEmptyValues($data)
- {
- foreach ($data as $key => $value) {
- if (is_array($value)) {
- $data[$key] = $this->removeEmptyValues($data[$key]);
- }
-
- if ($this->isEmpty($data[$key])) {
- unset($data[$key]);
- }
- }
-
- return $data;
- }
-
- /**
- * Empty values are null, empty string and empty array.
- *
- * @param mixed $value
- * @return bool
- */
- private function isEmpty($value)
- {
- return $value === null || (is_array($value) && empty($value));
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderInterface.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderInterface.php
deleted file mode 100644
index 56662f69e7c5a..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-dateTimeFactory = $dateTimeFactory;
- $this->scope = $scope;
- $this->signifydOrderSessionId = $signifydOrderSessionId;
- $this->paymentVerificationFactory = $paymentVerificationFactory;
- $this->paymentMethodMapper = $paymentMethodMapper;
- }
-
- /**
- * Returns purchase data params
- *
- * @param Order $order
- * @return array
- * @throws ConfigurationMismatchException
- */
- public function build(Order $order)
- {
- $orderPayment = $order->getPayment();
- $createdAt = $this->dateTimeFactory->create(
- $order->getCreatedAt(),
- new \DateTimeZone('UTC')
- );
-
- $result = [
- 'purchase' => [
- 'orderSessionId' => $this->signifydOrderSessionId->get($order->getQuoteId()),
- 'browserIpAddress' => $order->getRemoteIp(),
- 'orderId' => $order->getIncrementId(),
- 'createdAt' => $createdAt->format(\DateTime::ATOM),
- 'paymentGateway' => $this->getPaymentGateway($orderPayment->getMethod()),
- 'transactionId' => $orderPayment->getLastTransId(),
- 'currency' => $order->getOrderCurrencyCode(),
- 'avsResponseCode' => $this->getAvsCode($orderPayment),
- 'cvvResponseCode' => $this->getCvvCode($orderPayment),
- 'orderChannel' => $this->getOrderChannel(),
- 'totalPrice' => $order->getGrandTotal(),
- 'paymentMethod' => $this->paymentMethodMapper
- ->getSignifydPaymentMethodCode($orderPayment->getMethod())
- ],
- ];
-
- $shippingDescription = $order->getShippingDescription();
- if ($shippingDescription !== null) {
- $result['purchase']['shipments'] = [
- [
- 'shipper' => $this->getShipper($order->getShippingDescription()),
- 'shippingMethod' => $this->getShippingMethod($order->getShippingDescription()),
- 'shippingPrice' => $order->getShippingAmount()
- ]
- ];
- }
-
- $products = $this->getProducts($order);
- if (!empty($products)) {
- $result['purchase']['products'] = $products;
- }
-
- return $result;
- }
-
- /**
- * Returns the products purchased in the transaction.
- *
- * @param Order $order
- * @return array
- */
- private function getProducts(Order $order)
- {
- $result = [];
- foreach ($order->getAllItems() as $orderItem) {
- $result[] = [
- 'itemId' => $orderItem->getSku(),
- 'itemName' => $orderItem->getName(),
- 'itemPrice' => $orderItem->getPrice(),
- 'itemQuantity' => (int)$orderItem->getQtyOrdered(),
- 'itemUrl' => $orderItem->getProduct()->getProductUrl(),
- 'itemWeight' => $orderItem->getProduct()->getWeight()
- ];
- }
-
- return $result;
- }
-
- /**
- * Returns the name of the shipper
- *
- * @param string $shippingDescription
- * @return string
- */
- private function getShipper($shippingDescription)
- {
- $result = explode(' - ', $shippingDescription, 2);
-
- return count($result) == 2 ? $result[0] : '';
- }
-
- /**
- * Returns the type of the shipment method used
- *
- * @param string $shippingDescription
- * @return string
- */
- private function getShippingMethod($shippingDescription)
- {
- $result = explode(' - ', $shippingDescription, 2);
-
- return count($result) == 2 ? $result[1] : '';
- }
-
- /**
- * Returns the gateway that processed the transaction. For PayPal orders should be paypal_account.
- *
- * @param string $gatewayCode
- * @return string
- */
- private function getPaymentGateway($gatewayCode)
- {
- $payPalCodeList = [
- 'paypal_express',
- 'braintree_paypal',
- 'payflowpro',
- 'payflow_express',
- 'payflow_link',
- 'payflow_advanced',
- 'hosted_pro',
- ];
- return in_array($gatewayCode, $payPalCodeList) ? 'paypal_account' : $gatewayCode;
- }
-
- /**
- * Returns WEB for web-orders, PHONE for orders created by Admin
- *
- * @return string
- */
- private function getOrderChannel()
- {
- return $this->scope->getCurrentScope() === Area::AREA_ADMINHTML ? 'PHONE' : 'WEB';
- }
-
- /**
- * Gets AVS code for order payment method.
- *
- * @param OrderPaymentInterface $orderPayment
- * @return string
- * @throws ConfigurationMismatchException
- */
- private function getAvsCode(OrderPaymentInterface $orderPayment)
- {
- $avsAdapter = $this->paymentVerificationFactory->createPaymentAvs($orderPayment->getMethod());
- return $avsAdapter->getCode($orderPayment);
- }
-
- /**
- * Gets CVV code for order payment method.
- *
- * @param OrderPaymentInterface $orderPayment
- * @return string
- * @throws ConfigurationMismatchException
- */
- private function getCvvCode(OrderPaymentInterface $orderPayment)
- {
- $cvvAdapter = $this->paymentVerificationFactory->createPaymentCvv($orderPayment->getMethod());
- return $cvvAdapter->getCode($orderPayment);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/RecipientBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/RecipientBuilder.php
deleted file mode 100644
index d9d26c8943b88..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/RecipientBuilder.php
+++ /dev/null
@@ -1,55 +0,0 @@
-addressBuilder = $addressBuilder;
- }
-
- /**
- * Returns recipient data params based on shipping address
- *
- * @param Order $order
- * @return array
- */
- public function build(Order $order)
- {
- $result = [];
- $address = $order->getShippingAddress();
- if ($address === null) {
- return $result;
- }
-
- $result = [
- 'recipient' => [
- 'fullName' => $address->getName(),
- 'confirmationEmail' => $address->getEmail(),
- 'confirmationPhone' => $address->getTelephone(),
- 'organization' => $address->getCompany(),
- 'deliveryAddress' => $this->addressBuilder->build($address)
- ]
- ];
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/SellerBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/SellerBuilder.php
deleted file mode 100644
index b2cf0401b247f..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/SellerBuilder.php
+++ /dev/null
@@ -1,136 +0,0 @@
-scopeConfig = $scopeConfig;
- $this->regionFactory = $regionFactory;
- }
-
- /**
- * Returns seller data params
- *
- * @param Order $order
- * @return array
- */
- public function build(Order $order)
- {
- $store = $order->getStore();
-
- return [
- 'seller' => [
- 'name' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_NAME, $store),
- 'domain' => $this->getPublicDomain($store),
- 'shipFromAddress' => [
- 'streetAddress' => $this->getConfigValue(Shipment::XML_PATH_STORE_ADDRESS1, $store),
- 'unit' => $this->getConfigValue(Shipment::XML_PATH_STORE_ADDRESS2, $store),
- 'city' => $this->getConfigValue(Shipment::XML_PATH_STORE_CITY, $store),
- 'provinceCode' => $this->getRegionCodeById(
- $this->getConfigValue(Shipment::XML_PATH_STORE_REGION_ID, $store)
- ),
- 'postalCode' => $this->getConfigValue(Shipment::XML_PATH_STORE_ZIP, $store),
- 'countryCode' => $this->getConfigValue(Shipment::XML_PATH_STORE_COUNTRY_ID, $store),
- ],
- 'corporateAddress' => [
- 'streetAddress' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_STREET_LINE1, $store),
- 'unit' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_STREET_LINE2, $store),
- 'city' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_CITY, $store),
- 'provinceCode' => $this->getRegionCodeById(
- $this->getConfigValue(Information::XML_PATH_STORE_INFO_REGION_CODE, $store)
- ),
- 'postalCode' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_POSTCODE, $store),
- 'countryCode' => $this->getConfigValue(Information::XML_PATH_STORE_INFO_COUNTRY_CODE, $store),
- ]
- ]
- ];
- }
-
- /**
- * Returns region code by id
- *
- * @param int $regionId
- * @return string
- */
- private function getRegionCodeById($regionId)
- {
- if (!isset($this->regionCodes[$regionId])) {
- $this->regionCodes[$regionId] = $this->regionFactory->create()->load($regionId)->getCode();
- }
-
- return $this->regionCodes[$regionId];
- }
-
- /**
- * Returns value from config
- *
- * @param string $value
- * @param StoreInterface $store
- * @return mixed
- */
- private function getConfigValue($value, StoreInterface $store)
- {
- return $this->scopeConfig->getValue(
- $value,
- ScopeInterface::SCOPE_STORE,
- $store
- );
- }
-
- /**
- * Returns public domain name
- *
- * @param StoreInterface $store
- * @return string|null null if no DNS records corresponding to a current host found
- */
- private function getPublicDomain(StoreInterface $store)
- {
- $baseUrl = $store->getBaseUrl();
- $domain = parse_url($baseUrl, PHP_URL_HOST);
- if (\function_exists('checkdnsrr') && false === \checkdnsrr($domain)) {
- return null;
- }
-
- return $domain;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/UserAccountBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/UserAccountBuilder.php
deleted file mode 100644
index 0da49b85da869..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/UserAccountBuilder.php
+++ /dev/null
@@ -1,100 +0,0 @@
-customerRepository = $customerRepository;
- $this->dateTimeFactory = $dateTimeFactory;
- $this->customerOrders = $customerOrders;
- }
-
- /**
- * Returns user account data params.
- * Only for registered customers.
- *
- * @param Order $order
- * @return array
- */
- public function build(Order $order)
- {
- $result = [];
-
- $customerId = $order->getCustomerId();
- if (null === $customerId) {
- return $result;
- }
-
- $customer = $this->customerRepository->getById($customerId);
- $result = [
- 'userAccount' => [
- 'email' => $customer->getEmail(),
- 'username' => $customer->getEmail(),
- 'phone' => $order->getBillingAddress()->getTelephone(),
- 'accountNumber' => $customerId,
- 'createdDate' => $this->formatDate($customer->getCreatedAt()),
- 'lastUpdateDate' => $this->formatDate($customer->getUpdatedAt())
- ]
- ];
-
- $ordersInfo = $this->customerOrders->getAggregatedOrdersInfo($customerId);
- if (isset($ordersInfo['aggregateOrderCount'])) {
- $result['userAccount']['aggregateOrderCount'] = $ordersInfo['aggregateOrderCount'];
- }
- if (isset($ordersInfo['aggregateOrderDollars'])) {
- $result['userAccount']['aggregateOrderDollars'] = $ordersInfo['aggregateOrderDollars'];
- }
-
- return $result;
- }
-
- /**
- * Returns date formatted according to ISO8601.
- *
- * @param string $date
- * @return string
- */
- private function formatDate($date)
- {
- $result = $this->dateTimeFactory->create(
- $date,
- new \DateTimeZone('UTC')
- );
-
- return $result->format(\DateTime::ATOM);
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessage.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessage.php
deleted file mode 100644
index f77db737473c0..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessage.php
+++ /dev/null
@@ -1,64 +0,0 @@
-data = $data;
- $this->eventTopic = $eventTopic;
- }
-
- /**
- * Returns decoded webhook request body.
- *
- * @return array
- */
- public function getData()
- {
- return $this->data;
- }
-
- /**
- * Returns event topic identifier.
- *
- * @return string
- */
- public function getEventTopic()
- {
- return $this->eventTopic;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessageReader.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessageReader.php
deleted file mode 100644
index 50389102359b1..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookMessageReader.php
+++ /dev/null
@@ -1,65 +0,0 @@
-dataDecoder = $decoder;
- $this->webhookMessageFactory = $webhookMessageFactory;
- }
-
- /**
- * Returns webhook message data object.
- *
- * @param WebhookRequest $request
- * @return WebhookMessage
- * @throws \InvalidArgumentException
- */
- public function read(WebhookRequest $request)
- {
- try {
- $decodedData = $this->dataDecoder->decode($request->getBody());
- } catch (\Exception $e) {
- throw new \InvalidArgumentException(
- 'Webhook request body is not valid JSON: ' . $e->getMessage(),
- $e->getCode(),
- $e
- );
- }
-
- $webhookMessage = $this->webhookMessageFactory->create(
- [
- 'data' => $decodedData,
- 'eventTopic' => $request->getEventTopic()
- ]
- );
-
- return $webhookMessage;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequest.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequest.php
deleted file mode 100644
index 214ccf0eeb70f..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequest.php
+++ /dev/null
@@ -1,58 +0,0 @@
-request = $request;
- }
-
- /**
- * Returns Base64 encoded output of the HMAC SHA256 encoding of the JSON body of the message.
- *
- * @return string
- */
- public function getHash()
- {
- return (string)$this->request->getHeader('X-SIGNIFYD-SEC-HMAC-SHA256');
- }
-
- /**
- * Returns event topic identifier.
- *
- * @return string
- */
- public function getEventTopic()
- {
- return (string)$this->request->getHeader('X-SIGNIFYD-TOPIC');
- }
-
- /**
- * Returns raw data from the request body.
- *
- * @return string
- */
- public function getBody()
- {
- return (string)$this->request->getContent();
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequestValidator.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequestValidator.php
deleted file mode 100644
index 274ef2f854684..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Response/WebhookRequestValidator.php
+++ /dev/null
@@ -1,113 +0,0 @@
-config = $config;
- $this->decoder = $decoder;
- }
-
- /**
- * Validates webhook request.
- *
- * @param WebhookRequest $webhookRequest
- * @return bool
- */
- public function validate(WebhookRequest $webhookRequest)
- {
- $body = $webhookRequest->getBody();
- $eventTopic = $webhookRequest->getEventTopic();
- $hash = $webhookRequest->getHash();
-
- return $this->isValidTopic($eventTopic)
- && $this->isValidBody($body)
- && $this->isValidHash($eventTopic, $body, $hash);
- }
-
- /**
- * Checks if value of topic identifier is in allowed list
- *
- * @param string $topic topic identifier.
- * @return bool
- */
- private function isValidTopic($topic)
- {
- return in_array($topic, $this->allowedTopicValues);
- }
-
- /**
- * Verifies a webhook request body is valid JSON and not empty.
- *
- * @param string $body
- * @return bool
- */
- private function isValidBody($body)
- {
- try {
- $decodedBody = $this->decoder->decode($body);
- } catch (\Exception $e) {
- return false;
- }
-
- return !empty($decodedBody);
- }
-
- /**
- * Verifies a webhook request has in fact come from SIGNIFYD.
- *
- * @param string $eventTopic
- * @param string $body
- * @param string $hash
- * @return bool
- */
- private function isValidHash($eventTopic, $body, $hash)
- {
- // In the case that this is a webhook test, the encoding ABCDE is allowed
- $apiKey = $eventTopic == 'cases/test' ? 'ABCDE' : $this->config->getApiKey();
- $actualHash = base64_encode(hash_hmac('sha256', $body, $apiKey, true));
-
- return $hash === $actualHash;
- }
-}
diff --git a/app/code/Magento/Signifyd/Model/SignifydOrderSessionId.php b/app/code/Magento/Signifyd/Model/SignifydOrderSessionId.php
deleted file mode 100644
index 52746bc4ec6c5..0000000000000
--- a/app/code/Magento/Signifyd/Model/SignifydOrderSessionId.php
+++ /dev/null
@@ -1,39 +0,0 @@
-identityGenerator = $identityGenerator;
- }
-
- /**
- * Returns unique identifier through generation uuid by quote id.
- *
- * @param int $quoteId
- * @return string
- */
- public function get($quoteId)
- {
- return $this->identityGenerator->generateIdForData($quoteId);
- }
-}
diff --git a/app/code/Magento/Signifyd/Observer/PlaceOrder.php b/app/code/Magento/Signifyd/Observer/PlaceOrder.php
deleted file mode 100644
index 7c451a129cccd..0000000000000
--- a/app/code/Magento/Signifyd/Observer/PlaceOrder.php
+++ /dev/null
@@ -1,112 +0,0 @@
-signifydIntegrationConfig = $signifydIntegrationConfig;
- $this->caseCreationService = $caseCreationService;
- $this->logger = $logger;
- }
-
- /**
- * {@inheritdoc}
- */
- public function execute(Observer $observer)
- {
- $orders = $this->extractOrders(
- $observer->getEvent()
- );
-
- if (null === $orders) {
- return;
- }
-
- foreach ($orders as $order) {
- $storeId = $order->getStoreId();
- if ($this->signifydIntegrationConfig->isActive($storeId)) {
- $this->createCaseForOrder($order);
- }
- }
- }
-
- /**
- * Creates Signifyd case for single order with online payment method.
- *
- * @param OrderInterface $order
- * @return void
- */
- private function createCaseForOrder($order)
- {
- $orderId = $order->getEntityId();
- if (null === $orderId
- || $order->getPayment()->getMethodInstance()->isOffline()
- || $order->getState() === Order::STATE_PENDING_PAYMENT) {
- return;
- }
-
- try {
- $this->caseCreationService->createForOrder($orderId);
- } catch (AlreadyExistsException $e) {
- $this->logger->error($e->getMessage());
- }
- }
-
- /**
- * Returns Orders entity list from Event data container
- *
- * @param Event $event
- * @return OrderInterface[]|null
- */
- private function extractOrders(Event $event)
- {
- $order = $event->getData('order');
- if (null !== $order) {
- return [$order];
- }
-
- return $event->getData('orders');
- }
-}
diff --git a/app/code/Magento/Signifyd/Plugin/OrderPlugin.php b/app/code/Magento/Signifyd/Plugin/OrderPlugin.php
deleted file mode 100644
index 663409d0eb824..0000000000000
--- a/app/code/Magento/Signifyd/Plugin/OrderPlugin.php
+++ /dev/null
@@ -1,52 +0,0 @@
-guaranteeCancelingService = $guaranteeCancelingService;
- }
-
- /**
- * Performs Signifyd guarantee cancel operation after order canceling
- * if cancel order operation was successful.
- *
- * @see Order::cancel
- * @param Order $order
- * @param OrderInterface $result
- * @return OrderInterface
- */
- public function afterCancel(Order $order, $result)
- {
- if ($order->isCanceled()) {
- $this->guaranteeCancelingService->cancelForOrder(
- $order->getEntityId()
- );
- }
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Signifyd/Plugin/PaymentPlugin.php b/app/code/Magento/Signifyd/Plugin/PaymentPlugin.php
deleted file mode 100644
index 17cf4d7e7dbe9..0000000000000
--- a/app/code/Magento/Signifyd/Plugin/PaymentPlugin.php
+++ /dev/null
@@ -1,67 +0,0 @@
-guaranteeCancelingService = $guaranteeCancelingService;
- }
-
- /**
- * Performs Signifyd guarantee cancel operation after payment denying.
- *
- * @see MethodInterface::denyPayment
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- *
- * @param MethodInterface $subject
- * @param MethodInterface|bool $result
- * @param InfoInterface $payment
- * @return bool|MethodInterface
- */
- public function afterDenyPayment(MethodInterface $subject, $result, InfoInterface $payment)
- {
- if ($this->isPaymentDenied($payment, $result)) {
- $this->guaranteeCancelingService->cancelForOrder($payment->getParentId());
- }
-
- return $result;
- }
-
- /**
- * Checks if deny payment operation was successful.
- *
- * Result not false check for payment methods using AbstractMethod.
- * Transaction is closed check for payment methods using Gateway.
- *
- * @param InfoInterface $payment
- * @param MethodInterface $result
- * @return bool
- */
- private function isPaymentDenied($payment, $result)
- {
- return $result !== false || $payment->getIsTransactionClosed();
- }
-}
diff --git a/app/code/Magento/Signifyd/README.md b/app/code/Magento/Signifyd/README.md
deleted file mode 100644
index 8048716bed444..0000000000000
--- a/app/code/Magento/Signifyd/README.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# Magento_Signifyd module
-
-## Overview
-
-The Magento_Signifyd module provides integration with the [Signifyd](https://www.signifyd.com/) fraud protection system. The integration is based on the Signifyd API; see the [Signifyd API docs](https://www.signifyd.com/docs/api/#/introduction/) for technical details.
-
-The module implementation allows to:
-
- - create a [Signifyd case](https://www.signifyd.com/docs/api/#/reference/cases) for a placed order
- - automatically receive a [Signifyd guarantee](https://www.signifyd.com/docs/api/#/reference/guarantees) for a created case
- - automatically cancel a guarantee when the order is canceled
-
-## Extensibility
-
-The Magento_Signifyd module does not add own Events, Layouts, and UI Components as extension points.
-
-### Public API
-
-The following interfaces (marked with the `@api` annotation) provide methods that allow to:
-
-`Magento\Signifyd\Api\Data\CaseInterface` (common abstraction for the Signifyd case entity):
-
-- set or retrieve all case data fields
-
-`Magento\Signifyd\Api\CaseManagementInterface`:
-
-- create a new case entity
-- retrieve the existing case entity for a specified order
-
-`Magento\Signifyd\Api\CaseCreationServiceInterface`:
-
-- create a case entity for a specified order
-- send a request through the Signifyd API to create a new case
-
-`Magento\Signifyd\Api\CaseRepositoryInterface`:
-
-- describe methods to work with a case entity
-
-`Magento\Signifyd\Api\GuaranteeCreationServiceInterface`:
-
-- send a request through the Signifyd API to create a new case guarantee
-
-`Magento\Signifyd\Api\GuaranteeCancelingServiceInterface`:
-- send a request through the Signifyd API to cancel the Signifyd case guarantee
-
-`Magento\Signifyd\Api\Data\CaseSearchResultsInterface`:
-
-- might be used by `Magento\Signifyd\Api\CaseRepositoryInterface` to retrieve a list of case entities by specific conditions
-
-For information about a public API in Magento 2, see [Public interfaces & APIs](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/api-concepts.html).
-
-## Additional information
-
-### Webhooks
-
-To update the entity data for a case or guarantee, the Magento_Signifyd module uses the [Signifyd Webhooks](https://www.signifyd.com/docs/api/#/reference/webhooks) mechanism.
-
-The newly created case entities have the `PENDING` status for a case and a guarantee. After receiving Webhook, both statuses are changed to appropriate Signifyd statuses.
-
-### Debug mode
-
-The Debug Mode may be enabled in the module configuration. This logs the communication data between the Magento_Signifyd module and the Signifyd service in this file:
-
- var/log/debug.log
-
-### Backward incompatible changes
-
-The Magento_Signifyd module does not introduce backward incompatible changes.
-
-You can track [backward incompatible changes in patch releases](https://devdocs.magento.com/guides/v2.3/release-notes/backward-incompatible-changes/reference.html).
-
-### Processing supplementary payment information
-
-To improve the accuracy of Signifyd's transaction estimation, you may perform these operations (links lead to the Magento Developer Documentation Portal):
-
-- [Provide custom AVS/CVV mapping](https://devdocs.magento.com/guides/v2.3/payments-integrations/signifyd/signifyd.html#provide-avscvv-response-codes)
-
-- [Retrieve payment method for a placed order](https://devdocs.magento.com/guides/v2.3/payments-integrations/signifyd/signifyd.html#retrieve-payment-method-for-a-placed-order)
diff --git a/app/code/Magento/Signifyd/Test/Mftf/LICENSE.txt b/app/code/Magento/Signifyd/Test/Mftf/LICENSE.txt
deleted file mode 100644
index 49525fd99da9c..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/LICENSE.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Open Software License ("OSL") v. 3.0
-
-This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
-Licensed under the Open Software License version 3.0
-
- 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
- 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
-
- 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
-
- 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
-
- 4. to perform the Original Work publicly; and
-
- 5. to display the Original Work publicly.
-
- 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
- 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
- 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
- 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
- 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
- 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
- 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
- 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
- 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
- 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
- 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
- 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
- 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
- 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
-
- 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
\ No newline at end of file
diff --git a/app/code/Magento/Signifyd/Test/Mftf/LICENSE_AFL.txt b/app/code/Magento/Signifyd/Test/Mftf/LICENSE_AFL.txt
deleted file mode 100644
index f39d641b18a19..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/LICENSE_AFL.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Academic Free License ("AFL") v. 3.0
-
-This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
-
-Licensed under the Academic Free License version 3.0
-
- 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
-
- 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
-
- 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
-
- 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
-
- 4. to perform the Original Work publicly; and
-
- 5. to display the Original Work publicly.
-
- 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
-
- 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
-
- 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
-
- 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
-
- 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
-
- 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
-
- 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
-
- 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
-
- 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
-
- 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
-
- 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
-
- 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
-
- 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
- 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
-
- 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
diff --git a/app/code/Magento/Signifyd/Test/Mftf/Page/AdminFraudProtectionPage.xml b/app/code/Magento/Signifyd/Test/Mftf/Page/AdminFraudProtectionPage.xml
deleted file mode 100644
index 07b58b8594843..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/Page/AdminFraudProtectionPage.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/Test/Mftf/README.md b/app/code/Magento/Signifyd/Test/Mftf/README.md
deleted file mode 100644
index 9391d7b314ea5..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Signifyd Functional Tests
-
-The Functional Test Module for **Magento Signifyd** module.
diff --git a/app/code/Magento/Signifyd/Test/Mftf/Section/AdminSignifydConfigurationSection.xml b/app/code/Magento/Signifyd/Test/Mftf/Section/AdminSignifydConfigurationSection.xml
deleted file mode 100644
index 618e9d520dd87..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/Section/AdminSignifydConfigurationSection.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml b/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml
deleted file mode 100644
index e3275d4097c63..0000000000000
--- a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/Test/Unit/Block/Adminhtml/CaseInfoTest.php b/app/code/Magento/Signifyd/Test/Unit/Block/Adminhtml/CaseInfoTest.php
deleted file mode 100644
index 164cd8018fb69..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Block/Adminhtml/CaseInfoTest.php
+++ /dev/null
@@ -1,150 +0,0 @@
-context = $this->getMockBuilder(Context::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->request = $this->getMockBuilder(RequestInterface::class)
- ->getMockForAbstractClass();
-
- $this->context->expects(self::once())
- ->method('getRequest')
- ->willReturn($this->request);
-
- $this->config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->caseManagement = $this->getMockBuilder(CaseManagement::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getScore'])
- ->getMockForAbstractClass();
-
- $this->caseInfo = $objectManager->getObject(CaseInfo::class, [
- 'context' => $this->context,
- 'config' => $this->config,
- 'caseManagement' => $this->caseManagement
- ]);
- }
-
- /**
- * Checks label according to Signifyd Guarantee Disposition.
- *
- * @param string $guaranteeDisposition
- * @param string $expectedLabel
- * @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getCaseGuaranteeDisposition()
- * @dataProvider getGuaranteeLabelDataProvider
- */
- public function testGetGuaranteeDisposition($guaranteeDisposition, $expectedLabel)
- {
- $this->caseManagement->expects(self::once())
- ->method('getByOrderId')
- ->willReturn($this->caseEntity);
-
- $this->caseEntity->expects(self::atLeastOnce())
- ->method('getGuaranteeDisposition')
- ->willReturn($guaranteeDisposition);
-
- self::assertEquals(
- $expectedLabel,
- $this->caseInfo->getCaseGuaranteeDisposition()
- );
- }
-
- /**
- * Case Guarantee Disposition and corresponding label data provider.
- *
- * @return array
- */
- public function getGuaranteeLabelDataProvider()
- {
- return [
- [CaseInterface::GUARANTEE_APPROVED, __('Approved')],
- [CaseInterface::GUARANTEE_DECLINED, __('Declined')],
- [CaseInterface::GUARANTEE_PENDING, __('Pending')],
- [CaseInterface::GUARANTEE_CANCELED, __('Canceled')],
- [CaseInterface::GUARANTEE_IN_REVIEW, __('In Review')],
- [CaseInterface::GUARANTEE_UNREQUESTED, __('Unrequested')],
- ['Unregistered', '']
- ];
- }
-
- /**
- * Checks case property getter with empty case.
- *
- * @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getCaseProperty
- */
- public function testCasePropertyWithEmptyCase()
- {
- $this->caseManagement->expects(self::once())
- ->method('getByOrderId')
- ->willReturn(null);
-
- self::assertEquals(
- '',
- $this->caseInfo->getCaseGuaranteeDisposition()
- );
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Controller/Webhooks/HandlerTest.php b/app/code/Magento/Signifyd/Test/Unit/Controller/Webhooks/HandlerTest.php
deleted file mode 100644
index 8b98be338b973..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Controller/Webhooks/HandlerTest.php
+++ /dev/null
@@ -1,374 +0,0 @@
-context = $this->getMockBuilder(Context::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->webhookRequest = $this->getMockBuilder(WebhookRequest::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->webhookMessageReader = $this->getMockBuilder(WebhookMessageReader::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->webhookRequestValidator = $this->getMockBuilder(WebhookRequestValidator::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->caseUpdatingServiceFactory = $this->getMockBuilder(UpdatingServiceFactory::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->getMockForAbstractClass();
-
- $this->response = $this->getMockBuilder(ResponseHttp::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->context->expects($this->once())
- ->method('getResponse')
- ->willReturn($this->response);
- $this->redirect = $this->getMockBuilder(RedirectInterface::class)
- ->getMockForAbstractClass();
- $this->context->expects($this->once())
- ->method('getRedirect')
- ->willReturn($this->redirect);
- $this->caseRepository = $this->getMockBuilder(CaseRepositoryInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getByCaseId'])
- ->getMockForAbstractClass();
-
- $config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->setMethods(['isDebugModeEnabled', 'getByCaseId'])
- ->getMock();
- $config->expects(self::any())
- ->method('getByCaseId')
- ->willReturn(false);
-
- $this->controller = new Handler(
- $this->context,
- $this->webhookRequest,
- $this->logger,
- $this->webhookMessageReader,
- $this->caseUpdatingServiceFactory,
- $this->webhookRequestValidator,
- $this->caseRepository,
- $config
- );
- }
-
- /**
- * Successful case
- */
- public function testExecuteSuccessfully()
- {
- $eventTopic = 'cases/creation';
- $caseId = 1;
- $data = ['score' => 200, 'caseId' => $caseId];
-
- $this->webhookRequestValidator->expects($this->once())
- ->method('validate')
- ->willReturn(true);
-
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookMessage->expects($this->exactly(2))
- ->method('getEventTopic')
- ->willReturn($eventTopic);
- $webhookMessage->expects($this->once())
- ->method('getData')
- ->willReturn($data);
- $this->webhookMessageReader->expects($this->once())
- ->method('read')
- ->with($this->webhookRequest)
- ->willReturn($webhookMessage);
-
- $caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->caseRepository->expects(self::once())
- ->method('getByCaseId')
- ->with(self::equalTo($caseId))
- ->willReturn($caseEntity);
-
- $caseUpdatingService = $this->getMockBuilder(UpdatingService::class)
- ->disableOriginalConstructor()
- ->getMock();
- $caseUpdatingService->expects($this->once())
- ->method('update')
- ->with($caseEntity, $data);
-
- $this->caseUpdatingServiceFactory->expects($this->once())
- ->method('create')
- ->with($eventTopic)
- ->willReturn($caseUpdatingService);
-
- $this->controller->execute();
- }
-
- /**
- * Case when there is exception while updating case
- */
- public function testExecuteCaseUpdatingServiceException()
- {
- $eventTopic = 'cases/creation';
- $caseId = 1;
- $data = ['score' => 200, 'caseId' => $caseId];
-
- $this->webhookRequestValidator->expects($this->once())
- ->method('validate')
- ->willReturn(true);
-
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookMessage->expects($this->exactly(2))
- ->method('getEventTopic')
- ->willReturn($eventTopic);
- $webhookMessage->expects($this->once())
- ->method('getData')
- ->willReturn($data);
- $this->webhookMessageReader->expects($this->once())
- ->method('read')
- ->with($this->webhookRequest)
- ->willReturn($webhookMessage);
-
- $caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->caseRepository->expects(self::once())
- ->method('getByCaseId')
- ->with(self::equalTo($caseId))
- ->willReturn($caseEntity);
-
- $caseUpdatingService = $this->getMockBuilder(UpdatingService::class)
- ->disableOriginalConstructor()
- ->getMock();
- $caseUpdatingService->expects($this->once())
- ->method('update')
- ->with($caseEntity, $data)
- ->willThrowException(new LocalizedException(__('Error')));
-
- $this->caseUpdatingServiceFactory->expects($this->once())
- ->method('create')
- ->with($eventTopic)
- ->willReturn($caseUpdatingService);
-
- $this->response->expects($this->once())
- ->method('setHttpResponseCode')
- ->with(400);
- $this->logger->expects($this->once())
- ->method('critical');
-
- $this->controller->execute();
- }
-
- /**
- * Case when webhook request validation fails
- */
- public function testExecuteRequestValidationFails()
- {
- $this->webhookRequestValidator->expects($this->once())
- ->method('validate')
- ->willReturn(false);
- $this->redirect->expects($this->once())
- ->method('redirect')
- ->with($this->response, 'noroute', []);
- $this->webhookMessageReader->expects($this->never())
- ->method('read');
- $this->caseUpdatingServiceFactory->expects($this->never())
- ->method('create');
-
- $this->controller->execute();
- }
-
- /**
- * Case when webhook request has test event topic.
- */
- public function testExecuteWithTestEventTopic()
- {
- $this->webhookRequestValidator->expects($this->once())
- ->method('validate')
- ->willReturn(true);
- $this->redirect->expects($this->never())
- ->method('redirect');
-
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookMessage->expects($this->once())
- ->method('getEventTopic')
- ->willReturn('cases/test');
- $webhookMessage->expects($this->never())
- ->method('getData');
-
- $this->webhookMessageReader->expects($this->once())
- ->method('read')
- ->with($this->webhookRequest)
- ->willReturn($webhookMessage);
-
- $this->caseUpdatingServiceFactory->expects($this->never())
- ->method('create');
-
- $this->controller->execute();
- }
-
- /**
- * Checks a test case when received input data does not contain Signifyd case id.
- *
- * @covers \Magento\Signifyd\Controller\Webhooks\Handler::execute
- */
- public function testExecuteWithMissedCaseId()
- {
- $this->webhookRequestValidator->expects(self::once())
- ->method('validate')
- ->willReturn(true);
-
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookMessage->expects($this->once())
- ->method('getEventTopic')
- ->willReturn('cases/creation');
- $webhookMessage->expects(self::once())
- ->method('getData')
- ->willReturn([
- 'orderId' => '1000101'
- ]);
-
- $this->webhookMessageReader->expects(self::once())
- ->method('read')
- ->with($this->webhookRequest)
- ->willReturn($webhookMessage);
-
- $this->redirect->expects(self::once())
- ->method('redirect')
- ->with($this->response, 'noroute', []);
-
- $this->controller->execute();
- }
-
- /**
- * Checks a case when Signifyd case entity not found.
- *
- * @covers \Magento\Signifyd\Controller\Webhooks\Handler::execute
- */
- public function testExecuteWithNotFoundCaseEntity()
- {
- $caseId = 123;
-
- $this->webhookRequestValidator->expects(self::once())
- ->method('validate')
- ->willReturn(true);
-
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->setMethods(['getData'])
- ->getMock();
- $webhookMessage->expects(self::once())
- ->method('getData')
- ->willReturn([
- 'orderId' => '1000101',
- 'caseId' => $caseId
- ]);
-
- $this->webhookMessageReader->expects(self::once())
- ->method('read')
- ->with($this->webhookRequest)
- ->willReturn($webhookMessage);
-
- $this->caseRepository->expects(self::once())
- ->method('getByCaseId')
- ->with(self::equalTo($caseId))
- ->willReturn(null);
-
- $this->redirect->expects(self::once())
- ->method('redirect')
- ->with($this->response, 'noroute', []);
-
- $this->controller->execute();
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceFactoryTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceFactoryTest.php
deleted file mode 100644
index f0184c032b550..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceFactoryTest.php
+++ /dev/null
@@ -1,167 +0,0 @@
-config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->setMethods(['isActive'])
- ->getMock();
-
- $this->fakeObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['create'])
- ->getMockForAbstractClass();
-
- $this->generatorFactory = $this->getMockBuilder(GeneratorFactory::class)
- ->disableOriginalConstructor()
- ->setMethods(['create'])
- ->getMock();
-
- $objectManager = new ObjectManager($this);
- $this->factory = $objectManager->getObject(UpdatingServiceFactory::class, [
- 'objectManager' => $this->fakeObjectManager,
- 'generatorFactory' => $this->generatorFactory,
- 'config' => $this->config
- ]);
- }
-
- /**
- * Checks type of instance for updating service if Signifyd is not enabled.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingServiceFactory::create
- */
- public function testCreateWithInactiveConfig()
- {
- $type = 'cases/creation';
- $this->config->expects(self::once())
- ->method('isActive')
- ->willReturn(false);
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(StubUpdatingService::class)
- ->willReturn(new StubUpdatingService());
-
- $instance = $this->factory->create($type);
- static::assertInstanceOf(StubUpdatingService::class, $instance);
- }
-
- /**
- * Checks type of instance for updating service if test type is received.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingServiceFactory::create
- */
- public function testCreateWithTestType()
- {
- $type = 'cases/test';
- $this->config->expects(self::once())
- ->method('isActive')
- ->willReturn(true);
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(StubUpdatingService::class)
- ->willReturn(new StubUpdatingService());
-
- $instance = $this->factory->create($type);
- static::assertInstanceOf(StubUpdatingService::class, $instance);
- }
-
- /**
- * Checks exception type and message for unknown case type.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingServiceFactory::create
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Specified message type does not supported.
- */
- public function testCreateWithException()
- {
- $type = 'cases/unknown';
- $this->config->expects(self::once())
- ->method('isActive')
- ->willReturn(true);
-
- $this->generatorFactory->expects(self::once())
- ->method('create')
- ->with($type)
- ->willThrowException(new \InvalidArgumentException('Specified message type does not supported.'));
-
- $this->factory->create($type);
- }
-
- /**
- * Checks if factory creates correct instance of case updating service.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingServiceFactory::create
- */
- public function testCreate()
- {
- $type = 'case/creation';
- $this->config->expects(self::once())
- ->method('isActive')
- ->willReturn(true);
-
- $messageGenerator = $this->getMockBuilder(GeneratorInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->generatorFactory->expects(self::once())
- ->method('create')
- ->with($type)
- ->willReturn($messageGenerator);
-
- $service = $this->getMockBuilder(UpdatingService::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(UpdatingService::class, ['messageGenerator' => $messageGenerator])
- ->willReturn($service);
-
- $result = $this->factory->create($type);
- static::assertInstanceOf(UpdatingService::class, $result);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceTest.php
deleted file mode 100644
index 6eb7e5c37d5fc..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/CaseServices/UpdatingServiceTest.php
+++ /dev/null
@@ -1,316 +0,0 @@
-objectManager = new ObjectManager($this);
-
- $this->messageGenerator = $this->getMockBuilder(GeneratorInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['generate'])
- ->getMock();
-
- $this->caseRepository = $this->getMockBuilder(CaseRepositoryInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getByCaseId'])
- ->getMockForAbstractClass();
-
- $this->commentsHistoryUpdater = $this->getMockBuilder(CommentsHistoryUpdater::class)
- ->disableOriginalConstructor()
- ->setMethods(['addComment'])
- ->getMock();
-
- $this->orderGridUpdater = $this->getMockBuilder(OrderGridUpdater::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->orderStateService = $this->getMockBuilder(OrderStateService::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->service = $this->objectManager->getObject(UpdatingService::class, [
- 'messageGenerator' => $this->messageGenerator,
- 'caseRepository' => $this->caseRepository,
- 'commentsHistoryUpdater' => $this->commentsHistoryUpdater,
- 'orderGridUpdater' => $this->orderGridUpdater,
- 'orderStateService' => $this->orderStateService
- ]);
- }
-
- /**
- * Checks a test case when Signifyd case is empty entity.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage The case entity should not be empty.
- */
- public function testUpdateWithEmptyCaseEntity()
- {
- $data = [];
- $caseEntity = $this->withCaseEntity(null, 123, $data);
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Checks a test case when Signifyd case id is not specified for a case entity.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage The case entity should not be empty.
- */
- public function testUpdateWithEmptyCaseId()
- {
- $data = [
- 'caseId' => 123
- ];
- $caseEntity = $this->withCaseEntity(1, null, $data);
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Checks as test case when service cannot save Signifyd case entity
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Cannot update Case entity.
- */
- public function testUpdateWithFailedCaseSaving()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'status' => CaseInterface::STATUS_OPEN,
- 'orderId' => '10000012',
- 'score' => 500
- ];
-
- $caseEntity = $this->withCaseEntity(1, $caseId, $data);
-
- $this->caseRepository->expects(self::once())
- ->method('save')
- ->willThrowException(new \Exception('Something wrong.'));
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Checks as test case when message generator throws an exception
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Cannot update Case entity.
- */
- public function testUpdateWithExceptionFromMessageGenerator()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId
- ];
-
- $caseEntity = $this->withCaseEntity(1, $caseId, $data);
-
- $this->caseRepository->expects(self::never())
- ->method('save')
- ->with($caseEntity)
- ->willReturn($caseEntity);
-
- $this->messageGenerator->expects(self::once())
- ->method('generate')
- ->with($data)
- ->willThrowException(new GeneratorException(__('Cannot generate message.')));
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Checks a test case when comments history updater throws an exception.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Cannot update Case entity.
- */
- public function testUpdateWithFailedCommentSaving()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'orderId' => 1
- ];
-
- $caseEntity = $this->withCaseEntity(1, $caseId, $data);
-
- $this->caseRepository->expects(self::once())
- ->method('save')
- ->with($caseEntity)
- ->willReturn($caseEntity);
-
- $this->orderGridUpdater->expects(self::once())
- ->method('update')
- ->with($data['orderId']);
-
- $message = __('Message is generated.');
- $this->messageGenerator->expects(self::once())
- ->method('generate')
- ->with($data)
- ->willReturn($message);
-
- $this->commentsHistoryUpdater->expects(self::once())
- ->method('addComment')
- ->with($caseEntity, $message)
- ->willThrowException(new \Exception('Something wrong'));
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Checks a test case when Signifyd case entity is successfully updated and message stored in comments history.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- */
- public function testUpdate()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'orderId' => 1
- ];
-
- $caseEntity = $this->withCaseEntity(21, $caseId, $data);
-
- $caseEntitySaved = clone $caseEntity;
- $caseEntitySaved->expects(self::once())
- ->method('getGuaranteeDisposition')
- ->willReturn('APPROVED');
-
- $this->caseRepository->expects(self::once())
- ->method('save')
- ->with($caseEntity)
- ->willReturn($caseEntitySaved);
-
- $message = __('Message is generated.');
- $this->messageGenerator->expects(self::once())
- ->method('generate')
- ->with($data)
- ->willReturn($message);
-
- $this->orderGridUpdater->expects(self::once())
- ->method('update')
- ->with($data['orderId']);
-
- $this->commentsHistoryUpdater->expects(self::once())
- ->method('addComment')
- ->with($caseEntitySaved, $message);
-
- $this->orderStateService->expects(self::once())
- ->method('updateByCase')
- ->with($caseEntitySaved);
-
- $this->service->update($caseEntity, $data);
- }
-
- /**
- * Create mock for case entity with common scenarios.
- *
- * @param $caseEntityId
- * @param $caseId
- * @param array $data
- * @return CaseInterface|MockObject
- */
- private function withCaseEntity($caseEntityId, $caseId, array $data = [])
- {
- /** @var CaseInterface|MockObject $caseEntity */
- $caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->setMethods([
- 'getEntityId', 'getCaseId', 'getOrderId',
- 'setCaseId', 'setStatus', 'setOrderId', 'setScore'
- ])
- ->getMockForAbstractClass();
-
- $caseEntity->expects(self::any())
- ->method('getEntityId')
- ->willReturn($caseEntityId);
- $caseEntity->expects(self::any())
- ->method('getCaseId')
- ->willReturn($caseId);
-
- foreach ($data as $property => $value) {
- $method = 'set' . ucfirst($property);
- if ($property === 'orderId') {
- $caseEntity->expects(self::never())
- ->method($method);
- }
- $caseEntity->expects(self::any())
- ->method($method)
- ->with(self::equalTo($value))
- ->willReturnSelf();
-
- $method = 'get' . ucfirst($property);
- $caseEntity->expects(self::any())
- ->method($method)
- ->willReturn($value);
- }
-
- return $caseEntity;
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/CommentsHistoryUpdaterTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/CommentsHistoryUpdaterTest.php
deleted file mode 100644
index 5cbb3d8d93cdd..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/CommentsHistoryUpdaterTest.php
+++ /dev/null
@@ -1,176 +0,0 @@
-historyFactory = $this->getMockBuilder(HistoryFactory::class)
- ->disableOriginalConstructor()
- ->setMethods(['create', 'save'])
- ->getMock();
-
- $this->historyRepository = $this->getMockBuilder(OrderStatusHistoryRepositoryInterface::class)
- ->getMockForAbstractClass();
-
- $this->caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getOrderId'])
- ->getMockForAbstractClass();
-
- $this->initCommentMock();
-
- $this->updater = $objectManager->getObject(CommentsHistoryUpdater::class, [
- 'historyFactory' => $this->historyFactory,
- 'historyRepository' => $this->historyRepository
- ]);
- }
-
- /**
- * Checks a test case when updater throws an exception while saving history comment.
- *
- * @covers \Magento\Signifyd\Model\CommentsHistoryUpdater::addComment
- * @expectedException \Exception
- */
- public function testAddCommentWithException()
- {
- $this->caseEntity->expects(self::once())
- ->method('getOrderId')
- ->willReturn(self::$orderId);
-
- $this->historyEntity->method('setStatus')
- ->with('')
- ->willReturnSelf();
- $this->historyRepository->expects(self::once())
- ->method('save')
- ->with($this->historyEntity)
- ->willThrowException(new \Exception('Cannot save comment message.'));
-
- $this->updater->addComment($this->caseEntity, __(self::$message));
- }
-
- /**
- * Checks a test case when updater successfully saves history comment.
- *
- * @covers \Magento\Signifyd\Model\CommentsHistoryUpdater::addComment
- */
- public function testAddComment()
- {
- $this->caseEntity->expects(self::once())
- ->method('getOrderId')
- ->willReturn(self::$orderId);
-
- $this->historyEntity->method('setStatus')
- ->with(self::$status)
- ->willReturnSelf();
- $this->historyRepository->expects(self::once())
- ->method('save')
- ->with($this->historyEntity)
- ->willReturnSelf();
-
- $this->updater->addComment($this->caseEntity, __(self::$message), self::$status);
- }
-
- /**
- * Checks a test when message does not specified.
- *
- * @covers \Magento\Signifyd\Model\CommentsHistoryUpdater::addComment
- */
- public function testAddCommentWithoutMessage()
- {
- $this->caseEntity->expects(self::never())
- ->method('getOrderId');
-
- $this->historyFactory->expects(self::never())
- ->method('save');
-
- $phrase = '';
- $this->updater->addComment($this->caseEntity, __($phrase));
- }
-
- /**
- * Creates mock object for history entity.
- *
- * @return void
- */
- private function initCommentMock()
- {
- $this->historyEntity = $this->getMockBuilder(OrderStatusHistoryInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['setParentId', 'setComment', 'setEntityName', 'save'])
- ->getMockForAbstractClass();
-
- $this->historyFactory->method('create')
- ->willReturn($this->historyEntity);
-
- $this->historyEntity->method('setParentId')
- ->with(self::$orderId)
- ->willReturnSelf();
- $this->historyEntity->method('setComment')
- ->with(self::$message)
- ->willReturnSelf();
- $this->historyEntity->method('setEntityName')
- ->with('order')
- ->willReturnSelf();
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/CustomerOrdersTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/CustomerOrdersTest.php
deleted file mode 100644
index 02d3b4b9ad7a7..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/CustomerOrdersTest.php
+++ /dev/null
@@ -1,267 +0,0 @@
-objectManager = new ObjectManager($this);
-
- $this->orderRepository = $this->getMockBuilder(OrderRepositoryInterface::class)
- ->getMockForAbstractClass();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->getMockForAbstractClass();
-
- $this->filterBuilder = $this->getMockBuilder(FilterBuilder::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->searchCriteriaBuilder = $this->getMockBuilder(SearchCriteriaBuilder::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->model = $this->objectManager->getObject(CustomerOrders::class, [
- 'filterBuilder' => $this->filterBuilder,
- 'orderRepository' => $this->orderRepository,
- 'searchCriteriaBuilder' => $this->searchCriteriaBuilder,
- 'logger' => $this->logger
- ]);
-
- $this->initCurrencies();
- $this->initOrderRepository();
-
- $this->objectManager->setBackwardCompatibleProperty(
- $this->model,
- 'currencies',
- ['EUR' => $this->eurCurrency, 'UAH' => $this->uahCurrency]
- );
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CustomerOrders::getAggregatedOrdersInfo()
- */
- public function testGetCountAndTotalAmount()
- {
- $this->eurCurrency->expects($this->once())
- ->method('convert')
- ->with(self::$eurAmount, 'USD')
- ->willReturn(109);
-
- $this->uahCurrency->expects($this->once())
- ->method('convert')
- ->with(self::$uahAmount, 'USD')
- ->willReturn(10.35);
-
- $actual = $this->model->getAggregatedOrdersInfo(self::$customerId);
-
- static::assertEquals(3, $actual['aggregateOrderCount']);
- static::assertEquals(169.35, $actual['aggregateOrderDollars']);
- }
-
- /**
- * Test case when required currency rate is absent and exception is thrown
- * @covers \Magento\Signifyd\Model\CustomerOrders::getAggregatedOrdersInfo()
- */
- public function testGetCountAndTotalAmountNegative()
- {
- $this->eurCurrency->expects($this->once())
- ->method('convert')
- ->with(self::$eurAmount, 'USD')
- ->willReturn(109);
-
- $this->uahCurrency->expects($this->once())
- ->method('convert')
- ->with(self::$uahAmount, 'USD')
- ->willThrowException(new \Exception());
-
- $this->logger->expects($this->once())
- ->method('error');
-
- $actual = $this->model->getAggregatedOrdersInfo(self::$customerId);
-
- $this->assertNull($actual['aggregateOrderCount']);
- $this->assertNull($actual['aggregateOrderDollars']);
- }
-
- /**
- * Populate order repository with mocked orders
- */
- private function initOrderRepository()
- {
- $this->filterBuilder->expects($this->once())
- ->method('setField')
- ->willReturnSelf();
- $this->filterBuilder->expects($this->once())
- ->method('setValue')
- ->willReturnSelf();
- $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->filterBuilder->expects($this->once())
- ->method('create')
- ->willReturn($filter);
-
- $searchCriteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteria::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->searchCriteriaBuilder->expects($this->once())
- ->method('create')
- ->willReturn($searchCriteria);
-
- $orderSearchResult = $this->getMockBuilder(OrderSearchResultInterface::class)
- ->getMockForAbstractClass();
- $orderSearchResult->expects($this->once())
- ->method('getItems')
- ->willReturn($this->getOrders());
- $this->orderRepository->expects($this->once())
- ->method('getList')
- ->willReturn($orderSearchResult);
- }
-
- /**
- * Creates mocks for currencies
- * @return void
- */
- private function initCurrencies()
- {
- $this->eurCurrency = $this->getMockBuilder(Currency::class)
- ->disableOriginalConstructor()
- ->setMethods(['convert'])
- ->getMock();
-
- $this->uahCurrency = $this->getMockBuilder(Currency::class)
- ->disableOriginalConstructor()
- ->setMethods(['convert'])
- ->getMock();
- }
-
- /**
- * Get list of mocked orders with different currencies
- * @return array
- */
- private function getOrders()
- {
- $eurOrder = $this->getMockBuilder(Order::class)
- ->disableOriginalConstructor()
- ->setMethods(['getBaseGrandTotal', 'getBaseCurrencyCode'])
- ->getMock();
-
- $eurOrder->expects($this->once())
- ->method('getBaseGrandTotal')
- ->willReturn(self::$eurAmount);
- $eurOrder->expects($this->once())
- ->method('getBaseCurrencyCode')
- ->willReturn('EUR');
-
- $uahOrder = $this->getMockBuilder(Order::class)
- ->disableOriginalConstructor()
- ->setMethods(['getBaseGrandTotal', 'getBaseCurrencyCode'])
- ->getMock();
-
- $uahOrder->expects($this->once())
- ->method('getBaseGrandTotal')
- ->willReturn(self::$uahAmount);
- $uahOrder->expects($this->once())
- ->method('getBaseCurrencyCode')
- ->willReturn('UAH');
-
- $usdOrder = $this->getMockBuilder(Order::class)
- ->disableOriginalConstructor()
- ->setMethods(['getBaseGrandTotal', 'getBaseCurrencyCode'])
- ->getMock();
-
- $usdOrder->expects($this->once())
- ->method('getBaseGrandTotal')
- ->willReturn(self::$usdAmount);
- $usdOrder->expects($this->once())
- ->method('getBaseCurrencyCode')
- ->willReturn('USD');
-
- return [$usdOrder, $eurOrder, $uahOrder];
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelGuaranteeAbilityTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelGuaranteeAbilityTest.php
deleted file mode 100644
index f7b4e473a0ec8..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelGuaranteeAbilityTest.php
+++ /dev/null
@@ -1,154 +0,0 @@
-orderRepository = $this->getMockBuilder(OrderRepositoryInterface::class)
- ->getMockForAbstractClass();
-
- $this->caseManagement = $this->getMockBuilder(CaseManagement::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->cancelGuaranteeAbility = new CancelGuaranteeAbility(
- $this->caseManagement,
- $this->orderRepository
- );
- }
-
- /**
- * Success test for Cancel Guarantee Request button
- */
- public function testIsAvailableSuccess()
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $case->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseEntity::GUARANTEE_APPROVED);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- /** @var OrderInterface|\PHPUnit_Framework_MockObject_MockObject $order */
- $order = $this->getMockBuilder(OrderInterface::class)
- ->getMockForAbstractClass();
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willReturn($order);
-
- $this->assertTrue($this->cancelGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when Case entity doesn't exist for order
- */
- public function testIsAvailableWithNullCase()
- {
- $orderId = 123;
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn(null);
-
- $this->assertFalse($this->cancelGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when Guarantee Disposition has Canceled states.
- */
- public function testIsAvailableWithCanceledGuarantee()
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $case->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseEntity::GUARANTEE_CANCELED);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- $this->assertFalse($this->cancelGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when order does not exist.
- */
- public function testIsAvailableWithNullOrder()
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $case->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseEntity::GUARANTEE_APPROVED);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willThrowException(new NoSuchEntityException());
-
- $this->assertFalse($this->cancelGuaranteeAbility->isAvailable($orderId));
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelingServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelingServiceTest.php
deleted file mode 100644
index f8f1d4a4522c9..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CancelingServiceTest.php
+++ /dev/null
@@ -1,215 +0,0 @@
-caseManagement = $this->getMockBuilder(CaseManagementInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getByOrderId'])
- ->getMockForAbstractClass();
-
- $this->updatingFactory = $this->getMockBuilder(UpdatingServiceFactory::class)
- ->disableOriginalConstructor()
- ->setMethods(['create'])
- ->getMock();
-
- $this->gateway = $this->getMockBuilder(Gateway::class)
- ->disableOriginalConstructor()
- ->setMethods(['cancelGuarantee'])
- ->getMock();
-
- $this->guaranteeAbility = $this->getMockBuilder(CancelGuaranteeAbility::class)
- ->disableOriginalConstructor()
- ->setMethods(['isAvailable'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['error'])
- ->getMockForAbstractClass();
-
- $this->service = new CancelingService(
- $this->caseManagement,
- $this->updatingFactory,
- $this->gateway,
- $this->guaranteeAbility,
- $this->logger
- );
- }
-
- /**
- * Checks a test case, when validation for a guarantee is failed.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- */
- public function testCancelForOrderWithUnavailableDisposition()
- {
- $this->guaranteeAbility->expects(self::once())
- ->method('isAvailable')
- ->with(self::equalTo(self::$orderId))
- ->willReturn(false);
-
- $this->caseManagement->expects(self::never())
- ->method('getByOrderId');
-
- $this->gateway->expects(self::never())
- ->method('cancelGuarantee');
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $this->updatingFactory->expects(self::never())
- ->method('create');
-
- $result = $this->service->cancelForOrder(self::$orderId);
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when request to Signifyd API fails.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- */
- public function testCancelForOrderWithFailedRequest()
- {
- $this->withCaseEntity();
-
- $this->gateway->expects(self::once())
- ->method('cancelGuarantee')
- ->with(self::equalTo(self::$caseId))
- ->willThrowException(new GatewayException('Something wrong.'));
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with(self::equalTo('Something wrong.'));
-
- $this->updatingFactory->expects(self::never())
- ->method('create');
-
- $result = $this->service->cancelForOrder(self::$orderId);
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when request to Signifyd successfully processed and case entity has been updated.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- */
- public function testCancelForOrder()
- {
- $case = $this->withCaseEntity();
-
- $this->gateway->expects(self::once())
- ->method('cancelGuarantee')
- ->with(self::equalTo(self::$caseId))
- ->willReturn(CaseInterface::GUARANTEE_CANCELED);
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $service = $this->getMockBuilder(StubUpdatingService::class)
- ->setMethods(['update'])
- ->getMock();
- $this->updatingFactory->expects(self::once())
- ->method('create')
- ->willReturn($service);
-
- $service->expects(self::once())
- ->method('update')
- ->with(self::equalTo($case), self::equalTo(['guaranteeDisposition' => CaseInterface::GUARANTEE_CANCELED]));
-
- $result = $this->service->cancelForOrder(self::$orderId);
- self::assertTrue($result);
- }
-
- /**
- * Gets mock for a case entity.
- *
- * @return CaseInterface|MockObject
- */
- private function withCaseEntity()
- {
- $this->guaranteeAbility->expects(self::once())
- ->method('isAvailable')
- ->with(self::equalTo(self::$orderId))
- ->willReturn(true);
-
- $caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['getCaseId'])
- ->getMockForAbstractClass();
-
- $this->caseManagement->expects(self::once())
- ->method('getByOrderId')
- ->with(self::equalTo(self::$orderId))
- ->willReturn($caseEntity);
-
- $caseEntity->expects(self::once())
- ->method('getCaseId')
- ->willReturn(self::$caseId);
- return $caseEntity;
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php
deleted file mode 100644
index 6b7a6112a932e..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php
+++ /dev/null
@@ -1,260 +0,0 @@
-dateTimeFactory = new DateTimeFactory();
- $this->orderRepository = $this->getMockBuilder(OrderRepositoryInterface::class)
- ->getMockForAbstractClass();
- $this->caseManagement = $this->getMockBuilder(CaseManagement::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->createGuaranteeAbility = new CreateGuaranteeAbility(
- $this->caseManagement,
- $this->orderRepository,
- $this->dateTimeFactory
- );
- }
-
- public function testIsAvailableSuccess()
- {
- $orderId = 123;
- $orderCreatedAt = $this->getDateAgo(6);
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $case->expects($this->once())
- ->method('isGuaranteeEligible')
- ->willReturn(true);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- /** @var OrderInterface|\PHPUnit_Framework_MockObject_MockObject $order */
- $order = $this->getMockBuilder(OrderInterface::class)
- ->getMockForAbstractClass();
- $order->expects($this->once())
- ->method('getState')
- ->willReturn(Order::STATE_COMPLETE);
- $order->expects($this->once())
- ->method('getCreatedAt')
- ->willReturn($orderCreatedAt);
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willReturn($order);
-
- $this->assertTrue($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when Case entity doesn't exist for order
- */
- public function testIsAvailableWithNullCase()
- {
- $orderId = 123;
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn(null);
-
- $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when GuaranteeEligible for Case is false
- */
- public function testIsAvailableWithGuarantyEligibleFalse()
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $case->expects($this->once())
- ->method('isGuaranteeEligible')
- ->willReturn(false);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when GuaranteeEligible for Case is false
- */
- public function testIsAvailableWithNullOrder()
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $case->expects($this->once())
- ->method('isGuaranteeEligible')
- ->willReturn(true);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willThrowException(new NoSuchEntityException());
-
- $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Tests case when order has Canceled Or Closed states.
- *
- * @param string $state
- * @dataProvider isAvailableWithCanceledOrderDataProvider
- */
- public function testIsAvailableWithCanceledOrder($state)
- {
- $orderId = 123;
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $case->expects($this->once())
- ->method('isGuaranteeEligible')
- ->willReturn(true);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- /** @var OrderInterface|\PHPUnit_Framework_MockObject_MockObject $order */
- $order = $this->getMockBuilder(OrderInterface::class)
- ->getMockForAbstractClass();
- $order->expects($this->once())
- ->method('getState')
- ->willReturn($state);
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willReturn($order);
-
- $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * @return array
- */
- public function isAvailableWithCanceledOrderDataProvider()
- {
- return [
- [Order::STATE_CANCELED], [Order::STATE_CLOSED]
- ];
- }
-
- public function testIsAvailableWithOldOrder()
- {
- $orderId = 123;
- $orderCreatedAt = $this->getDateAgo(8);
-
- /** @var CaseInterface|\PHPUnit_Framework_MockObject_MockObject $case */
- $case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $case->expects($this->once())
- ->method('isGuaranteeEligible')
- ->willReturn(true);
-
- $this->caseManagement->expects($this->once())
- ->method('getByOrderId')
- ->with($orderId)
- ->willReturn($case);
-
- /** @var OrderInterface|\PHPUnit_Framework_MockObject_MockObject $order */
- $order = $this->getMockBuilder(OrderInterface::class)
- ->getMockForAbstractClass();
- $order->expects($this->once())
- ->method('getState')
- ->willReturn(Order::STATE_COMPLETE);
- $order->expects($this->once())
- ->method('getCreatedAt')
- ->willReturn($orderCreatedAt);
-
- $this->orderRepository->expects($this->once())
- ->method('get')
- ->with($orderId)
- ->willReturn($order);
-
- $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId));
- }
-
- /**
- * Returns date N days ago
- *
- * @param int $days number of days that will be deducted from the current date
- * @return string
- */
- private function getDateAgo($days)
- {
- $createdAtTime = $this->dateTimeFactory->create('now', new \DateTimeZone('UTC'));
- $createdAtTime->sub(new \DateInterval('P' . $days . 'D'));
-
- return $createdAtTime->format('Y-m-d h:i:s');
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php
deleted file mode 100644
index db64b38375fe1..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php
+++ /dev/null
@@ -1,253 +0,0 @@
-caseManagement = $this->getMockBuilder(CaseManagementInterface::class)
- ->getMockForAbstractClass();
-
- $caseUpdatingServiceFactory = $this->getMockBuilder(UpdatingServiceFactory::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->caseUpdatingService = $this->getMockBuilder(UpdatingServiceInterface::class)
- ->getMockForAbstractClass();
- $caseUpdatingServiceFactory
- ->method('create')
- ->willReturn($this->caseUpdatingService);
-
- $this->gateway = $this->getMockBuilder(Gateway::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->createGuaranteeAbility = $this->getMockBuilder(CreateGuaranteeAbility::class)
- ->disableOriginalConstructor()
- ->setMethods(['isAvailable'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->getMockForAbstractClass();
-
- $this->service = new CreationService(
- $this->caseManagement,
- $caseUpdatingServiceFactory,
- $this->gateway,
- $this->createGuaranteeAbility,
- $this->logger
- );
- }
-
- /**
- * Checks a test case, when guarantee ability checker does not allow to submit case for a guarantee.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CreationService::createForOrder
- */
- public function testCreateForOrderWithNotEligibleCase()
- {
- $orderId = 1;
-
- $this->createGuaranteeAbility->expects(self::once())
- ->method('isAvailable')
- ->with($orderId)
- ->willReturn(false);
-
- $this->caseManagement->expects(self::never())
- ->method('getByOrderId');
-
- $this->gateway->expects(self::never())
- ->method('submitCaseForGuarantee');
-
- $result = $this->service->createForOrder($orderId);
- self::assertFalse($result);
- }
-
- public function testCreateForOrderWitCase()
- {
- $dummyOrderId = 1;
- $dummyCaseId = 42;
- $this->withCaseEntityExistsForOrderId(
- $dummyOrderId,
- [
- 'caseId' => $dummyCaseId,
- ]
- );
-
- $this->gateway
- ->expects($this->once())
- ->method('submitCaseForGuarantee');
-
- $this->service->createForOrder($dummyOrderId);
- }
-
- public function testCreateForOrderWithGatewayFailure()
- {
- $dummyOrderId = 1;
- $dummyCaseId = 42;
- $dummyGatewayFailureMessage = 'Everything fails sometimes';
- $this->withCaseEntityExistsForOrderId(
- $dummyOrderId,
- [
- 'caseId' => $dummyCaseId,
- ]
- );
- $this->withGatewayFailure($dummyGatewayFailureMessage);
-
- $this->logger
- ->expects($this->once())
- ->method('error')
- ->with($this->equalTo($dummyGatewayFailureMessage));
- $this->caseUpdatingService
- ->expects($this->never())
- ->method('update');
-
- $result = $this->service->createForOrder($dummyOrderId);
- $this->assertEquals(
- false,
- $result,
- 'Service should return false in case of gateway failure'
- );
- }
-
- public function testCreateForOrderWithGatewaySuccess()
- {
- $dummyOrderId = 1;
- $dummyCaseId = 42;
- $dummyGuaranteeDisposition = 'foo';
- $caseEntity = $this->withCaseEntityExistsForOrderId(
- $dummyOrderId,
- [
- 'caseId' => $dummyCaseId,
- ]
- );
- $this->withGatewaySuccess($dummyGuaranteeDisposition);
-
- $this->caseUpdatingService
- ->expects($this->once())
- ->method('update')
- ->with($caseEntity, $this->equalTo([
- 'caseId' => $dummyCaseId,
- 'guaranteeDisposition' => $dummyGuaranteeDisposition,
- ]));
-
- $this->service->createForOrder($dummyOrderId);
- }
-
- public function testCreateForOrderWithCaseUpdate()
- {
- $dummyOrderId = 1;
- $dummyCaseId = 42;
- $dummyGuaranteeDisposition = 'foo';
- $this->withCaseEntityExistsForOrderId(
- $dummyOrderId,
- [
- 'caseId' => $dummyCaseId,
- ]
- );
- $this->withGatewaySuccess($dummyGuaranteeDisposition);
-
- $result = $this->service->createForOrder($dummyOrderId);
- $this->assertEquals(
- true,
- $result,
- 'Service should return true in case if case update service is called'
- );
- }
-
- /**
- * @param $orderId
- * @param array $caseData
- * @return MockObject
- */
- private function withCaseEntityExistsForOrderId($orderId, array $caseData = [])
- {
- $this->createGuaranteeAbility->expects(self::once())
- ->method('isAvailable')
- ->with(self::equalTo($orderId))
- ->willReturn(true);
-
- $dummyCaseEntity = $this->getMockBuilder(CaseInterface::class)
- ->getMockForAbstractClass();
- foreach ($caseData as $caseProperty => $casePropertyValue) {
- $dummyCaseEntity
- ->method('get' . ucfirst($caseProperty))
- ->willReturn($casePropertyValue);
- }
-
- $this->caseManagement
- ->method('getByOrderId')
- ->with($this->equalTo($orderId))
- ->willReturn($dummyCaseEntity);
-
- return $dummyCaseEntity;
- }
-
- /**
- * @param $failureMessage
- */
- private function withGatewayFailure($failureMessage)
- {
- $this->gateway
- ->method('submitCaseForGuarantee')
- ->willThrowException(new GatewayException($failureMessage));
- }
-
- /**
- * @param $gatewayResult
- */
- private function withGatewaySuccess($gatewayResult)
- {
- $this->gateway
- ->method('submitCaseForGuarantee')
- ->willReturn($gatewayResult);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/CaseRescoreTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/CaseRescoreTest.php
deleted file mode 100644
index ba14036cd68d0..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/CaseRescoreTest.php
+++ /dev/null
@@ -1,148 +0,0 @@
- 100,
- 'score' => 200
- ];
-
- /**
- * @var ObjectManager
- */
- private $objectManager;
-
- /**
- * @var CaseRepositoryInterface|MockObject
- */
- private $caseRepository;
-
- /**
- * @var CaseRescore|MockObject
- */
- private $caseRescore;
-
- /**
- * @var CaseInterface|MockObject
- */
- private $case;
-
- /**
- * @inheritdoc
- */
- protected function setUp()
- {
- $this->case = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->objectManager = new ObjectManager($this);
- $this->caseRepository = $this->getMockBuilder(CaseRepositoryInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->caseRescore = $this->objectManager->getObject(CaseRescore::class, [
- 'caseRepository' => $this->caseRepository
- ]);
- }
-
- /**
- * Data array without required attribute caseId.
- *
- * @expectedException \Magento\Signifyd\Model\MessageGenerators\GeneratorException
- * @expectedExceptionMessage The "caseId" should not be empty
- */
- public function testGenerateEmptyCaseIdException()
- {
- $this->caseRescore->generate([]);
- }
-
- /**
- * Case entity was not found in DB.
- *
- * @expectedException \Magento\Signifyd\Model\MessageGenerators\GeneratorException
- * @expectedExceptionMessage Case entity not found.
- */
- public function testGenerateNotFoundException()
- {
- $this->caseRepository->expects($this->once())
- ->method('getByCaseId')
- ->with(self::$data['caseId'])
- ->willReturn(null);
-
- $this->caseRescore = $this->objectManager->getObject(CaseRescore::class, [
- 'caseRepository' => $this->caseRepository
- ]);
-
- $this->caseRescore->generate(self::$data);
- }
-
- /**
- * Generate case message with not empty previous score.
- */
- public function testGenerateWithPreviousScore()
- {
- $this->case->expects($this->once())
- ->method('getScore')
- ->willReturn(self::$data['score']);
-
- $this->caseRepository->expects($this->once())
- ->method('getByCaseId')
- ->with(self::$data['caseId'])
- ->willReturn($this->case);
-
- $this->caseRescore = $this->objectManager->getObject(CaseRescore::class, [
- 'caseRepository' => $this->caseRepository
- ]);
-
- $phrase = __(
- 'Case Update: New score for the order is %1. Previous score was %2.',
- self::$data['score'],
- self::$data['score']
- );
-
- $message = $this->caseRescore->generate(self::$data);
-
- $this->assertEquals($phrase, $message);
- }
-
- /**
- * Generate case message with empty previous score.
- */
- public function testGenerateWithoutPreviousScore()
- {
- $this->caseRepository->expects($this->once())
- ->method('getByCaseId')
- ->with(self::$data['caseId'])
- ->willReturn($this->case);
-
- $this->caseRescore = $this->objectManager->getObject(CaseRescore::class, [
- 'caseRepository' => $this->caseRepository
- ]);
-
- $phrase = __(
- 'Case Update: New score for the order is %1. Previous score was %2.',
- self::$data['score'],
- null
- );
-
- $message = $this->caseRescore->generate(self::$data);
-
- $this->assertEquals($phrase, $message);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/GeneratorFactoryTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/GeneratorFactoryTest.php
deleted file mode 100644
index 50f87df3b694f..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/GeneratorFactoryTest.php
+++ /dev/null
@@ -1,99 +0,0 @@
-fakeObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['create'])
- ->getMockForAbstractClass();
-
- $this->factory = $objectManager->getObject(GeneratorFactory::class, [
- 'objectManager' => $this->fakeObjectManager
- ]);
- }
-
- /**
- * Checks if factory returns correct instance of message generator.
- *
- * @covers \Magento\Signifyd\Model\MessageGenerators\GeneratorFactory::create
- * @param string $type
- * @param string $className
- * @dataProvider typeDataProvider
- */
- public function testCreate($type, $className)
- {
- $generator = $this->getMockBuilder($className)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with($className)
- ->willReturn($generator);
-
- $instance = $this->factory->create($type);
- self::assertInstanceOf($className, $instance);
- }
-
- /**
- * Get list of available messages generators types and equal class names.
- *
- * @return array
- */
- public function typeDataProvider()
- {
- return [
- ['cases/creation', PatternGenerator::class],
- ['cases/review', PatternGenerator::class],
- ['cases/rescore', CaseRescore::class],
- ['guarantees/completion', PatternGenerator::class],
- ['guarantees/creation', PatternGenerator::class],
- ['guarantees/cancel', PatternGenerator::class],
- ];
- }
-
- /**
- * Checks correct exception message for unknown type of message generator.
- *
- * @covers \Magento\Signifyd\Model\MessageGenerators\GeneratorFactory::create
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Specified message type does not supported.
- */
- public function testCreateWithException()
- {
- $type = 'cases/unknown';
- $this->factory->create($type);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/PatternGeneratorTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/PatternGeneratorTest.php
deleted file mode 100644
index 9d5f71f657a1e..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/MessageGenerators/PatternGeneratorTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-generate($data);
- }
-
- /**
- * Checks cases with different template placeholders and input data.
- *
- * @covers \Magento\Signifyd\Model\MessageGenerators\PatternGenerator::generate
- * @param string $template
- * @param array $requiredFields
- * @param string $expected
- * @dataProvider messageDataProvider
- */
- public function testGenerate($template, array $requiredFields, $expected)
- {
- $data = [
- 'caseId' => 123,
- 'reviewDisposition' => 'Good',
- 'guaranteeDisposition' => 'Approved',
- 'score' => 500,
- 'case_score' => 300
- ];
-
- $generator = new PatternGenerator($template, $requiredFields);
- $actual = $generator->generate($data);
- self::assertEquals($expected, $actual);
- }
-
- /**
- * Get list of variations with message templates, required fields and expected generated messages.
- *
- * @return array
- */
- public function messageDataProvider()
- {
- return [
- [
- 'Signifyd Case %1 has been created for order.',
- ['caseId'],
- 'Signifyd Case 123 has been created for order.'
- ],
- [
- 'Case Update: Case Review was completed. Review Deposition is %1.',
- ['reviewDisposition'],
- 'Case Update: Case Review was completed. Review Deposition is Good.'
- ],
- [
- 'Case Update: New score for the order is %1. Previous score was %2.',
- ['score', 'case_score'],
- 'Case Update: New score for the order is 500. Previous score was 300.'
- ],
- [
- 'Case Update: Case is submitted for guarantee.',
- [],
- 'Case Update: Case is submitted for guarantee.'
- ],
- ];
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/OrderStateServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/OrderStateServiceTest.php
deleted file mode 100644
index 3a567a79891f8..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/OrderStateServiceTest.php
+++ /dev/null
@@ -1,204 +0,0 @@
-orderManagement = $this->getMockBuilder(OrderManagementInterface::class)
- ->getMockForAbstractClass();
-
- $this->commentsHistoryUpdater = $this->getMockBuilder(CommentsHistoryUpdater::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->orderFactory = $this->getMockBuilder(OrderFactory::class)
- ->setMethods(['create'])
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->order = $this->getMockBuilder(Order::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->order->expects($this->once())
- ->method('load')
- ->willReturnSelf();
-
- $this->orderFactory->expects($this->once())
- ->method('create')
- ->willReturn($this->order);
-
- $this->caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMockForAbstractClass();
- $this->caseEntity->expects($this->once())
- ->method('getOrderId')
- ->willReturn(self::$orderId);
-
- $this->orderStateService = new OrderStateService(
- $this->orderFactory,
- $this->orderManagement,
- $this->commentsHistoryUpdater
- );
- }
-
- /**
- * Tests update order state flow when case guarantee disposition is PENDING.
- *
- * @param bool $canHold
- * @param bool $hold
- * @param int $addCommentCall
- * @dataProvider updateByCaseWithGuaranteePendingDataProvider
- */
- public function testUpdateByCaseWithGuaranteePending($canHold, $hold, $addCommentCall)
- {
- $this->caseEntity->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseInterface::GUARANTEE_PENDING);
- $this->order->expects($this->any())
- ->method('canHold')
- ->willReturn($canHold);
- $this->orderManagement->expects($this->any())
- ->method('hold')
- ->willReturn($hold);
- $this->commentsHistoryUpdater->expects($this->exactly($addCommentCall))
- ->method('addComment')
- ->with(
- $this->caseEntity,
- __('Awaiting the Signifyd guarantee disposition.'),
- Order::STATE_HOLDED
- );
-
- $this->orderStateService->updateByCase($this->caseEntity);
- }
-
- /**
- * @return array
- */
- public function updateByCaseWithGuaranteePendingDataProvider()
- {
- return [
- ['canHold' => true, 'hold' => true, 'addCommentCall' => 1],
- ['canHold' => false, 'hold' => true, 'addCommentCall' => 0],
- ['canHold' => true, 'hold' => false, 'addCommentCall' => 0],
- ];
- }
-
- /**
- * Tests update order state flow when case guarantee disposition is APPROVED.
- *
- * @param bool $canUnhold
- * @param int $unholdCall
- * @dataProvider updateByCaseWithGuaranteeApprovedDataProvider
- */
- public function testUpdateByCaseWithGuaranteeApproved($canUnhold, $unholdCall)
- {
- $this->caseEntity->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseInterface::GUARANTEE_APPROVED);
- $this->order->expects($this->any())
- ->method('canUnhold')
- ->willReturn($canUnhold);
- $this->orderManagement->expects($this->exactly($unholdCall))
- ->method('unHold');
- $this->commentsHistoryUpdater->expects($this->never())
- ->method('addComment');
-
- $this->orderStateService->updateByCase($this->caseEntity);
- }
-
- /**
- * @return array
- */
- public function updateByCaseWithGuaranteeApprovedDataProvider()
- {
- return [
- ['canUnhold' => true, 'unholdCall' => 1],
- ['canUnhold' => false, 'unholdCall' => 0]
- ];
- }
-
- /**
- * Tests update order state flow when case guarantee disposition is DECLINED.
- *
- * @param bool $canHold
- * @param int $holdCall
- * @dataProvider updateByCaseWithGuaranteeDeclinedDataProvider
- */
- public function testUpdateByCaseWithGuaranteeDeclined($canHold, $holdCall)
- {
- $this->caseEntity->expects($this->once())
- ->method('getGuaranteeDisposition')
- ->willReturn(CaseInterface::GUARANTEE_DECLINED);
- $this->order->expects($this->any())
- ->method('canHold')
- ->willReturn($canHold);
- $this->orderManagement->expects($this->exactly($holdCall))
- ->method('hold');
- $this->commentsHistoryUpdater->expects($this->never())
- ->method('addComment');
-
- $this->orderStateService->updateByCase($this->caseEntity);
- }
-
- /**
- * @return array
- */
- public function updateByCaseWithGuaranteeDeclinedDataProvider()
- {
- return [
- ['canHold' => true, 'holdCall' => 1],
- ['canHold' => false, 'holdCall' => 0]
- ];
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/XmlToArrayConfigConverterTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/XmlToArrayConfigConverterTest.php
deleted file mode 100644
index 319229e326c4b..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/XmlToArrayConfigConverterTest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-filePath = realpath(__DIR__) . '/_files/';
-
- $objectManagerHelper = new ObjectManager($this);
- $this->converter = $objectManagerHelper->getObject(
- XmlToArrayConfigConverter::class
- );
- }
-
- public function testConvert()
- {
- $testDom = $this->filePath . 'signifyd_payment_mapping.xml';
- $dom = new \DOMDocument();
- $dom->load($testDom);
- $mapping = $this->converter->convert($dom);
- $expectedArray = include $this->filePath . 'expected_array.php';
-
- $this->assertEquals($expectedArray, $mapping);
- }
-
- /**
- * @expectedException \Magento\Framework\Config\Dom\ValidationSchemaException
- * @expectedExceptionMessage Only single entrance of "magento_code" node is required.
- */
- public function testConvertEmptyPaymentMethodException()
- {
- $dom = new \DOMDocument();
- $element = $dom->createElement('payment_method');
- $subelement = $dom->createElement('signifyd_code', 'test');
- $element->appendChild($subelement);
- $dom->appendChild($element);
-
- $this->converter->convert($dom);
- }
-
- /**
- * @expectedException \Magento\Framework\Config\Dom\ValidationSchemaException
- * @expectedExceptionMessage Not empty value for "signifyd_code" node is required.
- */
- public function testConvertEmptySygnifydPaymentMethodException()
- {
- $dom = new \DOMDocument();
- $element = $dom->createElement('payment_method');
- $subelement = $dom->createElement('magento_code', 'test');
- $subelement2 = $dom->createElement('signifyd_code', '');
- $element->appendChild($subelement);
- $element->appendChild($subelement2);
- $dom->appendChild($element);
-
- $this->converter->convert($dom);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/expected_array.php b/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/expected_array.php
deleted file mode 100644
index f5d3436ae6b7b..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/expected_array.php
+++ /dev/null
@@ -1,12 +0,0 @@
- 'PAYMENT_CARD',
- 'payment_method_2' => 'PAYPAL_ACCOUNT',
- 'payment_method_3' => 'CHECK',
- 'payment_method_4' => 'CASH',
- 'payment_method_5' => 'FREE'
-];
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/signifyd_payment_mapping.xml b/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/signifyd_payment_mapping.xml
deleted file mode 100644
index f70763e22c418..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentMethodMapper/_files/signifyd_payment_mapping.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
- payment_method_1
- PAYMENT_CARD
-
-
- payment_method_2
- PAYPAL_ACCOUNT
-
-
- payment_method_3
- CHECK
-
-
- payment_method_4
- CASH
-
-
- payment_method_5
- FREE
-
-
-
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentVerificationFactoryTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/PaymentVerificationFactoryTest.php
deleted file mode 100644
index b0f9239d43bfa..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/PaymentVerificationFactoryTest.php
+++ /dev/null
@@ -1,222 +0,0 @@
-objectManager = new ObjectManager($this);
-
- $this->fakeObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->config = $this->getMockBuilder(ConfigInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->avsDefaultAdapter = $this->getMockBuilder(PaymentVerificationInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->cvvDefaultAdapter = $this->getMockBuilder(PaymentVerificationInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->factory = $this->objectManager->getObject(PaymentVerificationFactory::class, [
- 'objectManager' => $this->fakeObjectManager,
- 'config' => $this->config,
- 'avsDefaultAdapter' => $this->avsDefaultAdapter,
- 'cvvDefaultAdapter' => $this->cvvDefaultAdapter
- ]);
- }
-
- /**
- * Checks a test case when factory creates CVV mapper for provided payment method.
- *
- * @covers \Magento\Signifyd\Model\PaymentVerificationFactory::createPaymentCvv
- */
- public function testCreatePaymentCvv()
- {
- $paymentMethodCode = 'exists_payment';
-
- $this->config->expects(self::once())
- ->method('setMethodCode')
- ->with(self::equalTo($paymentMethodCode))
- ->willReturnSelf();
-
- $this->config->expects(self::once())
- ->method('getValue')
- ->with('cvv_ems_adapter')
- ->willReturn(PaymentVerificationInterface::class);
-
- /** @var PaymentVerificationInterface|MockObject $cvvAdapter */
- $cvvAdapter = $this->getMockBuilder(PaymentVerificationInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(self::equalTo(PaymentVerificationInterface::class))
- ->willReturn($cvvAdapter);
-
- $mapper = $this->factory->createPaymentCvv($paymentMethodCode);
- self::assertInstanceOf(PaymentVerificationInterface::class, $mapper);
- }
-
- /**
- * Checks a test case, when provided payment method does not have cvv mapper.
- *
- * @covers \Magento\Signifyd\Model\PaymentVerificationFactory::createPaymentCvv
- */
- public function testCreateDefaultCvvMapper()
- {
- $paymentMethodCode = 'non_exists_payment';
-
- $this->config->expects(self::once())
- ->method('setMethodCode')
- ->with(self::equalTo($paymentMethodCode))
- ->willReturnSelf();
-
- $this->config->expects(self::once())
- ->method('getValue')
- ->with('cvv_ems_adapter')
- ->willReturn(null);
-
- $this->fakeObjectManager->expects(self::never())
- ->method('create');
-
- $mapper = $this->factory->createPaymentCvv($paymentMethodCode);
- self::assertSame($this->cvvDefaultAdapter, $mapper);
- }
-
- /**
- * Checks a test case, when mapper implementation does not corresponding to PaymentVerificationInterface.
- *
- * @covers \Magento\Signifyd\Model\PaymentVerificationFactory::createPaymentCvv
- * @expectedException \Magento\Framework\Exception\ConfigurationMismatchException
- * @expectedExceptionMessage stdClass must implement Magento\Payment\Api\PaymentVerificationInterface
- */
- public function testCreateWithUnsupportedImplementation()
- {
- $paymentMethodCode = 'exists_payment';
-
- $this->config->expects(self::once())
- ->method('setMethodCode')
- ->with(self::equalTo($paymentMethodCode))
- ->willReturnSelf();
-
- $this->config->expects(self::once())
- ->method('getValue')
- ->with('cvv_ems_adapter')
- ->willReturn(\stdClass::class);
-
- $cvvAdapter = new \stdClass();
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(self::equalTo(\stdClass::class))
- ->willReturn($cvvAdapter);
-
- $this->factory->createPaymentCvv($paymentMethodCode);
- }
-
- /**
- * Checks a test case when factory creates AVS mapper for provided payment method.
- *
- * @covers \Magento\Signifyd\Model\PaymentVerificationFactory::createPaymentAvs
- */
- public function testCreatePaymentAvs()
- {
- $paymentMethodCode = 'exists_payment';
-
- $this->config->expects(self::once())
- ->method('setMethodCode')
- ->with(self::equalTo($paymentMethodCode))
- ->willReturnSelf();
-
- $this->config->expects(self::once())
- ->method('getValue')
- ->with('avs_ems_adapter')
- ->willReturn(PaymentVerificationInterface::class);
-
- $avsAdapter = $this->getMockBuilder(PaymentVerificationInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->fakeObjectManager->expects(self::once())
- ->method('create')
- ->with(self::equalTo(PaymentVerificationInterface::class))
- ->willReturn($avsAdapter);
-
- $mapper = $this->factory->createPaymentAvs($paymentMethodCode);
- self::assertInstanceOf(PaymentVerificationInterface::class, $mapper);
- }
-
- /**
- * Checks a test case when provided payment method does not support
- */
- public function testCreateDefaultAvsMapper()
- {
- $paymentMethodCode = 'non_exists_payment';
-
- $this->config->expects(self::once())
- ->method('setMethodCode')
- ->with(self::equalTo($paymentMethodCode))
- ->willReturnSelf();
-
- $this->config->expects(self::once())
- ->method('getValue')
- ->with('avs_ems_adapter')
- ->willReturn(null);
-
- $this->fakeObjectManager->expects(self::never())
- ->method('create');
-
- $mapper = $this->factory->createPaymentAvs($paymentMethodCode);
- self::assertSame($this->avsDefaultAdapter, $mapper);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SalesOrderGrid/OrderGridUpdaterTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SalesOrderGrid/OrderGridUpdaterTest.php
deleted file mode 100644
index 885c9f018a488..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SalesOrderGrid/OrderGridUpdaterTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-orderGrid = $this->getMockBuilder(GridInterface::class)
- ->getMockForAbstractClass();
- $this->globalConfig = $this->getMockBuilder(ScopeConfigInterface::class)
- ->getMockForAbstractClass();
-
- $this->model = new OrderGridUpdater($this->orderGrid, $this->globalConfig);
- }
-
- public function testUpdateInSyncMode()
- {
- $orderId = 1;
-
- $this->globalConfig->expects($this->once())
- ->method('getValue')
- ->with('dev/grid/async_indexing', 'default', null)
- ->willReturn(false);
- $this->orderGrid->expects($this->once())
- ->method('refresh')
- ->with($orderId);
-
- $this->model->update($orderId);
- }
-
- public function testUpdateInAsyncMode()
- {
- $orderId = 1;
-
- $this->globalConfig->expects($this->once())
- ->method('getValue')
- ->with('dev/grid/async_indexing', 'default', null)
- ->willReturn(true);
- $this->orderGrid->expects($this->never())
- ->method('refresh')
- ->with($orderId);
-
- $this->model->update($orderId);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/HttpClientFactoryTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/HttpClientFactoryTest.php
deleted file mode 100644
index 4aefd63355773..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/HttpClientFactoryTest.php
+++ /dev/null
@@ -1,131 +0,0 @@
-objectManager = new ObjectManager($this);
-
- $this->config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->client = $this->getMockBuilder(ZendClient::class)
- ->disableOriginalConstructor()
- ->setMethods(['setHeaders', 'setMethod', 'setUri', 'setRawData'])
- ->getMock();
-
- $this->clientFactory = $this->getMockBuilder(ZendClientFactory::class)
- ->disableOriginalConstructor()
- ->setMethods(['create'])
- ->getMock();
-
- $this->clientFactory->expects($this->once())
- ->method('create')
- ->willReturn($this->client);
-
- $this->dataEncoder = $this->getMockBuilder(EncoderInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->httpClient = $this->objectManager->getObject(HttpClientFactory::class, [
- 'config' => $this->config,
- 'clientFactory' => $this->clientFactory,
- 'dataEncoder' => $this->dataEncoder
- ]);
- }
-
- public function testCreateHttpClient()
- {
- $this->config->expects($this->once())
- ->method('getApiKey')
- ->willReturn('testKey');
-
- $this->config->expects($this->once())
- ->method('getApiUrl')
- ->willReturn('testUrl');
-
- $client = $this->httpClient->create('url', 'method');
-
- $this->assertInstanceOf(ZendClient::class, $client);
- }
-
- public function testCreateWithParams()
- {
- $param = ['id' => 1];
- $storeId = 1;
- $json = '{"id":1}';
-
- $this->config->expects($this->once())
- ->method('getApiKey')
- ->with($storeId)
- ->willReturn('testKey');
-
- $this->config->expects($this->once())
- ->method('getApiUrl')
- ->with($storeId)
- ->willReturn(self::$dummy);
-
- $this->dataEncoder->expects($this->once())
- ->method('encode')
- ->with($this->equalTo($param))
- ->willReturn($json);
-
- $this->client->expects($this->once())
- ->method('setRawData')
- ->with($this->equalTo($json), 'application/json')
- ->willReturnSelf();
-
- $client = $this->httpClient->create('url', 'method', $param, $storeId);
-
- $this->assertInstanceOf(ZendClient::class, $client);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php
deleted file mode 100644
index 1ee55d7ad150c..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php
+++ /dev/null
@@ -1,182 +0,0 @@
-objectManager = new ObjectManager($this);
-
- $this->dataDecoder = $this->getMockBuilder(DecoderInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->response = $this->getMockBuilder(Response::class)
- ->disableOriginalConstructor()
- ->setMethods(['getStatus', 'getBody'])
- ->getMock();
-
- $this->responseHandler = $this->objectManager->getObject(ResponseHandler::class, [
- 'dataDecoder' => $this->dataDecoder
- ]);
- }
-
- /**
- * @dataProvider errorsProvider
- */
- public function testHandleFailureMessage($code, $message)
- {
- $this->response->expects($this->any())
- ->method('getStatus')
- ->willReturn($code);
-
- $this->response->expects($this->once())
- ->method('getBody')
- ->willReturn(self::$errorMessage);
-
- try {
- $this->responseHandler->handle($this->response);
- } catch (ApiCallException $e) {
- $this->assertEquals($e->getMessage(), sprintf($message, self::$errorMessage));
- }
- }
-
- /**
- * @return array
- */
- public function errorsProvider()
- {
- return [
- [400, 'Bad Request - The request could not be parsed. Response: %s'],
- [401, 'Unauthorized - user is not logged in, could not be authenticated. Response: %s'],
- [403, 'Forbidden - Cannot access resource. Response: %s'],
- [404, 'Not Found - resource does not exist. Response: %s'],
- [
- 409,
- 'Conflict - with state of the resource on server. Can occur with (too rapid) PUT requests. Response: %s'
- ],
- [500, 'Server error. Response: %s']
- ];
- }
-
- /**
- * @expectedException \Magento\Signifyd\Model\SignifydGateway\ApiCallException
- * @expectedExceptionMessage Response is not valid JSON: Decoding failed: Syntax error
- */
- public function testHandleEmptyJsonException()
- {
- $this->response->expects($this->any())
- ->method('getStatus')
- ->willReturn(self::$successfulCode);
-
- $this->response->expects($this->once())
- ->method('getBody')
- ->willReturn('');
-
- $r = new \ReflectionObject($this->responseHandler);
- $prop = $r->getProperty('phpVersionId');
- $prop->setAccessible(true);
- $prop->setValue(self::$phpVersionId);
-
- $this->responseHandler->handle($this->response);
- }
-
- /**
- * @expectedException \Magento\Signifyd\Model\SignifydGateway\ApiCallException
- * @expectedExceptionMessage Response is not valid JSON: Some error
- */
- public function testHandleInvalidJson()
- {
- $this->response->expects($this->any())
- ->method('getStatus')
- ->willReturn(self::$successfulCode);
-
- $this->response->expects($this->once())
- ->method('getBody')
- ->willReturn('param');
-
- $this->dataDecoder = $this->getMockBuilder(DecoderInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->dataDecoder->expects($this->once())
- ->method('decode')
- ->with('param')
- ->willThrowException(new \Exception(self::$errorMessage, 30));
-
- $this->responseHandler = $this->objectManager->getObject(ResponseHandler::class, [
- 'dataDecoder' => $this->dataDecoder
- ]);
-
- $this->responseHandler->handle($this->response);
- }
-
- public function testHandle()
- {
- $this->response->expects($this->any())
- ->method('getStatus')
- ->willReturn(self::$successfulCode);
-
- $this->response->expects($this->once())
- ->method('getBody')
- ->willReturn(self::$testJson);
-
- $this->dataDecoder->expects($this->once())
- ->method('decode')
- ->willReturn(json_decode(self::$testJson, 1));
-
- $decodedResponseBody = $this->responseHandler->handle($this->response);
- $this->assertEquals($decodedResponseBody, ['id' => 1]);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php
deleted file mode 100644
index ba82ff4619ad3..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php
+++ /dev/null
@@ -1,448 +0,0 @@
-createCaseBuilder = $this->getMockBuilder(CreateCaseBuilderInterface::class)
- ->getMockForAbstractClass();
-
- $this->apiClient = $this->getMockBuilder(ApiClient::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->orderRepository = $this->getMockBuilder(OrderRepositoryInterface::class)
- ->getMockForAbstractClass();
-
- $this->caseRepository= $this->getMockBuilder(CaseRepositoryInterface::class)
- ->getMockForAbstractClass();
-
- $this->gateway = new Gateway(
- $this->createCaseBuilder,
- $this->apiClient,
- $this->orderRepository,
- $this->caseRepository
- );
- }
-
- public function testCreateCaseForSpecifiedOrder()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
- $dummySignifydInvestigationId = 42;
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'investigationId' => $dummySignifydInvestigationId
- ]);
-
- $this->createCaseBuilder
- ->expects($this->atLeastOnce())
- ->method('build')
- ->with($this->equalTo($dummyOrderId))
- ->willReturn([]);
-
- $result = $this->gateway->createCase($dummyOrderId);
- $this->assertEquals(42, $result);
- }
-
- public function testCreateCaseCallsValidApiMethod()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
- $dummySignifydInvestigationId = 42;
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->createCaseBuilder
- ->method('build')
- ->willReturn([]);
-
- $this->apiClient
- ->expects($this->atLeastOnce())
- ->method('makeApiCall')
- ->with(
- $this->equalTo('/cases'),
- $this->equalTo('POST'),
- $this->isType('array'),
- $this->equalTo($dummyStoreId)
- )
- ->willReturn([
- 'investigationId' => $dummySignifydInvestigationId
- ]);
-
- $result = $this->gateway->createCase($dummyOrderId);
- $this->assertEquals(42, $result);
- }
-
- public function testCreateCaseNormalFlow()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
- $dummySignifydInvestigationId = 42;
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->createCaseBuilder
- ->method('build')
- ->willReturn([]);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'investigationId' => $dummySignifydInvestigationId
- ]);
-
- $returnedInvestigationId = $this->gateway->createCase($dummyOrderId);
- $this->assertEquals(
- $dummySignifydInvestigationId,
- $returnedInvestigationId,
- 'Method must return value specified in "investigationId" response parameter'
- );
- }
-
- public function testCreateCaseWithFailedApiCall()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
- $apiCallFailureMessage = 'Api call failed';
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->createCaseBuilder
- ->method('build')
- ->willReturn([]);
- $this->apiClient
- ->method('makeApiCall')
- ->willThrowException(new ApiCallException($apiCallFailureMessage));
-
- $this->expectException(GatewayException::class);
- $this->expectExceptionMessage($apiCallFailureMessage);
- $this->gateway->createCase($dummyOrderId);
- }
-
- public function testCreateCaseWithMissedResponseRequiredData()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->createCaseBuilder
- ->method('build')
- ->willReturn([]);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'someOtherParameter' => 'foo',
- ]);
-
- $this->expectException(GatewayException::class);
- $this->gateway->createCase($dummyOrderId);
- }
-
- public function testCreateCaseWithAdditionalResponseData()
- {
- $dummyOrderId = 1;
- $dummyStoreId = 2;
- $dummySignifydInvestigationId = 42;
-
- $this->withOrderEntity($dummyOrderId, $dummyStoreId);
- $this->createCaseBuilder
- ->method('build')
- ->willReturn([]);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'investigationId' => $dummySignifydInvestigationId,
- 'someOtherParameter' => 'foo',
- ]);
-
- $returnedInvestigationId = $this->gateway->createCase($dummyOrderId);
- $this->assertEquals(
- $dummySignifydInvestigationId,
- $returnedInvestigationId,
- 'Method must return value specified in "investigationId" response parameter and ignore any other parameters'
- );
- }
-
- public function testSubmitCaseForGuaranteeCallsValidApiMethod()
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
- $dummyDisposition = 'APPROVED';
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->expects($this->atLeastOnce())
- ->method('makeApiCall')
- ->with(
- $this->equalTo('/guarantees'),
- $this->equalTo('POST'),
- $this->equalTo([
- 'caseId' => $dummySygnifydCaseId
- ]),
- $this->equalTo($dummyStoreId)
- )->willReturn([
- 'disposition' => $dummyDisposition
- ]);
-
- $result = $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- $this->assertEquals('APPROVED', $result);
- }
-
- public function testSubmitCaseForGuaranteeWithFailedApiCall()
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
- $apiCallFailureMessage = 'Api call failed';
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willThrowException(new ApiCallException($apiCallFailureMessage));
-
- $this->expectException(GatewayException::class);
- $this->expectExceptionMessage($apiCallFailureMessage);
- $result = $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- $this->assertEquals('Api call failed', $result);
- }
-
- public function testSubmitCaseForGuaranteeReturnsDisposition()
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
- $dummyDisposition = 'APPROVED';
- $dummyGuaranteeId = 123;
- $dummyRereviewCount = 0;
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'guaranteeId' => $dummyGuaranteeId,
- 'disposition' => $dummyDisposition,
- 'rereviewCount' => $dummyRereviewCount,
- ]);
-
- $actualDisposition = $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- $this->assertEquals(
- $dummyDisposition,
- $actualDisposition,
- 'Method must return guarantee disposition retrieved in Signifyd API response as a result'
- );
- }
-
- public function testSubmitCaseForGuaranteeWithMissedDisposition()
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
- $dummyGuaranteeId = 123;
- $dummyRereviewCount = 0;
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'guaranteeId' => $dummyGuaranteeId,
- 'rereviewCount' => $dummyRereviewCount,
- ]);
-
- $this->expectException(GatewayException::class);
- $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- }
-
- public function testSubmitCaseForGuaranteeWithUnexpectedDisposition()
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
- $dummyUnexpectedDisposition = 'UNEXPECTED';
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'disposition' => $dummyUnexpectedDisposition,
- ]);
-
- $this->expectException(GatewayException::class);
- $result = $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- $this->assertEquals('UNEXPECTED', $result);
- }
-
- /**
- * @dataProvider supportedGuaranteeDispositionsProvider
- */
- public function testSubmitCaseForGuaranteeWithExpectedDisposition($dummyExpectedDisposition)
- {
- $dummySygnifydCaseId = 42;
- $dummyStoreId = 1;
-
- $this->withCaseEntity($dummySygnifydCaseId, $dummyStoreId);
- $this->apiClient
- ->method('makeApiCall')
- ->willReturn([
- 'disposition' => $dummyExpectedDisposition,
- ]);
-
- try {
- $result = $this->gateway->submitCaseForGuarantee($dummySygnifydCaseId);
- $this->assertEquals($dummyExpectedDisposition, $result);
- } catch (GatewayException $e) {
- $this->fail(sprintf(
- 'Expected disposition "%s" was not accepted with message "%s"',
- $dummyExpectedDisposition,
- $e->getMessage()
- ));
- }
- }
-
- /**
- * Checks a test case when guarantee for a case is successfully canceled
- *
- * @covers \Magento\Signifyd\Model\SignifydGateway\Gateway::cancelGuarantee
- */
- public function testCancelGuarantee()
- {
- $caseId = 123;
- $dummyStoreId = 1;
-
- $this->withCaseEntity($caseId, $dummyStoreId);
- $this->apiClient->expects(self::once())
- ->method('makeApiCall')
- ->with(
- '/cases/' . $caseId . '/guarantee',
- 'PUT',
- ['guaranteeDisposition' => Gateway::GUARANTEE_CANCELED],
- $dummyStoreId
- )
- ->willReturn(
- ['disposition' => Gateway::GUARANTEE_CANCELED]
- );
-
- $result = $this->gateway->cancelGuarantee($caseId);
- self::assertEquals(Gateway::GUARANTEE_CANCELED, $result);
- }
-
- /**
- * Checks a case when API request returns unexpected guarantee disposition.
- *
- * @covers \Magento\Signifyd\Model\SignifydGateway\Gateway::cancelGuarantee
- * @expectedException \Magento\Signifyd\Model\SignifydGateway\GatewayException
- * @expectedExceptionMessage API returned unexpected disposition: DECLINED.
- */
- public function testCancelGuaranteeWithUnexpectedDisposition()
- {
- $caseId = 123;
- $dummyStoreId = 1;
-
- $this->withCaseEntity($caseId, $dummyStoreId);
- $this->apiClient->expects(self::once())
- ->method('makeApiCall')
- ->with(
- '/cases/' . $caseId . '/guarantee',
- 'PUT',
- ['guaranteeDisposition' => Gateway::GUARANTEE_CANCELED],
- $dummyStoreId
- )
- ->willReturn(['disposition' => Gateway::GUARANTEE_DECLINED]);
-
- $result = $this->gateway->cancelGuarantee($caseId);
- $this->assertEquals(Gateway::GUARANTEE_CANCELED, $result);
- }
-
- /**
- * @return array
- */
- public function supportedGuaranteeDispositionsProvider()
- {
- return [
- 'APPROVED' => ['APPROVED'],
- 'DECLINED' => ['DECLINED'],
- 'PENDING' => ['PENDING'],
- 'CANCELED' => ['CANCELED'],
- 'IN_REVIEW' => ['IN_REVIEW'],
- 'UNREQUESTED' => ['UNREQUESTED'],
- ];
- }
-
- /**
- * Specifies order entity mock execution.
- *
- * @param int $orderId
- * @param int $storeId
- * @return void
- */
- private function withOrderEntity(int $orderId, int $storeId): void
- {
- $orderEntity = $this->getMockBuilder(OrderInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $orderEntity->method('getStoreId')
- ->willReturn($storeId);
- $this->orderRepository->method('get')
- ->with($orderId)
- ->willReturn($orderEntity);
- }
-
- /**
- * Specifies case entity mock execution.
- *
- * @param int $caseId
- * @param int $storeId
- * @return void
- */
- private function withCaseEntity(int $caseId, int $storeId): void
- {
- $orderId = 1;
-
- $caseEntity = $this->getMockBuilder(CaseInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $caseEntity->method('getOrderId')
- ->willReturn($orderId);
- $this->caseRepository->method('getByCaseId')
- ->with($caseId)
- ->willReturn($caseEntity);
-
- $this->withOrderEntity($orderId, $storeId);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookMessageReaderTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookMessageReaderTest.php
deleted file mode 100644
index 0dfdf4980fb58..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookMessageReaderTest.php
+++ /dev/null
@@ -1,114 +0,0 @@
-decoder = $this->getMockBuilder(DecoderInterface::class)
- ->getMockForAbstractClass();
-
- $this->webhookMessageFactory = $this->getMockBuilder(WebhookMessageFactory::class)
- ->setMethods(['create'])
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->webhookRequest = $this->getMockBuilder(WebhookRequest::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->model = new WebhookMessageReader(
- $this->decoder,
- $this->webhookMessageFactory
- );
- }
-
- /**
- * Tests successful reading webhook message from request.
- *
- */
- public function testReadSuccess()
- {
- $rawBody = 'body';
- $topic = 'topic';
- $decodedData = ['status' => "DISMISSED", 'orderId' => '19418'];
-
- $this->webhookRequest->expects($this->once())
- ->method('getBody')
- ->willReturn($rawBody);
- $this->webhookRequest->expects($this->once())
- ->method('getEventTopic')
- ->willReturn('topic');
- $this->decoder->expects($this->once())
- ->method('decode')
- ->with($rawBody)
- ->willReturn($decodedData);
- $webhookMessage = $this->getMockBuilder(WebhookMessage::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->webhookMessageFactory->expects($this->once())
- ->method('create')
- ->with(
- [
- 'data' => $decodedData,
- 'eventTopic' => $topic
- ]
- )
- ->willReturn($webhookMessage);
-
- $this->assertEquals(
- $webhookMessage,
- $this->model->read($this->webhookRequest)
- );
- }
-
- /**
- * Tests reading failure webhook message from request.
- *
- * @expectedException \InvalidArgumentException
- */
- public function testReadFail()
- {
- $this->decoder->expects($this->once())
- ->method('decode')
- ->willThrowException(new \Exception('Error'));
-
- $this->model->read($this->webhookRequest);
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookRequestValidatorTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookRequestValidatorTest.php
deleted file mode 100644
index 5ae6b95a77548..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Response/WebhookRequestValidatorTest.php
+++ /dev/null
@@ -1,231 +0,0 @@
-config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->decoder = $this->getMockBuilder(DecoderInterface::class)
- ->getMockForAbstractClass();
-
- $this->model = new WebhookRequestValidator(
- $this->config,
- $this->decoder
- );
- }
-
- /**
- * Tests successful cases.
- *
- * @param string $body
- * @param string $topic
- * @param string $hash
- * @param int$callConfigCount
- * @dataProvider validateSuccessDataProvider
- */
- public function testValidateSuccess($body, $topic, $hash, $callConfigCount)
- {
- $this->config->expects($this->exactly($callConfigCount))
- ->method('getApiKey')
- ->willReturn('GpFZZnxGgIxuI8BazSm3v6eGK');
-
- $this->decoder->expects($this->once())
- ->method('decode')
- ->with($body)
- ->willReturn(['status' => "DISMISSED", 'orderId' => '19418']);
-
- $webhookRequest = $this->createWebhookRequest($body, $topic, $hash);
-
- $this->assertTrue(
- $this->model->validate($webhookRequest)
- );
- }
-
- /**
- * @case 1. All data are correct, event topic has real value
- * @case 2. All data are correct, event topic has test value
- * @return array
- */
- public function validateSuccessDataProvider()
- {
- return [
- 1 => [
- 'body' => '{ status: "DISMISSED", orderId: "19418" }',
- 'topic' => 'cases/creation',
- 'hash' => 'KWR8Bzu3tinEpDviw1opWSMJGFqfpA79nNGp0TEYM6Q=',
- 'callConfigCount' => 1
- ],
- 2 => [
- 'body' => '{ status: "DISMISSED", orderId: "19418" }',
- 'topic' => 'cases/test',
- 'hash' => '6npAahliNbzYo/Qi4+g+JeqPhLFgg19sIbuxDLmvobw=',
- 'callConfigCount' => 0
- ]
- ];
- }
-
- /**
- * Case with wrong event topic
- *
- * @param string $topic
- * @dataProvider validationTopicFailsDataProvider
- */
- public function testValidationTopicFails($topic)
- {
- $body = '{ status: "DISMISSED", orderId: "19418" }';
- $hash = 'KWR8Bzu3tinEpDviw1opWSMJGFqfpA79nNGp0TEYM6Q=';
-
- $this->config->expects($this->never())
- ->method('getApiKey');
-
- $this->decoder->expects($this->never())
- ->method('decode');
-
- $webhookRequest = $this->createWebhookRequest($body, $topic, $hash);
-
- $this->assertFalse(
- $this->model->validate($webhookRequest),
- 'Negative webhook event topic value validation fails'
- );
- }
-
- /**
- * @return array
- */
- public function validationTopicFailsDataProvider()
- {
- return [
- ['wrong topic' => 'bla-bla-topic'],
- ['empty topic' => '']
- ];
- }
-
- /**
- * Case with wrong webhook request body
- *
- * @param string $body
- * @dataProvider validationBodyFailsDataProvider
- */
- public function testValidationBodyFails($body)
- {
- $topic = 'cases/creation';
- $hash = 'KWR8Bzu3tinEpDviw1opWSMJGFqfpA79nNGp0TEYM6Q=';
- $webhookRequest = $this->createWebhookRequest($body, $topic, $hash);
-
- $this->config->expects($this->never())
- ->method('getApiKey');
-
- if (empty($body)) {
- $this->decoder->expects($this->once())
- ->method('decode')
- ->with($body)
- ->willReturn('');
- } else {
- $this->decoder->expects($this->once())
- ->method('decode')
- ->with($body)
- ->willThrowException(new \Exception('Error'));
- }
-
- $this->assertFalse(
- $this->model->validate($webhookRequest),
- 'Negative webhook request body validation fails'
- );
- }
-
- /**
- * @return array
- */
- public function validationBodyFailsDataProvider()
- {
- return [
- ['Empty request body' => ''],
- ['Bad request body' => '{ bad data}']
- ];
- }
-
- /**
- * Case with wrong hash
- */
- public function testValidationHashFails()
- {
- $topic = 'cases/creation';
- $body = '{ status: "DISMISSED", orderId: "19418" }';
- $hash = 'wrong hash';
- $webhookRequest = $this->createWebhookRequest($body, $topic, $hash);
-
- $this->config->expects($this->once())
- ->method('getApiKey')
- ->willReturn('GpFZZnxGgIxuI8BazSm3v6eGK');
-
- $this->decoder->expects($this->once())
- ->method('decode')
- ->with($body)
- ->willReturn(['status' => "DISMISSED", 'orderId' => '19418']);
-
- $this->assertFalse(
- $this->model->validate($webhookRequest),
- 'Negative webhook hash validation fails'
- );
- }
-
- /**
- * Returns mocked WebhookRequest
- *
- * @param string $body
- * @param string $topic
- * @param string $hash
- * @return WebhookRequest|\PHPUnit_Framework_MockObject_MockObject
- */
- private function createWebhookRequest($body, $topic, $hash)
- {
- $webhookRequest = $this->getMockBuilder(WebhookRequest::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookRequest->expects($this->once())
- ->method('getBody')
- ->willReturn($body);
- $webhookRequest->expects($this->once())
- ->method('getEventTopic')
- ->willReturn($topic);
- $webhookRequest->expects($this->once())
- ->method('getHash')
- ->willReturn($hash);
-
- return $webhookRequest;
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydOrderSessionIdTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydOrderSessionIdTest.php
deleted file mode 100644
index 9d3061f240c21..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydOrderSessionIdTest.php
+++ /dev/null
@@ -1,60 +0,0 @@
-identityGenerator = $this->getMockBuilder(IdentityGeneratorInterface::class)
- ->getMockForAbstractClass();
-
- $this->signifydOrderSessionId = new SignifydOrderSessionId($this->identityGenerator);
- }
-
- /**
- * Tests method by passing quoteId parameter
- *
- * @covers \Magento\Signifyd\Model\SignifydOrderSessionId::get
- */
- public function testGetByQuoteId()
- {
- $quoteId = 1;
- $signifydOrderSessionId = 'asdfzxcv';
-
- $this->identityGenerator->expects(self::once())
- ->method('generateIdForData')
- ->with($quoteId)
- ->willReturn($signifydOrderSessionId);
-
- $this->assertEquals(
- $signifydOrderSessionId,
- $this->signifydOrderSessionId->get($quoteId)
- );
- }
-}
diff --git a/app/code/Magento/Signifyd/Test/Unit/Observer/PlaceOrderTest.php b/app/code/Magento/Signifyd/Test/Unit/Observer/PlaceOrderTest.php
deleted file mode 100644
index d63831b1d4a8e..0000000000000
--- a/app/code/Magento/Signifyd/Test/Unit/Observer/PlaceOrderTest.php
+++ /dev/null
@@ -1,284 +0,0 @@
-config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->setMethods(['isActive'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->creationService = $this->getMockBuilder(CaseCreationServiceInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['createForOrder'])
- ->getMock();
-
- $this->observer = $this->getMockBuilder(Observer::class)
- ->disableOriginalConstructor()
- ->setMethods(['getEvent'])
- ->getMock();
-
- $this->event = $this->getMockBuilder(Event::class)
- ->disableOriginalConstructor()
- ->setMethods(['getData'])
- ->getMock();
-
- $this->placeOrder = new PlaceOrder(
- $this->config,
- $this->creationService,
- $this->logger
- );
- }
-
- /**
- * Checks a test case when Signifyd module is disabled.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- */
- public function testExecuteWithDisabledModule()
- {
- $orderId = 1;
- $storeId = 2;
- $this->withActiveSignifydIntegration(false, $storeId);
- $this->withOrderEntity($orderId, $storeId);
-
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $this->placeOrder->execute($this->observer);
- }
-
- /**
- * Checks a test case when the observer event returns empty an order entity.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- */
- public function testExecuteWithoutOrder()
- {
- $this->withActiveSignifydIntegration(true);
- $this->withOrderEntity(null, null);
-
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $this->placeOrder->execute($this->observer);
- }
-
- /**
- * Checks a test case when the order placed with offline payment method.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- */
- public function testExecuteWithOfflinePayment()
- {
- $orderId = 1;
- $storeId = 2;
- $this->withActiveSignifydIntegration(true, $storeId);
- $this->withOrderEntity($orderId, $storeId);
- $this->withAvailablePaymentMethod(false);
-
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $this->placeOrder->execute($this->observer);
- }
-
- /**
- * Checks a test case when case creation service fails.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- */
- public function testExecuteWithFailedCaseCreation()
- {
- $orderId = 1;
- $storeId = 2;
- $exceptionMessage = __('Case with the same order id already exists.');
-
- $this->withActiveSignifydIntegration(true, $storeId);
- $this->withOrderEntity($orderId, $storeId);
- $this->withAvailablePaymentMethod(true);
-
- $this->creationService->method('createForOrder')
- ->with(self::equalTo($orderId))
- ->willThrowException(new AlreadyExistsException($exceptionMessage));
-
- $this->logger->method('error')
- ->with(self::equalTo($exceptionMessage));
-
- $result = $this->placeOrder->execute($this->observer);
- $this->assertNull($result);
- }
-
- /**
- * Checks a test case when observer successfully calls case creation service.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- */
- public function testExecute()
- {
- $orderId = 1;
- $storeId = 2;
-
- $this->withActiveSignifydIntegration(true, $storeId);
- $this->withOrderEntity($orderId, $storeId);
- $this->withAvailablePaymentMethod(true);
-
- $this->creationService
- ->method('createForOrder')
- ->with(self::equalTo($orderId));
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $this->placeOrder->execute($this->observer);
- }
-
- public function testExecuteWithOrderPendingPayment()
- {
- $orderId = 1;
- $storeId = 2;
-
- $this->withActiveSignifydIntegration(true, $storeId);
- $this->withOrderEntity($orderId, $storeId);
- $this->orderEntity->method('getState')
- ->willReturn(Order::STATE_PENDING_PAYMENT);
- $this->withAvailablePaymentMethod(true);
-
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $this->placeOrder->execute($this->observer);
- }
-
- /**
- * Specifies order entity mock execution.
- *
- * @param int|null $orderId
- * @param int|null $storeId
- * @return void
- */
- private function withOrderEntity($orderId, $storeId): void
- {
- $this->orderEntity = $this->getMockBuilder(OrderInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->orderEntity->method('getEntityId')
- ->willReturn($orderId);
- $this->orderEntity->method('getStoreId')
- ->willReturn($storeId);
-
- $this->observer->method('getEvent')
- ->willReturn($this->event);
-
- $this->event->method('getData')
- ->with('order')
- ->willReturn($this->orderEntity);
- }
-
- /**
- * Specifies config mock execution.
- *
- * @param bool $isActive
- * @param int|null $storeId
- * @return void
- */
- private function withActiveSignifydIntegration(bool $isActive, $storeId = null): void
- {
- $this->config->method('isActive')
- ->with($storeId)
- ->willReturn($isActive);
- }
-
- /**
- * Specifies payment method mock execution.
- *
- * @param bool $isAvailable
- * @return void
- */
- private function withAvailablePaymentMethod($isAvailable)
- {
- /** @var MethodInterface|MockObject $paymentMethod */
- $paymentMethod = $this->getMockBuilder(MethodInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- /**
- * The code depends on implementation but not interface
- * because order payment implements two interfaces
- */
- /** @var Payment|MockObject $orderPayment */
- $orderPayment = $this->getMockBuilder(Payment::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->orderEntity->method('getPayment')
- ->willReturn($orderPayment);
-
- $orderPayment->method('getMethodInstance')
- ->willReturn($paymentMethod);
-
- $paymentMethod->method('isOffline')
- ->willReturn(!$isAvailable);
- }
-}
diff --git a/app/code/Magento/Signifyd/Ui/Component/Listing/Column/Guarantee/Options.php b/app/code/Magento/Signifyd/Ui/Component/Listing/Column/Guarantee/Options.php
deleted file mode 100644
index 1e6234a8e27a9..0000000000000
--- a/app/code/Magento/Signifyd/Ui/Component/Listing/Column/Guarantee/Options.php
+++ /dev/null
@@ -1,56 +0,0 @@
-escaper = $escaper;
- }
-
- /**
- * {@inheritdoc}
- */
- public function toOptionArray()
- {
- return [
- [
- 'value' => CaseInterface::GUARANTEE_DECLINED,
- 'label' => $this->escaper->escapeHtml(__('Declined'))
- ],
- [
- 'value' => CaseInterface::GUARANTEE_APPROVED,
- 'label' => $this->escaper->escapeHtml(__('Approved'))
- ],
- [
- 'value' => CaseInterface::GUARANTEE_CANCELED,
- 'label' => $this->escaper->escapeHtml(__('Canceled'))
- ],
- [
- 'value' => CaseInterface::GUARANTEE_PENDING,
- 'label' => $this->escaper->escapeHtml(__('Pending'))
- ]
- ];
- }
-}
diff --git a/app/code/Magento/Signifyd/composer.json b/app/code/Magento/Signifyd/composer.json
deleted file mode 100644
index c0214e9a2813c..0000000000000
--- a/app/code/Magento/Signifyd/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "magento/module-signifyd",
- "description": "Submitting Case Entry to Signifyd on Order Creation",
- "config": {
- "sort-packages": true
- },
- "require": {
- "magento/framework": "*",
- "magento/module-backend": "*",
- "magento/module-checkout": "*",
- "magento/module-config": "*",
- "magento/module-customer": "*",
- "magento/module-directory": "*",
- "magento/module-payment": "*",
- "magento/module-sales": "*",
- "magento/module-store": "*",
- "php": "~7.1.3||~7.2.0||~7.3.0"
- },
- "suggest": {
- "magento/module-config": "*"
- },
- "type": "magento2-module",
- "license": [
- "OSL-3.0",
- "AFL-3.0"
- ],
- "autoload": {
- "files": [
- "registration.php"
- ],
- "psr-4": {
- "Magento\\Signifyd\\": ""
- }
- }
-}
diff --git a/app/code/Magento/Signifyd/etc/acl.xml b/app/code/Magento/Signifyd/etc/acl.xml
deleted file mode 100644
index 32f0493fbcad9..0000000000000
--- a/app/code/Magento/Signifyd/etc/acl.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/adminhtml/di.xml b/app/code/Magento/Signifyd/etc/adminhtml/di.xml
deleted file mode 100644
index c771d67216d43..0000000000000
--- a/app/code/Magento/Signifyd/etc/adminhtml/di.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/adminhtml/routes.xml b/app/code/Magento/Signifyd/etc/adminhtml/routes.xml
deleted file mode 100644
index c078ab3c8c4c1..0000000000000
--- a/app/code/Magento/Signifyd/etc/adminhtml/routes.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/adminhtml/system.xml b/app/code/Magento/Signifyd/etc/adminhtml/system.xml
deleted file mode 100644
index 182a67e4e1f35..0000000000000
--- a/app/code/Magento/Signifyd/etc/adminhtml/system.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
- sales
- Magento_Sales::fraud_protection
-
- signifyd-logo-header
-
- Magento\Signifyd\Block\Adminhtml\System\Config\Fieldset\Info
- signifyd-about-header
-
- Benefits:
- - Grow your business without fear of fraud
- - Accept more orders and maximize your revenue
- - Automate order review and shift fraud off your plate
]]>
-
- https://www.signifyd.com/magento-guaranteed-fraud-protection
-
-
- signifyd-about-header
-
- View our setup guide for step-by-step instructions on how to integrate Signifyd with Magento.
For support contact support@signifyd.com.]]>
-
-
-
- Magento\Config\Model\Config\Source\Yesno
- fraud_protection/signifyd/active
-
-
-
- settings page in the Signifyd console.]]>
- fraud_protection/signifyd/api_key
- Magento\Config\Model\Config\Backend\Encrypted
-
- 1
-
-
-
-
- fraud_protection/signifyd/api_url
- Don’t change unless asked to do so.
-
- 1
-
-
-
-
- Magento\Config\Model\Config\Source\Yesno
- fraud_protection/signifyd/debug
-
- 1
-
-
-
-
- configure a guarantee completed webhook in Signifyd. Webhooks are used to sync Signifyd`s guarantee decisions back to Magento.]]>
- signifyd/webhooks/handler
- Magento\Signifyd\Block\Adminhtml\System\Config\Field\WebhookUrl
-
- 1
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/config.xml b/app/code/Magento/Signifyd/etc/config.xml
deleted file mode 100644
index 804342a14bb08..0000000000000
--- a/app/code/Magento/Signifyd/etc/config.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
- 0
- https://api.signifyd.com/v2/
-
- 0
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/db_schema.xml b/app/code/Magento/Signifyd/etc/db_schema.xml
deleted file mode 100644
index 8d47321c38b29..0000000000000
--- a/app/code/Magento/Signifyd/etc/db_schema.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/db_schema_whitelist.json b/app/code/Magento/Signifyd/etc/db_schema_whitelist.json
deleted file mode 100644
index 69d164b23d9e7..0000000000000
--- a/app/code/Magento/Signifyd/etc/db_schema_whitelist.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "signifyd_case": {
- "column": {
- "entity_id": true,
- "order_id": true,
- "case_id": true,
- "guarantee_eligible": true,
- "guarantee_disposition": true,
- "status": true,
- "score": true,
- "associated_team": true,
- "review_disposition": true,
- "created_at": true,
- "updated_at": true
- },
- "constraint": {
- "PRIMARY": true,
- "SIGNIFYD_CASE_ORDER_ID_SALES_ORDER_ENTITY_ID": true,
- "SIGNIFYD_CASE_ORDER_ID": true,
- "SIGNIFYD_CASE_CASE_ID": true
- }
- },
- "sales_order_grid": {
- "column": {
- "signifyd_guarantee_status": true
- }
- }
-}
\ No newline at end of file
diff --git a/app/code/Magento/Signifyd/etc/di.xml b/app/code/Magento/Signifyd/etc/di.xml
deleted file mode 100644
index e82e8f84b3584..0000000000000
--- a/app/code/Magento/Signifyd/etc/di.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Magento\Payment\Gateway\Config\Config
- SignifydAvsDefaultMapper
- SignifydCvvDefaultMapper
-
-
-
-
- Magento\Sales\Model\ResourceModel\Order\Grid
-
-
-
-
-
- - Magento\Signifyd\Model\SalesOrderGrid\NotSyncedOrderIdListProvider
-
-
-
-
-
- SignifydIdListProvider
-
- -
-
- signifyd_case
- - entity_id
- - order_id
-
-
-
- - signifyd_case.guarantee_disposition
-
-
-
-
-
- sales
-
-
-
-
- Magento_Signifyd
- signifyd_payment_mapping.xsd
-
-
-
-
- Magento\Signifyd\Model\PaymentMethodMapper\XmlToArrayConfigConverter
- PaymentMapperSchemaLocator
- signifyd_payment_mapping.xml
-
- - name
-
-
-
-
-
- PaymentMapperConfigReader
- signifyd_payment_list_cache
-
-
-
-
- PaymentMethodConfigData
-
-
-
-
-
- - 1
- - 1
-
-
- - 1
- - 1
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/events.xml b/app/code/Magento/Signifyd/etc/events.xml
deleted file mode 100644
index d44665f9fb97b..0000000000000
--- a/app/code/Magento/Signifyd/etc/events.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/frontend/di.xml b/app/code/Magento/Signifyd/etc/frontend/di.xml
deleted file mode 100644
index 08a690d1a9930..0000000000000
--- a/app/code/Magento/Signifyd/etc/frontend/di.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/frontend/routes.xml b/app/code/Magento/Signifyd/etc/frontend/routes.xml
deleted file mode 100644
index 5803f59d8624b..0000000000000
--- a/app/code/Magento/Signifyd/etc/frontend/routes.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/module.xml b/app/code/Magento/Signifyd/etc/module.xml
deleted file mode 100644
index 264f295e8c528..0000000000000
--- a/app/code/Magento/Signifyd/etc/module.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xml b/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xml
deleted file mode 100644
index 9ff952d04925d..0000000000000
--- a/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
- braintree
- PAYMENT_CARD
-
-
- braintree_paypal
- PAYPAL_ACCOUNT
-
-
- paypal_express
- PAYPAL_ACCOUNT
-
-
- paypal_express_bml
- PAYPAL_ACCOUNT
-
-
- payflow_express
- PAYPAL_ACCOUNT
-
-
- payflow_express_bml
- PAYPAL_ACCOUNT
-
-
- payflowpro
- PAYMENT_CARD
-
-
- payflow_link
- PAYMENT_CARD
-
-
- payflow_advanced
- PAYMENT_CARD
-
-
- hosted_pro
- PAYMENT_CARD
-
-
- authorizenet_directpost
- PAYMENT_CARD
-
-
- worldpay
- PAYMENT_CARD
-
-
- eway
- PAYMENT_CARD
-
-
- cybersource
- PAYMENT_CARD
-
-
- free
- FREE
-
-
-
diff --git a/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xsd b/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xsd
deleted file mode 100644
index bb3b3036d0c9c..0000000000000
--- a/app/code/Magento/Signifyd/etc/signifyd_payment_mapping.xsd
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Element's unique identifier.
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/i18n/en_US.csv b/app/code/Magento/Signifyd/i18n/en_US.csv
deleted file mode 100644
index 40772188dac9e..0000000000000
--- a/app/code/Magento/Signifyd/i18n/en_US.csv
+++ /dev/null
@@ -1,46 +0,0 @@
-OPEN,Open
-PROCESSING,Processing
-FLAGGED,Flagged
-DISMISSED,Dismissed
-HELD,Held
-GOOD,Good
-FRAUDULENT,Fraudulent
-UNSET,Unset
-NULL,Unset
-APPROVED,Approved
-DECLINED,Declined
-PENDING,Pending
-CANCELED,Canceled
-IN_REVIEW,"In review"
-Approved,Approved
-Declined,Declined
-Pending,Pending
-Canceled,Canceled
-"In Review","In Review"
-Unrequested,Unrequested
-"Learn more","Learn more"
-"This order already has associated case entity","This order already has associated case entity"
-"The case entity should not be empty.","The case entity should not be empty."
-"Cannot update Case entity.","Cannot update Case entity."
-"The ""%1"" should not be empty.","The ""%1"" should not be empty."
-"Case entity not found.","Case entity not found."
-"Case Update: New score for the order is %1. Previous score was %2.","Case Update: New score for the order is %1. Previous score was %2."
-"Awaiting the Signifyd guarantee disposition.","Awaiting the Signifyd guarantee disposition."
-"Only single entrance of ""%1"" node is required.","Only single entrance of ""%1"" node is required."
-"Not empty value for ""%1"" node is required.","Not empty value for ""%1"" node is required."
-"%1 must implement %2","%1 must implement %2"
-Error,Error
-"Cannot generate message.","Cannot generate message."
-"Message is generated.","Message is generated."
-"Case with the same order id already exists.","Case with the same order id already exists."
-"Fraud Protection Information","Fraud Protection Information"
-"Signifyd Guarantee Decision","Signifyd Guarantee Decision"
-"Fraud Protection Section","Fraud Protection Section"
-"Fraud Protection","Fraud Protection"
-"Protect your store from fraud with Guaranteed Fraud Protection by Signifyd.","Protect your store from fraud with Guaranteed Fraud Protection by Signifyd."
-Configuration,Configuration
-"Enable this Solution","Enable this Solution"
-"API Key","API Key"
-"API URL","API URL"
-Debug,Debug
-"Webhook URL","Webhook URL"
diff --git a/app/code/Magento/Signifyd/registration.php b/app/code/Magento/Signifyd/registration.php
deleted file mode 100644
index e7fa9cfd2f9b3..0000000000000
--- a/app/code/Magento/Signifyd/registration.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/view/adminhtml/templates/case_info.phtml b/app/code/Magento/Signifyd/view/adminhtml/templates/case_info.phtml
deleted file mode 100644
index 07f1b2c2e4ae6..0000000000000
--- a/app/code/Magento/Signifyd/view/adminhtml/templates/case_info.phtml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-isEmptyCase()) {
- return '';
-}
-?>
-
-
- = $block->escapeHtml(__('Fraud Protection Information')) ?>
-
-
-
-
-
-
-
- = $block->escapeHtml(__('Signifyd Guarantee Decision')) ?> |
- = $block->escapeHtml($block->getCaseGuaranteeDisposition()) ?> |
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/view/adminhtml/ui_component/sales_order_grid.xml b/app/code/Magento/Signifyd/view/adminhtml/ui_component/sales_order_grid.xml
deleted file mode 100644
index 91053d617f31f..0000000000000
--- a/app/code/Magento/Signifyd/view/adminhtml/ui_component/sales_order_grid.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
- select
-
- true
- select
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/view/adminhtml/web/images/logo.png b/app/code/Magento/Signifyd/view/adminhtml/web/images/logo.png
deleted file mode 100644
index 7c6645e7c6c93..0000000000000
Binary files a/app/code/Magento/Signifyd/view/adminhtml/web/images/logo.png and /dev/null differ
diff --git a/app/code/Magento/Signifyd/view/adminhtml/web/js/request-send.js b/app/code/Magento/Signifyd/view/adminhtml/web/js/request-send.js
deleted file mode 100644
index f55170336ca03..0000000000000
--- a/app/code/Magento/Signifyd/view/adminhtml/web/js/request-send.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-define([
- 'mageUtils',
- 'Magento_Ui/js/form/components/button'
-], function (utils, Button) {
- 'use strict';
-
- return Button.extend({
-
- /**
- * Creates and submits form for Guarantee create/cancel
- */
- sendRequest: function () {
- utils.submit({
- url: this.requestURL,
- data: this.data
- });
- }
- });
-});
diff --git a/app/code/Magento/Signifyd/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Signifyd/view/frontend/layout/checkout_cart_index.xml
deleted file mode 100644
index 30472ae5e9ae9..0000000000000
--- a/app/code/Magento/Signifyd/view/frontend/layout/checkout_cart_index.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Signifyd/view/frontend/layout/checkout_index_index.xml
deleted file mode 100644
index 30472ae5e9ae9..0000000000000
--- a/app/code/Magento/Signifyd/view/frontend/layout/checkout_index_index.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Signifyd/view/frontend/templates/fingerprint.phtml b/app/code/Magento/Signifyd/view/frontend/templates/fingerprint.phtml
deleted file mode 100644
index 657043b895f60..0000000000000
--- a/app/code/Magento/Signifyd/view/frontend/templates/fingerprint.phtml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-isModuleActive()) : ?>
-
-
diff --git a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml
index 0ddc0640b56df..01c8ab5658186 100644
--- a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml
+++ b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml
index 608b284f247f3..2a9b17ad49bff 100644
--- a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml
+++ b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Store/App/Config/Source/InitialConfigSource.php b/app/code/Magento/Store/App/Config/Source/InitialConfigSource.php
index d6e98c0ddcdaa..4598a70e99397 100644
--- a/app/code/Magento/Store/App/Config/Source/InitialConfigSource.php
+++ b/app/code/Magento/Store/App/Config/Source/InitialConfigSource.php
@@ -52,6 +52,7 @@ public function __construct(
/**
* Return whole config data from config file for specified config type.
+ *
* Ignore $path argument due to config source must return all config data
*
* @param string $path
@@ -65,7 +66,7 @@ public function get($path = '')
*
* @see \Magento\Store\Model\Config\Importer To import store configs
*/
- if ($this->deploymentConfig->isAvailable()) {
+ if ($this->deploymentConfig->isAvailable() || $this->deploymentConfig->isDbAvailable()) {
return [];
}
diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml
index 208ed316e2e51..d25e7dbb0056a 100644
--- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml
+++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Swagger/Controller/Index/Index.php b/app/code/Magento/Swagger/Controller/Index/Index.php
index 162367aaf81f9..c486989c0b1bc 100644
--- a/app/code/Magento/Swagger/Controller/Index/Index.php
+++ b/app/code/Magento/Swagger/Controller/Index/Index.php
@@ -3,42 +3,38 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+declare(strict_types=1);
+
namespace Magento\Swagger\Controller\Index;
-/**
- * Class Index
- *
- * @package Magento\Swagger\Controller\Index
- */
-class Index extends \Magento\Framework\App\Action\Action
+use Magento\Framework\App\Action\HttpGetActionInterface;
+use Magento\Framework\View\Page\Config as PageConfig;
+use Magento\Framework\View\Result\PageFactory as PageFactory;
+
+class Index implements HttpGetActionInterface
{
/**
- * @var \Magento\Framework\View\Page\Config
+ * @var PageConfig
*/
private $pageConfig;
/**
- * @var \Magento\Framework\View\Result\PageFactory
+ * @var PageFactory
*/
private $pageFactory;
/**
- * @param \Magento\Framework\App\Action\Context $context
- * @param \Magento\Framework\View\Page\Config $pageConfig
- * @param \Magento\Framework\View\Result\PageFactory $pageFactory
+ * @param PageConfig $pageConfig
+ * @param PageFactory $pageFactory
*/
- public function __construct(
- \Magento\Framework\App\Action\Context $context,
- \Magento\Framework\View\Page\Config $pageConfig,
- \Magento\Framework\View\Result\PageFactory $pageFactory
- ) {
- parent::__construct($context);
+ public function __construct(PageConfig $pageConfig, PageFactory $pageFactory)
+ {
$this->pageConfig = $pageConfig;
$this->pageFactory = $pageFactory;
}
/**
- * @return \Magento\Framework\View\Result\Page
+ * @inheritDoc
*/
public function execute()
{
diff --git a/app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php
index c409cd6ca7504..abfc40d7e5437 100644
--- a/app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php
+++ b/app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php
@@ -8,29 +8,29 @@
namespace Magento\Swagger\Test\Unit\Controller\Index;
-class IndexTest extends \PHPUnit\Framework\TestCase
+use Magento\Framework\View\Page\Config as PageConfig;
+use Magento\Framework\View\Result\PageFactory;
+use Magento\Swagger\Controller\Index\Index;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+
+class IndexTest extends TestCase
{
public function testExecute()
{
- $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-
- $pageConfigMock = $this->getMockBuilder(\Magento\Framework\View\Page\Config::class)
+ /** @var MockObject|PageConfig $pageConfigMock */
+ $pageConfigMock = $this->getMockBuilder(PageConfig::class)
->disableOriginalConstructor()
->getMock();
- $resultPageFactory = $this->getMockBuilder(\Magento\Framework\View\Result\PageFactory::class)
+ /** @var MockObject|PageFactory $resultPageFactory */
+ $resultPageFactory = $this->getMockBuilder(PageFactory::class)
->disableOriginalConstructor()
->getMock();
$pageConfigMock->expects($this->once())->method('addBodyClass')->with('swagger-section');
$resultPageFactory->expects($this->once())->method('create');
- $model = $objectManager->getObject(
- \Magento\Swagger\Controller\Index\Index::class,
- [
- 'pageConfig' => $pageConfigMock,
- 'pageFactory' => $resultPageFactory
- ]
- );
- $model->execute();
+ $indexAction = new Index($pageConfigMock, $resultPageFactory);
+ $indexAction->execute();
}
}
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml
index 65ac017072917..a4fc0bdcfd1fb 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml
@@ -17,7 +17,7 @@
-
+
-
+
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml
index ff1286d8092fc..a42aadc497a7a 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml
index 5437489fd5697..6b2a29d8ec451 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml
index 7599111260980..1a6c0341c0704 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml
index 5660922962b47..e93a27d377a52 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
index 7d3d1aafd8d6d..8fd21acbd51d9 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml
index 0ca0561be0a0d..06a51575e68fb 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml
index d5bc8dbadfb56..3e133dacc66c1 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest/StorefrontConfigurableProductSwatchMinimumPriceProductPageTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest/StorefrontConfigurableProductSwatchMinimumPriceProductPageTest.xml
index fdc8fb631dd8a..62444fd9d30e1 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest/StorefrontConfigurableProductSwatchMinimumPriceProductPageTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest/StorefrontConfigurableProductSwatchMinimumPriceProductPageTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
index 1fe46c20a542d..47018a1b142b2 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
index 820150b10d06a..82dbff950d62f 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
index 76ec3658243bf..b6b3e58bd7c01 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
index d15d5dcb3d63c..47ca8ce44bec3 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml
index 22ce176da8233..43944ceef33ef 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml
index 9acfdf394be4b..a1d346ffa2744 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml
@@ -54,7 +54,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml
index 5c0ad3bc4ea77..e027a41cd9d2a 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml
index dce8852ac5628..fc4b6dd8b84c5 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckingTaxReportGridTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckingTaxReportGridTest.xml
index 3e0998b79c3f5..0990daf1ecfbf 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckingTaxReportGridTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckingTaxReportGridTest.xml
@@ -46,7 +46,7 @@
-
+
@@ -119,7 +119,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRuleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRuleTest.xml
index e632f6265f438..3a5f905d89dd5 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRuleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateDefaultsTaxRuleTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml
index b63ca1953157f..06160eb09b787 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml
index 3befada509afa..3a6e4dfef5bac 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml
index cb79de19ce23a..b55ec35fa9eb1 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml
index 696d6c4c87763..379164d134448 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml
index c6c5e318cc791..d276a6a276b2c 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml
index f75fa716e9d30..998c948d869d0 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClassTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClassTest.xml
index 03b12c8f28098..6e2ca794379f6 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClassTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithCustomerAndProductTaxClassTest.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClassTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClassTest.xml
index abff31803a165..895bb920973c8 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClassTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewAndExistingTaxRateAndCustomerAndProductTaxClassTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest.xml
index 6e9b81743ddf0..43ce4059ad84e 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithNewTaxClassesAndTaxRateTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRangeTest.xml
index 6a9bf30811ff5..0293e04293daf 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRangeTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRuleWithZipRangeTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminDeleteTaxRuleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminDeleteTaxRuleTest.xml
index 72adf7b0dae1e..770cdd1e3b2c4 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminDeleteTaxRuleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminDeleteTaxRuleTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml
index 219cb309820d8..fd5b07a88b52f 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml
index 73c8c63be0318..824d6d1630162 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml
index 2b2e0c5184d4a..a6939bf14c4a1 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateDefaultTaxRuleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateDefaultTaxRuleTest.xml
index 0390542544060..61b09eabe7d35 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateDefaultTaxRuleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateDefaultTaxRuleTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithCustomClassesTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithCustomClassesTest.xml
index 0e87f268f8825..b7ffe05ebf5c2 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithCustomClassesTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithCustomClassesTest.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithFixedZipUtahTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithFixedZipUtahTest.xml
index a96a57cbfec55..14df3f8987f5e 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithFixedZipUtahTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRuleWithFixedZipUtahTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml
index 5f855f5bb750d..4b34121b10829 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml
index b4070081519d7..959aa323308be 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml
index 9469f6a7a6f20..c1268638c7104 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml
index 4f7e5534e85bb..609c8c7b27980 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml
index bd935113fe051..724831d9409be 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml
index 14615c101b9a7..d005f4b657448 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestVirtualTest.xml
index 248828aa94a4b..d1fc0654fc496 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestVirtualTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestVirtualTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInSimpleTest.xml
index 187f079434ddc..3a67276c42737 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInSimpleTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInSimpleTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml
index a0396cd2793bf..793468b7f0b1e 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/Update01TaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/Update01TaxRateEntityTest.xml
index 2ed31c2e20488..306216422adea 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/Update01TaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/Update01TaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/Update100TaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/Update100TaxRateEntityTest.xml
index 27a7f2c51724e..c22bab774de29 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/Update100TaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/Update100TaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/Update1299TaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/Update1299TaxRateEntityTest.xml
index aa46a5fdae0e1..6f93d07b76eed 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/Update1299TaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/Update1299TaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/UpdateAnyRegionTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/UpdateAnyRegionTaxRateEntityTest.xml
index d7b25da6c14ae..c3986e6a8d0cc 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/UpdateAnyRegionTaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/UpdateAnyRegionTaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/UpdateDecimalTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/UpdateDecimalTaxRateEntityTest.xml
index 3002452196904..fb1eff1d74067 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/UpdateDecimalTaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/UpdateDecimalTaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/UpdateLargeTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/UpdateLargeTaxRateEntityTest.xml
index 6c81a6aeb3f11..1f0406244a926 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/UpdateLargeTaxRateEntityTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/UpdateLargeTaxRateEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml
index 4a074a484537d..056b4c3f914fe 100644
--- a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml
+++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml
index 2d0dc4501dfa1..167191ee69a79 100644
--- a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml
+++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml
index ae0ebe2ed7ef3..07db3a5a18b73 100644
--- a/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml
+++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml
index 666d01e1090c1..fbe1d5ac936d7 100644
--- a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml
+++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml
index 56041c6ccc99a..0f9ff05af3d89 100644
--- a/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml
+++ b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml b/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml
index c6f2bb0713f48..7a107f059a84a 100644
--- a/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml
+++ b/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/sortBy.js b/app/code/Magento/Ui/view/base/web/js/grid/sortBy.js
new file mode 100644
index 0000000000000..50cbb6881a6f1
--- /dev/null
+++ b/app/code/Magento/Ui/view/base/web/js/grid/sortBy.js
@@ -0,0 +1,78 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+define([
+ 'uiElement'
+], function (Element) {
+ 'use strict';
+
+ return Element.extend({
+ defaults: {
+ template: 'ui/grid/sortBy',
+ options: [],
+ applied: {},
+ sorting: 'asc',
+ columnsProvider: 'ns = ${ $.ns }, componentType = columns',
+ selectedOption: '',
+ isVisible: true,
+ listens: {
+ 'selectedOption': 'applyChanges'
+ },
+ statefull: {
+ selectedOption: true,
+ applied: true
+ },
+ exports: {
+ applied: '${ $.provider }:params.sorting'
+ },
+ imports: {
+ preparedOptions: '${ $.columnsProvider }:elems'
+ },
+ modules: {
+ columns: '${ $.columnsProvider }'
+ }
+ },
+
+ /**
+ * @inheritdoc
+ */
+ initObservable: function () {
+ return this._super()
+ .observe([
+ 'applied',
+ 'selectedOption',
+ 'isVisible'
+ ]);
+ },
+
+ /**
+ * Prepared sort order options
+ */
+ preparedOptions: function (columns) {
+ if (columns && columns.length > 0) {
+ columns.map(function (column) {
+ if (column.sortable === true) {
+ this.options.push({
+ value: column.index,
+ label: column.label
+ });
+ this.isVisible(true);
+ } else {
+ this.isVisible(false);
+ }
+ }.bind(this));
+ }
+ },
+
+ /**
+ * Apply changes
+ */
+ applyChanges: function () {
+ this.applied({
+ field: this.selectedOption(),
+ direction: this.sorting
+ });
+ }
+ });
+});
diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js
index 443d35f1b0ded..84e9494a8e781 100644
--- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js
+++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js
@@ -111,6 +111,7 @@ define([
_create: function () {
this.options.focus = this.options.promptField;
this.options.validation = this.options.validation && this.options.validationRules.length;
+ this.options.outerClickHandler = this.options.outerClickHandler || _.bind(this.closeModal, this, false);
this._super();
this.modal.find(this.options.modalContent).append(this.getFormTemplate());
this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this, false));
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/sortBy.html b/app/code/Magento/Ui/view/base/web/templates/grid/sortBy.html
new file mode 100644
index 0000000000000..104c92bf784f0
--- /dev/null
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/sortBy.html
@@ -0,0 +1,15 @@
+
+
+ :
+
+
diff --git a/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml b/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml
index f4f30d4317a57..58ac4ef53861c 100644
--- a/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml
+++ b/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml
index 089f74411ac58..fe9f38d1b541c 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml
index 70ce7e2d64fb3..b9f726aec668e 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml
@@ -21,7 +21,7 @@
category-admin
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTestWithConfigurationTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteGeneratedForMultipleStoreviewsDuringProductImportWithConfigTurnedOffTest.xml
similarity index 98%
rename from app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTestWithConfigurationTurnedOffTest.xml
rename to app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteGeneratedForMultipleStoreviewsDuringProductImportWithConfigTurnedOffTest.xml
index a9a5cf4a05b66..f9003ce8c0897 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTestWithConfigurationTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteGeneratedForMultipleStoreviewsDuringProductImportWithConfigTurnedOffTest.xml
@@ -7,7 +7,7 @@
-->
-
+
@@ -26,7 +26,7 @@
category-admin
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
index 734b8bb667674..b4d87df4b4a36 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml
index d337da37e0d2a..f430fb8921f80 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml
index 2d5f70f4e7328..f8136fbb6b59d 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
index cf963bea12fa6..5aedbe9ff79c2 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
index 401ce09f1a149..ba810817052f0 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml
index b6007d63290b8..aee47c5e9df95 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml
index 33e1969be38ff..3986717b16b2a 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml
index 1c6c1572b3206..56b558a94960a 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml
index 3191de550bd52..d2fecea9234ba 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml
index c34dce4ab0b91..e3e187c1cb358 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml
index 26bc86bdabae7..a0efcb02361c0 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml
index 5276cac8625ec..d4d5b163a1881 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml
index 2136918fa6186..540b38a9b33fb 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml
index e26a283861ecd..450ecb8ba5601 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml
index 86f7f84f9f1a5..3051ac2764ce9 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml
index d04cafc3602b6..2646c3631101d 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml
index fe71094e49064..6dddc0f333ca5 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml
index 2e753e5fca7d8..5a33e63c5e08c 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml
index 06b5745c32be3..8113d4511d8da 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml
index c8ef5470eef3a..65544f414140c 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml
index e1228c47b9030..61e9847308263 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml
index 1efd063a23708..b9f20b8651320 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml
index c03c21abb9e7e..293c412570742 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml
index 6803816f42d85..4ad6e99b0b424 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml
index 80fe34a3099f1..dff59c1ca9770 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
index 63e76717dd6b6..9d6b267055f70 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml
index 0111a35508fd9..136b2fc226566 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
index f3b0ca2237975..f03d9ae1bad67 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml
index d47b700dab790..37c5226e4cf46 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml
index 5a9aa4df336e0..4606465f1b8dd 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
index 788d29a4d4f9f..62ed25fd47212 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
index 3d890854f5e09..c6bc35c227ef3 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml
index 95b509ac38a8a..5692323fbb9e6 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml
index da97bc5988512..d36e2e9645727 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml
index 5ac0330ab80b2..53d78cdf57bdb 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml
index b5fa9267c581b..167a11548064f 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml
index f9eb150ad6113..801bc90d106c6 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml
index 34318b3dd8ac0..7d7bc753307d4 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml
index 79376dfd7be35..9b739b157cddc 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml
index 9253cad21f936..f450d7640d360 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml
index 0c1298672db51..a7e2eb2335eef 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductAfterImportTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductAfterImportTest.xml
index 2a0152c9da34c..a70065dc1d307 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductAfterImportTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductAfterImportTest.xml
@@ -47,7 +47,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTest.xml
index e666a2aad1738..cce0cd11e0199 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTest.xml
@@ -43,7 +43,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
index e3fc730a3549a..639cd2c57f7d1 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
@@ -54,7 +54,7 @@
-
+
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
index 4618e901d42e3..1d460b9b668a0 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
@@ -42,7 +42,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserWithRoleAndIsInactiveActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserWithRoleAndIsInactiveActionGroup.xml
new file mode 100644
index 0000000000000..3c7db628e1378
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserWithRoleAndIsInactiveActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserActionGroup.xml
index 67075eb52a678..82a3a37cdd724 100644
--- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserActionGroup.xml
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserActionGroup.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml
new file mode 100644
index 0000000000000..54fe82831ef02
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleInGridActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleInGridActionGroup.xml
new file mode 100644
index 0000000000000..93ff97e8bbf8c
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleInGridActionGroup.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleNotInGridActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleNotInGridActionGroup.xml
new file mode 100644
index 0000000000000..bb6af04e0e7b6
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminRoleNotInGridActionGroup.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserInGridActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserInGridActionGroup.xml
new file mode 100644
index 0000000000000..b0ade7b3a8ce8
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserInGridActionGroup.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserNotInGridActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserNotInGridActionGroup.xml
new file mode 100644
index 0000000000000..ed5c82aba84db
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserNotInGridActionGroup.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Data/UserData.xml b/app/code/Magento/User/Test/Mftf/Data/UserData.xml
index 7947c8ee3c161..cf15c77810791 100644
--- a/app/code/Magento/User/Test/Mftf/Data/UserData.xml
+++ b/app/code/Magento/User/Test/Mftf/Data/UserData.xml
@@ -145,6 +145,38 @@
admin_user_with_correct_password
123123123q
+
+ AdminUser
+ FirstName
+ LastName
+ admin@example.com
+ 123123q
+ 123123q
+ en_US
+ English (United States)
+ {{_ENV.MAGENTO_ADMIN_PASSWORD}}
+ Administrators
+ 1
+
+ - 1
+
+
+
+ AdminUser
+ FirstName
+ LastName
+ admin@example.com
+ 123123q
+ 123123q
+ en_US
+ English (United States)
+ {{_ENV.MAGENTO_ADMIN_PASSWORD}}
+ Administrators
+ 0
+
+ - 1
+
+
@@ -47,8 +47,9 @@
-
-
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
index 218be4e282b4a..668ae550f1b3d 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
@@ -14,36 +14,34 @@
-
+
-
-
-
-
+
+
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
index d52cafa13b7b8..23a30246bd999 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
@@ -14,35 +14,28 @@
-
+
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateUserRoleEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateUserRoleEntityTest.xml
new file mode 100644
index 0000000000000..d373bc6676deb
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateUserRoleEntityTest.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminDeleteAdminUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminDeleteAdminUserEntityTest.xml
new file mode 100644
index 0000000000000..60f6089e56a41
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminDeleteAdminUserEntityTest.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{DefaultAdminUser.password}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminDeleteOwnAdminUserAccountTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminDeleteOwnAdminUserAccountTest.xml
new file mode 100644
index 0000000000000..1019d58edcaf2
--- /dev/null
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminDeleteOwnAdminUserAccountTest.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$adminPassword}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
index c367bddc8d999..850fa04549e84 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
@@ -19,16 +19,17 @@
-
+
-
+
+
-
+
@@ -38,33 +39,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml
index 57e2ab0faccf6..9793387b02289 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml
index 963af44ac3bc0..e32f0736f880b 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml
index d6a4318c7d7be..8c7bdfc9360b5 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml
index ef9cb5ebfa5fe..5abf119f18d4a 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
index 39d7954ef7729..d1034c7a5945f 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
@@ -23,7 +23,7 @@
-
+
@@ -42,7 +42,7 @@
-
+
@@ -71,7 +71,7 @@
-
+
diff --git a/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml b/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml
index ee7368a44616d..1c6e222a242d8 100644
--- a/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml
+++ b/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml b/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml
index c5d85907d15fc..8197f9a5b5752 100644
--- a/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml
+++ b/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Version/Controller/Index/Index.php b/app/code/Magento/Version/Controller/Index/Index.php
index 53bcd4b4ff700..2c874c601ea08 100644
--- a/app/code/Magento/Version/Controller/Index/Index.php
+++ b/app/code/Magento/Version/Controller/Index/Index.php
@@ -1,6 +1,5 @@
rawFactory = $rawFactory;
$this->productMetadata = $productMetadata;
- parent::__construct($context);
}
/**
- * Sets the response body to ProductName/Major.MinorVersion (Edition).
- *
- * @return void
+ * @inheritDoc
*/
- public function execute(): void
+ public function execute()
{
+ $rawResponse = $this->rawFactory->create();
+
$version = $this->productMetadata->getVersion();
$versionParts = explode('.', $version);
- if ($this->isGitBasedInstallation($version) || !$this->isCorrectVersion($versionParts)) {
- return;
+ if (!$this->isGitBasedInstallation($version) && $this->isCorrectVersion($versionParts)) {
+ $rawResponse->setContents(
+ $this->productMetadata->getName() . '/' .
+ $this->getMajorMinorVersion($versionParts) .
+ ' (' . $this->productMetadata->getEdition() . ')'
+ );
}
- $this->getResponse()->setBody(
- $this->productMetadata->getName() . '/' .
- $this->getMajorMinorVersion($versionParts) .
- ' (' . $this->productMetadata->getEdition() . ')'
- );
+ return $rawResponse;
}
/**
diff --git a/app/code/Magento/Version/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Version/Test/Unit/Controller/Index/IndexTest.php
index 3fc2cecabe990..69aed915bd513 100644
--- a/app/code/Magento/Version/Test/Unit/Controller/Index/IndexTest.php
+++ b/app/code/Magento/Version/Test/Unit/Controller/Index/IndexTest.php
@@ -7,67 +7,43 @@
namespace Magento\Version\Test\Unit\Controller\Index;
-use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ProductMetadataInterface;
use Magento\Framework\App\ResponseInterface;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\Controller\Result\Raw;
+use Magento\Framework\Controller\Result\RawFactory;
use Magento\Version\Controller\Index\Index as VersionIndex;
+use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
class IndexTest extends TestCase
{
- /**
- * @var VersionIndex
- */
- private $model;
-
- /**
- * @var Context
- */
- private $contextMock;
+ /** @var VersionIndex */
+ private $versionController;
- /**
- * @var ProductMetadataInterface
- */
+ /** @var MockObject|ProductMetadataInterface */
private $productMetadataMock;
- /**
- * @var ResponseInterface
- */
- private $responseMock;
+ /** @var MockObject|RawFactory */
+ private $rawResponseFactoryMock;
+
+ /** @var MockObject|Raw */
+ private $rawResponseMock;
/**
* Prepare test preconditions
*/
protected function setUp()
{
- $this->contextMock = $this->getMockBuilder(Context::class)
- ->disableOriginalConstructor()
- ->getMock();
-
$this->productMetadataMock = $this->getMockBuilder(ProductMetadataInterface::class)
->disableOriginalConstructor()
->setMethods(['getName', 'getEdition', 'getVersion'])
->getMock();
- $this->responseMock = $this->getMockBuilder(ResponseInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['setBody', 'sendResponse'])
- ->getMock();
-
- $this->contextMock->expects($this->any())
- ->method('getResponse')
- ->willReturn($this->responseMock);
-
- $objectManager = new ObjectManager($this);
+ $this->rawResponseFactoryMock = $this->createPartialMock(RawFactory::class, ['create']);
+ $this->rawResponseMock = $this->createPartialMock(Raw::class, ['setContents']);
+ $this->rawResponseFactoryMock->method('create')->willReturn($this->rawResponseMock);
- $this->model = $objectManager->getObject(
- VersionIndex::class,
- [
- 'context' => $this->contextMock,
- 'productMetadata' => $this->productMetadataMock
- ]
- );
+ $this->versionController = new VersionIndex($this->rawResponseFactoryMock, $this->productMetadataMock);
}
/**
@@ -79,10 +55,10 @@ public function testGitBasedInstallationDoesNotReturnVersion(): void
->method('getVersion')
->willReturn('dev-2.3');
- $this->responseMock->expects($this->never())
- ->method('setBody');
+ $this->rawResponseMock->expects($this->never())
+ ->method('setContents');
- $this->assertNull($this->model->execute());
+ $this->versionController->execute();
}
/**
@@ -94,10 +70,10 @@ public function testCommunityVersionDisplaysMajorMinorVersionAndEditionName(): v
$this->productMetadataMock->expects($this->any())->method('getEdition')->willReturn('Community');
$this->productMetadataMock->expects($this->any())->method('getName')->willReturn('Magento');
- $this->responseMock->expects($this->once())->method('setBody')
+ $this->rawResponseMock->expects($this->once())->method('setContents')
->with('Magento/2.3 (Community)')
->will($this->returnSelf());
- $this->model->execute();
+ $this->versionController->execute();
}
}
diff --git a/app/code/Magento/WebapiAsync/Model/OperationRepository.php b/app/code/Magento/WebapiAsync/Model/OperationRepository.php
index 695cab2ae4402..7af8ff877ebbc 100644
--- a/app/code/Magento/WebapiAsync/Model/OperationRepository.php
+++ b/app/code/Magento/WebapiAsync/Model/OperationRepository.php
@@ -97,6 +97,6 @@ public function create($topicName, $entityParams, $groupId, $operationId): Opera
/** @var OperationInterface $operation */
$operation = $this->operationFactory->create($data);
- return $this->entityManager->save($operation);
+ return $operation;
}
}
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
index b542d6a4d0364..3e9635e2a1492 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml
index d3f39e9aee664..60c39dd5058b5 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml
index c35a6309f1f3d..74d6c2a97b089 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml
index 92936c2ed77c5..dda125835110a 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml
@@ -40,7 +40,7 @@
-
+
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml
index d2246f07dd7cb..92f526c79e926 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml
@@ -39,7 +39,7 @@
10.00
-
+
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml
index 82685910bc717..495b9a990a465 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml
@@ -38,7 +38,7 @@
40.00
-
+
diff --git a/app/code/Magento/WeeeGraphQl/Test/Unit/FixedProductTaxTest.php b/app/code/Magento/WeeeGraphQl/Test/Unit/FixedProductTaxTest.php
index 9e5812282545a..b289c7d1dac55 100644
--- a/app/code/Magento/WeeeGraphQl/Test/Unit/FixedProductTaxTest.php
+++ b/app/code/Magento/WeeeGraphQl/Test/Unit/FixedProductTaxTest.php
@@ -58,7 +58,7 @@ protected function setUp()
->getMock();
$this->extensionAttributesMock = $this->getMockBuilder(ContextExtensionInterface::class)
- ->setMethods(['getStore'])
+ ->setMethods(['getStore', 'setStore', 'getIsCustomer', 'setIsCustomer'])
->getMock();
$this->contextMock->method('getExtensionAttributes')
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml
index 073cdabf37698..6e83687207341 100644
--- a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml
+++ b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml
@@ -18,10 +18,10 @@
-
+
-
+
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml
index e62383d57fc93..b599feeef76db 100644
--- a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml
+++ b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml
index 0550c1cc2ca42..04218c76a4b7b 100644
--- a/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml
+++ b/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml
index d7be487382c56..30b4f46c791e8 100644
--- a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml
+++ b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminCustomerWishListShareOptionsInputValidationTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminCustomerWishListShareOptionsInputValidationTest.xml
index 32c16ff7f5a55..aaf7980e46aac 100755
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminCustomerWishListShareOptionsInputValidationTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminCustomerWishListShareOptionsInputValidationTest.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml
index 4e4d5c1a0696f..fbda4b97f6e5c 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml
index 9d6482248df0a..738bbc6bda35c 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml
index 2a84043584dbe..eed4dc8d4767e 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml
index 6238f0dcbff09..8ba45035e7b70 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml
@@ -47,7 +47,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml
index e07315e0ee0a4..6932d56b2f56a 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml
@@ -45,7 +45,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml
index 227212cd05ae8..689b76e42e6f1 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/app/code/Magento/WishlistGraphQl/Test/Unit/CustomerWishlistResolverTest.php b/app/code/Magento/WishlistGraphQl/Test/Unit/CustomerWishlistResolverTest.php
index f5baa5183e558..67c38561c7e41 100644
--- a/app/code/Magento/WishlistGraphQl/Test/Unit/CustomerWishlistResolverTest.php
+++ b/app/code/Magento/WishlistGraphQl/Test/Unit/CustomerWishlistResolverTest.php
@@ -58,7 +58,7 @@ protected function setUp()
->getMock();
$this->extensionAttributesMock = $this->getMockBuilder(ContextExtensionInterface::class)
- ->setMethods(['getIsCustomer'])
+ ->setMethods(['getStore', 'setStore', 'getIsCustomer', 'setIsCustomer'])
->getMock();
$this->contextMock->method('getExtensionAttributes')
diff --git a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/_module.less
deleted file mode 100644
index 3f0875da552a3..0000000000000
--- a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/_module.less
+++ /dev/null
@@ -1,7 +0,0 @@
-// /**
-// * Copyright © Magento, Inc. All rights reserved.
-// * See COPYING.txt for license details.
-// */
-
-@import 'module/_order.less';
-@import 'module/_config.less';
diff --git a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_config.less b/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_config.less
deleted file mode 100644
index b66c9c753aa83..0000000000000
--- a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_config.less
+++ /dev/null
@@ -1,25 +0,0 @@
-// /**
-// * Copyright © Magento, Inc. All rights reserved.
-// * See COPYING.txt for license details.
-// */
-
-@image-signifyd-logo-path: '../Magento_Signifyd/images/logo.png';
-
-//
-// Outer slider of configuration
-//
-.signifyd-logo-header {
- > .entry-edit-head {
- > a:after {
- content: url(@image-signifyd-logo-path);
- }
- }
-
- ul {
- margin-left: 5em;
- }
-
- .webhook-url {
- word-break: break-all;
- }
-}
diff --git a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_order.less b/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_order.less
deleted file mode 100644
index d0ae877b3f18c..0000000000000
--- a/app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_order.less
+++ /dev/null
@@ -1,23 +0,0 @@
-// /**
-// * Copyright © Magento, Inc. All rights reserved.
-// * See COPYING.txt for license details.
-// */
-
-//
-// Order Case Info
-// ---------------------------------------------
-
-.order-case-table {
- &:extend(.abs-order-tables all);
- &:extend(.abs-order-tbody-border all);
-}
-
-//
-// Layout
-// ---------------------------------------------
-.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
- .case-information {
- float: left;
- #mix-grid .width(6,12);
- }
-}
diff --git a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_masonry-grid.less b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_masonry-grid.less
index 9dd42246dac3f..237395db8cb43 100644
--- a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_masonry-grid.less
+++ b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_masonry-grid.less
@@ -114,5 +114,16 @@
}
}
}
+
+ &-sortby {
+ select {
+ background-image: url(../images/arrows-bg.svg);
+ border: none;
+ padding-right: 3.2rem;
+ &:active {
+ background-image+: url('../images/arrows-bg.svg');
+ }
+ }
+ }
}
}
diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_minicart.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_minicart.less
index c9b1d41857eee..9ed7e3a1ba839 100644
--- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_minicart.less
+++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_minicart.less
@@ -135,7 +135,7 @@
.product {
.actions {
float: right;
- margin: -24px 0 0;
+ margin: -28px 0 0;
text-align: right;
> .primary,
diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less
index 14c754623cf03..a97cc041b1c42 100644
--- a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less
+++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less
@@ -145,7 +145,7 @@
.product {
.actions {
float: right;
- margin: -24px 0 0;
+ margin: -28px 0 0;
> .primary,
> .secondary {
diff --git a/composer.json b/composer.json
index fbd5b0ea3bbea..769885ef305bf 100644
--- a/composer.json
+++ b/composer.json
@@ -242,7 +242,6 @@
"magento/module-send-friend": "*",
"magento/module-send-friend-graph-ql": "*",
"magento/module-shipping": "*",
- "magento/module-signifyd": "*",
"magento/module-sitemap": "*",
"magento/module-store": "*",
"magento/module-store-graph-ql": "*",
diff --git a/composer.lock b/composer.lock
index d3cdaa36326f6..550de1d904aec 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "3b2c88252ab70b75998cb4e200257796",
+ "content-hash": "b801d92bd57ad3f2d51d2b264e9c37ac",
"packages": [
{
"name": "braintree/braintree_php",
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoriesQuery/CategoriesFilterTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoriesQuery/CategoriesFilterTest.php
index b30eb24da6a2d..2bea5832126e8 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoriesQuery/CategoriesFilterTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoriesQuery/CategoriesFilterTest.php
@@ -188,8 +188,8 @@ public function testQueryChildCategoriesWithProducts()
//Check base category products
$expectedBaseCategoryProducts = [
['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => '12345', 'name' => 'Simple Product Two'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => '12345', 'name' => 'Simple Product Two']
];
$this->assertCategoryProducts($baseCategory, $expectedBaseCategoryProducts);
//Check base category children
@@ -204,8 +204,8 @@ public function testQueryChildCategoriesWithProducts()
$this->assertEquals('Category 1.1', $firstChildCategory['name']);
$this->assertEquals('Category 1.1 description.', $firstChildCategory['description']);
$firstChildCategoryExpectedProducts = [
- ['sku' => 'simple', 'name' => 'Simple Product'],
['sku' => '12345', 'name' => 'Simple Product Two'],
+ ['sku' => 'simple', 'name' => 'Simple Product']
];
$this->assertCategoryProducts($firstChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [['name' =>'Category 1.1.1']];
@@ -215,8 +215,8 @@ public function testQueryChildCategoriesWithProducts()
$this->assertEquals('Category 1.2', $secondChildCategory['name']);
$this->assertEquals('Its a description of Test Category 1.2', $secondChildCategory['description']);
$firstChildCategoryExpectedProducts = [
- ['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => 'simple', 'name' => 'Simple Product']
];
$this->assertCategoryProducts($secondChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [];
@@ -281,8 +281,8 @@ public function testQueryCategoryWithDisabledChildren()
//Check base category products
$expectedBaseCategoryProducts = [
['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => '12345', 'name' => 'Simple Product Two'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => '12345', 'name' => 'Simple Product Two']
];
$this->assertCategoryProducts($baseCategory, $expectedBaseCategoryProducts);
//Check base category children
@@ -297,8 +297,8 @@ public function testQueryCategoryWithDisabledChildren()
$this->assertEquals('Its a description of Test Category 1.2', $firstChildCategory['description']);
$firstChildCategoryExpectedProducts = [
- ['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => 'simple', 'name' => 'Simple Product']
];
$this->assertCategoryProducts($firstChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [];
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryListTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryListTest.php
index 4831671dec450..82a606dad7dec 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryListTest.php
@@ -187,8 +187,8 @@ public function testQueryChildCategoriesWithProducts()
//Check base category products
$expectedBaseCategoryProducts = [
['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => '12345', 'name' => 'Simple Product Two'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => '12345', 'name' => 'Simple Product Two']
];
$this->assertCategoryProducts($baseCategory, $expectedBaseCategoryProducts);
//Check base category children
@@ -203,8 +203,8 @@ public function testQueryChildCategoriesWithProducts()
$this->assertEquals('Category 1.1', $firstChildCategory['name']);
$this->assertEquals('Category 1.1 description.', $firstChildCategory['description']);
$firstChildCategoryExpectedProducts = [
- ['sku' => 'simple', 'name' => 'Simple Product'],
['sku' => '12345', 'name' => 'Simple Product Two'],
+ ['sku' => 'simple', 'name' => 'Simple Product'],
];
$this->assertCategoryProducts($firstChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [['name' =>'Category 1.1.1']];
@@ -214,8 +214,8 @@ public function testQueryChildCategoriesWithProducts()
$this->assertEquals('Category 1.2', $secondChildCategory['name']);
$this->assertEquals('Its a description of Test Category 1.2', $secondChildCategory['description']);
$firstChildCategoryExpectedProducts = [
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
];
$this->assertCategoryProducts($secondChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [];
@@ -278,8 +278,8 @@ public function testQueryCategoryWithDisabledChildren()
//Check base category products
$expectedBaseCategoryProducts = [
['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => '12345', 'name' => 'Simple Product Two'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => '12345', 'name' => 'Simple Product Two']
];
$this->assertCategoryProducts($baseCategory, $expectedBaseCategoryProducts);
//Check base category children
@@ -294,8 +294,8 @@ public function testQueryCategoryWithDisabledChildren()
$this->assertEquals('Its a description of Test Category 1.2', $firstChildCategory['description']);
$firstChildCategoryExpectedProducts = [
- ['sku' => 'simple', 'name' => 'Simple Product'],
- ['sku' => 'simple-4', 'name' => 'Simple Product Three']
+ ['sku' => 'simple-4', 'name' => 'Simple Product Three'],
+ ['sku' => 'simple', 'name' => 'Simple Product']
];
$this->assertCategoryProducts($firstChildCategory, $firstChildCategoryExpectedProducts);
$firstChildCategoryChildren = [];
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php
index f367e70fa7397..d7f7a3601b7e9 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php
@@ -364,6 +364,8 @@ private function reIndexAndCleanCache() : void
$out = '';
// phpcs:ignore Magento2.Security.InsecureFunction
exec("php -f {$appDir}/bin/magento indexer:reindex catalog_category_product", $out);
+ // phpcs:ignore Magento2.Security.InsecureFunction
+ exec("php -f {$appDir}/bin/magento indexer:reindex catalogsearch_fulltext", $out);
CacheCleaner::cleanAll();
}
@@ -670,7 +672,7 @@ public function testFilterByCategoryIdAndCustomAttribute()
$productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class);
$product1 = $productRepository->get('simple');
$product2 = $productRepository->get('simple-4');
- $filteredProducts = [$product1, $product2];
+ $filteredProducts = [$product2, $product1];
$productItemsInResponse = array_map(null, $response['products']['items'], $filteredProducts);
//phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ($itemIndex = 0; $itemIndex < count($filteredProducts); $itemIndex++) {
@@ -678,7 +680,8 @@ public function testFilterByCategoryIdAndCustomAttribute()
//validate that correct products are returned
$this->assertResponseFields(
$productItemsInResponse[$itemIndex][0],
- [ 'name' => $filteredProducts[$itemIndex]->getName(),
+ [
+ 'name' => $filteredProducts[$itemIndex]->getName(),
'sku' => $filteredProducts[$itemIndex]->getSku()
]
);
@@ -1121,6 +1124,7 @@ public function testFilterWithinSpecificPriceRangeSortedByNameDesc()
*/
public function testSortByPosition()
{
+ $this->reIndexAndCleanCache();
// Get category ID for filtering
/** @var Collection $categoryCollection */
$categoryCollection = Bootstrap::getObjectManager()->get(Collection::class);
@@ -1141,7 +1145,8 @@ public function testSortByPosition()
$resultAsc = $this->graphQlQuery($queryAsc);
$this->assertArrayNotHasKey('errors', $resultAsc);
$productsAsc = array_column($resultAsc['products']['items'], 'sku');
- $expectedProductsAsc = ['simple1000', 'simple1001', 'simple1002'];
+ $expectedProductsAsc = ['simple1002', 'simple1001', 'simple1000'];
+ // position equal and secondary sort by entity_id DESC
$this->assertEquals($expectedProductsAsc, $productsAsc);
$queryDesc = <<graphQlQuery($queryDesc);
$this->assertArrayNotHasKey('errors', $resultDesc);
$productsDesc = array_column($resultDesc['products']['items'], 'sku');
- $expectedProductsDesc = array_reverse($expectedProductsAsc);
- $this->assertEquals($expectedProductsDesc, $productsDesc);
+ // position equal and secondary sort by entity_id DESC
+ $this->assertEquals($expectedProductsAsc, $productsDesc);
//revert position
$productPositions = $category->getProductsPosition();
- $count = 3;
+ $count = 1;
foreach ($productPositions as $productId => $position) {
$productPositions[$productId] = $count;
- $count--;
+ $count++;
}
+ ksort($productPositions);
$category->setPostedProducts($productPositions);
$category->save();
+ $this->reIndexAndCleanCache();
$queryDesc = <<graphQlQuery($queryDesc);
$this->assertArrayNotHasKey('errors', $resultDesc);
$productsDesc = array_column($resultDesc['products']['items'], 'sku');
- $expectedProductsDesc = $expectedProductsAsc;
- $this->assertEquals($expectedProductsDesc, $productsDesc);
+ // position NOT equal and oldest entity first
+ $this->assertEquals(array_reverse($expectedProductsAsc), $productsDesc);
}
/**
@@ -1532,6 +1539,7 @@ public function testFilterProductsBySingleCategoryId()
$categoryRepository = ObjectManager::getInstance()->get(CategoryRepositoryInterface::class);
$links = $productLinks->getAssignedProducts($queryCategoryId);
+ $links = array_reverse($links);
foreach ($response['products']['items'] as $itemIndex => $itemData) {
$this->assertNotEmpty($itemData);
$this->assertEquals($response['products']['items'][$itemIndex]['sku'], $links[$itemIndex]->getSku());
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php
index 1af44012bb515..b7376e91f705e 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php
@@ -954,6 +954,88 @@ public function testSetBillingAddressAndPlaceOrder()
}
}
+ /**
+ * @magentoApiDataFixture Magento/Customer/_files/customer.php
+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
+ */
+ public function testSetBillingAddressWithDefaultValueOfSaveInAddressBookAndPlaceOrder()
+ {
+ $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
+ $query = <<graphQlMutation($query, [], '', $this->getHeaderMap());
+ $this->graphQlMutation(
+ $this->getSetShippingMethodsQuery($maskedQuoteId, 'flatrate', 'flatrate'),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $this->graphQlMutation(
+ $this->getSetPaymentMethodQuery(
+ $maskedQuoteId,
+ 'checkmo'
+ ),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $this->graphQlMutation(
+ $this->getPlaceOrderQuery($maskedQuoteId),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $customer = $this->customerRepository->get('customer@example.com');
+ $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create();
+ $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems();
+
+ $this->assertCount(1, $addresses);
+ $this->assertArrayHasKey('cart', $response['setBillingAddressOnCart']);
+ foreach ($addresses as $address) {
+ $this->customerAddressRepository->delete($address);
+ }
+ }
+
/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
@@ -1208,9 +1290,9 @@ private function getSetShippingMethodsQuery(
): string {
return <<getMaskedQuoteIdByReservedOrderId->execute('test_quote');
+ $query = <<graphQlMutation($query, [], '', $this->getHeaderMap());
+ $this->graphQlMutation(
+ $this->getSetShippingMethodsQuery($maskedQuoteId, 'flatrate', 'flatrate'),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $this->graphQlMutation(
+ $this->getSetPaymentMethodQuery(
+ $maskedQuoteId,
+ 'checkmo'
+ ),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $this->graphQlMutation(
+ $this->getPlaceOrderQuery($maskedQuoteId),
+ [],
+ '',
+ $this->getHeaderMap()
+ );
+ $customer = $this->customerRepository->get('customer@example.com');
+ $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create();
+ $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems();
+
+ $this->assertCount(1, $addresses);
+ $this->assertArrayHasKey('cart', $response['setShippingAddressesOnCart']);
+
+ $cartResponse = $response['setShippingAddressesOnCart']['cart'];
+ $this->assertArrayHasKey('shipping_addresses', $cartResponse);
+ $shippingAddressResponse = current($cartResponse['shipping_addresses']);
+ $this->assertNewShippingAddressFields($shippingAddressResponse);
+
+ foreach ($addresses as $address) {
+ $this->customerAddressRepository->delete($address);
+ }
+ }
+
/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
@@ -1201,9 +1293,9 @@ private function getSetShippingMethodsQuery(
): string {
return <<
-
-
diff --git a/dev/tests/functional/etc/repository_replacer_payments.xml b/dev/tests/functional/etc/repository_replacer_payments.xml
index a0ecca61eb372..2b20e7220f537 100644
--- a/dev/tests/functional/etc/repository_replacer_payments.xml
+++ b/dev/tests/functional/etc/repository_replacer_payments.xml
@@ -21,11 +21,4 @@
AUTHORIZENET_PASSWORD
-
-
-
- SIGNIFYD_EMAIL
- SIGNIFYD_PASSWORD
-
-
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml
index e16d5881e2ee4..b8298ffcee3c9 100644
--- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml
@@ -8,7 +8,7 @@
- severity:S3
+ severity:S3, mftf_migrated:yes
checkout_term_condition
catalogProductSimple::default
term_enabled_text
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml
index 5f537baf9c979..bd9db3f34bdd7 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml
@@ -8,7 +8,7 @@
- test_type:extended_acceptance_test, severity:S1
+ test_type:extended_acceptance_test, severity:S1, mftf_migrated:yes
block_%isolation%
identifier_%isolation%
All Store Views
@@ -19,7 +19,7 @@
- severity:S2
+ severity:S2, mftf_migrated:yes
block_%isolation%
identifier_%isolation%
default
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.xml
index 4bee113add071..61ca945adcad9 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.xml
@@ -8,7 +8,7 @@
- severity:S3
+ severity:S3, mftf_migrated:yes
CmsPageEdited%isolation%
No
cms_page_text_content_after_edit
@@ -16,7 +16,7 @@
- severity:S1
+ severity:S1, mftf_migrated:yes
CmsPageEdited%isolation%
cms_page_url_edited_%isolation%
Content Heading TextEdited
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.xml
index c8cf44a674b28..822cbcfbcb7ee 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.xml
@@ -10,10 +10,12 @@
NOT_LOGGED_IN
+ mftf_migrated:yes
General
+ mftf_migrated:yes
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerEmailTest.xml b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerEmailTest.xml
index bd8a417d48bf3..8c7f35add2a8d 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerEmailTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerEmailTest.xml
@@ -8,7 +8,7 @@
- severity:S1
+ severity:S1, mftf_migrated:yes
default
JaneDoe_%isolation%@example.com
123123^q
@@ -16,7 +16,7 @@
- severity:S2
+ severity:S2, mftf_migrated:yes
default
JaneDoe_%isolation%@example.com
123123123
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerPasswordTest.xml b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerPasswordTest.xml
index da5e312cf0bc9..1c5807401ca7b 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerPasswordTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/SecureChangingCustomerPasswordTest.xml
@@ -8,7 +8,7 @@
- severity:S1
+ severity:S1, mftf_migrated:yes
default
123123^q
123123Qa
@@ -18,7 +18,7 @@
- severity:S2
+ severity:S2, mftf_migrated:yes
default
123123123
123123Qa
@@ -27,7 +27,7 @@
- severity:S3
+ severity:S3, mftf_migrated:yes
default
0
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/Grid.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/Grid.php
deleted file mode 100644
index 54f580f48dcf4..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/Grid.php
+++ /dev/null
@@ -1,33 +0,0 @@
- [
- 'selector' => '[name="increment_id"]',
- ],
- 'status' => [
- 'selector' => '[name="status"]',
- 'input' => 'select',
- ],
- 'signifyd_guarantee_status' => [
- 'selector' => '[name="signifyd_guarantee_status"]',
- 'input' => 'select'
- ]
- ];
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/View/FraudProtection.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/View/FraudProtection.php
deleted file mode 100644
index e2b4e6f748977..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/Adminhtml/Order/View/FraudProtection.php
+++ /dev/null
@@ -1,31 +0,0 @@
-_rootElement->find($this->caseGuaranteeDisposition)->getText();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseInfo.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseInfo.php
deleted file mode 100644
index 1529755fdc3c9..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseInfo.php
+++ /dev/null
@@ -1,245 +0,0 @@
-_rootElement->find($this->noDeviceAnalysisAvailable)->isVisible();
- }
-
- /**
- * Returns shipping price.
- *
- * @return string
- */
- public function getShippingPrice()
- {
- return $this->_rootElement->find($this->shippingPrice)->getText();
- }
-
- /**
- * Flags case as good or bad.
- *
- * @param string $flagType
- * @return void
- */
- public function flagCase($flagType)
- {
- $flagSelector = ($flagType === 'Good')
- ? $this->flagCaseAsGoodButton
- : $this->flagCaseAsBadButton;
-
- $this->_rootElement->find($flagSelector)->click();
- }
-
- /**
- * Flags case as bad.
- *
- * @return void
- */
- public function flagCaseAsBad()
- {
- $this->_rootElement->find($this->flagCaseAsBadButton)->click();
- }
-
- /**
- * Gets guarantee disposition.
- *
- * @return string
- */
- public function getGuaranteeDisposition()
- {
- return $this->_rootElement->find($this->guaranteeDisposition)->getText();
- }
-
- /**
- * Gets CVV response.
- *
- * @return string
- */
- public function getCvvResponse()
- {
- return sprintf(
- '%s (%s)',
- $this->_rootElement->find($this->cvvResponseDescription)->getText(),
- $this->_rootElement->find($this->cvvResponseCode)->getText()
- );
- }
-
- /**
- * Gets AVS response.
- *
- * @return string
- */
- public function getAvsResponse()
- {
- return sprintf(
- '%s (%s)',
- $this->_rootElement->find($this->avsResponseDescription)->getText(),
- $this->_rootElement->find($this->avsResponseCode)->getText()
- );
- }
-
- /**
- * Gets displayed order id.
- *
- * @return string
- */
- public function getOrderId()
- {
- return $this->_rootElement->find($this->orderId)->getText();
- }
-
- /**
- * Gets displayed order amount.
- *
- * @return string
- */
- public function getOrderAmount()
- {
- return $this->_rootElement->find($this->orderAmount)->getText();
- }
-
- /**
- * Returns displayed order amount currency.
- *
- * @return string
- */
- public function getOrderAmountCurrency()
- {
- return $this->_rootElement->find($this->orderAmountCurrency)->getText();
- }
-
- /**
- * Gets displayed card holder name.
- *
- * @return string
- */
- public function getCardHolder()
- {
- return $this->_rootElement->find($this->cardHolder)->getText();
- }
-
- /**
- * Gets displayed billing address.
- *
- * @return string
- */
- public function getBillingAddress()
- {
- return $this->_rootElement->find($this->billingAddress)->getText();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseSearch.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseSearch.php
deleted file mode 100644
index 16621f9a0cd48..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/CaseSearch.php
+++ /dev/null
@@ -1,119 +0,0 @@
- ul > li > a';
-
- /**
- * Locator for loading spinner.
- *
- * @var string
- */
- private $spinner = '.cases-loading-spinner';
-
- /**
- * Fill search input with customer name and submit.
- *
- * @param string $customerName
- * @return void
- */
- public function searchCaseByCustomerName($customerName)
- {
- $this->resetFilters();
- $this->_rootElement->find($this->searchBar)->setValue($customerName);
- $this->_rootElement->find($this->submitButton)->click();
- $this->waitLoadingSpinner();
- }
-
- /**
- * Reset applied filters.
- *
- * @return void
- */
- private function resetFilters(): void
- {
- $filters = $this->_rootElement->getElements($this->appliedFilters);
- if (!empty($filters)) {
- foreach ($filters as $filter) {
- $filter->click();
- $this->waitLoadingSpinner();
- }
- }
- }
-
- /**
- * Wait until loading spinner disappeared.
- *
- * @return void
- */
- private function waitLoadingSpinner(): void
- {
- $this->waitForElementNotVisible($this->spinner);
- }
-
- /**
- * Checks if any case is visible.
- *
- * @return bool
- */
- public function isAnyCaseVisible(): bool
- {
- return $this->_rootElement->find($this->selectCaseLink)->isVisible();
- }
-
- /**
- * Select searched case.
- *
- * @return void
- */
- public function selectCase()
- {
- $this->_rootElement->find($this->selectCaseLink)->click();
- }
-
- /**
- * Waiting of case page loading.
- *
- * @return void
- */
- public function waitForLoading()
- {
- $this->waitForElementVisible($this->searchBar);
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/SignifydLogin.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/SignifydLogin.php
deleted file mode 100644
index 7705a67360e55..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/SignifydLogin.php
+++ /dev/null
@@ -1,64 +0,0 @@
-closeNotification();
-
- return parent::fill($fixture, $element);
- }
-
- /**
- * Login to Signifyd.
- *
- * @return void
- */
- public function login()
- {
- $this->closeNotification();
- $this->_rootElement->find($this->loginButton)->click();
- }
-
- /**
- * Close notification popup.
- *
- * @return void
- */
- private function closeNotification(): void
- {
- $notification = $this->browser->find($this->notificationCloseButton);
- if ($notification->isVisible()) {
- $notification->click();
- }
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/Webhooks.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/Webhooks.php
deleted file mode 100644
index 424d5681c07c6..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Block/SignifydConsole/Webhooks.php
+++ /dev/null
@@ -1,216 +0,0 @@
- 'Case Creation',
- 'CASE_REVIEW' => 'Case Review',
- 'GUARANTEE_COMPLETION' => 'Guarantee Completion'
- ];
-
- /**
- * XPath selector of webhook element added into grid.
- *
- * @var string
- */
- private $webhookAddedElement = '//table[@id="webhooks"]//tr[./td/span/text()="%s" and ./td/span/text()="%s"]';
-
- /**
- * Css selector of webhook url input.
- *
- * @var string
- */
- private $webhookUrl = '[id="webhookUrl"]';
-
- /**
- * XPath selector of test team select option.
- *
- * @var string
- */
- private $webhookTeamOption = './/select[@id="webhookTeams"]//option[text()="%s"]';
-
- /**
- * Css selector of webhook event select option.
- *
- * @var string
- */
- private $webhookEventOption = 'select[id="webhookEvent"] option[value="%s"]';
-
- /**
- * Css selector of webhook addition button.
- *
- * @var string
- */
- private $webhookAddButton = '[id="addWebhook"] [type=submit]';
-
- /**
- * Css selector of delete button in element of webhook grid.
- *
- * @var string
- */
- private $webhookDeleteButton = '[class*="webhook-delete"]';
-
- /**
- * Css selector of confirming button for deleting webhook.
- *
- * @var string
- */
- private $webhookDeleteConfirmButton = '[class="appriseOuter"] button[value="ok"]';
-
- /**
- * Creates new set of webhooks, if it not exists.
- *
- * @param string $team
- * @return void
- */
- public function create($team)
- {
- $handlerUrl = $this->getHandlerUrl();
-
- foreach ($this->webhookEventOptionsMap as $webhookEventCode => $webhookEventName) {
- if ($this->getWebhook($team, $webhookEventName)) {
- continue;
- }
-
- $this->addWebhook($handlerUrl, $webhookEventCode, $team);
- }
- }
-
- /**
- * Deletes set of webhooks.
- *
- * @param string $team
- * @return void
- */
- public function cleanup($team)
- {
- foreach ($this->webhookEventOptionsMap as $webhookEventName) {
- if ($webhook = $this->getWebhook($team, $webhookEventName)) {
- $this->deleteWebhook($webhook);
- }
- }
- }
-
- /**
- * Gets webhook if exists.
- *
- * @param string $team
- * @param string $webhookEventName
- * @return ElementInterface|null
- */
- private function getWebhook($team, $webhookEventName)
- {
- $webhook = $this->_rootElement->find(
- sprintf($this->webhookAddedElement, $team, $webhookEventName),
- Locator::SELECTOR_XPATH
- );
-
- return $webhook->isPresent() ? $webhook : null;
- }
-
- /**
- * Delete webhook element with confirmation popup.
- *
- * @param ElementInterface $webhook
- * @return void
- */
- private function deleteWebhook(ElementInterface $webhook)
- {
- $webhook->find($this->webhookDeleteButton)->click();
- $this->_rootElement->find($this->webhookDeleteConfirmButton)->click();
- }
-
- /**
- * Sets webhook data and add it.
- *
- * @param string $handlerUrl
- * @param string $webhookEventCode
- * @param string $team
- * @return void
- */
- private function addWebhook(
- $handlerUrl,
- $webhookEventCode,
- $team
- ) {
- $this->setEvent($webhookEventCode);
- $this->setTeam($team);
- $this->setUrl($handlerUrl);
- $this->submit();
- }
-
- /**
- * Sets appropriate webhook event select option by code.
- *
- * @param string $webhookEventCode
- * @return void
- */
- private function setEvent($webhookEventCode)
- {
- $this->_rootElement->find(
- sprintf($this->webhookEventOption, $webhookEventCode)
- )->click();
- }
-
- /**
- * Sets test team select option.
- *
- * @param string $team
- * @return void
- */
- private function setTeam($team)
- {
- $this->_rootElement->find(
- sprintf($this->webhookTeamOption, $team),
- Locator::SELECTOR_XPATH
- )->click();
- }
-
- /**
- * Sets webhook handler url input value.
- *
- * @param string $handlerUrl
- * @return void
- */
- private function setUrl($handlerUrl)
- {
- $this->_rootElement->find($this->webhookUrl)->setValue($handlerUrl);
- }
-
- /**
- * Add webhook element.
- *
- * @return void
- */
- private function submit()
- {
- $this->_rootElement->find($this->webhookAddButton)->click();
- }
-
- /**
- * Gets webhook handler url.
- *
- * @return string
- */
- private function getHandlerUrl()
- {
- return $_ENV['app_frontend_url'] . 'signifyd/webhooks/handler';
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertAwaitingSignifydGuaranteeInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertAwaitingSignifydGuaranteeInCommentsHistory.php
deleted file mode 100644
index f85e77a5c421b..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertAwaitingSignifydGuaranteeInCommentsHistory.php
+++ /dev/null
@@ -1,73 +0,0 @@
-open();
- $salesOrder->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
-
- /** @var \Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\Info $infoTab */
- $infoTab = $salesOrderView->getOrderForm()->openTab('info')->getTab('info');
- $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
-
- $key = array_search(
- $this->historyComment,
- array_column($orderComments, 'comment')
- );
-
- \PHPUnit\Framework\Assert::assertNotFalse(
- $key,
- 'There is no message about awaiting the Signifyd guarantee disposition' .
- ' in Comments History section for the order #' . $orderId
- );
-
- \PHPUnit\Framework\Assert::assertEquals(
- $this->historyCommentStatus,
- $orderComments[$key]['status'],
- 'Message about awaiting the Signifyd guarantee disposition' .
- ' doesn\'t have status "'. $this->historyCommentStatus.'"' .
- ' in Comments History section for the order #' . $orderId
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return "Message about awaiting the Signifyd guarantee disposition is available in Comments History section.";
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnAdmin.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnAdmin.php
deleted file mode 100644
index 298b957131395..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnAdmin.php
+++ /dev/null
@@ -1,85 +0,0 @@
-open();
- $salesOrder->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
-
- $this->orderView = $orderView;
- $this->signifydData = $signifydData;
- $this->orderId = $orderId;
-
- $this->checkCaseGuaranteeDisposition();
- }
-
- /**
- * Checks case guarantee disposition is correct.
- *
- * @return void
- */
- private function checkCaseGuaranteeDisposition()
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $this->signifydData->getGuaranteeDisposition(),
- $this->orderView->getFraudProtectionBlock()->getCaseGuaranteeDisposition(),
- 'Case Guarantee Disposition status is wrong for order #' . $this->orderId
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return 'Signifyd Case information is correct in Admin.';
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnSignifydConsole.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnSignifydConsole.php
deleted file mode 100644
index a8a1f735d004c..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertCaseInfoOnSignifydConsole.php
+++ /dev/null
@@ -1,214 +0,0 @@
-signifydCases = $signifydCases;
-
- $this->checkDeviceData();
- $this->checkShippingPrice($signifydData->getShippingPrice());
- $this->checkGuaranteeDisposition($signifydData->getGuaranteeDisposition());
- $cvvResponse = $signifydData->getCvvResponse();
- if (isset($cvvResponse)) {
- $this->checkCvvResponse($cvvResponse);
- }
- $this->checkAvsResponse($signifydData->getAvsResponse());
- $this->checkOrderId($orderId);
- $this->checkOrderAmount($prices['grandTotal']);
- $this->checkOrderAmountCurrency($prices['grandTotalCurrency']);
- $this->checkCardHolder($customerFullName);
- $this->checkBillingAddress($billingAddress);
- }
-
- /**
- * Checks device data are present.
- *
- * @return void
- */
- private function checkDeviceData()
- {
- \PHPUnit\Framework\Assert::assertTrue(
- $this->signifydCases->getCaseInfoBlock()->isAvailableDeviceData(),
- 'Device data are not available on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks shipping price is correct.
- *
- * @param string $shippingPrice
- * @return void
- */
- private function checkShippingPrice($shippingPrice)
- {
- \PHPUnit\Framework\Assert::assertContains(
- $shippingPrice,
- $this->signifydCases->getCaseInfoBlock()->getShippingPrice(),
- 'Shipping price is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks guarantee disposition is correct.
- *
- * @param string $guaranteeDisposition
- * @return void
- */
- private function checkGuaranteeDisposition($guaranteeDisposition)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $guaranteeDisposition,
- $this->signifydCases->getCaseInfoBlock()->getGuaranteeDisposition(),
- 'Guarantee disposition is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks CVV response is correct.
- *
- * @param string $cvvResponse
- * @return void
- */
- private function checkCvvResponse($cvvResponse)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $cvvResponse,
- $this->signifydCases->getCaseInfoBlock()->getCvvResponse(),
- 'CVV response is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks AVS response is correct.
- *
- * @param string $avsResponse
- * @return void
- */
- private function checkAvsResponse($avsResponse)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $avsResponse,
- $this->signifydCases->getCaseInfoBlock()->getAvsResponse(),
- 'AVS response is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks order id is correct.
- *
- * @param string $orderId
- * @return void
- */
- private function checkOrderId($orderId)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $orderId,
- $this->signifydCases->getCaseInfoBlock()->getOrderId(),
- 'Order id is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks order amount is correct.
- *
- * @param string $amount
- * @return void
- */
- private function checkOrderAmount($amount)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- number_format($amount, 2),
- $this->signifydCases->getCaseInfoBlock()->getOrderAmount(),
- 'Order amount is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks order amount currency is correct.
- *
- * @param string $currency
- * @return void
- */
- private function checkOrderAmountCurrency($currency)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $currency,
- $this->signifydCases->getCaseInfoBlock()->getOrderAmountCurrency(),
- 'Order amount currency is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks card holder is correct.
- *
- * @param string $customerFullName
- * @return void
- */
- private function checkCardHolder($customerFullName)
- {
- \PHPUnit\Framework\Assert::assertEquals(
- $customerFullName,
- $this->signifydCases->getCaseInfoBlock()->getCardHolder(),
- 'Card holder name is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * Checks billing address is correct.
- *
- * @param SignifydAddress $billingAddress
- * @return void
- */
- private function checkBillingAddress(SignifydAddress $billingAddress)
- {
- \PHPUnit\Framework\Assert::assertContains(
- $billingAddress->getStreet(),
- $this->signifydCases->getCaseInfoBlock()->getBillingAddress(),
- 'Billing address is incorrect on case page in Signifyd console.'
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return 'Case information is correct on case page in Signifyd console.';
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInCommentsHistory.php
deleted file mode 100644
index ea919f9410d4d..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInCommentsHistory.php
+++ /dev/null
@@ -1,56 +0,0 @@
-open();
- $salesOrder->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
-
- /** @var \Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\Info $infoTab */
- $infoTab = $salesOrderView->getOrderForm()->openTab('info')->getTab('info');
- $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
- $commentsMessages = array_column($orderComments, 'comment');
-
- \PHPUnit\Framework\Assert::assertRegExp(
- self::CASE_CREATED_PATTERN,
- implode('. ', $commentsMessages),
- 'Signifyd case is not created for the order #' . $orderId
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return "Message about Signifyd Case is available in Comments History section.";
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInOrdersGrid.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInOrdersGrid.php
deleted file mode 100644
index bdf3598d4f46a..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydCaseInOrdersGrid.php
+++ /dev/null
@@ -1,50 +0,0 @@
- $orderId,
- 'signifyd_guarantee_status' => $signifydData->getGuaranteeDisposition()
- ];
-
- $errorMessage = implode(', ', $filter);
-
- $ordersGrid->open();
-
- \PHPUnit\Framework\Assert::assertTrue(
- $ordersGrid->getSignifydOrdersGrid()->isRowVisible(array_filter($filter)),
- 'Order with following data \'' . $errorMessage . '\' is absent in orders grid.'
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return 'Signifyd guarantee status is displayed in sales orders grid.';
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydGuaranteeCancelInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydGuaranteeCancelInCommentsHistory.php
deleted file mode 100644
index 618d77885736c..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Constraint/AssertSignifydGuaranteeCancelInCommentsHistory.php
+++ /dev/null
@@ -1,57 +0,0 @@
-open();
- $salesOrder->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
-
- /** @var \Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\Info $infoTab */
- $infoTab = $salesOrderView->getOrderForm()->openTab('info')->getTab('info');
- $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
- $commentsMessages = array_column($orderComments, 'comment');
-
- \PHPUnit\Framework\Assert::assertContains(
- $this->guaranteeCancelMessage,
- implode('. ', $commentsMessages),
- 'There is no message regarding Signifyd guarantee cancel in Comments History section for the order #'
- . $orderId
- );
- }
-
- /**
- * @inheritdoc
- */
- public function toString()
- {
- return "Message about Signifyd guarantee cancel is available in Comments History section.";
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAccount.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAccount.xml
deleted file mode 100644
index 8b1455811d003..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAccount.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress.xml
deleted file mode 100644
index 02b5cc8211d89..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress/Firstname.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress/Firstname.php
deleted file mode 100644
index 9e4930484eef0..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydAddress/Firstname.php
+++ /dev/null
@@ -1,46 +0,0 @@
-data = $data;
- }
-
- /**
- * Add isolation for `firstname` field.
- *
- * @param null $key
- * @return string
- */
- public function getData($key = null)
- {
- $this->data = str_replace('%signifyd_isolation%', $this->generateIsolation(), $this->data);
-
- return parent::getData($key);
- }
-
- /**
- * Generates character isolation.
- *
- * @param int $length
- * @return string
- */
- private function generateIsolation($length = 10)
- {
- return substr(str_shuffle(str_repeat("abcdefghijklmnopqrstuvwxyz", $length)), 0, $length);
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydData.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydData.xml
deleted file mode 100644
index 23ee2cddf434a..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Fixture/SignifydData.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/OrdersGrid.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/OrdersGrid.xml
deleted file mode 100644
index 749d91c3ed395..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/OrdersGrid.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/SalesOrderView.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/SalesOrderView.xml
deleted file mode 100644
index 36d77723dfcee..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/Adminhtml/SalesOrderView.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydCases.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydCases.xml
deleted file mode 100644
index cfe889bb8de44..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydCases.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydLogin.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydLogin.xml
deleted file mode 100644
index 5fe5da6d28013..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydLogin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydNotifications.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydNotifications.xml
deleted file mode 100644
index dd12f14c28800..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Page/SignifydConsole/SignifydNotifications.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Address.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Address.xml
deleted file mode 100644
index a534cbc6107fe..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Address.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- John%signifyd_isolation%
- Doe
- Magento
- Culver City
- 6161 West Centinela Avenue
- 555-55-555-55
- United States
- California
- 90230
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/ConfigData.xml
deleted file mode 100644
index 2af46f077b304..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/ConfigData.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
- - fraud_protection
- - 1
- - Yes
- - 1
-
-
- - fraud_protection
- - 1
-
- - SIGNIFYD_CONFIG_API_KEY
-
-
- - fraud_protection
- - 1
-
- - https://api.signifyd.com/v2/
-
-
- - fraud_protection
- - 1
- - Yes
- - 1
-
-
-
-
- - fraud_protection
- - 1
- - Yes
- - 0
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Customer.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Customer.xml
deleted file mode 100644
index b45e3d01b8ec8..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/Customer.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- John
- Doe
- testapprove@magento.com
- 123123^q
- 123123^q
-
-
- John
- Doe
- testdecline@magento.com
- 123123^q
- 123123^q
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydAccount.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydAccount.xml
deleted file mode 100644
index 4d3dd5229eae3..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydAccount.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
- SIGNIFYD_EMAIL
- SIGNIFYD_PASSWORD
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydData.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydData.xml
deleted file mode 100644
index 02037534b0149..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/Repository/SignifydData.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- autotest
- Good
- Approved
- CVV2 Match (M)
- Full match (Y)
- USD 5.00
-
-
- autotest
- Bad
- Declined
- CVV2 Match (M)
- Full match (Y)
- USD 5.00
-
-
- autotest
- Bad
- Declined
- GBP 10.00
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.php
deleted file mode 100644
index 1dd742c9f7096..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-executeScenario();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.xml
deleted file mode 100644
index 6391081e5e161..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/AcceptPaymentWithSignifydGuaranteeDeclinedTest.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
- catalogProductSimple::product_100_dollar
- signifyd_decline_us_customer
- login
- Flat Rate
- Fixed
- hosted_pro
-
- - 210.00
- - GBP
-
- credit_card_hostedpro
- visa_hosted_pro
- false
- merchant_country_gb, hosted_pro, config_base_currency_gb, signifyd
- Suspected Fraud
- signifyd_us_shipping_address
- sandbox_default
- signifyd_guarantee_fraudulent
- Processing
- test_type:3rd_party_test_single_flow, severity:S2
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.php
deleted file mode 100644
index 5ca76ff70479f..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-executeScenario();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.xml
deleted file mode 100644
index 082627fe5821d..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/CreateSignifydGuaranteeAndCancelOrderTest.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
- catalogProductSimple::product_10_dollar
- login
- signifyd_approve_us_customer
- Flat Rate
- Fixed
- braintree
- braintree
- 15.00
- USD
- visa_default
- braintree
- braintree,signifyd
- Processing
- signifyd_us_shipping_address
- sandbox_default
- signifyd_guarantee_approve
- test_type:3rd_party_test_single_flow, severity:S1
-
-
-
-
-
-
-
-
-
- catalogProductSimple::product_10_dollar
- login
- signifyd_decline_us_customer
- Flat Rate
- Fixed
- braintree
- braintree
- 15.00
- USD
- visa_default
- braintree
- braintree,signifyd
- On Hold
- signifyd_us_shipping_address
- sandbox_default
- signifyd_guarantee_decline
- test_type:3rd_party_test_single_flow, severity:S1
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.php
deleted file mode 100644
index 698861da26018..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-executeScenario();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.xml
deleted file mode 100644
index 5496619fe1bf9..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestCase/DenyPaymentWithSignifydGuaranteeDeclinedTest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
- catalogProductSimple::product_100_dollar
- signifyd_decline_us_customer
- login
- Flat Rate
- Fixed
- hosted_pro
-
- - 210.00
- - GBP
-
- credit_card_hostedpro
- visa_hosted_pro
- false
- merchant_country_gb, hosted_pro, config_base_currency_gb, signifyd
- Suspected Fraud
- Canceled
- signifyd_us_shipping_address
- sandbox_default
- signifyd_guarantee_fraudulent
- test_type:3rd_party_test_single_flow, severity:S2
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/OpenOrderGridStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/OpenOrderGridStep.php
deleted file mode 100644
index 409dffc8340b7..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/OpenOrderGridStep.php
+++ /dev/null
@@ -1,173 +0,0 @@
-placeOrderStatus = $placeOrderStatus;
- $this->orderId = $orderId;
- $this->orderIndex = $orderIndex;
- $this->salesOrderView = $salesOrderView;
- $this->ordersGrid = $ordersGrid;
- $this->assertOrderStatus = $assertOrderStatus;
- $this->assertCaseInfo = $assertCaseInfo;
- $this->assertOrdersGrid = $assertOrdersGrid;
- $this->signifydData = $signifydData;
- }
-
- /**
- * Open order.
- *
- * @return void
- */
- public function run()
- {
- $this->checkOrdersGrid();
- $this->checkCaseInfo();
- $this->checkOrderStatus();
- }
-
- /**
- * Run assert to check Signifyd Case Disposition status in orders grid.
- *
- * @return void
- */
- private function checkOrdersGrid()
- {
- $this->assertOrdersGrid->processAssert(
- $this->orderId,
- $this->ordersGrid,
- $this->signifydData
- );
- }
-
- /**
- * Run assert to check order status is valid.
- *
- * @return void
- */
- private function checkOrderStatus()
- {
- $this->assertOrderStatus->processAssert(
- $this->placeOrderStatus,
- $this->orderId,
- $this->orderIndex,
- $this->salesOrderView
- );
- }
-
- /**
- * Run assert to check Signifyd Case information is correct in Admin.
- *
- * @return void
- */
- private function checkCaseInfo()
- {
- $this->assertCaseInfo->processAssert(
- $this->salesOrderView,
- $this->orderIndex,
- $this->signifydData,
- $this->orderId
- );
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCancelOrderStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCancelOrderStep.php
deleted file mode 100644
index 54f4dd75223e0..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCancelOrderStep.php
+++ /dev/null
@@ -1,105 +0,0 @@
-orderIndex = $orderIndex;
- $this->order = $order;
- $this->salesOrderView = $salesOrderView;
- $this->testStepFactory = $testStepFactory;
- }
-
- /**
- * @inheritdoc
- */
- public function run()
- {
- $this->orderIndex->open();
- $this->orderIndex->getSalesOrderGrid()
- ->searchAndOpen(['id' => $this->order->getId()]);
-
- switch ($this->salesOrderView->getOrderInfoBlock()->getOrderStatus()) {
- case 'Suspected Fraud':
- $this->getStepInstance(DenyPaymentStep::class)->run();
- break;
- case 'On Hold':
- $this->getStepInstance(UnholdOrderStep::class)->run();
- $this->getStepInstance(CancelOrderStep::class)->run();
- break;
- case 'Canceled':
- break;
- default:
- $this->getStepInstance(CancelOrderStep::class)->run();
- }
- }
-
- /**
- * Creates test step instance with preset params.
- *
- * @param string $class
- * @return TestStepInterface
- */
- private function getStepInstance($class)
- {
- return $this->testStepFactory->create(
- $class,
- ['order' => $this->order]
- );
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCreateCustomerStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCreateCustomerStep.php
deleted file mode 100644
index 5fec5988d2c9f..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydCreateCustomerStep.php
+++ /dev/null
@@ -1,77 +0,0 @@
-customer = $customer;
- $this->testStepFactory = $testStepFactory;
- }
-
- /**
- * Run step flow.
- *
- * @return void
- */
- public function run()
- {
- $this->getStepInstance(CreateCustomerStep::class)->run();
- }
-
- /**
- * @return void
- */
- public function cleanup()
- {
- $this->getStepInstance(CreateCustomerStep::class)->cleanup();
- $this->getStepInstance(DeleteCustomerStep::class)->run();
- }
-
- /**
- * Creates test step instance with preset params.
- *
- * @param string $class
- * @return TestStepInterface
- */
- private function getStepInstance($class)
- {
- return $this->testStepFactory->create(
- $class,
- ['customer' => $this->customer]
- );
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydFillShippingAddressStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydFillShippingAddressStep.php
deleted file mode 100644
index 0b1dda1d0a46a..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydFillShippingAddressStep.php
+++ /dev/null
@@ -1,70 +0,0 @@
-signifydAddress = $signifydAddress;
- }
-
- /**
- * @inheritdoc
- */
- public function run()
- {
- parent::run();
-
- return [
- 'signifydAddress' => $this->signifydAddress,
- ];
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydLoginStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydLoginStep.php
deleted file mode 100644
index 3dd1b94d6b505..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydLoginStep.php
+++ /dev/null
@@ -1,68 +0,0 @@
-signifydAccount = $signifydAccount;
- $this->signifydLogin = $signifydLogin;
- $this->signifydCases = $signifydCases;
- }
-
- /**
- * @inheritdoc
- */
- public function run()
- {
- $this->signifydLogin->open();
-
- if ($this->signifydLogin->getLoginBlock()->isVisible()) {
- $this->signifydLogin->getLoginBlock()->fill($this->signifydAccount);
- $this->signifydLogin->getLoginBlock()->login();
- }
-
- $this->signifydCases->getCaseSearchBlock()->waitForLoading();
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydObserveCaseStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydObserveCaseStep.php
deleted file mode 100644
index c00c81fa237e0..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydObserveCaseStep.php
+++ /dev/null
@@ -1,165 +0,0 @@
-assertCaseInfo = $assertCaseInfoOnSignifydConsole;
- $this->signifydAddress = $signifydAddress;
- $this->signifydCases = $signifydCases;
- $this->signifydNotifications = $signifydNotifications;
- $this->signifydData = $signifydData;
- $this->order = $order;
- $this->testStepFactory = $testStepFactory;
- $this->prices = $prices;
- }
-
- /**
- * @inheritdoc
- */
- public function run()
- {
- $this->signifydCases->open();
- // Search case few times because it can appear with delay.
- for ($attempts = $this->searchAttempts; $attempts > 0; $attempts--) {
- $this->signifydCases->getCaseSearchBlock()
- ->searchCaseByCustomerName($this->signifydAddress->getFirstname());
- if ($this->signifydCases->getCaseSearchBlock()->isAnyCaseVisible()) {
- break;
- }
- sleep(3);
- }
-
- $this->signifydCases->getCaseSearchBlock()->selectCase();
- $this->signifydCases->getCaseInfoBlock()->flagCase($this->signifydData->getCaseFlag());
-
- $this->assertCaseInfo->processAssert(
- $this->signifydCases,
- $this->signifydAddress,
- $this->signifydData,
- $this->prices,
- $this->order->getId(),
- $this->getCustomerFullName($this->signifydAddress)
- );
- }
-
- /**
- * Cancel order if test fails, or in the end of variation.
- *
- * @return void
- */
- public function cleanup()
- {
- $this->testStepFactory->create(
- SignifydCancelOrderStep::class,
- ['order' => $this->order]
- )->run();
- }
-
- /**
- * Gets customer full name.
- *
- * @param SignifydAddress $billingAddress
- * @return string
- */
- private function getCustomerFullName(SignifydAddress $billingAddress)
- {
- return sprintf('%s %s', $billingAddress->getFirstname(), $billingAddress->getLastname());
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydSetWebhookHandlersStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydSetWebhookHandlersStep.php
deleted file mode 100644
index 2b630b8c1dac8..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/SignifydSetWebhookHandlersStep.php
+++ /dev/null
@@ -1,64 +0,0 @@
-signifydNotifications = $signifydNotifications;
- $this->signifydData = $signifydData;
- }
-
- /**
- * @inheritdoc
- */
- public function run()
- {
- $this->signifydNotifications->open();
- $this->signifydNotifications->getWebhooksBlock()
- ->create($this->signifydData->getTeam());
- }
-
- /**
- * Removes webhooks if test fails, or in the end of variation execution.
- *
- * @return void
- */
- public function cleanup()
- {
- $this->signifydNotifications->open();
- $this->signifydNotifications->getWebhooksBlock()
- ->cleanup($this->signifydData->getTeam());
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/UnholdAndCancelOrderStep.php b/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/UnholdAndCancelOrderStep.php
deleted file mode 100644
index 0c90b1b76937b..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/TestStep/UnholdAndCancelOrderStep.php
+++ /dev/null
@@ -1,84 +0,0 @@
-placeOrderStatus = $placeOrderStatus;
- $this->order = $order;
- $this->testStepFactory = $testStepFactory;
- }
-
- /**
- * Cancel order step.
- *
- * If order was held - unhold and then cancel the order.
- *
- * @return void
- */
- public function run()
- {
- if ($this->placeOrderStatus === 'On Hold') {
- $this->getStepInstance(UnholdOrderStep::class)->run();
- }
-
- $this->getStepInstance(CancelOrderStep::class)->run();
- }
-
- /**
- * Creates test step instance with preset params.
- *
- * @param string $class
- * @return TestStepInterface
- */
- private function getStepInstance($class)
- {
- return $this->testStepFactory->create(
- $class,
- ['order' => $this->order]
- );
- }
-}
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/di.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/di.xml
deleted file mode 100644
index 2ba4b6c97d33f..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/di.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- S1
-
-
-
-
- S1
-
-
-
-
- S1
-
-
-
-
- S1
-
-
-
-
- S2
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/testcase.xml
deleted file mode 100644
index cfbd2e6ace2b4..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Signifyd/Test/etc/testcase.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.xml
index 19b7406139584..4ae4c476a959b 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.xml
@@ -8,7 +8,7 @@
- test_type:extended_acceptance_test
+ test_type:extended_acceptance_test, mftf_migrated:yes
AdminRole%isolation%
%current_password%
Custom
@@ -22,6 +22,7 @@
All
+ mftf_migrated:yes
AdminRole%isolation%
@@ -29,6 +30,7 @@
All
+ mftf_migrated:yes
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.xml
index 2d44f86a17fe1..58e3fc4e76b30 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.xml
@@ -12,12 +12,14 @@
system_admin
+ mftf_migrated:yes
1
system_admin
+ mftf_migrated:yes
diff --git a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/SaveMultipleOperationsTest.php b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/SaveMultipleOperationsTest.php
new file mode 100644
index 0000000000000..cbf20d9e8ab59
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/SaveMultipleOperationsTest.php
@@ -0,0 +1,117 @@
+saveMultipleOperationsInterface = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ SaveMultipleOperationsInterface::class
+ );
+ $this->operationFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ OperationInterfaceFactory::class
+ );
+ $this->bulkStatusManagement = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ BulkStatus::class
+ );
+ $this->bulkSummaryFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ BulkSummaryInterfaceFactory::class
+ );
+ $this->entityManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ EntityManager::class
+ );
+ }
+
+ /**
+ * Test execute() of SaveMultipleOperations
+ */
+ public function testExecute()
+ {
+ $operation = $this->createOperation();
+ $operations = [$operation, $operation, $operation];
+
+ $bulkSummary = $this->bulkSummaryFactory->create();
+ $this->entityManager->load($bulkSummary, self::BULK_UUID);
+ $bulkSummary->setBulkId(self::BULK_UUID);
+ $bulkSummary->setDescription("Test Bulk");
+ $bulkSummary->setUserId(1);
+ $bulkSummary->setUserType(1);
+ $bulkSummary->setOperationCount(count($operations));
+ $this->entityManager->save($bulkSummary);
+
+ $this->saveMultipleOperationsInterface->execute($operations);
+ $operationsCount = $this->bulkStatusManagement
+ ->getOperationsCountByBulkIdAndStatus(self::BULK_UUID, OperationInterface::STATUS_TYPE_OPEN);
+ $this->assertEquals($operationsCount, 3);
+ }
+
+ /**
+ * Create Operation object and pre-fill with test data
+ * @return OperationInterface
+ */
+ public function createOperation()
+ {
+ $serializedData = [
+ 'entity_id' => null,
+ 'entity_link' => '',
+ 'meta_information' => json_encode([
+ 'entity_id' => 5,
+ 'meta_information' => 'Test'
+ ])
+ ];
+
+ $data = [
+ 'data' => [
+ OperationInterface::BULK_ID => self::BULK_UUID,
+ OperationInterface::TOPIC_NAME => "topic-4",
+ OperationInterface::SERIALIZED_DATA => json_encode($serializedData),
+ OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN,
+ ],
+ ];
+ return $this->operationFactory->create($data);
+ }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php
index 80502833cb2d7..10476eb01f306 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php
@@ -11,6 +11,7 @@
use Magento\Customer\Model\Url;
use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Framework\Message\MessageInterface;
+use Magento\Framework\Phrase;
use Magento\Framework\Url\EncoderInterface;
use Magento\TestFramework\TestCase\AbstractController;
@@ -151,6 +152,28 @@ public function testLoginWithRedirectToDashboard(): void
$this->assertRedirect($this->stringContains('customer/account/'));
}
+ /**
+ * @magentoConfigFixture current_store customer/startup/redirect_dashboard 1
+ * @magentoConfigFixture current_store customer/captcha/enable 0
+ *
+ * @magentoDataFixture Magento/Customer/_files/customer.php
+ *
+ * @return void
+ */
+ public function testNoFormKeyLoginPostAction(): void
+ {
+ $this->prepareRequest('customer@example.com', 'password');
+ $this->getRequest()->setPostValue('form_key', null);
+ $this->getRequest()->setParam(Url::REFERER_QUERY_PARAM_NAME, $this->urlEncoder->encode('test_redirect'));
+ $this->dispatch('customer/account/loginPost');
+ $this->assertFalse($this->session->isLoggedIn());
+ $this->assertRedirect($this->stringContains('customer/account/'));
+ $this->assertSessionMessages(
+ $this->equalTo([new Phrase('Invalid Form Key. Please refresh the page.')]),
+ MessageInterface::TYPE_ERROR
+ );
+ }
+
/**
* Prepare request
*
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
index c5fdd050bb46b..7b0a4823f701e 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
@@ -16,6 +16,7 @@
use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Framework\Data\Form\FormKey;
use Magento\Framework\Message\MessageInterface;
+use Magento\Framework\Phrase;
use Magento\Framework\Serialize\Serializer\Json;
use Magento\Framework\Stdlib\CookieManagerInterface;
use Magento\Store\Model\StoreManager;
@@ -227,6 +228,10 @@ public function testNoFormKeyCreatePostAction()
$this->assertNull($this->getCustomerByEmail('test1@email.com'));
$this->assertRedirect($this->stringEndsWith('customer/account/create/'));
+ $this->assertSessionMessages(
+ $this->equalTo([new Phrase('Invalid Form Key. Please refresh the page.')]),
+ MessageInterface::TYPE_ERROR
+ );
}
/**
@@ -612,6 +617,10 @@ public function testWrongConfirmationEditPostAction()
*
* @magentoDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php
* @return void
+ * @throws \Magento\Framework\Exception\InputException
+ * @throws \Magento\Framework\Exception\LocalizedException
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
+ * @throws \Magento\Framework\Stdlib\Cookie\FailureToSendException
*/
public function testRegisterCustomerWithEmailConfirmation(): void
{
@@ -725,6 +734,10 @@ public function testConfirmationEmailWithSpecialCharacters(): void
* @magentoConfigFixture current_store customer/captcha/enable 0
*
* @return void
+ * @throws \Magento\Framework\Exception\InputException
+ * @throws \Magento\Framework\Exception\LocalizedException
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
+ * @throws \Magento\Framework\Exception\State\InputMismatchException
*/
public function testResetPasswordWhenEmailChanged(): void
{
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
index e723549288cda..69b6d314ee64d 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
@@ -8437,45 +8437,6 @@
],
"description": "N/A"
},
- {
- "name": "magento/module-signifyd",
- "version": "100.3.1",
- "dist": {
- "type": "zip",
- "url": "https://repo.magento.com/archives/magento/module-signifyd/magento-module-signifyd-100.3.1.0.zip",
- "reference": null,
- "shasum": "768442b807e31bacfb5bbf914e155bac3ca88dde"
- },
- "require": {
- "magento/framework": "102.0.*",
- "magento/module-backend": "101.0.*",
- "magento/module-checkout": "100.3.*",
- "magento/module-config": "101.1.*",
- "magento/module-customer": "102.0.*",
- "magento/module-directory": "100.3.*",
- "magento/module-payment": "100.3.*",
- "magento/module-sales": "102.0.*",
- "magento/module-store": "101.0.*",
- "php": "~7.1.3||~7.2.0"
- },
- "suggest": {
- "magento/module-config": "101.1.*"
- },
- "type": "magento2-module",
- "autoload": {
- "files": [
- "registration.php"
- ],
- "psr-4": {
- "Magento\\Signifyd\\": ""
- }
- },
- "license": [
- "OSL-3.0",
- "AFL-3.0"
- ],
- "description": "Submitting Case Entry to Signifyd on Order Creation"
- },
{
"name": "magento/module-sitemap",
"version": "100.3.1",
@@ -9816,7 +9777,6 @@
"magento/module-send-friend": "100.3.1",
"magento/module-send-friend-graph-ql": "100.3.0",
"magento/module-shipping": "100.3.1",
- "magento/module-signifyd": "100.3.1",
"magento/module-sitemap": "100.3.1",
"magento/module-store": "101.0.1",
"magento/module-store-graph-ql": "100.3.1",
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
index 2e2fa561fa4cc..151c2b5eca565 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
@@ -8437,45 +8437,6 @@
],
"description": "N/A"
},
- {
- "name": "magento/module-signifyd",
- "version": "100.3.1",
- "dist": {
- "type": "zip",
- "url": "https://repo.magento.com/archives/magento/module-signifyd/magento-module-signifyd-100.3.1.0.zip",
- "reference": null,
- "shasum": "768442b807e31bacfb5bbf914e155bac3ca88dde"
- },
- "require": {
- "magento/framework": "102.0.*",
- "magento/module-backend": "101.0.*",
- "magento/module-checkout": "100.3.*",
- "magento/module-config": "101.1.*",
- "magento/module-customer": "102.0.*",
- "magento/module-directory": "100.3.*",
- "magento/module-payment": "100.3.*",
- "magento/module-sales": "102.0.*",
- "magento/module-store": "101.0.*",
- "php": "~7.1.3||~7.2.0"
- },
- "suggest": {
- "magento/module-config": "101.1.*"
- },
- "type": "magento2-module",
- "autoload": {
- "files": [
- "registration.php"
- ],
- "psr-4": {
- "Magento\\Signifyd\\": ""
- }
- },
- "license": [
- "OSL-3.0",
- "AFL-3.0"
- ],
- "description": "Submitting Case Entry to Signifyd on Order Creation"
- },
{
"name": "magento/module-sitemap",
"version": "100.3.1",
@@ -9816,7 +9777,6 @@
"magento/module-send-friend": "100.3.1",
"magento/module-send-friend-graph-ql": "100.3.0",
"magento/module-shipping": "100.3.1",
- "magento/module-signifyd": "100.3.1",
"magento/module-sitemap": "100.3.1",
"magento/module-store": "101.0.1",
"magento/module-store-graph-ql": "100.3.1",
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php
index c8719ea7e0a0a..5dec995f83827 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php
@@ -64,6 +64,32 @@ protected function tearDown(): void
$this->removeGeneratedDirectory();
}
+ /**
+ * Tests read directory with symlynked folders.
+ *
+ * @return void
+ */
+ public function testReadDirectoryRecursivelyWithSymlinkedFolders(): void
+ {
+ $sourceDirectory = $this->generatedPath . '/source';
+ $destinationDirectory = $this->generatedPath . '/destination';
+
+ $this->driver->createDirectory($sourceDirectory);
+ $this->driver->createDirectory($sourceDirectory . '/directory1');
+ $this->driver->createDirectory($destinationDirectory);
+
+ $linkName = $destinationDirectory . '/link';
+ $this->driver->symlink($sourceDirectory, $linkName);
+
+ $paths = [
+ $destinationDirectory . '/link' . '/directory1',
+ $destinationDirectory . '/link'
+
+ ];
+ $actual = $this->driver->readDirectoryRecursively($destinationDirectory);
+ $this->assertEquals($paths, $actual);
+ }
+
/**
* Tests directory recursive read.
*
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_with_invoice.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_with_invoice.php
index d1f74c746b64f..1460f5742c1fc 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_with_invoice.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_with_invoice.php
@@ -45,7 +45,8 @@
'base_grand_total' => 130.00,
'grand_total' => 130.00,
'subtotal' => 130.00,
- 'created_at' => $dateTime->modify('-1 day')->format(DateTime::DATETIME_PHP_FORMAT),
+ 'created_at' => max($dateTime->modify('-1 day'), $dateTime->modify('first day of this month'))
+ ->format(DateTime::DATETIME_PHP_FORMAT),
],
[
'increment_id' => '100000004',
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Block/Adminhtml/CaseInfoTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Block/Adminhtml/CaseInfoTest.php
deleted file mode 100644
index 7607526b1389e..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Block/Adminhtml/CaseInfoTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
- $this->order = $this->objectManager->create(Order::class);
- $this->layoutFactory = $this->objectManager->get(\Magento\Framework\View\LayoutFactory::class);
- }
-
- /**
- * Checks that block has contents when case entity for order is exists
- * even if Signifyd module is inactive.
- *
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 0
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- * @magentoAppArea adminhtml
- */
- public function testModuleIsInactive()
- {
- $this->order->loadByIncrementId('100000001');
-
- self::assertNotEmpty($this->getBlock()->toHtml());
- }
-
- /**
- * Checks that block does not give contents
- * if there is no case entity created for order.
- *
- * @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getCaseEntity
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- * @magentoAppArea adminhtml
- */
- public function testCaseEntityNotExists()
- {
- $this->order->loadByIncrementId('100000001');
-
- self::assertEmpty($this->getBlock()->toHtml());
- }
-
- /**
- * Checks that:
- * - block give contents
- * - block contents guarantee decision field
- *
- * @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getScoreClass
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- * @magentoAppArea adminhtml
- */
- public function testCaseEntityExists()
- {
- $this->order->loadByIncrementId('100000001');
-
- $block = $this->getBlock();
- self::assertNotEmpty($block->toHtml());
- self::assertContains((string) $block->getCaseGuaranteeDisposition(), $block->toHtml());
- }
-
- /**
- * Gets block.
- *
- * @return CaseInfo
- */
- private function getBlock()
- {
- $layout = $this->layoutFactory->create();
-
- $layout->addContainer('order_additional_info', 'Container');
-
- /** @var CaseInfo $block */
- $block = $layout->addBlock(CaseInfo::class, 'order_case_info', 'order_additional_info');
- $block->setAttribute('context', $this->getContext());
- $block->setTemplate('Magento_Signifyd::case_info.phtml');
-
- return $block;
- }
-
- /**
- * Creates template context with necessary order id param.
- *
- * @return Context
- */
- private function getContext()
- {
- /** @var RequestInterface $request */
- $request = $this->objectManager->get(RequestInterface::class);
- $request->setParams(['order_id' => $this->order->getEntityId()]);
-
- return $this->objectManager->create(Context::class, ['request' => $request]);
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Block/FingerprintTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Block/FingerprintTest.php
deleted file mode 100644
index 1efbb8b6d33e4..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Block/FingerprintTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-loadArea(Area::AREA_FRONTEND);
-
- $this->objectManager = Bootstrap::getObjectManager();
- }
-
- /**
- * Checks if session id attribute is present when the module is enabled.
- *
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testSessionIdPresent()
- {
- self::assertContains('data-order-session-id', $this->getBlockContents());
- }
-
- /**
- * Checks if block is an empty when the module is disabled.
- *
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 0
- */
- public function testBlockEmpty()
- {
- self::assertEmpty($this->getBlockContents());
- }
-
- /**
- * Renders block contents.
- *
- * @return string
- */
- private function getBlockContents()
- {
- $block = $this->objectManager->get(LayoutInterface::class)
- ->createBlock(Fingerprint::class);
-
- return $block->fetchView($block->getTemplateFile());
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Controller/Webhooks/HandlerTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Controller/Webhooks/HandlerTest.php
deleted file mode 100644
index 667cb079f9096..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Controller/Webhooks/HandlerTest.php
+++ /dev/null
@@ -1,135 +0,0 @@
-getWebhookRequest();
- $this->_objectManager->addSharedInstance($webhookRequest, WebhookRequest::class);
-
- $this->dispatch(self::$entryPoint);
-
- /** @var CaseRepositoryInterface $caseManagement */
- $caseRepository = $this->_objectManager->get(CaseRepositoryInterface::class);
- /** @var CaseInterface $caseEntity */
- $caseEntity = $caseRepository->getByCaseId($caseId);
- $orderEntityId = $caseEntity->getOrderId();
-
- self::assertNotEmpty($caseEntity);
- self::assertEquals('2017-01-06 12:47:03', $caseEntity->getCreatedAt());
- self::assertEquals('2017-01-06 12:47:03', $caseEntity->getUpdatedAt());
- self::assertEquals('Magento', $caseEntity->getAssociatedTeam()['teamName']);
- self::assertEquals(true, $caseEntity->isGuaranteeEligible());
- self::assertEquals(CaseInterface::STATUS_OPEN, $caseEntity->getStatus());
- self::assertEquals($orderEntityId, $caseEntity->getOrderId());
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->_objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($caseEntity->getOrderId());
- $histories = $order->getStatusHistories();
- self::assertNotEmpty($histories);
-
- /** @var OrderStatusHistoryInterface $caseCreationComment */
- $caseComment = array_pop($histories);
- self::assertInstanceOf(OrderStatusHistoryInterface::class, $caseComment);
-
- self::assertEquals(
- "Case Update: New score for the order is 384. Previous score was 553.",
- $caseComment->getComment()
- );
-
- $this->_objectManager->removeSharedInstance(WebhookRequest::class);
- }
-
- /**
- * Tests handling webhook message of cases/test type.
- * Controller should response with code 200.
- *
- * @covers \Magento\Signifyd\Controller\Webhooks\Handler::execute
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testExecuteTestSuccess()
- {
- $webhookRequest = $this->getTestWebhookRequest();
- $this->_objectManager->addSharedInstance($webhookRequest, WebhookRequest::class);
- $this->dispatch(self::$entryPoint);
- $this->assertEquals(200, $this->getResponse()->getHttpResponseCode());
- $this->_objectManager->removeSharedInstance(WebhookRequest::class);
- }
-
- /**
- * Returns mocked WebhookRequest
- *
- * @return WebhookRequest|\PHPUnit\Framework\MockObject_MockObject
- */
- private function getWebhookRequest()
- {
- $webhookRequest = $this->getMockBuilder(WebhookRequest::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookRequest->expects($this->any())
- ->method('getBody')
- ->willReturn(file_get_contents(__DIR__ . '/../../_files/webhook_body.json'));
- $webhookRequest->expects($this->any())
- ->method('getEventTopic')
- ->willReturn('cases/rescore');
- $webhookRequest->expects($this->any())
- ->method('getHash')
- ->willReturn('m/X29RcHWPSCDPgQuSXjnyTfKISJDopcdGbVsRLeqy8=');
-
- return $webhookRequest;
- }
-
- /**
- * Returns mocked test WebhookRequest
- *
- * @return WebhookRequest|\PHPUnit\Framework\MockObject_MockObject
- */
- private function getTestWebhookRequest()
- {
- $webhookRequest = $this->getMockBuilder(WebhookRequest::class)
- ->disableOriginalConstructor()
- ->getMock();
- $webhookRequest->expects($this->any())
- ->method('getBody')
- ->willReturn(file_get_contents(__DIR__ . '/../../_files/webhook_body.json'));
- $webhookRequest->expects($this->any())
- ->method('getEventTopic')
- ->willReturn('cases/test');
- $webhookRequest->expects($this->any())
- ->method('getHash')
- ->willReturn('wyG0r9mOmv1IqVlN6ZqJ5sgA635yKW6lbSsqlYF2b8U=');
-
- return $webhookRequest;
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseManagementTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseManagementTest.php
deleted file mode 100644
index 30603baf867ff..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseManagementTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
- $this->caseManagement = $this->objectManager->get(CaseManagement::class);
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseManagement::create
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testCreate()
- {
- $order = $this->getOrder();
- $case = $this->caseManagement->create($order->getEntityId());
-
- self::assertNotEmpty($case->getEntityId());
- self::assertEquals(CaseInterface::STATUS_PENDING, $case->getStatus());
- self::assertEquals(CaseInterface::GUARANTEE_PENDING, $case->getGuaranteeDisposition());
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseManagement::getByOrderId
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- */
- public function testGetByOrderId()
- {
- $order = $this->getOrder();
- $case = $this->caseManagement->getByOrderId($order->getEntityId());
-
- self::assertEquals(CaseInterface::STATUS_PROCESSING, $case->getStatus());
- self::assertEquals(CaseInterface::DISPOSITION_GOOD, $case->getReviewDisposition());
- self::assertEquals('2016-12-12 15:17:17', $case->getCreatedAt());
- self::assertEquals('2016-12-12 19:23:16', $case->getUpdatedAt());
- }
-
- /**
- * Get stored order
- * @return OrderInterface
- */
- private function getOrder()
- {
- /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
- $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $searchCriteria = $searchCriteriaBuilder->addFilter(OrderInterface::INCREMENT_ID, '100000001')
- ->create();
-
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $orders = $orderRepository->getList($searchCriteria)
- ->getItems();
-
- /** @var OrderInterface $order */
- return array_pop($orders);
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseRepositoryTest.php
deleted file mode 100644
index ca98a20b15bec..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseRepositoryTest.php
+++ /dev/null
@@ -1,148 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
- $this->filterBuilder = $this->objectManager->get(FilterBuilder::class);
- $this->searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $this->repository = $this->objectManager->get(CaseRepository::class);
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseRepository::delete
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- */
- public function testDelete()
- {
- $filters = [
- $this->filterBuilder->setField('case_id')
- ->setValue(123)
- ->create()
- ];
- $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)->create();
- $cases = $this->repository->getList($searchCriteria)
- ->getItems();
-
- $case = array_pop($cases);
- $this->repository->delete($case);
-
- self::assertEmpty($this->repository->getList($searchCriteria)->getItems());
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseRepository::getById
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- */
- public function testGetById()
- {
- $filters = [
- $this->filterBuilder->setField('case_id')
- ->setValue(123)
- ->create()
- ];
- $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)->create();
- $cases = $this->repository->getList($searchCriteria)
- ->getItems();
-
- $case = array_pop($cases);
-
- $found = $this->repository->getById($case->getEntityId());
-
- self::assertNotEmpty($found->getEntityId());
- self::assertEquals($case->getEntityId(), $found->getEntityId());
- self::assertEquals($case->getOrderId(), $found->getOrderId());
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseRepository::getList
- * @magentoDataFixture Magento/Signifyd/_files/multiple_cases.php
- */
- public function testGetListDateInterval()
- {
- $startDateInterval = [
- $this->filterBuilder->setField('created_at')
- ->setConditionType('gteq')
- ->setValue('2016-12-01 00:00:01')
- ->create()
- ];
- $endDateInterval = [
- $this->filterBuilder->setField('created_at')
- ->setConditionType('lteq')
- ->setValue('2016-12-03 23:59:59')
- ->create()
- ];
-
- $this->searchCriteriaBuilder->addFilters($startDateInterval);
- $searchCriteria = $this->searchCriteriaBuilder->addFilters($endDateInterval)->create();
- $items = $this->repository->getList($searchCriteria)
- ->getItems();
-
- self::assertCount(3, $items);
-
- for ($i = 1; $i < 4; $i ++) {
- $current = array_shift($items);
- self::assertEquals($i, $current->getCaseId());
- }
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseRepository::getList
- * @magentoDataFixture Magento/Signifyd/_files/multiple_cases.php
- */
- public function testGetListStatusProcessing()
- {
- $filters = [
- $this->filterBuilder->setField('status')
- ->setValue(CaseInterface::STATUS_PROCESSING)
- ->create()
- ];
-
- $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)->create();
- $items = $this->repository->getList($searchCriteria)
- ->getItems();
-
- self::assertCount(1, $items);
-
- $case = array_pop($items);
- self::assertEquals(123, $case->getCaseId());
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/CreationServiceTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/CreationServiceTest.php
deleted file mode 100644
index 6cf1e0bfddc9a..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/CreationServiceTest.php
+++ /dev/null
@@ -1,245 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->requestBuilder = $this->getMockBuilder(RequestBuilder::class)
- ->disableOriginalConstructor()
- ->setMethods(['doRequest'])
- ->getMock();
-
- $apiClient = $this->objectManager->create(
- ApiClient::class,
- ['requestBuilder' => $this->requestBuilder]
- );
-
- $gateway = $this->objectManager->create(
- Gateway::class,
- ['apiClient' => $apiClient]
- );
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['error'])
- ->getMockForAbstractClass();
-
- $this->service = $this->objectManager->create(
- CreationService::class,
- [
- 'signifydGateway' => $gateway,
- 'logger' => $this->logger
- ]
- );
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseServices\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testCreateForOrderWithEmptyResponse()
- {
- $order = $this->getOrder();
- $exceptionMessage = 'Response is not valid JSON: Decoding failed: Syntax error';
-
- $this->requestBuilder->expects(self::once())
- ->method('doRequest')
- ->willThrowException(new ApiCallException($exceptionMessage));
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with($exceptionMessage);
-
- $result = $this->service->createForOrder($order->getEntityId());
- self::assertTrue($result);
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseServices\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testCreateForOrderWithBadResponse()
- {
- $order = $this->getOrder();
- $responseData = [
- 'messages' => [
- 'Something wrong'
- ]
- ];
- $exceptionMessage = 'Bad Request - The request could not be parsed. Response: ' . json_encode($responseData);
-
- $this->requestBuilder->expects(self::once())
- ->method('doRequest')
- ->willThrowException(new ApiCallException($exceptionMessage));
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with($exceptionMessage);
-
- $result = $this->service->createForOrder($order->getEntityId());
- self::assertTrue($result);
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseServices\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testCreateOrderWithEmptyInvestigationId()
- {
- $order = $this->getOrder();
-
- $this->requestBuilder->expects(self::once())
- ->method('doRequest')
- ->willReturn([]);
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with('Expected field "investigationId" missed.');
-
- $result = $this->service->createForOrder($order->getEntityId());
- self::assertTrue($result);
- }
-
- /**
- * @covers \Magento\Signifyd\Model\CaseServices\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testCreateForOrder()
- {
- $order = $this->getOrder();
-
- $this->requestBuilder->expects(self::once())
- ->method('doRequest')
- ->willReturn(['investigationId' => 123123]);
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $result = $this->service->createForOrder($order->getEntityId());
- self::assertTrue($result);
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId(123123);
- $gridGuarantyStatus = $this->getOrderGridGuarantyStatus($caseEntity->getOrderId());
-
- self::assertNotEmpty($caseEntity);
- self::assertEquals($order->getEntityId(), $caseEntity->getOrderId());
- self::assertEquals(
- $gridGuarantyStatus,
- $caseEntity->getGuaranteeDisposition(),
- 'Signifyd guaranty status in sales_order_grid table does not match case entity guaranty status'
- );
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($caseEntity->getOrderId());
- self::assertEquals(Order::STATE_HOLDED, $order->getState());
-
- $histories = $order->getStatusHistories();
- self::assertNotEmpty($histories);
-
- /** @var OrderStatusHistoryInterface $orderHoldComment */
- $orderHoldComment = array_pop($histories);
- self::assertInstanceOf(OrderStatusHistoryInterface::class, $orderHoldComment);
- self::assertEquals("Awaiting the Signifyd guarantee disposition.", $orderHoldComment->getComment());
- }
-
- /**
- * Get stored order
- *
- * @return OrderInterface
- */
- private function getOrder()
- {
- if ($this->order === null) {
-
- /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
- $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $searchCriteria = $searchCriteriaBuilder->addFilter(OrderInterface::INCREMENT_ID, '100000001')
- ->create();
-
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $orders = $orderRepository->getList($searchCriteria)
- ->getItems();
-
- $this->order = array_pop($orders);
- }
-
- return $this->order;
- }
-
- /**
- * Returns value of signifyd_guarantee_status column from sales order grid
- *
- * @param int $orderEntityId
- * @return string|null
- */
- private function getOrderGridGuarantyStatus($orderEntityId)
- {
- /** @var Collection $orderGridCollection */
- $orderGridCollection = $this->objectManager->get(Collection::class);
-
- $items = $orderGridCollection->addFilter($orderGridCollection->getIdFieldName(), $orderEntityId)
- ->getItems();
- $result = array_pop($items);
-
- return isset($result['signifyd_guarantee_status']) ? $result['signifyd_guarantee_status'] : null;
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/UpdatingServiceTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/UpdatingServiceTest.php
deleted file mode 100644
index 50e510ca072be..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/CaseServices/UpdatingServiceTest.php
+++ /dev/null
@@ -1,186 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- /** @var GeneratorFactory $messageFactory */
- $messageFactory = $this->objectManager->get(GeneratorFactory::class);
- $messageGenerator = $messageFactory->create('cases/creation');
-
- $this->service = $this->objectManager->create(UpdatingService::class, [
- 'messageGenerator' => $messageGenerator
- ]);
- }
-
- /**
- * Checks case updating flow and messages in order comments history.
- * Also checks that order is unholded when case guarantee disposition is APPROVED.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- */
- public function testUpdate()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'score' => 750,
- 'orderId' => '100000001',
- 'reviewDisposition' => CaseInterface::DISPOSITION_FRAUDULENT,
- 'associatedTeam' => [
- 'teamName' => 'AnyTeam',
- 'teamId' => 26,
- 'getAutoDismiss' => true,
- 'getTeamDismissalDays' => 2
- ],
- 'createdAt' => '2017-01-05T14:23:26-0800',
- 'updatedAt' => '2017-01-05T14:44:26-0800',
- 'guaranteeDisposition' => CaseInterface::GUARANTEE_APPROVED
- ];
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- /** @var CaseInterface $caseEntity */
- $caseEntity = $caseRepository->getByCaseId($caseId);
-
- $this->service->update($caseEntity, $data);
-
- $caseEntity = $caseRepository->getByCaseId($caseId);
- $orderEntityId = $caseEntity->getOrderId();
- $gridGuarantyStatus = $this->getOrderGridGuarantyStatus($orderEntityId);
-
- self::assertNotEmpty($caseEntity);
- self::assertEquals('2017-01-05 22:23:26', $caseEntity->getCreatedAt());
- self::assertEquals(CaseInterface::GUARANTEE_APPROVED, $caseEntity->getGuaranteeDisposition());
- self::assertEquals('AnyTeam', $caseEntity->getAssociatedTeam()['teamName']);
- self::assertEquals(true, $caseEntity->isGuaranteeEligible());
- self::assertEquals(CaseInterface::STATUS_PROCESSING, $caseEntity->getStatus());
- self::assertEquals($orderEntityId, $caseEntity->getOrderId());
- self::assertEquals(
- $gridGuarantyStatus,
- $caseEntity->getGuaranteeDisposition(),
- 'Signifyd guaranty status in sales_order_grid table does not match case entity guaranty status'
- );
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($caseEntity->getOrderId());
- self::assertEquals(Order::STATE_PROCESSING, $order->getState());
- $histories = $order->getStatusHistories();
- self::assertNotEmpty($histories);
-
- /** @var OrderStatusHistoryInterface $caseCreationComment */
- $caseCreationComment = array_pop($histories);
- self::assertInstanceOf(OrderStatusHistoryInterface::class, $caseCreationComment);
- self::assertEquals("Signifyd Case $caseId has been created for order.", $caseCreationComment->getComment());
- }
-
- /**
- * Checks that order is holded when case guarantee disposition is DECLINED.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @magentoDataFixture Magento/Signifyd/_files/approved_case.php
- */
- public function testOrderStateAfterDeclinedGuaranteeDisposition()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'orderId' => '100000001',
- 'guaranteeDisposition' => CaseInterface::GUARANTEE_DECLINED
- ];
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId($caseId);
-
- $this->service->update($caseEntity, $data);
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($caseEntity->getOrderId());
-
- self::assertEquals(Order::STATE_HOLDED, $order->getState());
- }
-
- /**
- * Checks that order doesn't become holded
- * when previous case guarantee disposition was DECLINED
- * and webhook without guarantee disposition was received.
- *
- * @covers \Magento\Signifyd\Model\CaseServices\UpdatingService::update
- * @magentoDataFixture Magento/Signifyd/_files/declined_case.php
- */
- public function testOrderStateAfterWebhookWithoutGuaranteeDisposition()
- {
- $caseId = 123;
- $data = [
- 'caseId' => $caseId,
- 'orderId' => '100000001'
- ];
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId($caseId);
-
- $this->service->update($caseEntity, $data);
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($caseEntity->getOrderId());
-
- self::assertEquals(Order::STATE_PROCESSING, $order->getState());
- }
-
- /**
- * Returns value of signifyd_guarantee_status column from sales order grid
- *
- * @param int $orderEntityId
- * @return string|null
- */
- private function getOrderGridGuarantyStatus($orderEntityId)
- {
- /** @var Collection $orderGridCollection */
- $orderGridCollection = $this->objectManager->get(Collection::class);
-
- $items = $orderGridCollection->addFilter($orderGridCollection->getIdFieldName(), $orderEntityId)
- ->getItems();
- $result = array_pop($items);
-
- return isset($result['signifyd_guarantee_status']) ? $result['signifyd_guarantee_status'] : null;
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CancelingServiceTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CancelingServiceTest.php
deleted file mode 100644
index 2cc7a9a1f240a..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CancelingServiceTest.php
+++ /dev/null
@@ -1,158 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->gateway = $this->getMockBuilder(Gateway::class)
- ->disableOriginalConstructor()
- ->setMethods(['cancelGuarantee'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->service = $this->objectManager->create(CancelingService::class, [
- 'gateway' => $this->gateway,
- 'logger' => $this->logger
- ]);
- }
-
- /**
- * Checks a test case, when Signifyd guarantee was canceled.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testCancelForOrderWithCanceledGuarantee()
- {
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId(self::$caseId);
- $caseEntity->setGuaranteeDisposition(CaseInterface::GUARANTEE_CANCELED);
- $caseRepository->save($caseEntity);
-
- $this->gateway->expects(self::never())
- ->method('cancelGuarantee');
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $result = $this->service->cancelForOrder($caseEntity->getOrderId());
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when Signifyd gateway throws an exception.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- * @magentoDataFixture Magento/Signifyd/_files/approved_case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testCancelForOrderWithFailedRequest()
- {
- $exceptionMessage = 'Something wrong.';
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId(self::$caseId);
-
- $this->gateway->expects(self::once())
- ->method('cancelGuarantee')
- ->with(self::equalTo(self::$caseId))
- ->willThrowException(new GatewayException($exceptionMessage));
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with(self::equalTo($exceptionMessage));
-
- $result = $this->service->cancelForOrder($caseEntity->getOrderId());
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when request to cancel is submitted and case entity is updated successfully.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
- * @magentoDataFixture Magento/Signifyd/_files/approved_case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testCancelForOrder()
- {
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $caseEntity = $caseRepository->getByCaseId(self::$caseId);
-
- $this->gateway->expects(self::once())
- ->method('cancelGuarantee')
- ->with(self::equalTo(self::$caseId))
- ->willReturn(CaseInterface::GUARANTEE_CANCELED);
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $result = $this->service->cancelForOrder($caseEntity->getOrderId());
- self::assertTrue($result);
-
- $updatedCase = $caseRepository->getByCaseId(self::$caseId);
- self::assertEquals(CaseInterface::GUARANTEE_CANCELED, $updatedCase->getGuaranteeDisposition());
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($updatedCase->getOrderId());
- $histories = $order->getStatusHistories();
- self::assertNotEmpty($histories);
-
- /** @var OrderStatusHistoryInterface $caseCreationComment */
- $caseCreationComment = array_pop($histories);
- self::assertInstanceOf(OrderStatusHistoryInterface::class, $caseCreationComment);
- self::assertEquals('Case Update: Case guarantee has been cancelled.', $caseCreationComment->getComment());
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CreationServiceTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CreationServiceTest.php
deleted file mode 100644
index 157e3270648b3..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/Guarantee/CreationServiceTest.php
+++ /dev/null
@@ -1,155 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->gateway = $this->getMockBuilder(Gateway::class)
- ->disableOriginalConstructor()
- ->setMethods(['submitCaseForGuarantee'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->service = $this->objectManager->create(CreationService::class, [
- 'gateway' => $this->gateway,
- 'logger' => $this->logger
- ]);
- }
-
- /**
- * Checks a test case, when Signifyd case entity cannot be found
- * for a specified order.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CreationService::createForOrder
- */
- public function testCreateWithoutCaseEntity()
- {
- $orderId = 123;
-
- $this->gateway->expects(self::never())
- ->method('submitCaseForGuarantee');
-
- $result = $this->service->createForOrder($orderId);
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when request is failing.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- */
- public function testCreateWithFailedRequest()
- {
- $caseEntity = $this->getCaseEntity();
-
- $this->gateway->expects(self::once())
- ->method('submitCaseForGuarantee')
- ->willThrowException(new GatewayException('Something wrong'));
-
- $this->logger->expects(self::once())
- ->method('error')
- ->with('Something wrong');
-
- $result = $this->service->createForOrder($caseEntity->getOrderId());
- self::assertFalse($result);
- }
-
- /**
- * Checks a test case, when case entity is updated successfully.
- *
- * @covers \Magento\Signifyd\Model\Guarantee\CreationService::createForOrder
- * @magentoDataFixture Magento/Signifyd/_files/case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testCreate()
- {
- $caseEntity = $this->getCaseEntity();
-
- $this->gateway->expects(self::once())
- ->method('submitCaseForGuarantee')
- ->with($caseEntity->getCaseId())
- ->willReturn(CaseInterface::GUARANTEE_IN_REVIEW);
-
- $this->logger->expects(self::never())
- ->method('error');
-
- $result = $this->service->createForOrder($caseEntity->getOrderId());
- self::assertTrue($result);
-
- $updatedCase = $this->getCaseEntity();
- self::assertEquals(CaseInterface::GUARANTEE_IN_REVIEW, $updatedCase->getGuaranteeDisposition());
- self::assertEquals(CaseInterface::STATUS_PROCESSING, $updatedCase->getStatus());
-
- /** @var OrderRepositoryInterface $orderRepository */
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $order = $orderRepository->get($updatedCase->getOrderId());
- $histories = $order->getStatusHistories();
- self::assertNotEmpty($histories);
-
- /** @var OrderStatusHistoryInterface $caseCreationComment */
- $caseCreationComment = array_pop($histories);
- self::assertInstanceOf(OrderStatusHistoryInterface::class, $caseCreationComment);
- self::assertEquals('Case Update: Case is submitted for guarantee.', $caseCreationComment->getComment());
- }
-
- /**
- * Gets case entity.
- *
- * @return \Magento\Signifyd\Api\Data\CaseInterface|null
- */
- private function getCaseEntity()
- {
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- return $caseRepository->getByCaseId(123);
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderTest.php
deleted file mode 100644
index 594c065185ac7..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Model/SignifydGateway/Request/CreateCaseBuilderTest.php
+++ /dev/null
@@ -1,291 +0,0 @@
-loadArea(Area::AREA_FRONTEND);
- $this->objectManager = Bootstrap::getObjectManager();
- $this->dateTimeFactory = $this->objectManager->create(DateTimeFactory::class);
- $this->caseBuilder = $this->objectManager->create(CreateCaseBuilder::class);
- }
-
- /**
- * Test builder on order with customer, simple product, frontend area,
- * PayPal gateway, shipping and billing addresses, with two orders
- *
- * @covers \Magento\Signifyd\Model\SignifydGateway\Request\CreateCaseBuilder::build()
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
- */
- public function testCreateCaseBuilderWithFullSetOfData()
- {
- /** @var Order $order */
- $order = $this->objectManager->create(Order::class);
- $order->loadByIncrementId('100000001');
-
- $orderItems = $order->getAllItems();
- $payment = $order->getPayment();
- $billingAddress = $order->getBillingAddress();
- $shippingAddress = $order->getShippingAddress();
-
- /** @var CustomerRepositoryInterface $customerRepository */
- $customerRepository = $this->objectManager->create(CustomerRepositoryInterface::class);
- $customer = $customerRepository->getById($order->getCustomerId());
-
- $productMetadata = $this->objectManager->create(ProductMetadataInterface::class);
-
- /** @var SignifydOrderSessionId $signifydOrderSessionId */
- $signifydOrderSessionId = $this->objectManager->create(SignifydOrderSessionId::class);
-
- $expected = [
- 'purchase' => [
- 'orderSessionId' => $signifydOrderSessionId->get($order->getQuoteId()),
- 'browserIpAddress' => $order->getRemoteIp(),
- 'orderId' => $order->getIncrementId(),
- 'createdAt' => date('c', strtotime(date('Y-m-d 00:00:55'))),
- 'paymentGateway' => 'paypal_account',
- 'transactionId' => $payment->getLastTransId(),
- 'currency' => $order->getOrderCurrencyCode(),
- 'avsResponseCode' => '',
- 'cvvResponseCode' => '',
- 'orderChannel' => 'WEB',
- 'totalPrice' => $order->getGrandTotal(),
- 'shipments' => [
- 0 => [
- 'shipper' => 'Flat Rate',
- 'shippingMethod' => 'Fixed',
- 'shippingPrice' => $order->getShippingAmount()
- ]
- ],
- 'products' => [
- 0 => [
- 'itemId' => $orderItems[0]->getSku(),
- 'itemName' => $orderItems[0]->getName(),
- 'itemPrice' => $orderItems[0]->getPrice(),
- 'itemQuantity' => $orderItems[0]->getQtyOrdered(),
- 'itemUrl' => $orderItems[0]->getProduct()->getProductUrl(),
- 'itemWeight' => $orderItems[0]->getProduct()->getWeight()
- ],
- 1 => [
- 'itemId' => $orderItems[1]->getSku(),
- 'itemName' => $orderItems[1]->getName(),
- 'itemPrice' => $orderItems[1]->getPrice(),
- 'itemQuantity' => $orderItems[1]->getQtyOrdered(),
- 'itemUrl' => $orderItems[1]->getProduct()->getProductUrl(),
- 'itemWeight' => $orderItems[1]->getProduct()->getWeight()
- ]
- ],
- 'paymentMethod' => 'PAYPAL_ACCOUNT'
- ],
- 'card' => [
- 'cardHolderName' => 'firstname lastname',
- 'last4' => $payment->getCcLast4(),
- 'expiryMonth' => $payment->getCcExpMonth(),
- 'expiryYear' => $payment->getCcExpYear(),
- 'billingAddress' => [
- 'streetAddress' => 'street',
- 'city' => $billingAddress->getCity(),
- 'provinceCode' => $billingAddress->getRegionCode(),
- 'postalCode' => $billingAddress->getPostcode(),
- 'countryCode' => $billingAddress->getCountryId(),
- 'unit' => ''
- ]
- ],
- 'recipient' => [
- 'fullName' => $shippingAddress->getName(),
- 'confirmationEmail' => $shippingAddress->getEmail(),
- 'confirmationPhone' => $shippingAddress->getTelephone(),
- 'deliveryAddress' => [
- 'streetAddress' => '6161 West Centinela Avenue',
- 'unit' => 'app. 33',
- 'city' => $shippingAddress->getCity(),
- 'provinceCode' => $shippingAddress->getRegionCode(),
- 'postalCode' => $shippingAddress->getPostcode(),
- 'countryCode' => $shippingAddress->getCountryId()
- ]
- ],
- 'userAccount' => [
- 'email' => $customer->getEmail(),
- 'username' => $customer->getEmail(),
- 'phone' => $order->getBillingAddress()->getTelephone(),
- 'accountNumber' => $customer->getId(),
- 'createdDate' => $this->formatDate($customer->getCreatedAt()),
- 'lastUpdateDate' => $this->formatDate($customer->getUpdatedAt()),
- 'aggregateOrderCount' => 2,
- 'aggregateOrderDollars' => 150.0
- ],
- 'seller' => $this->getSellerData(),
- 'platformAndClient' => [
- 'storePlatform' => $productMetadata->getName() . ' ' . $productMetadata->getEdition(),
- 'storePlatformVersion' => $productMetadata->getVersion(),
- 'signifydClientApp' => $productMetadata->getName(),
- 'signifydClientAppVersion' => '1.0'
- ]
- ];
-
- self::assertEquals(
- $expected,
- $this->caseBuilder->build($order->getEntityId())
- );
- }
-
- /**
- * Test builder on order with guest, virtual product, admin area,
- * none PayPal gateway, no shipping address, without credit card data
- *
- * @covers \Magento\Signifyd\Model\SignifydGateway\Request\CreateCaseBuilder::build()
- * @magentoDataFixture Magento/Signifyd/_files/order_with_guest_and_virtual_product.php
- */
- public function testCreateCaseBuilderWithVirtualProductAndGuest()
- {
- /** @var Order $order */
- $order = $this->objectManager->create(Order::class);
- $order->loadByIncrementId('100000002');
-
- $scope = $this->objectManager->get(ScopeInterface::class);
- $scope->setCurrentScope(Area::AREA_ADMINHTML);
-
- $orderItems = $order->getAllItems();
- $product = $orderItems[0]->getProduct();
- $payment = $order->getPayment();
- $billingAddress = $order->getBillingAddress();
- $productMetadata = $this->objectManager->create(ProductMetadataInterface::class);
-
- /** @var SignifydOrderSessionId $quoteSessionId */
- $quoteSessionId = $this->objectManager->create(SignifydOrderSessionId::class);
-
- $expected = [
- 'purchase' => [
- 'orderSessionId' => $quoteSessionId->get($order->getQuoteId()),
- 'browserIpAddress' => $order->getRemoteIp(),
- 'orderId' => $order->getIncrementId(),
- 'createdAt' => '2016-12-12T12:00:55+00:00',
- 'paymentGateway' => $payment->getMethod(),
- 'transactionId' => $payment->getLastTransId(),
- 'currency' => $order->getOrderCurrencyCode(),
- 'avsResponseCode' => 'Y',
- 'cvvResponseCode' => 'M',
- 'orderChannel' => 'PHONE',
- 'totalPrice' => $order->getGrandTotal(),
- 'products' => [
- 0 => [
- 'itemId' => $orderItems[0]->getSku(),
- 'itemName' => $orderItems[0]->getName(),
- 'itemPrice' => $orderItems[0]->getPrice(),
- 'itemQuantity' => $orderItems[0]->getQtyOrdered(),
- 'itemUrl' => $product->getProductUrl()
- ],
- ],
- 'paymentMethod' => 'PAYMENT_CARD'
- ],
- 'card' => [
- 'cardHolderName' => 'firstname lastname',
- 'billingAddress' => [
- 'streetAddress' => 'street',
- 'city' => $billingAddress->getCity(),
- 'provinceCode' => $billingAddress->getRegionCode(),
- 'postalCode' => $billingAddress->getPostcode(),
- 'countryCode' => $billingAddress->getCountryId(),
- 'unit' => ''
- ]
- ],
- 'seller' => $this->getSellerData(),
- 'platformAndClient' => [
- 'storePlatform' => $productMetadata->getName() . ' ' . $productMetadata->getEdition(),
- 'storePlatformVersion' => $productMetadata->getVersion(),
- 'signifydClientApp' => $productMetadata->getName(),
- 'signifydClientAppVersion' => '1.0'
- ]
- ];
-
- self::assertEquals(
- $expected,
- $this->caseBuilder->build($order->getEntityId())
- );
- }
-
- /**
- * Return seller data according to fixture
- *
- * @return array
- */
- private function getSellerData()
- {
- return [
- 'name' => 'Sample Store',
- 'domain' => 'm2.com',
- 'shipFromAddress' => [
- 'streetAddress' => '6161 West Centinela Avenue',
- 'unit' => 'app. 111',
- 'city' => 'Culver City',
- 'provinceCode' => 'AE',
- 'postalCode' => '90230',
- 'countryCode' => 'US',
- ],
- 'corporateAddress' => [
- 'streetAddress' => '5th Avenue',
- 'unit' => '75',
- 'city' => 'New York',
- 'provinceCode' => 'MH',
- 'postalCode' => '19032',
- 'countryCode' => 'US',
- ],
- ];
- }
-
- /**
- * Format date in ISO8601
- *
- * @param string $date
- * @return string
- */
- private function formatDate($date)
- {
- $result = $this->dateTimeFactory->create(
- $date,
- new \DateTimeZone('UTC')
- );
-
- return $result->format(\DateTime::ATOM);
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Observer/PlaceOrderTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Observer/PlaceOrderTest.php
deleted file mode 100644
index e547187be5ed7..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Observer/PlaceOrderTest.php
+++ /dev/null
@@ -1,218 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->creationService = $this->getMockBuilder(CaseCreationServiceInterface::class)
- ->disableOriginalConstructor()
- ->setMethods(['createForOrder'])
- ->getMock();
-
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->placeOrder = $this->objectManager->create(PlaceOrder::class, [
- 'caseCreationService' => $this->creationService,
- 'logger' => $this->logger
- ]);
- }
-
- /**
- * Checks a case when order placed with offline payment method.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testExecuteWithOfflinePayment()
- {
- $order = $this->getOrder('100000005');
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $event = $this->objectManager->create(
- Event::class,
- [
- 'data' => ['order' => $order]
- ]
- );
-
- /** @var Observer $observer */
- $observer = $this->objectManager->get(Observer::class);
- $observer->setEvent($event);
-
- $this->placeOrder->execute($observer);
- }
-
- /**
- * Checks a test case when order placed with online payment method.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testExecute()
- {
- $order = $this->getOrder('100000001');
-
- $this->creationService->expects(self::once())
- ->method('createForOrder')
- ->with(self::equalTo($order->getEntityId()));
-
- $event = $this->objectManager->create(
- Event::class,
- [
- 'data' => ['order' => $order],
- ]
- );
-
- /** @var Observer $observer */
- $observer = $this->objectManager->get(Observer::class);
- $observer->setEvent($event);
-
- $this->placeOrder->execute($observer);
- }
-
- /**
- * Signifyd is enabled for default store.
- * Checks a test case when order placed with website where signifyd is disabled.
- *
- * @return void
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- * @magentoDataFixture Magento/Signifyd/_files/website_configuration.php
- */
- public function testExecuteWithWebsiteConfiguration(): void
- {
- /** @var StoreRepositoryInterface $storeRepository */
- $storeRepository = $this->objectManager->get(StoreRepositoryInterface::class);
- $store = $storeRepository->get('test_second_store');
-
- /** @var StoreManagerInterface $storeManager */
- $storeManager = $this->objectManager->get(StoreManagerInterface::class);
- $storeManager->setCurrentStore($store->getId());
-
- $order = $this->getOrder('100000001');
- $order->setStoreId($store->getId());
-
- $this->creationService->expects(self::never())
- ->method('createForOrder');
-
- $event = $this->objectManager->create(
- Event::class,
- [
- 'data' => ['order' => $order],
- ]
- );
-
- /** @var Observer $observer */
- $observer = $this->objectManager->get(Observer::class);
- $observer->setEvent($event);
-
- $this->placeOrder->execute($observer);
- }
-
- /**
- * Checks a test case when observer event contains two orders:
- * one order with offline payment and one order with online payment.
- *
- * @covers \Magento\Signifyd\Observer\PlaceOrder::execute
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- * @magentoDataFixture Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
- */
- public function testExecuteWithMultipleOrders()
- {
- $orderWithOnlinePayment = $this->getOrder('100000001');
- $orderWithOfflinePayment = $this->getOrder('100000005');
-
- // this service mock should be called only once for the order with online payment method.
- $this->creationService->expects(self::once())
- ->method('createForOrder')
- ->with(self::equalTo($orderWithOnlinePayment->getEntityId()));
-
- $event = $this->objectManager->create(
- Event::class,
- [
- 'data' => ['orders' => [$orderWithOfflinePayment, $orderWithOnlinePayment]]
- ]
- );
-
- /** @var Observer $observer */
- $observer = $this->objectManager->get(Observer::class);
- $observer->setEvent($event);
-
- $this->placeOrder->execute($observer);
- }
-
- /**
- * Gets stored order.
- *
- * @param string $incrementId
- * @return OrderInterface
- */
- private function getOrder($incrementId)
- {
- /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
- $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $searchCriteria = $searchCriteriaBuilder->addFilter(OrderInterface::INCREMENT_ID, $incrementId)
- ->create();
-
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $orders = $orderRepository->getList($searchCriteria)
- ->getItems();
-
- $order = array_pop($orders);
-
- return $order;
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/CancelOrderTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/CancelOrderTest.php
deleted file mode 100644
index 7c1af95bdb89c..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/CancelOrderTest.php
+++ /dev/null
@@ -1,114 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->apiClient = $this->getMockBuilder(ApiClient::class)
- ->disableOriginalConstructor()
- ->setMethods(['makeApiCall'])
- ->getMock();
-
- $this->objectManager->addSharedInstance($this->apiClient, ApiClient::class);
- }
-
- /**
- * @inheritdoc
- */
- protected function tearDown()
- {
- $this->objectManager->removeSharedInstance(ApiClient::class);
- }
-
- /**
- * Checks a test case, when order has been cancelled
- * and calls plugin to cancel Signifyd case guarantee.
- *
- * @covers \Magento\Signifyd\Plugin\OrderPlugin::afterCancel
- * @magentoDataFixture Magento/Signifyd/_files/approved_case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testAfterCancel()
- {
- $order = $this->getOrder();
-
- $this->apiClient->expects(self::once())
- ->method('makeApiCall')
- ->with(
- self::equalTo('/cases/' . self::$caseId . '/guarantee'),
- 'PUT',
- [
- 'guaranteeDisposition' => CaseInterface::GUARANTEE_CANCELED
- ]
- )
- ->willReturn([
- 'disposition' => CaseInterface::GUARANTEE_CANCELED
- ]);
-
- /** @var OrderManagementInterface $orderService */
- $orderService = $this->objectManager->get(OrderManagementInterface::class);
- $orderService->cancel($order->getEntityId());
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $case = $caseRepository->getByCaseId(self::$caseId);
-
- self::assertEquals(CaseInterface::GUARANTEE_CANCELED, $case->getGuaranteeDisposition());
- }
-
- /**
- * Get stored order.
- *
- * @return OrderInterface
- */
- private function getOrder()
- {
- /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
- $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $searchCriteria = $searchCriteriaBuilder->addFilter(OrderInterface::INCREMENT_ID, '100000001')
- ->create();
-
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $orders = $orderRepository->getList($searchCriteria)
- ->getItems();
-
- /** @var OrderInterface $order */
- return array_pop($orders);
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/DenyPaymentTest.php b/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/DenyPaymentTest.php
deleted file mode 100644
index 72da71a630dff..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/Plugin/DenyPaymentTest.php
+++ /dev/null
@@ -1,209 +0,0 @@
-objectManager = Bootstrap::getObjectManager();
-
- $this->apiClient = $this->getMockBuilder(ApiClient::class)
- ->disableOriginalConstructor()
- ->setMethods(['makeApiCall'])
- ->getMock();
-
- $this->registry = $this->objectManager->get(Registry::class);
-
- $this->objectManager->addSharedInstance($this->apiClient, ApiClient::class);
- }
-
- /**
- * @inheritdoc
- */
- protected function tearDown()
- {
- $this->objectManager->removeSharedInstance(ApiClient::class);
- }
-
- /**
- * Checks a test case, when payment has been denied
- * and calls plugin to cancel Signifyd case guarantee.
- *
- * @covers \Magento\Signifyd\Plugin\PaymentPlugin::afterDenyPayment
- * @magentoDataFixture Magento/Signifyd/_files/approved_case.php
- * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
- */
- public function testAfterDenyPayment()
- {
- $order = $this->getOrder();
- $this->registry->register('current_order', $order);
-
- $this->apiClient->expects(self::once())
- ->method('makeApiCall')
- ->with(
- self::equalTo('/cases/' . self::$caseId . '/guarantee'),
- 'PUT',
- [
- 'guaranteeDisposition' => CaseInterface::GUARANTEE_CANCELED
- ]
- )
- ->willReturn([
- 'disposition' => CaseInterface::GUARANTEE_CANCELED
- ]);
-
- /** @var \Magento\Sales\Model\Order\Payment $payment */
- $payment = $order->getPayment();
- $payment->setData('method_instance', $this->getMethodInstance());
- $payment->deny();
-
- /** @var CaseRepositoryInterface $caseRepository */
- $caseRepository = $this->objectManager->get(CaseRepositoryInterface::class);
- $case = $caseRepository->getByCaseId(self::$caseId);
-
- self::assertEquals(CaseInterface::GUARANTEE_CANCELED, $case->getGuaranteeDisposition());
- }
-
- /**
- * Get stored order.
- *
- * @return OrderInterface
- */
- private function getOrder()
- {
- /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
- $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
- $searchCriteria = $searchCriteriaBuilder->addFilter(OrderInterface::INCREMENT_ID, '100000001')
- ->create();
-
- $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
- $orders = $orderRepository->getList($searchCriteria)
- ->getItems();
-
- /** @var OrderInterface $order */
- return array_pop($orders);
- }
-
- /**
- * Gets payment method instance.
- *
- * @return Express
- */
- private function getMethodInstance()
- {
- /** @var PaymentInfo $infoInstance */
- $infoInstance = $this->objectManager->get(PaymentInfo::class);
- $infoInstance->setAdditionalInformation(
- Info::PAYMENT_STATUS_GLOBAL,
- Info::PAYMENTSTATUS_PENDING
- );
- $infoInstance->setAdditionalInformation(
- Info::PENDING_REASON_GLOBAL,
- Info::PAYMENTSTATUS_PENDING
- );
-
- /** @var Express $methodInstance */
- $methodInstance = $this->objectManager->create(
- Express::class,
- ['proFactory' => $this->getProFactory()]
- );
- $methodInstance->setData('info_instance', $infoInstance);
-
- return $methodInstance;
- }
-
- /**
- * Gets Pro factory mock.
- *
- * @return ProFactory|MockObject
- */
- protected function getProFactory()
- {
- $pro = $this->getMockBuilder(Pro::class)
- ->disableOriginalConstructor()
- ->setMethods(['getApi', 'setMethod', 'getConfig', '__wakeup', 'reviewPayment'])
- ->getMock();
- $nvpClient = $this->getMockBuilder(Nvp::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $pro->method('getConfig')
- ->willReturn($this->getConfig());
- $pro->method('getApi')
- ->willReturn($nvpClient);
- $pro->method('reviewPayment')
- ->willReturn(true);
-
- $proFactory = $this->getMockBuilder(ProFactory::class)
- ->disableOriginalConstructor()
- ->getMock();
- $proFactory->method('create')
- ->willReturn($pro);
-
- return $proFactory;
- }
-
- /**
- * Gets config mock.
- *
- * @return Config|MockObject
- */
- protected function getConfig()
- {
- $config = $this->getMockBuilder(Config::class)
- ->disableOriginalConstructor()
- ->getMock();
- $config->method('getValue')
- ->with('payment_action')
- ->willReturn(Config::PAYMENT_ACTION_AUTH);
-
- return $config;
- }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/approved_case.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/approved_case.php
deleted file mode 100644
index eaa3622c04e0e..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/approved_case.php
+++ /dev/null
@@ -1,38 +0,0 @@
-get(CaseInterfaceFactory::class);
-
-$associatedTeam = [
- 'teamName' => 'Some Team',
- 'teamId' => 123,
- 'getAutoDismiss' => true,
- 'getTeamDismissalDays' => 3
-];
-
-/** @var CaseInterface $case */
-$case = $caseFactory->create();
-$case->setCaseId(123)
- ->setGuaranteeEligible(false)
- ->setGuaranteeDisposition(CaseInterface::GUARANTEE_APPROVED)
- ->setStatus(CaseInterface::STATUS_PROCESSING)
- ->setScore(553)
- ->setOrderId($order->getEntityId())
- ->setAssociatedTeam($associatedTeam)
- ->setReviewDisposition(CaseInterface::DISPOSITION_GOOD)
- ->setCreatedAt('2016-12-12T15:17:17+0000')
- ->setUpdatedAt('2016-12-12T19:23:16+0000');
-
-/** @var CaseRepositoryInterface $caseRepository */
-$caseRepository = $objectManager->get(CaseRepositoryInterface::class);
-$caseRepository->save($case);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/case.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/case.php
deleted file mode 100644
index 4102233f6fb1f..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/case.php
+++ /dev/null
@@ -1,42 +0,0 @@
-create(OrderManagementInterface::class);
-$orderManagement->hold($order->getEntityId());
-
-/** @var CaseInterfaceFactory $caseFactory */
-$caseFactory = $objectManager->get(CaseInterfaceFactory::class);
-
-$associatedTeam = [
- 'teamName' => 'Some Team',
- 'teamId' => 123,
- 'getAutoDismiss' => true,
- 'getTeamDismissalDays' => 3
-];
-
-/** @var CaseInterface $case */
-$case = $caseFactory->create();
-$case->setCaseId(123)
- ->setGuaranteeEligible(true)
- ->setStatus(CaseInterface::STATUS_PROCESSING)
- ->setScore(553)
- ->setOrderId($order->getEntityId())
- ->setAssociatedTeam($associatedTeam)
- ->setReviewDisposition(CaseInterface::DISPOSITION_GOOD)
- ->setGuaranteeDisposition(CaseInterface::GUARANTEE_PENDING)
- ->setCreatedAt('2016-12-12T15:17:17+0000')
- ->setUpdatedAt('2016-12-12T19:23:16+0000');
-
-/** @var CaseRepositoryInterface $caseRepository */
-$caseRepository = $objectManager->get(CaseRepositoryInterface::class);
-$caseRepository->save($case);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/customer.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/customer.php
deleted file mode 100644
index 7c5f34cd203fa..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/customer.php
+++ /dev/null
@@ -1,38 +0,0 @@
-get(CustomerRegistry::class);
-$customer = $objectManager->create(Customer::class);
-
-/** @var CustomerInterface $customer */
-$customer->setWebsiteId(1)
- ->setId(1)
- ->setEmail('customer@example.com')
- ->setGroupId(1)
- ->setStoreId(1)
- ->setPrefix('Mr.')
- ->setFirstname('John')
- ->setMiddlename('A')
- ->setLastname('Smith')
- ->setSuffix('Esq.')
- ->setDefaultBilling(1)
- ->setDefaultShipping(1)
- ->setTaxvat('12')
- ->setGender(0)
- ->setCreatedAt('2016-12-12T11:00:00+0000')
- ->setUpdatedAt('2016-12-12T11:05:00+0000');
-
-$customer->isObjectNew(true);
-$customer->save();
-
-$customerRegistry->remove($customer->getId());
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/declined_case.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/declined_case.php
deleted file mode 100644
index 041cdb0291d83..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/declined_case.php
+++ /dev/null
@@ -1,38 +0,0 @@
-get(CaseInterfaceFactory::class);
-
-$associatedTeam = [
- 'teamName' => 'Some Team',
- 'teamId' => 123,
- 'getAutoDismiss' => true,
- 'getTeamDismissalDays' => 3
-];
-
-/** @var CaseInterface $case */
-$case = $caseFactory->create();
-$case->setCaseId(123)
- ->setGuaranteeEligible(false)
- ->setGuaranteeDisposition(CaseInterface::GUARANTEE_DECLINED)
- ->setStatus(CaseInterface::STATUS_PROCESSING)
- ->setScore(553)
- ->setOrderId($order->getEntityId())
- ->setAssociatedTeam($associatedTeam)
- ->setReviewDisposition(CaseInterface::DISPOSITION_FRAUDULENT)
- ->setCreatedAt('2016-12-12T15:17:17+0000')
- ->setUpdatedAt('2016-12-12T19:23:16+0000');
-
-/** @var CaseRepositoryInterface $caseRepository */
-$caseRepository = $objectManager->get(CaseRepositoryInterface::class);
-$caseRepository->save($case);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/multiple_cases.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/multiple_cases.php
deleted file mode 100644
index 4930906954148..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/multiple_cases.php
+++ /dev/null
@@ -1,27 +0,0 @@
-setEntityId(null)
- ->setIncrementId($order->getIncrementId() + $i);
-
- $orderRepository->save($newOrder);
-
- $newCase = clone $case;
- $newCase->setEntityId(null)
- ->setCaseId($i)
- ->setOrderId($newOrder->getEntityId())
- ->setStatus(CaseInterface::STATUS_OPEN)
- ->setCreatedAt('2016-12-0' . $i . 'T15:' . $i . ':17+0000')
- ->setUpdatedAt('2016-12-12T0' . $i . ':23:16+0000')
- ->setId(null);
-
- $caseRepository->save($newCase);
-}
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
deleted file mode 100644
index 49a0a2d33e236..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_customer_and_two_simple_products.php
+++ /dev/null
@@ -1,119 +0,0 @@
-create(Address::class, ['data' => $addressData]);
-$billingAddress->setAddressType('billing');
-
-$shippingAddress = clone $billingAddress;
-$shippingAddress->setId(null)
- ->setAddressType('shipping')
- ->setStreet(['6161 West Centinela Avenue', 'app. 33'])
- ->setFirstname('John')
- ->setLastname('Doe')
- ->setShippingMethod('flatrate_flatrate');
-
-$payment = $objectManager->create(Payment::class);
-$payment->setMethod('paypal_express')
- ->setLastTransId('00001')
- ->setCcLast4('1234')
- ->setCcExpMonth('01')
- ->setCcExpYear('21');
-
-/** @var Item $orderItem */
-$orderItem1 = $objectManager->create(Item::class);
-$orderItem1->setProductId($product->getId())
- ->setSku($product->getSku())
- ->setName($product->getName())
- ->setQtyOrdered(1)
- ->setBasePrice($product->getPrice())
- ->setPrice($product->getPrice())
- ->setRowTotal($product->getPrice())
- ->setProductType($product->getTypeId());
-
-/** @var Item $orderItem */
-$orderItem2 = $objectManager->create(Item::class);
-$orderItem2->setProductId($product->getId())
- ->setSku('simple2')
- ->setName('Simple product')
- ->setPrice(100)
- ->setQtyOrdered(2)
- ->setBasePrice($product->getPrice())
- ->setPrice($product->getPrice())
- ->setRowTotal($product->getPrice())
- ->setProductType($product->getTypeId());
-
-$orderAmount = 100;
-$customerEmail = $billingAddress->getEmail();
-
-/** @var Order $order */
-$order = $objectManager->create(Order::class);
-$order->setIncrementId('100000001')
- ->setState(Order::STATE_PROCESSING)
- ->setStatus(Order::STATE_PROCESSING)
- ->setCustomerId($customer->getId())
- ->setCustomerIsGuest(false)
- ->setRemoteIp('127.0.0.1')
- ->setCreatedAt(date('Y-m-d 00:00:55'))
- ->setOrderCurrencyCode('USD')
- ->setBaseCurrencyCode('USD')
- ->setSubtotal($orderAmount)
- ->setGrandTotal($orderAmount)
- ->setBaseSubtotal($orderAmount)
- ->setBaseGrandTotal($orderAmount)
- ->setCustomerEmail($customerEmail)
- ->setBillingAddress($billingAddress)
- ->setShippingAddress($shippingAddress)
- ->setShippingDescription('Flat Rate - Fixed')
- ->setShippingAmount(10)
- ->setStoreId($store->getId())
- ->addItem($orderItem1)
- ->addItem($orderItem2)
- ->setPayment($payment)
- ->setQuoteId(1);
-
-/** @var OrderRepositoryInterface $orderRepository */
-$orderRepository = $objectManager->get(OrderRepositoryInterface::class);
-$orderRepository->save($order);
-
-$orderAmount2 = 50;
-$payment2 = $objectManager->create(Payment::class);
-$payment2->setMethod('checkmo');
-/** @var Order $order2 */
-$order2 = $objectManager->create(Order::class);
-$order2->setIncrementId('100000005')
- ->setCustomerId($customer->getId())
- ->setCustomerIsGuest(false)
- ->setRemoteIp('127.0.0.1')
- ->setCreatedAt('2016-12-12T12:00:55+0000')
- ->setOrderCurrencyCode('USD')
- ->setBaseCurrencyCode('USD')
- ->setGrandTotal($orderAmount2)
- ->setBaseGrandTotal($orderAmount2)
- ->setCustomerEmail($customerEmail)
- ->setBillingAddress($billingAddress)
- ->setShippingAddress($shippingAddress)
- ->setShippingDescription('Flat Rate - Fixed')
- ->setShippingAmount(10)
- ->setStoreId($store->getId())
- ->addItem($orderItem1)
- ->setPayment($payment2)
- ->setQuoteId(2);
-
-$orderRepository->save($order2);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_guest_and_virtual_product.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_guest_and_virtual_product.php
deleted file mode 100644
index ba0e92687dc17..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/order_with_guest_and_virtual_product.php
+++ /dev/null
@@ -1,68 +0,0 @@
-create(Address::class, ['data' => $addressData]);
-$billingAddress->setAddressType('billing');
-
-/** @var OrderPaymentInterface $payment */
-$payment = $objectManager->create(Payment::class);
-$payment->setMethod('braintree')
- ->setLastTransId('00001')
- ->setAdditionalInformation('avsPostalCodeResponseCode', 'M')
- ->setAdditionalInformation('avsStreetAddressResponseCode', 'M')
- ->setAdditionalInformation('cvvResponseCode', 'M');
-
-/** @var Item $orderItem */
-$orderItem1 = $objectManager->create(Item::class);
-$orderItem1->setProductId($product->getId())
- ->setSku($product->getSku())
- ->setName($product->getName())
- ->setQtyOrdered(1)
- ->setBasePrice($product->getPrice())
- ->setPrice($product->getPrice())
- ->setRowTotal($product->getPrice())
- ->setProductType($product->getTypeId());
-
-$orderAmount = 100;
-$customerEmail = $billingAddress->getEmail();
-
-/** @var Order $order */
-$order = $objectManager->create(Order::class);
-$order->setIncrementId('100000002')
- ->setState(Order::STATE_PROCESSING)
- ->setStatus(Order::STATE_PROCESSING)
- ->setCustomerIsGuest(true)
- ->setRemoteIp('127.0.0.1')
- ->setCreatedAt('2016-12-12T12:00:55+0000')
- ->setOrderCurrencyCode('USD')
- ->setBaseCurrencyCode('USD')
- ->setSubtotal($orderAmount)
- ->setGrandTotal($orderAmount)
- ->setBaseSubtotal($orderAmount)
- ->setBaseGrandTotal($orderAmount)
- ->setCustomerEmail($customerEmail)
- ->setBillingAddress($billingAddress)
- ->setStoreId($store->getId())
- ->addItem($orderItem1)
- ->setPayment($payment)
- ->setQuoteId(1);
-
-/** @var OrderRepositoryInterface $orderRepository */
-$orderRepository = $objectManager->get(OrderRepositoryInterface::class);
-$orderRepository->save($order);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/store.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/store.php
deleted file mode 100644
index b814263bdc5ef..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/store.php
+++ /dev/null
@@ -1,33 +0,0 @@
-get(StoreManagerInterface::class)->getStore();
-/** @var MutableScopeConfigInterface $mutableConfig */
-$mutableConfig = $objectManager->get(MutableScopeConfigInterface::class);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_NAME, 'Sample Store', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Store::XML_PATH_UNSECURE_BASE_LINK_URL, 'http://m2.com/', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_ADDRESS1, '6161 West Centinela Avenue', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_ADDRESS2, 'app. 111', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_CITY, 'Culver City', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_REGION_ID, 10, ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_ZIP, '90230', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Shipment::XML_PATH_STORE_COUNTRY_ID, 'US', ScopeInterface::SCOPE_STORE);
-
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_STREET_LINE1, '5th Avenue', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_STREET_LINE2, '75', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_CITY, 'New York', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_REGION_CODE, 30, ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_POSTCODE, '19032', ScopeInterface::SCOPE_STORE);
-$mutableConfig->setValue(Information::XML_PATH_STORE_INFO_COUNTRY_CODE, 'US', ScopeInterface::SCOPE_STORE);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/webhook_body.json b/dev/tests/integration/testsuite/Magento/Signifyd/_files/webhook_body.json
deleted file mode 100644
index 4308c8bf833ef..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/webhook_body.json
+++ /dev/null
@@ -1 +0,0 @@
-{"investigationId":123,"analysisUrl":"https://signifyd.com/v2/cases/185088720/analysis","entriesUrl":"https://signifyd.com/v2/cases/185088720/entries","notesUrl":"https://signifyd.com/v2/cases/185088720/notes","orderUrl":"https://signifyd.com/v2/cases/185088720/order","currency":"USD","uuid":"368df42c-d25f-44ef-a1d9-92755f743901","createdAt":"2017-01-06T12:47:03+0000","updatedAt":"2017-01-06T12:47:03+0000","status":"OPEN","caseId":123,"score":384,"headline":"John Doe","orderId":"000000003","adjustedScore":385,"orderDate":"2017-01-06T12:46:58+0000","orderAmount":5.85,"orderOutcome":"SUCCESSFUL","associatedTeam":{"teamName":"Magento","teamId":7940},"testInvestigation":true,"reviewDisposition":null}
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration.php
deleted file mode 100644
index e53b0431503e7..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration.php
+++ /dev/null
@@ -1,67 +0,0 @@
-create(Website::class);
-$website->setData(['code' => 'test_website', 'name' => 'Test Website', 'default_group_id' => '1', 'is_default' => '0']);
-$websiteResourceModel = $objectManager->create(WebsiteResourceModel::class);
-$websiteResourceModel->save($website);
-
-$websiteId = $website->getId();
-$store = $objectManager->create(Store::class);
-$groupId = Bootstrap::getObjectManager()->get(StoreManagerInterface::class)
- ->getWebsite()
- ->getDefaultGroupId();
-$store->setCode('test_second_store')
- ->setWebsiteId($websiteId)
- ->setGroupId($groupId)
- ->setName('Test Second Store')
- ->setSortOrder(10)
- ->setIsActive(1);
-$storeResourceModel = $objectManager->create(StoreResourceModel::class);
-$storeResourceModel->save($store);
-
-/* Refresh stores memory cache */
-$objectManager->get(StoreManagerInterface::class)->reinitStores();
-
-$processConfigData = function (Config $config, array $data) {
- foreach ($data as $key => $value) {
- $config->setDataByPath($key, $value);
- $config->save();
- }
-};
-
-// save signifyd configuration for the default scope
-$configData = [
- 'fraud_protection/signifyd/active' => '1',
-];
-/** @var Config $defConfig */
-$defConfig = $objectManager->create(Config::class);
-$defConfig->setScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT);
-$processConfigData($defConfig, $configData);
-
-// save signifyd website config data
-$websiteConfigData = [
- 'fraud_protection/signifyd/active' => '0',
-];
-/** @var Config $websiteConfig */
-$websiteConfig = $objectManager->create(Config::class);
-$websiteConfig->setScope(ScopeInterface::SCOPE_WEBSITES);
-$websiteConfig->setWebsite($websiteId);
-$processConfigData($websiteConfig, $websiteConfigData);
diff --git a/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration_rollback.php b/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration_rollback.php
deleted file mode 100644
index 9b731813fea3b..0000000000000
--- a/dev/tests/integration/testsuite/Magento/Signifyd/_files/website_configuration_rollback.php
+++ /dev/null
@@ -1,44 +0,0 @@
-delete($path, $scope, $scopeId);
- }
-};
-
-/** @var WriterInterface $configWriter */
-$configWriter = $objectManager->get(WriterInterface::class);
-$deleteConfigData($configWriter, ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null);
-
-/** @var WebsiteRepositoryInterface $websiteRepository */
-$websiteRepository = $objectManager->get(WebsiteRepositoryInterface::class);
-$website = $websiteRepository->get('test_website');
-$deleteConfigData($configWriter, ScopeInterface::SCOPE_WEBSITES, $website->getId());
-
-$website = $objectManager->create(Website::class);
-/** @var $website Website */
-if ($website->load('test_website', 'code')->getId()) {
- $website->delete();
-}
-$store = $objectManager->create(Store::class);
-if ($store->load('test_second_store', 'code')->getId()) {
- $store->delete();
-}
diff --git a/dev/tests/integration/testsuite/Magento/Store/App/Config/Source/InitialConfigSourceTest.php b/dev/tests/integration/testsuite/Magento/Store/App/Config/Source/InitialConfigSourceTest.php
new file mode 100644
index 0000000000000..282b2d1cc24bb
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Store/App/Config/Source/InitialConfigSourceTest.php
@@ -0,0 +1,175 @@
+reader = $objectManager->get(FileReader::class);
+ $this->writer = $objectManager->get(Writer::class);
+ $this->filesystem = $objectManager->get(Filesystem::class);
+ $this->configFilePool = $objectManager->get(ConfigFilePool::class);
+ $this->storeManager = $objectManager->get(StoreManagerInterface::class);
+ $this->config = $this->loadConfig();
+ $this->envConfig = $this->loadEnvConfig();
+ $this->loadDumpConfig();
+ $this->storeManager->reinitStores();
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function tearDown()
+ {
+ $this->clearConfig(ConfigFilePool::APP_CONFIG);
+ $this->clearConfig(ConfigFilePool::APP_ENV);
+ $this->writer->saveConfig([ConfigFilePool::APP_CONFIG => $this->config]);
+ $this->writer->saveConfig([ConfigFilePool::APP_ENV => $this->envConfig]);
+ $this->storeManager->reinitStores();
+ }
+
+ /**
+ * Test that initial scopes config are loaded if database is available
+ *
+ * @param array $websites
+ * @param string $defaultWebsite
+ * @param bool $offline
+ * @throws \Magento\Framework\Exception\LocalizedException
+ * @dataProvider getDefaultDataProvider
+ */
+ public function testGetWebsites(array $websites, string $defaultWebsite, bool $offline = false): void
+ {
+ if ($offline) {
+ // remove application environment config for emulate work without db
+ $this->clearConfig(ConfigFilePool::APP_ENV);
+ }
+ $this->assertEquals($defaultWebsite, $this->storeManager->getWebsite()->getCode());
+ $this->assertEquals($websites, array_keys($this->storeManager->getWebsites(true, true)), '', 0.0, 10, true);
+ }
+
+ /**
+ * @return array
+ */
+ public function getDefaultDataProvider(): array
+ {
+ return [
+ [
+ [
+ 'admin',
+ 'base',
+ ],
+ 'base',
+ false
+ ],
+ [
+ [
+ 'admin',
+ 'main',
+ ],
+ 'main',
+ true
+ ]
+ ];
+ }
+
+ private function clearConfig(string $type): void
+ {
+ $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG)->writeFile(
+ $this->configFilePool->getPath($type),
+ "config,
+ $this->getDumpConfig()
+ );
+ $this->writer->saveConfig([ConfigFilePool::APP_CONFIG => $data], true);
+ }
+
+ /**
+ * @return array
+ */
+ private function getDumpConfig(): array
+ {
+ return require __DIR__ . '/../../../_files/dump_config.php';
+ }
+
+ /**
+ * @return array
+ */
+ private function loadConfig(): array
+ {
+ return $this->reader->load(ConfigFilePool::APP_CONFIG);
+ }
+
+ /**
+ * @return array
+ */
+ private function loadEnvConfig(): array
+ {
+ return $this->reader->load(ConfigFilePool::APP_ENV);
+ }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/dump_config.php b/dev/tests/integration/testsuite/Magento/Store/_files/dump_config.php
new file mode 100644
index 0000000000000..7e4337ee65200
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Store/_files/dump_config.php
@@ -0,0 +1,65 @@
+ [
+ 'websites' => [
+ 'admin' => [
+ 'website_id' => '0',
+ 'code' => 'admin',
+ 'name' => 'Admin',
+ 'sort_order' => '0',
+ 'default_group_id' => '0',
+ 'is_default' => '0',
+ ],
+ 'main' => [ // base website code was changed to main
+ 'website_id' => '1',
+ 'code' => 'main',
+ 'name' => 'Main Website',
+ 'sort_order' => '0',
+ 'default_group_id' => '1',
+ 'is_default' => '1',
+ ],
+ ],
+ 'groups' => [
+ 0 => [
+ 'group_id' => '0',
+ 'website_id' => '0',
+ 'code' => 'default',
+ 'name' => 'Default',
+ 'root_category_id' => '0',
+ 'default_store_id' => '0',
+ ],
+ 1 => [
+ 'group_id' => '1',
+ 'website_id' => '1',
+ 'code' => 'main_website_store',
+ 'name' => 'Main Website Store',
+ 'root_category_id' => '2',
+ 'default_store_id' => '1',
+ ],
+ ],
+ 'stores' => [
+ 'admin' => [
+ 'store_id' => '0',
+ 'code' => 'admin',
+ 'website_id' => '0',
+ 'group_id' => '0',
+ 'name' => 'Admin',
+ 'sort_order' => '0',
+ 'is_active' => '1',
+ ],
+ 'default' => [
+ 'store_id' => '1',
+ 'code' => 'default',
+ 'website_id' => '1',
+ 'group_id' => '1',
+ 'name' => 'Default Store View',
+ 'sort_order' => '0',
+ 'is_active' => '1',
+ ],
+ ],
+ ]
+];
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
index 229207aa03899..7a8f04d0160ff 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
@@ -20,5 +20,6 @@
// Fails because of dependence on registry
\Magento\Reminder\Block\Adminhtml\Reminder\Edit\Tab\Customers::class,
\Magento\LayeredNavigation\Block\Navigation::class,
- \Magento\LayeredNavigation\Block\Navigation\State::class
+ \Magento\LayeredNavigation\Block\Navigation\State::class,
+ \Magento\Paypal\Block\Express\InContext\Minicart\Button::class,
];
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_template_blocks_ce.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_template_blocks_ce.php
index 91d74b0908078..1edb23738820f 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_template_blocks_ce.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_template_blocks_ce.php
@@ -12,4 +12,5 @@
\Magento\Reminder\Block\Adminhtml\Reminder\Edit\Tab\Customers::class,
\Magento\LayeredNavigation\Block\Navigation::class,
\Magento\LayeredNavigation\Block\Navigation\State::class,
+ \Magento\Paypal\Block\Express\InContext\Minicart\Button::class,
];
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/sidebar.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/sidebar.test.js
index 7c21a8aae2f26..e9b606eebac3d 100644
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/sidebar.test.js
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/sidebar.test.js
@@ -67,7 +67,9 @@ define([
sidebar._removeItemAfter(elem);
expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
expect(jQuery('body').trigger).toHaveBeenCalledWith('ajax:removeFromCart', {
- 'productIds': ['5']
+ 'productIds': ['5'], 'productInfo': [{
+ 'id': '5'
+ }]
});
});
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Signifyd/frontend/js/Fingerprint.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Signifyd/frontend/js/Fingerprint.test.js
deleted file mode 100644
index a9d9fe8d08047..0000000000000
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Signifyd/frontend/js/Fingerprint.test.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-define([
- 'jquery'
-], function ($) {
- 'use strict';
-
- /*eslint max-nested-callbacks: ["error", 5]*/
- describe('Signifyd device fingerprint client script', function () {
- var originalTimeout;
-
- beforeEach(function () {
- originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
- jasmine.DEFAULT_TIMEOUT_INTERVAL = 12000;
- });
-
- afterEach(function () {
- jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
- });
-
- it('SIGNIFYD_GLOBAL object initialization check', function (done) {
- var script = document.createElement('script');
-
- script.setAttribute('src', 'https://cdn-scripts.signifyd.com/api/script-tag.js');
- script.setAttribute('id', 'sig-api');
- script.setAttribute('type', 'text/javascript');
- script.setAttribute('async', '');
- script.setAttribute('data-order-session-id', 'mage-jasmin-test');
-
- $(document.body).append(script);
-
- setTimeout(function () {
- var signifyd = window.SIGNIFYD_GLOBAL;
-
- expect(signifyd).toBeDefined();
- expect(typeof signifyd).toBe('object');
- expect(signifyd.scriptTagHasLoaded).toBeDefined();
- expect(typeof signifyd.scriptTagHasLoaded).toBe('function');
- expect(signifyd.scriptTagHasLoaded()).toBe(true);
- done();
- }, 10000);
- });
- });
-});
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/sortBy.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/sortBy.test.js
new file mode 100644
index 0000000000000..064329ac3bce1
--- /dev/null
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/sortBy.test.js
@@ -0,0 +1,83 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/*eslint max-nested-callbacks: 0*/
+define([
+ 'Magento_Ui/js/grid/sortBy'
+], function (SortBy) {
+ 'use strict';
+
+ describe('Magento_Ui/js/grid/sortBy', function () {
+
+ var sortByObj;
+
+ beforeEach(function () {
+ sortByObj = new SortBy({
+ options: []
+ });
+ });
+
+ describe('"preparedOptions" method', function () {
+ it('sort option will not available if sorting is disabled for the columns', function () {
+ var columns = {
+ sortable: false,
+ label: 'magento',
+ index: 'name'
+ };
+
+ sortByObj.preparedOptions([columns]);
+ expect(sortByObj.options[0]).toBeUndefined();
+ expect(sortByObj.options[0]).toBeUndefined();
+ });
+
+ it('sort option will available if sorting is enabled for the columns', function () {
+ var columns = {
+ sortable: true,
+ label: 'magento',
+ index: 'name'
+ };
+
+ sortByObj.preparedOptions([columns]);
+ expect(sortByObj.options[0].value).toEqual('name');
+ expect(sortByObj.options[0].label).toEqual('magento');
+ });
+
+ it('return "isVisible" method true if sorting is enabled for column', function () {
+ var columns = {
+ sortable: true,
+ label: 'magento',
+ index: 'name'
+ };
+
+ sortByObj.preparedOptions([columns]);
+ expect(sortByObj.isVisible()).toBeTruthy();
+ });
+
+ it('return "isVisible" method false if sorting is disabled for column', function () {
+ var columns = {
+ sortable: false,
+ label: 'magento',
+ index: 'name'
+ };
+
+ sortByObj.preparedOptions([columns]);
+ expect(sortByObj.isVisible()).toBeFalsy();
+ });
+ });
+ describe('"applyChanges" method', function () {
+ it('return applied options for sorting column', function () {
+ var applied = {
+ field: 'selectedOption',
+ direction: 'asc'
+ };
+
+ spyOn(sortByObj, 'selectedOption').and.returnValue('selectedOption');
+ sortByObj.applyChanges();
+ expect(sortByObj.applied()).toEqual(applied);
+ expect(sortByObj.selectedOption).toHaveBeenCalled();
+ });
+ });
+ });
+});
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/modal/prompt.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/modal/prompt.test.js
index f2c74729e0ee8..7a0d3ac3fef91 100644
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/modal/prompt.test.js
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/modal/prompt.test.js
@@ -10,8 +10,20 @@ define([
'use strict';
describe('ui/js/modal/prompt', function () {
- var element = $('some element
'),
+
+ var element,
+ prompt,
+ widget;
+
+ beforeEach(function () {
+ element = $('some element
'),
prompt = element.prompt({});
+ widget = element.prompt({}).data('mage-prompt');
+ });
+
+ afterEach(function () {
+ $('#element').remove();
+ });
it('Check for modal definition', function () {
expect(prompt).toBeDefined();
@@ -23,5 +35,12 @@ define([
it('Integration: modal created on page', function () {
expect(prompt.length).toEqual(1);
});
+ it('Check cancel action', function () {
+ var cancel = spyOn(widget.options.actions, 'cancel');
+
+ jQuery('.modals-overlay').click();
+ expect(widget.options.outerClickHandler).toBeDefined();
+ expect(cancel).toHaveBeenCalled();
+ });
});
});
diff --git a/dev/tests/js/jasmine/tests/lib/mage/translate.test.js b/dev/tests/js/jasmine/tests/lib/mage/translate.test.js
index dc6c6ce7eb966..a29dbab63232b 100644
--- a/dev/tests/js/jasmine/tests/lib/mage/translate.test.js
+++ b/dev/tests/js/jasmine/tests/lib/mage/translate.test.js
@@ -33,7 +33,8 @@ define([
translation = {
'Hello World!': 'Hallo Welt!',
- 'Some text with symbols!-+"%#*': 'Ein Text mit Symbolen!-+"%#*'
+ 'Some text with symbols!-+"%#*': 'Ein Text mit Symbolen!-+"%#*',
+ 'Text with empty value': ''
};
$.mage.translate.add(translation);
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/exception_hierarchy.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/exception_hierarchy.txt
index 8eb3392476400..195c88274ae4a 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/exception_hierarchy.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/exception_hierarchy.txt
@@ -10,6 +10,4 @@
\Magento\Framework\DB\DataConverter\DataConversionException
\Magento\Framework\DB\FieldDataConversionException
\Magento\Catalog\Model\Product\Image\NotLoadInfoImageException
-\Magento\Signifyd\Model\SignifydGateway\GatewayException
-\Magento\Signifyd\Model\SignifydGateway\ApiCallException
\Magento\Framework\MessageQueue\ConnectionLostException
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
index f2411cdad86de..168ac5cde16cb 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
@@ -201,4 +201,5 @@
['Magento\MysqlMq\Model\Resource', 'Magento\MysqlMq\Model\ResourceModel'],
['Magento\BulkOperations', 'Magento\AsynchronousOperations'],
['Zend', 'Laminas'],
+ ['Magento\Signifyd'],
];
diff --git a/lib/internal/Magento/Framework/App/FrontController.php b/lib/internal/Magento/Framework/App/FrontController.php
index 2e6ce65970b97..d72c548be4fba 100644
--- a/lib/internal/Magento/Framework/App/FrontController.php
+++ b/lib/internal/Magento/Framework/App/FrontController.php
@@ -5,14 +5,15 @@
*/
namespace Magento\Framework\App;
+use Magento\Framework\App\Action\AbstractAction;
+use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Framework\App\Request\InvalidRequestException;
-use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\App\Request\ValidatorInterface as RequestValidator;
+use Magento\Framework\Controller\ResultInterface;
+use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\Message\ManagerInterface as MessageManager;
-use Magento\Framework\App\Action\AbstractAction;
use Psr\Log\LoggerInterface;
-use Magento\Framework\App\Request\Http as HttpRequest;
/**
* Front controller responsible for dispatching application requests
@@ -51,19 +52,33 @@ class FrontController implements FrontControllerInterface
*/
private $validatedRequest = false;
+ /**
+ * @var State
+ */
+ private $appState;
+
+ /**
+ * @var AreaList
+ */
+ private $areaList;
+
/**
* @param RouterListInterface $routerList
* @param ResponseInterface $response
* @param RequestValidator|null $requestValidator
* @param MessageManager|null $messageManager
* @param LoggerInterface|null $logger
+ * @param State $appState
+ * @param AreaList $areaList
*/
public function __construct(
RouterListInterface $routerList,
ResponseInterface $response,
?RequestValidator $requestValidator = null,
?MessageManager $messageManager = null,
- ?LoggerInterface $logger = null
+ ?LoggerInterface $logger = null,
+ ?State $appState = null,
+ ?AreaList $areaList = null
) {
$this->_routerList = $routerList;
$this->response = $response;
@@ -73,6 +88,10 @@ public function __construct(
?? ObjectManager::getInstance()->get(MessageManager::class);
$this->logger = $logger
?? ObjectManager::getInstance()->get(LoggerInterface::class);
+ $this->appState = $appState
+ ?? ObjectManager::getInstance()->get(State::class);
+ $this->areaList = $areaList
+ ?? ObjectManager::getInstance()->get(AreaList::class);
}
/**
@@ -81,6 +100,7 @@ public function __construct(
* @param RequestInterface|HttpRequest $request
* @return ResponseInterface|ResultInterface
* @throws \LogicException
+ * @throws LocalizedException
*/
public function dispatch(RequestInterface $request)
{
@@ -120,9 +140,10 @@ public function dispatch(RequestInterface $request)
*
* @param HttpRequest $request
* @param ActionInterface $actionInstance
- * @throws NotFoundException
- *
* @return ResponseInterface|ResultInterface
+ * @throws LocalizedException
+ *
+ * @throws NotFoundException
*/
private function processRequest(
HttpRequest $request,
@@ -147,6 +168,9 @@ private function processRequest(
["exception" => $exception]
);
$result = $exception->getReplaceResult();
+ $area = $this->areaList->getArea($this->appState->getAreaCode());
+ $area->load(Area::PART_DESIGN);
+ $area->load(Area::PART_TRANSLATE);
if ($messages = $exception->getMessages()) {
foreach ($messages as $message) {
$this->messages->addErrorMessage($message);
diff --git a/lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php
index e088bb92c8782..727e27080569c 100644
--- a/lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php
+++ b/lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php
@@ -6,8 +6,12 @@
namespace Magento\Framework\App\Test\Unit;
+use Magento\Framework\App\Area;
+use Magento\Framework\App\AreaInterface;
+use Magento\Framework\App\AreaList;
use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\Request\ValidatorInterface;
+use Magento\Framework\App\State;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\Message\ManagerInterface as MessageManager;
use Psr\Log\LoggerInterface;
@@ -57,6 +61,21 @@ class FrontControllerTest extends \PHPUnit\Framework\TestCase
*/
private $logger;
+ /**
+ * @var \PHPUnit\Framework\MockObject\MockObject|AreaList
+ */
+ private $areaListMock;
+
+ /**
+ * @var \PHPUnit\Framework\MockObject\MockObject|State
+ */
+ private $appStateMock;
+
+ /**
+ * @var \PHPUnit\Framework\MockObject\MockObject|AreaInterface
+ */
+ private $areaMock;
+
protected function setUp()
{
$this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class)
@@ -70,12 +89,19 @@ protected function setUp()
$this->requestValidator = $this->createMock(ValidatorInterface::class);
$this->messages = $this->createMock(MessageManager::class);
$this->logger = $this->createMock(LoggerInterface::class);
+ $this->appStateMock = $this->getMockBuilder(State::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->areaListMock = $this->createMock(AreaList::class);
+ $this->areaMock = $this->createMock(AreaInterface::class);
$this->model = new \Magento\Framework\App\FrontController(
$this->routerList,
$this->response,
$this->requestValidator,
$this->messages,
- $this->logger
+ $this->logger,
+ $this->appStateMock,
+ $this->areaListMock
);
}
@@ -114,6 +140,10 @@ public function testAddingValidationFailureMessageToDebugLog()
$exceptionMessage = 'exception_message';
$exception = new InvalidRequestException($exceptionMessage);
+ $this->appStateMock->expects($this->any())->method('getAreaCode')->willReturn('frontend');
+ $this->areaMock->expects($this->at(0))->method('load')->with(Area::PART_DESIGN)->willReturnSelf();
+ $this->areaMock->expects($this->at(1))->method('load')->with(Area::PART_TRANSLATE)->willReturnSelf();
+ $this->areaListMock->expects($this->any())->method('getArea')->will($this->returnValue($this->areaMock));
$this->routerList->expects($this->any())
->method('valid')
->will($this->returnValue(true));
diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
index 27df19f66c7aa..aec9a64a132fe 100644
--- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php
+++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
@@ -254,7 +254,10 @@ private function mkdirRecursive($path, $permissions = 0777)
public function readDirectory($path)
{
try {
- $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS;
+ $flags = \FilesystemIterator::SKIP_DOTS |
+ \FilesystemIterator::UNIX_PATHS |
+ \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
+
$iterator = new \FilesystemIterator($path, $flags);
$result = [];
/** @var \FilesystemIterator $file */
@@ -946,7 +949,10 @@ protected function getScheme($scheme = null)
public function readDirectoryRecursively($path = null)
{
$result = [];
- $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS;
+ $flags = \FilesystemIterator::SKIP_DOTS |
+ \FilesystemIterator::UNIX_PATHS |
+ \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
+
try {
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($path, $flags),
diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeTest.php
index 3c7f49671d74a..210e36ee05ef1 100644
--- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeTest.php
+++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/DateTimeTest.php
@@ -5,13 +5,18 @@
*/
namespace Magento\Framework\Stdlib\Test\Unit\DateTime;
+use DateTimeImmutable;
+use DateTimeInterface;
+use Exception;
use Magento\Framework\Stdlib\DateTime\DateTime;
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
/**
- * Magento\Framework\Stdlib\DateTimeTest test case
+ * Tests for @see DateTime
*/
-class DateTimeTest extends \PHPUnit\Framework\TestCase
+class DateTimeTest extends TestCase
{
/**
* @var string
@@ -19,12 +24,14 @@ class DateTimeTest extends \PHPUnit\Framework\TestCase
private $testDate = '2015-04-02 21:03:00';
/**
- * @param int|string|\DateTimeInterface $input
+ * @param int|string|DateTimeInterface $input
+ * @throws Exception
+ *
* @dataProvider dateTimeInputDataProvider
*/
public function testGmtTimestamp($input)
{
- /** @var TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject $timezone */
+ /** @var TimezoneInterface|MockObject $timezone */
$timezone = $this->getMockBuilder(TimezoneInterface::class)->getMock();
$timezone->method('date')->willReturn(new \DateTime($this->testDate));
@@ -33,12 +40,14 @@ public function testGmtTimestamp($input)
}
/**
- * @param int|string|\DateTimeInterface $input
+ * @param int|string|DateTimeInterface $input
+ * @throws Exception
+ *
* @dataProvider dateTimeInputDataProvider
*/
public function testTimestamp($input)
{
- /** @var TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject $timezone */
+ /** @var TimezoneInterface|MockObject $timezone */
$timezone = $this->getMockBuilder(TimezoneInterface::class)->getMock();
$timezone->method('date')->willReturn(new \DateTime($this->testDate));
@@ -48,28 +57,50 @@ public function testTimestamp($input)
public function testGtmOffset()
{
- /** @var TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject $timezone */
+ /** @var TimezoneInterface|MockObject $timezone */
$timezone = $this->getMockBuilder(TimezoneInterface::class)->getMock();
$timezone->method('getConfigTimezone')->willReturn('Europe/Amsterdam');
- /** @var DateTime|\PHPUnit_Framework_MockObject_MockObject $dateTime */
+ /** @var DateTime|MockObject $dateTime */
$dateTime = $this->getMockBuilder(DateTime::class)
->setConstructorArgs([$timezone])
->setMethods(null)
->getMock();
- $this->assertEquals(3600, $dateTime->getGmtOffset());
+ $this->assertEquals(
+ $this->getExpectedGtmOffset($timezone->getConfigTimezone()),
+ $dateTime->getGmtOffset()
+ );
}
/**
+ * Returns expected offset according to Daylight Saving Time in timezone
+ *
+ * @param string $timezoneIdentifier
+ * @return int
+ */
+ private function getExpectedGtmOffset(string $timezoneIdentifier): int
+ {
+ $timeZoneToReturn = date_default_timezone_get();
+ date_default_timezone_set($timezoneIdentifier);
+ $expectedOffset = (date('I', time()) + 1) * 3600;
+ date_default_timezone_set($timeZoneToReturn);
+
+ return (int) $expectedOffset;
+ }
+
+ /**
+ * Data provider
+ *
* @return array
+ * @throws Exception
*/
public function dateTimeInputDataProvider()
{
return [
'string' => [$this->testDate],
'int' => [strtotime($this->testDate)],
- \DateTimeInterface::class => [new \DateTimeImmutable($this->testDate)],
+ DateTimeInterface::class => [new DateTimeImmutable($this->testDate)],
];
}
}
diff --git a/lib/web/mage/translate.js b/lib/web/mage/translate.js
index 0a385da8dcf38..8c5c218b2498f 100644
--- a/lib/web/mage/translate.js
+++ b/lib/web/mage/translate.js
@@ -39,7 +39,7 @@ define([
* @return {String}
*/
translate: function (text) {
- return _data[text] ? _data[text] : text;
+ return typeof _data[text] !== 'undefined' ? _data[text] : text;
}
};
}())
diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js
index 18e7b6413bc96..10f9dab6bdd9b 100644
--- a/lib/web/mage/validation.js
+++ b/lib/web/mage/validation.js
@@ -6,10 +6,11 @@
define([
'jquery',
'moment',
+ 'mageUtils',
'jquery-ui-modules/widget',
'jquery/validate',
'mage/translate'
-], function ($, moment) {
+], function ($, moment, utils) {
'use strict';
var creditCartTypes, rules, showLabel, originValidateDelegate;
@@ -1032,7 +1033,7 @@ define([
],
'validate-date': [
function (value, params, additionalParams) {
- var test = moment(value, additionalParams.dateFormat);
+ var test = moment(value, utils.convertToMomentFormat(additionalParams.dateFormat));
return $.mage.isEmptyNoTrim(value) || test.isValid();
},
diff --git a/setup/src/Magento/Setup/Controller/Navigation.php b/setup/src/Magento/Setup/Controller/Navigation.php
index c1d42d905b3eb..e3f2091accbbd 100644
--- a/setup/src/Magento/Setup/Controller/Navigation.php
+++ b/setup/src/Magento/Setup/Controller/Navigation.php
@@ -8,8 +8,11 @@
use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\JsonModel;
use Laminas\View\Model\ViewModel;
+use Magento\Backend\Model\UrlInterface;
+use Magento\Framework\ObjectManagerInterface;
use Magento\Setup\Model\Cron\Status;
use Magento\Setup\Model\Navigation as NavModel;
+use Magento\Setup\Model\ObjectManagerProvider;
/**
* Navigation controller
@@ -32,13 +35,20 @@ class Navigation extends AbstractActionController
protected $view;
/**
- * @param NavModel $navigation
- * @param Status $status
+ * @var ObjectManagerInterface
*/
- public function __construct(NavModel $navigation, Status $status)
+ private $objectManagerProvider;
+
+ /**
+ * @param NavModel $navigation
+ * @param Status $status
+ * @param ObjectManagerProvider $objectManagerProvider
+ */
+ public function __construct(NavModel $navigation, Status $status, ObjectManagerProvider $objectManagerProvider)
{
$this->navigation = $navigation;
$this->status = $status;
+ $this->objectManagerProvider = $objectManagerProvider->get();
$this->view = new ViewModel();
$this->view->setVariable('menu', $this->navigation->getMenuItems());
$this->view->setVariable('main', $this->navigation->getMainItems());
@@ -80,8 +90,11 @@ public function menuAction()
*/
public function sideMenuAction()
{
+ /** @var UrlInterface $backendUrl */
+ $backendUrl = $this->objectManagerProvider->get(UrlInterface::class);
$this->view->setTemplate('/magento/setup/navigation/side-menu.phtml');
$this->view->setVariable('isInstaller', $this->navigation->getType() == NavModel::NAV_INSTALLER);
+ $this->view->setVariable('backendUrl', $backendUrl->getRouteUrl('adminhtml'));
$this->view->setTerminal(true);
return $this->view;
}
diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php b/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php
index 1d9fdd6098cbb..6d5235cffec77 100644
--- a/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php
+++ b/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php
@@ -46,6 +46,7 @@ public function getDriverOptions(array $options): array
*/
private function optionExists($options, $driverOptionKey): bool
{
- return $options[$driverOptionKey] === false || !empty($options[$driverOptionKey]);
+ return isset($options[$driverOptionKey])
+ && ($options[$driverOptionKey] === false || !empty($options[$driverOptionKey]));
}
}
diff --git a/setup/view/magento/setup/navigation/side-menu.phtml b/setup/view/magento/setup/navigation/side-menu.phtml
index f34a6c7c72e69..b731881e8bf4f 100644
--- a/setup/view/magento/setup/navigation/side-menu.phtml
+++ b/setup/view/magento/setup/navigation/side-menu.phtml
@@ -20,9 +20,11 @@
ng-show="= implode( '&&', $expressions) ?>"
>