diff --git a/app/bootstrap.php b/app/bootstrap.php
index 70b632537a75b..8e901cac9bfb8 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -31,8 +31,6 @@
// Sets default autoload mappings, may be overridden in Bootstrap::create
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
-require_once BP . '/app/functions.php';
-
/* Custom umask value may be provided in optional mage_umask file in root */
$umaskFile = BP . '/magento_umask';
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json
index 0ecdca6bb1d05..ae1b8dc7d14ff 100644
--- a/app/code/Magento/AdminNotification/composer.json
+++ b/app/code/Magento/AdminNotification/composer.json
@@ -11,7 +11,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json
index 49a6f5379d1c0..458827b9ab18a 100644
--- a/app/code/Magento/AdvancedPricingImportExport/composer.json
+++ b/app/code/Magento/AdvancedPricingImportExport/composer.json
@@ -13,7 +13,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json
index f69960e082f84..7edb72db45e52 100644
--- a/app/code/Magento/Analytics/composer.json
+++ b/app/code/Magento/Analytics/composer.json
@@ -10,7 +10,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json
index a3f9f5da95a04..35063d1516784 100644
--- a/app/code/Magento/Authorization/composer.json
+++ b/app/code/Magento/Authorization/composer.json
@@ -7,7 +7,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json
index 0046ba01adbe8..90f19e36777b2 100644
--- a/app/code/Magento/Authorizenet/composer.json
+++ b/app/code/Magento/Authorizenet/composer.json
@@ -16,7 +16,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml
new file mode 100644
index 0000000000000..8c258accdf06c
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml
index f8d259cc8e490..c56a8768b0adf 100644
--- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml
@@ -11,5 +11,6 @@
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
new file mode 100644
index 0000000000000..9d3182b6236a4
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml
index 84709e92d9bbd..72a00ed6db9b6 100644
--- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml
@@ -10,6 +10,6 @@
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json
index 4494e51b9337c..845bc4ec87402 100644
--- a/app/code/Magento/Backend/composer.json
+++ b/app/code/Magento/Backend/composer.json
@@ -24,7 +24,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json
index b45fc8d2a2bef..f0cbb27bd8ab2 100644
--- a/app/code/Magento/Backup/composer.json
+++ b/app/code/Magento/Backup/composer.json
@@ -9,7 +9,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json
index 8af2198949f1c..bf85cdd94a474 100644
--- a/app/code/Magento/Braintree/composer.json
+++ b/app/code/Magento/Braintree/composer.json
@@ -25,7 +25,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json
index c9e5f87a1afad..fe883e783d6ff 100644
--- a/app/code/Magento/Bundle/composer.json
+++ b/app/code/Magento/Bundle/composer.json
@@ -26,7 +26,7 @@
"magento/module-sales-rule": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json
index 59698c598419b..b21da5c7ae5b9 100644
--- a/app/code/Magento/BundleImportExport/composer.json
+++ b/app/code/Magento/BundleImportExport/composer.json
@@ -12,7 +12,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json
index 1331114ca50c4..825c9937c16d1 100644
--- a/app/code/Magento/CacheInvalidate/composer.json
+++ b/app/code/Magento/CacheInvalidate/composer.json
@@ -7,7 +7,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php
deleted file mode 100644
index 7ccaa76b6c7c8..0000000000000
--- a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php
+++ /dev/null
@@ -1,82 +0,0 @@
-_helper = $helper;
- $this->_actionFlag = $actionFlag;
- $this->captchaStringResolver = $captchaStringResolver;
- $this->_typeOnepage = $typeOnepage;
- $this->jsonHelper = $jsonHelper;
- }
-
- /**
- * Check Captcha On Checkout as Guest Page
- *
- * @param \Magento\Framework\Event\Observer $observer
- * @return $this
- */
- public function execute(\Magento\Framework\Event\Observer $observer)
- {
- $formId = 'guest_checkout';
- $captchaModel = $this->_helper->getCaptcha($formId);
- $checkoutMethod = $this->_typeOnepage->getQuote()->getCheckoutMethod();
- if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_GUEST
- && $captchaModel->isRequired()
- ) {
- $controller = $observer->getControllerAction();
- if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId))) {
- $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
- $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')];
- $controller->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
- }
- }
-
- return $this;
- }
-}
diff --git a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php
deleted file mode 100644
index 8e110a9f4653d..0000000000000
--- a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php
+++ /dev/null
@@ -1,82 +0,0 @@
-_helper = $helper;
- $this->_actionFlag = $actionFlag;
- $this->captchaStringResolver = $captchaStringResolver;
- $this->_typeOnepage = $typeOnepage;
- $this->jsonHelper = $jsonHelper;
- }
-
- /**
- * Check Captcha On Checkout Register Page
- *
- * @param \Magento\Framework\Event\Observer $observer
- * @return $this
- */
- public function execute(\Magento\Framework\Event\Observer $observer)
- {
- $formId = 'register_during_checkout';
- $captchaModel = $this->_helper->getCaptcha($formId);
- $checkoutMethod = $this->_typeOnepage->getQuote()->getCheckoutMethod();
- if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER
- && $captchaModel->isRequired()
- ) {
- $controller = $observer->getControllerAction();
- if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId))) {
- $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
- $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')];
- $controller->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
- }
- }
-
- return $this;
- }
-}
diff --git a/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml b/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml
new file mode 100644
index 0000000000000..9640da9bd2f67
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml b/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml
new file mode 100644
index 0000000000000..45b9e59a5e767
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ Create user
+ Login
+ Forgot password
+ Contact Us
+ Change password
+ Register during Checkout
+ Check Out as Guest
+
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml b/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml
new file mode 100644
index 0000000000000..6def5f9ccdac9
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml
new file mode 100644
index 0000000000000..6e330390b372b
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{CaptchaData.checkoutAsGuest}}
+ $formItems
+
+
+ {{CaptchaData.register}}
+ $formItems
+
+
+
+
+ {{CaptchaData.createUser}}
+ $createUser
+
+
+
+ {{CaptchaData.login}}
+ login
+
+
+
+ {{CaptchaData.passwd}}
+ $forgotpassword
+
+
+
+ {{CaptchaData.contactUs}}
+ $contactUs
+
+
+
+ {{CaptchaData.changePasswd}}
+ $userEdit
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
index 0500b29f787c2..63e7308eea34c 100644
--- a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
+++ b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
@@ -24,7 +24,7 @@ class DefaultTest extends \PHPUnit\Framework\TestCase
'enable' => '1',
'font' => 'linlibertine',
'mode' => 'after_fail',
- 'forms' => 'user_forgotpassword,user_create,guest_checkout,register_during_checkout',
+ 'forms' => 'user_forgotpassword,user_create',
'failed_attempts_login' => '3',
'failed_attempts_ip' => '1000',
'timeout' => '7',
@@ -35,8 +35,6 @@ class DefaultTest extends \PHPUnit\Framework\TestCase
'always_for' => [
'user_create',
'user_forgotpassword',
- 'guest_checkout',
- 'register_during_checkout',
'contact_us',
],
];
@@ -363,7 +361,6 @@ public function isShownToLoggedInUserDataProvider()
[true, 'contact_us'],
[false, 'user_create'],
[false, 'user_forgotpassword'],
- [false, 'guest_checkout']
];
}
}
diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php
deleted file mode 100644
index d3f29fae8a592..0000000000000
--- a/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php
+++ /dev/null
@@ -1,211 +0,0 @@
-createMock(Onepage::class);
- $captchaHelperMock = $this->createMock(CaptchaDataHelper::class);
- $this->objectManager = new ObjectManager($this);
- $this->actionFlagMock = $this->createMock(ActionFlag::class);
- $this->captchaStringResolverMock = $this->createMock(CaptchaStringResolver::class);
- $this->captchaModelMock = $this->createMock(CaptchaModel::class);
- $this->quoteModelMock = $this->createMock(Quote::class);
- $this->controllerMock = $this->createMock(Action::class);
- $this->requestMock = $this->createMock(Http::class);
- $this->responseMock = $this->createMock(HttpResponse::class);
- $this->observer = new Observer(['controller_action' => $this->controllerMock]);
- $this->jsonHelperMock = $this->createMock(JsonHelper::class);
-
- $this->checkGuestCheckoutObserver = $this->objectManager->getObject(
- CheckGuestCheckoutObserver::class,
- [
- 'helper' => $captchaHelperMock,
- 'actionFlag' => $this->actionFlagMock,
- 'captchaStringResolver' => $this->captchaStringResolverMock,
- 'typeOnepage' => $onepageModelTypeMock,
- 'jsonHelper' => $this->jsonHelperMock
- ]
- );
-
- $captchaHelperMock->expects($this->once())
- ->method('getCaptcha')
- ->with(self::FORM_ID)
- ->willReturn($this->captchaModelMock);
- $onepageModelTypeMock->expects($this->once())
- ->method('getQuote')
- ->willReturn($this->quoteModelMock);
- }
-
- public function testCheckGuestCheckoutForRegister()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_REGISTER);
- $this->captchaModelMock->expects($this->never())
- ->method('isRequired');
-
- $this->checkGuestCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckGuestCheckoutWithNoCaptchaRequired()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_GUEST);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(false);
- $this->captchaModelMock->expects($this->never())
- ->method('isCorrect');
-
- $this->checkGuestCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckGuestCheckoutWithIncorrectCaptcha()
- {
- $captchaValue = 'some_word';
- $encodedJsonValue = '{}';
-
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_GUEST);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(true);
- $this->controllerMock->expects($this->once())
- ->method('getRequest')
- ->willReturn($this->requestMock);
- $this->controllerMock->expects($this->once())
- ->method('getResponse')
- ->willReturn($this->responseMock);
- $this->controllerMock->expects($this->once())
- ->method('getResponse')
- ->willReturn($this->responseMock);
- $this->captchaStringResolverMock->expects($this->once())
- ->method('resolve')
- ->with($this->requestMock, self::FORM_ID)
- ->willReturn($captchaValue);
- $this->captchaModelMock->expects($this->once())
- ->method('isCorrect')
- ->with($captchaValue)
- ->willReturn(false);
- $this->actionFlagMock->expects($this->once())
- ->method('set')
- ->with('', Action::FLAG_NO_DISPATCH, true);
- $this->jsonHelperMock->expects($this->once())
- ->method('jsonEncode')
- ->willReturn($encodedJsonValue);
- $this->responseMock->expects($this->once())
- ->method('representJson')
- ->with($encodedJsonValue);
-
- $this->checkGuestCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckGuestCheckoutWithCorrectCaptcha()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_GUEST);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(true);
- $this->controllerMock->expects($this->once())
- ->method('getRequest')
- ->willReturn($this->requestMock);
- $this->captchaStringResolverMock->expects($this->once())
- ->method('resolve')
- ->with($this->requestMock, self::FORM_ID)
- ->willReturn('some_word');
- $this->captchaModelMock->expects($this->once())
- ->method('isCorrect')
- ->with('some_word')
- ->willReturn(true);
- $this->actionFlagMock->expects($this->never())
- ->method('set');
-
- $this->checkGuestCheckoutObserver->execute($this->observer);
- }
-}
diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php
deleted file mode 100644
index 89012ef653838..0000000000000
--- a/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php
+++ /dev/null
@@ -1,211 +0,0 @@
-createMock(Onepage::class);
- $captchaHelperMock = $this->createMock(CaptchaDataHelper::class);
- $this->objectManager = new ObjectManager($this);
- $this->actionFlagMock = $this->createMock(ActionFlag::class);
- $this->captchaStringResolverMock = $this->createMock(CaptchaStringResolver::class);
- $this->captchaModelMock = $this->createMock(CaptchaModel::class);
- $this->quoteModelMock = $this->createMock(Quote::class);
- $this->controllerMock = $this->createMock(Action::class);
- $this->requestMock = $this->createMock(Http::class);
- $this->responseMock = $this->createMock(HttpResponse::class);
- $this->observer = new Observer(['controller_action' => $this->controllerMock]);
- $this->jsonHelperMock = $this->createMock(JsonHelper::class);
-
- $this->checkRegisterCheckoutObserver = $this->objectManager->getObject(
- CheckRegisterCheckoutObserver::class,
- [
- 'helper' => $captchaHelperMock,
- 'actionFlag' => $this->actionFlagMock,
- 'captchaStringResolver' => $this->captchaStringResolverMock,
- 'typeOnepage' => $onepageModelTypeMock,
- 'jsonHelper' => $this->jsonHelperMock
- ]
- );
-
- $captchaHelperMock->expects($this->once())
- ->method('getCaptcha')
- ->with(self::FORM_ID)
- ->willReturn($this->captchaModelMock);
- $onepageModelTypeMock->expects($this->once())
- ->method('getQuote')
- ->willReturn($this->quoteModelMock);
- }
-
- public function testCheckRegisterCheckoutForGuest()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_GUEST);
- $this->captchaModelMock->expects($this->never())
- ->method('isRequired');
-
- $this->checkRegisterCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckRegisterCheckoutWithNoCaptchaRequired()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_REGISTER);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(false);
- $this->captchaModelMock->expects($this->never())
- ->method('isCorrect');
-
- $this->checkRegisterCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckRegisterCheckoutWithIncorrectCaptcha()
- {
- $captchaValue = 'some_word';
- $encodedJsonValue = '{}';
-
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_REGISTER);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(true);
- $this->controllerMock->expects($this->once())
- ->method('getRequest')
- ->willReturn($this->requestMock);
- $this->controllerMock->expects($this->once())
- ->method('getResponse')
- ->willReturn($this->responseMock);
- $this->controllerMock->expects($this->once())
- ->method('getResponse')
- ->willReturn($this->responseMock);
- $this->captchaStringResolverMock->expects($this->once())
- ->method('resolve')
- ->with($this->requestMock, self::FORM_ID)
- ->willReturn($captchaValue);
- $this->captchaModelMock->expects($this->once())
- ->method('isCorrect')
- ->with($captchaValue)
- ->willReturn(false);
- $this->actionFlagMock->expects($this->once())
- ->method('set')
- ->with('', Action::FLAG_NO_DISPATCH, true);
- $this->jsonHelperMock->expects($this->once())
- ->method('jsonEncode')
- ->willReturn($encodedJsonValue);
- $this->responseMock->expects($this->once())
- ->method('representJson')
- ->with($encodedJsonValue);
-
- $this->checkRegisterCheckoutObserver->execute($this->observer);
- }
-
- public function testCheckRegisterCheckoutWithCorrectCaptcha()
- {
- $this->quoteModelMock->expects($this->once())
- ->method('getCheckoutMethod')
- ->willReturn(Onepage::METHOD_REGISTER);
- $this->captchaModelMock->expects($this->once())
- ->method('isRequired')
- ->willReturn(true);
- $this->controllerMock->expects($this->once())
- ->method('getRequest')
- ->willReturn($this->requestMock);
- $this->captchaStringResolverMock->expects($this->once())
- ->method('resolve')
- ->with($this->requestMock, self::FORM_ID)
- ->willReturn('some_word');
- $this->captchaModelMock->expects($this->once())
- ->method('isCorrect')
- ->with('some_word')
- ->willReturn(true);
- $this->actionFlagMock->expects($this->never())
- ->method('set');
-
- $this->checkRegisterCheckoutObserver->execute($this->observer);
- }
-}
diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json
index 7842d7bc68bf1..a8a63e19e67df 100644
--- a/app/code/Magento/Captcha/composer.json
+++ b/app/code/Magento/Captcha/composer.json
@@ -13,7 +13,7 @@
"zendframework/zend-session": "^2.7.3"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Captcha/etc/config.xml b/app/code/Magento/Captcha/etc/config.xml
index 71c474de90ff4..dd748dd05ccda 100644
--- a/app/code/Magento/Captcha/etc/config.xml
+++ b/app/code/Magento/Captcha/etc/config.xml
@@ -53,8 +53,6 @@
1
1
- 1
- 1
1
@@ -77,12 +75,6 @@
-
-
-
-
-
-
diff --git a/app/code/Magento/Captcha/etc/di.xml b/app/code/Magento/Captcha/etc/di.xml
index 955896eb12744..3a929f5e6cc00 100644
--- a/app/code/Magento/Captcha/etc/di.xml
+++ b/app/code/Magento/Captcha/etc/di.xml
@@ -33,7 +33,6 @@
- user_login
- - guest_checkout
diff --git a/app/code/Magento/Captcha/etc/events.xml b/app/code/Magento/Captcha/etc/events.xml
index e3ddd19de2d12..970c0d077260c 100644
--- a/app/code/Magento/Captcha/etc/events.xml
+++ b/app/code/Magento/Captcha/etc/events.xml
@@ -18,10 +18,6 @@
-
-
-
-
diff --git a/app/code/Magento/Captcha/etc/frontend/di.xml b/app/code/Magento/Captcha/etc/frontend/di.xml
index 225e62c8e8203..0c4ab0cda0735 100644
--- a/app/code/Magento/Captcha/etc/frontend/di.xml
+++ b/app/code/Magento/Captcha/etc/frontend/di.xml
@@ -17,7 +17,6 @@
- user_login
- - guest_checkout
diff --git a/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml
index 4ed56fd56cc3a..7180372f004e5 100644
--- a/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml
+++ b/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml
@@ -36,29 +36,7 @@
-
- Magento_Captcha/js/view/checkout/loginCaptcha
- additional-login-form-fields
- - guest_checkout
- - checkoutConfig
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Magento_Captcha/js/view/checkout/loginCaptcha
- - additional-login-form-fields
- - guest_checkout
+ - user_login
- checkoutConfig
diff --git a/app/code/Magento/Captcha/view/frontend/web/js/onepage.js b/app/code/Magento/Captcha/view/frontend/web/js/onepage.js
deleted file mode 100644
index 7f5f11d20572b..0000000000000
--- a/app/code/Magento/Captcha/view/frontend/web/js/onepage.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-/**
- * @deprecated since version 2.2.0
- */
-define(['jquery'], function ($) {
- 'use strict';
-
- $(document).on('login', function () {
- var type;
-
- $('[data-captcha="guest_checkout"], [data-captcha="register_during_checkout"]').hide();
- $('[role="guest_checkout"], [role="register_during_checkout"]').hide();
- type = $('#login\\:guest').is(':checked') ? 'guest_checkout' : 'register_during_checkout';
- $('[role="' + type + '"], [data-captcha="' + type + '"]').show();
- }).on('billingSave', function () {
- $('.captcha-reload:visible').trigger('click');
- });
-});
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
index 4872c0c5c716c..127b69e5c3dc4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
@@ -8,6 +8,7 @@
+
@@ -24,6 +25,7 @@
+
@@ -41,6 +43,7 @@
+
@@ -58,4 +61,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml
new file mode 100644
index 0000000000000..68c432a136ac9
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml
new file mode 100644
index 0000000000000..bf6f3c692b6c3
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml
index 1de234c512339..ccb5ae60db59b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php
index af1ded6987196..196b4df5b47c0 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php
@@ -71,7 +71,7 @@ protected function setUp()
false,
true,
true,
- ['addSuccess']
+ ['addSuccessMessage']
);
$this->categoryRepository = $this->createMock(\Magento\Catalog\Api\CategoryRepositoryInterface::class);
$context->expects($this->any())
diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php
index 53f7fa0ed7e63..74173dc926d97 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php
@@ -102,7 +102,7 @@ protected function setUp()
false,
true,
true,
- ['addSuccess', 'getMessages']
+ ['addSuccessMessage', 'getMessages']
);
$this->save = $this->objectManager->getObject(
@@ -392,7 +392,7 @@ public function testExecute($categoryId, $storeId, $parentId)
$categoryMock->expects($this->once())
->method('save');
$this->messageManagerMock->expects($this->once())
- ->method('addSuccess')
+ ->method('addSuccessMessage')
->with(__('You saved the category.'));
$categoryMock->expects($this->at(1))
->method('getId')
diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php
index 5a977b7934670..0ddd89afeac22 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php
@@ -94,7 +94,7 @@ private function prepareContext()
$messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class)
->setMethods([])
->disableOriginalConstructor()->getMock();
- $messageManager->expects($this->any())->method('addError')->willReturn(true);
+ $messageManager->expects($this->any())->method('addErrorMessage')->willReturn(true);
$this->context = $this->getMockBuilder(\Magento\Backend\App\Action\Context::class)
->setMethods(['getRequest', 'getObjectManager', 'getMessageManager', 'getResultRedirectFactory'])
->disableOriginalConstructor()->getMock();
diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php
index c88a008efb19b..de44af7f58afc 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php
@@ -250,8 +250,8 @@ public function testExecuteThatProductIdsAreObtainedFromAttributeHelper()
['inventory', [], [7]],
]));
- $this->messageManager->expects($this->never())->method('addError');
- $this->messageManager->expects($this->never())->method('addException');
+ $this->messageManager->expects($this->never())->method('addErrorMessage');
+ $this->messageManager->expects($this->never())->method('addExceptionMessage');
$this->object->execute();
}
diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json
index 57bb7d1e4ccef..4535e527d2dec 100644
--- a/app/code/Magento/Catalog/composer.json
+++ b/app/code/Magento/Catalog/composer.json
@@ -34,7 +34,7 @@
"magento/module-catalog-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "102.0.5",
+ "version": "102.0.6",
"license": [
"OSL-3.0",
"AFL-3.0"
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 fc82b3a49da53..5b77828d3c029 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
@@ -161,6 +161,13 @@ define([
.html(res.product.statusText);
}
self.enableAddToCartButton(form);
+ },
+
+ /** @inheritdoc */
+ complete: function (res) {
+ if (res.state() === 'rejected') {
+ location.reload();
+ }
}
});
},
diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json
index 9a36d7a98c7b2..ead59ef212600 100644
--- a/app/code/Magento/CatalogAnalytics/composer.json
+++ b/app/code/Magento/CatalogAnalytics/composer.json
@@ -7,7 +7,7 @@
"magento/module-catalog": "102.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json
index d217a665cf924..39b05acc4e3b6 100644
--- a/app/code/Magento/CatalogImportExport/composer.json
+++ b/app/code/Magento/CatalogImportExport/composer.json
@@ -16,7 +16,7 @@
"ext-ctype": "*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
index 30a1cce77cd70..a104f5b098b8e 100644
--- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
+++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
@@ -16,10 +16,12 @@
use Magento\CatalogInventory\Model\Stock;
use Magento\Framework\Event\Observer;
use Magento\Framework\Exception\LocalizedException;
+use Magento\Quote\Model\Quote\Item;
/**
* @api
* @since 100.0.2
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class QuantityValidator
{
@@ -66,7 +68,7 @@ public function __construct(
* Add error information to Quote Item
*
* @param \Magento\Framework\DataObject $result
- * @param \Magento\Quote\Model\Quote\Item $quoteItem
+ * @param Item $quoteItem
* @param bool $removeError
* @return void
*/
@@ -99,7 +101,7 @@ private function addErrorInfoToQuote($result, $quoteItem)
*/
public function validate(Observer $observer)
{
- /* @var $quoteItem \Magento\Quote\Model\Quote\Item */
+ /* @var $quoteItem Item */
$quoteItem = $observer->getEvent()->getItem();
if (!$quoteItem ||
!$quoteItem->getProductId() ||
@@ -174,31 +176,7 @@ public function validate(Observer $observer)
$qty = $product->getTypeInstance()->prepareQuoteItemQty($qty, $product);
$quoteItem->setData('qty', $qty);
if ($stockStatus) {
- $result = $this->stockState->checkQtyIncrements(
- $product->getId(),
- $qty,
- $product->getStore()->getWebsiteId()
- );
- if ($result->getHasError()) {
- $quoteItem->addErrorInfo(
- 'cataloginventory',
- Data::ERROR_QTY_INCREMENTS,
- $result->getMessage()
- );
-
- $quoteItem->getQuote()->addErrorInfo(
- $result->getQuoteMessageIndex(),
- 'cataloginventory',
- Data::ERROR_QTY_INCREMENTS,
- $result->getQuoteMessage()
- );
- } else {
- // Delete error from item and its quote, if it was set due to qty problems
- $this->_removeErrorsFromQuoteAndItem(
- $quoteItem,
- Data::ERROR_QTY_INCREMENTS
- );
- }
+ $this->checkOptionsQtyIncrements($quoteItem, $options);
}
// variable to keep track if we have previously encountered an error in one of the options
$removeError = true;
@@ -227,10 +205,44 @@ public function validate(Observer $observer)
}
}
+ /**
+ * Verifies product options quantity increments.
+ *
+ * @param Item $quoteItem
+ * @param array $options
+ * @return void
+ */
+ private function checkOptionsQtyIncrements(Item $quoteItem, array $options)
+ {
+ $removeErrors = true;
+ foreach ($options as $option) {
+ $result = $this->stockState->checkQtyIncrements(
+ $option->getProduct()->getId(),
+ $quoteItem->getData('qty'),
+ $option->getProduct()->getStore()->getWebsiteId()
+ );
+ if ($result->getHasError()) {
+ $quoteItem->getQuote()->addErrorInfo(
+ $result->getQuoteMessageIndex(),
+ 'cataloginventory',
+ Data::ERROR_QTY_INCREMENTS,
+ $result->getQuoteMessage()
+ );
+
+ $removeErrors = false;
+ }
+ }
+
+ if ($removeErrors) {
+ // Delete error from item and its quote, if it was set due to qty problems
+ $this->_removeErrorsFromQuoteAndItem($quoteItem, Data::ERROR_QTY_INCREMENTS);
+ }
+ }
+
/**
* Removes error statuses from quote and item, set by this observer
*
- * @param \Magento\Quote\Model\Quote\Item $item
+ * @param Item $item
* @param int $code
* @return void
*/
diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php
index b99e43d52f470..5b3a441333432 100644
--- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php
+++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php
@@ -9,6 +9,9 @@
use Magento\CatalogInventory\Api\StockStateInterface;
use Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList;
+/**
+ * Class for initialize quote item options.
+ */
class Option
{
/**
@@ -67,10 +70,6 @@ public function getStockItem(
* define that stock item is child for composite product
*/
$stockItem->setIsChildItem(true);
- /**
- * don't check qty increments value for option product
- */
- $stockItem->setSuppressCheckQtyIncrements(true);
return $stockItem;
}
diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php
index eb32c30ab4f86..9ca4496e53172 100644
--- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php
+++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php
@@ -5,6 +5,9 @@
*/
namespace Magento\CatalogInventory\Test\Unit\Model\Quote\Item\QuantityValidator\Initializer;
+/**
+ * Class OptionTest
+ */
class OptionTest extends \PHPUnit\Framework\TestCase
{
/**
@@ -67,6 +70,9 @@ class OptionTest extends \PHPUnit\Framework\TestCase
*/
protected $websiteId = 111;
+ /**
+ * @inheritdoc
+ */
protected function setUp()
{
$optionMethods = [
@@ -140,6 +146,9 @@ protected function setUp()
);
}
+ /**
+ * @return void
+ */
public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQtyUpdate()
{
$optionValue = 5;
@@ -151,7 +160,6 @@ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQt
$this->optionMock->expects($this->any())->method('getProduct')->will($this->returnValue($this->productMock));
$this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true);
- $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true);
$this->stockItemMock->expects($this->once())->method('getItemId')->will($this->returnValue(true));
$this->stockRegistry
@@ -212,6 +220,9 @@ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQt
$this->validator->initialize($this->optionMock, $this->quoteItemMock, $qty);
}
+ /**
+ * @return void
+ */
public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQtyUpdate()
{
$optionValue = 5;
@@ -222,7 +233,6 @@ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQ
$this->optionMock->expects($this->any())->method('getProduct')->will($this->returnValue($this->productMock));
$this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true);
- $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true);
$this->stockItemMock->expects($this->once())->method('getItemId')->will($this->returnValue(true));
$this->stockRegistry
@@ -267,6 +277,8 @@ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQ
}
/**
+ * @return void
+ *
* @expectedException \Magento\Framework\Exception\LocalizedException
* @expectedExceptionMessage The stock item for Product in option is not valid.
*/
diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php
index 7e2bad0b96354..884908aa1c378 100644
--- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php
+++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php
@@ -119,6 +119,9 @@ class QuantityValidatorTest extends \PHPUnit\Framework\TestCase
*/
private $stockStatusMock;
+ /**
+ * @inheritdoc
+ */
protected function setUp()
{
$objectManagerHelper = new ObjectManager($this);
@@ -278,11 +281,13 @@ public function testValidateWithOptions()
{
$optionMock = $this->getMockBuilder(OptionItem::class)
->disableOriginalConstructor()
- ->setMethods(['setHasError', 'getStockStateResult'])
+ ->setMethods(['setHasError', 'getStockStateResult', 'getProduct'])
->getMock();
$optionMock->expects($this->once())
->method('getStockStateResult')
->willReturn($this->resultMock);
+ $optionMock->method('getProduct')
+ ->willReturn($this->productMock);
$this->stockRegistryMock->expects($this->at(0))
->method('getStockItem')
->willReturn($this->stockItemMock);
@@ -319,7 +324,7 @@ public function testValidateWithOptionsAndError()
{
$optionMock = $this->getMockBuilder(OptionItem::class)
->disableOriginalConstructor()
- ->setMethods(['setHasError', 'getStockStateResult'])
+ ->setMethods(['setHasError', 'getStockStateResult', 'getProduct'])
->getMock();
$this->stockRegistryMock->expects($this->at(0))
->method('getStockItem')
@@ -330,6 +335,8 @@ public function testValidateWithOptionsAndError()
$optionMock->expects($this->once())
->method('getStockStateResult')
->willReturn($this->resultMock);
+ $optionMock->method('getProduct')
+ ->willReturn($this->productMock);
$options = [$optionMock];
$this->createInitialStub(1);
$this->setUpStubForQuantity(1, true);
@@ -360,7 +367,7 @@ public function testValidateAndRemoveErrorsFromQuote()
{
$optionMock = $this->getMockBuilder(OptionItem::class)
->disableOriginalConstructor()
- ->setMethods(['setHasError', 'getStockStateResult'])
+ ->setMethods(['setHasError', 'getStockStateResult', 'getProduct'])
->getMock();
$quoteItem = $this->getMockBuilder(Item::class)
->disableOriginalConstructor()
@@ -369,6 +376,8 @@ public function testValidateAndRemoveErrorsFromQuote()
$optionMock->expects($this->once())
->method('getStockStateResult')
->willReturn($this->resultMock);
+ $optionMock->method('getProduct')
+ ->willReturn($this->productMock);
$this->stockRegistryMock->expects($this->at(0))
->method('getStockItem')
->willReturn($this->stockItemMock);
@@ -544,6 +553,9 @@ private function createInitialStub($qty)
->willReturn($this->resultMock);
}
+ /**
+ * @return void
+ */
private function setUpStubForRemoveError()
{
$quoteItems = [$this->quoteItemMock];
diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json
index 2b823cdb9cc08..41fd9db15f15a 100644
--- a/app/code/Magento/CatalogInventory/composer.json
+++ b/app/code/Magento/CatalogInventory/composer.json
@@ -14,7 +14,7 @@
"magento/module-sales": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json
index 595cd121a1a1c..4067d7044b158 100644
--- a/app/code/Magento/CatalogRule/composer.json
+++ b/app/code/Magento/CatalogRule/composer.json
@@ -17,7 +17,7 @@
"magento/module-catalog-rule-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "101.0.4",
+ "version": "101.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json
index ecad2425eccc8..93a937ffcc45e 100644
--- a/app/code/Magento/CatalogRuleConfigurable/composer.json
+++ b/app/code/Magento/CatalogRuleConfigurable/composer.json
@@ -13,7 +13,7 @@
"magento/module-catalog-rule": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json
index 2903ee3789da7..2a72af9cf96a5 100644
--- a/app/code/Magento/CatalogSearch/composer.json
+++ b/app/code/Magento/CatalogSearch/composer.json
@@ -20,7 +20,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json
index a1abf32d21a49..66011fcac287e 100644
--- a/app/code/Magento/CatalogUrlRewrite/composer.json
+++ b/app/code/Magento/CatalogUrlRewrite/composer.json
@@ -14,7 +14,7 @@
"magento/module-ui": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json
index 169d21215cb09..496651a6bfa17 100644
--- a/app/code/Magento/CatalogWidget/composer.json
+++ b/app/code/Magento/CatalogWidget/composer.json
@@ -14,7 +14,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php
index 6aa489dc8cacc..82085281c93d9 100644
--- a/app/code/Magento/Checkout/Controller/Cart/Add.php
+++ b/app/code/Magento/Checkout/Controller/Cart/Add.php
@@ -80,6 +80,9 @@ protected function _initProduct()
public function execute()
{
if (!$this->_formKeyValidator->validate($this->getRequest())) {
+ $this->messageManager->addErrorMessage(
+ __('Your session has expired')
+ );
return $this->resultRedirectFactory->create()->setPath('*/*/');
}
diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml
index b3163ca9c62f5..83dddf0aa8435 100644
--- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml
@@ -11,7 +11,8 @@
-
+
+
@@ -25,4 +26,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml
new file mode 100644
index 0000000000000..c23d860e4660d
--- /dev/null
+++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml
new file mode 100644
index 0000000000000..748db42af3bfe
--- /dev/null
+++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml
new file mode 100644
index 0000000000000..b72f238565fd6
--- /dev/null
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php
new file mode 100644
index 0000000000000..b06000662e093
--- /dev/null
+++ b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php
@@ -0,0 +1,95 @@
+formKeyValidator = $this->getMockBuilder(Validator::class)
+ ->disableOriginalConstructor()->getMock();
+ $this->resultRedirectFactory = $this->getMockBuilder(RedirectFactory::class)
+ ->disableOriginalConstructor()->getMock();
+ $this->request = $this->getMockBuilder(RequestInterface::class)
+ ->disableOriginalConstructor()->getmock();
+ $this->messageManager = $this->getMockBuilder(ManagerInterface::class)
+ ->disableOriginalConstructor()->getMock();
+
+ $this->objectManagerHelper = new ObjectManagerHelper($this);
+ $this->cartAdd = $this->objectManagerHelper->getObject(
+ Add::class,
+ [
+ '_formKeyValidator' => $this->formKeyValidator,
+ 'resultRedirectFactory' => $this->resultRedirectFactory,
+ '_request' => $this->request,
+ 'messageManager' => $this->messageManager,
+ ]
+ );
+ }
+
+ /**
+ * Test for method execute.
+ *
+ * @return void
+ */
+ public function testExecute()
+ {
+ $redirect = $this->getMockBuilder(\Magento\Framework\Controller\Result\Redirect::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $path = '*/*/';
+
+ $this->formKeyValidator->expects($this->once())->method('validate')->with($this->request)->willReturn(false);
+ $this->messageManager->expects($this->once())->method('addErrorMessage');
+ $this->resultRedirectFactory->expects($this->once())->method('create')->willReturn($redirect);
+ $redirect->expects($this->once())->method('setPath')->with($path)->willReturnSelf();
+ $this->assertEquals($redirect, $this->cartAdd->execute());
+ }
+}
diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json
index 9400af352196c..32cb6c53864db 100644
--- a/app/code/Magento/Checkout/composer.json
+++ b/app/code/Magento/Checkout/composer.json
@@ -26,7 +26,7 @@
"magento/module-cookie": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json
index d54b90d823386..a53558981e2f8 100644
--- a/app/code/Magento/CheckoutAgreements/composer.json
+++ b/app/code/Magento/CheckoutAgreements/composer.json
@@ -10,7 +10,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json
index ea31f1bda59b2..64e97e0a38e18 100644
--- a/app/code/Magento/Cms/composer.json
+++ b/app/code/Magento/Cms/composer.json
@@ -18,7 +18,7 @@
"magento/module-cms-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "102.0.5",
+ "version": "102.0.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json
index e86f4c073db74..414dcdf54921d 100644
--- a/app/code/Magento/CmsUrlRewrite/composer.json
+++ b/app/code/Magento/CmsUrlRewrite/composer.json
@@ -9,7 +9,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Config/App/Config/Type/System.php b/app/code/Magento/Config/App/Config/Type/System.php
index 07bb0ca8cf748..83c61f90f789a 100644
--- a/app/code/Magento/Config/App/Config/Type/System.php
+++ b/app/code/Magento/Config/App/Config/Type/System.php
@@ -5,58 +5,46 @@
*/
namespace Magento\Config\App\Config\Type;
+use Magento\Framework\App\Config\ConfigSourceInterface;
use Magento\Framework\App\Config\ConfigTypeInterface;
+use Magento\Framework\App\Config\Spi\PostProcessorInterface;
+use Magento\Framework\App\Config\Spi\PreProcessorInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Config\App\Config\Type\System\Reader;
use Magento\Framework\Serialize\Serializer\Sensitive as SensitiveSerializer;
use Magento\Framework\Serialize\Serializer\SensitiveFactory as SensitiveSerializerFactory;
+use Magento\Framework\App\ScopeInterface;
+use Magento\Framework\Cache\FrontendInterface;
+use Magento\Framework\Serialize\SerializerInterface;
+use Magento\Store\Model\Config\Processor\Fallback;
+use Magento\Store\Model\ScopeInterface as StoreScope;
/**
* System configuration type
+ *
* @api
* @since 100.1.2
*/
class System implements ConfigTypeInterface
{
const CACHE_TAG = 'config_scopes';
-
const CONFIG_TYPE = 'system';
- /**
- * @var \Magento\Framework\App\Config\ConfigSourceInterface
- */
- private $source;
-
/**
* @var array
*/
private $data = [];
/**
- * @var \Magento\Framework\App\Config\Spi\PostProcessorInterface
+ * @var PostProcessorInterface
*/
private $postProcessor;
/**
- * @var \Magento\Framework\App\Config\Spi\PreProcessorInterface
- */
- private $preProcessor;
-
- /**
- * @var \Magento\Framework\Cache\FrontendInterface
+ * @var FrontendInterface
*/
private $cache;
- /**
- * @var int
- */
- private $cachingNestedLevel;
-
- /**
- * @var \Magento\Store\Model\Config\Processor\Fallback
- */
- private $fallback;
-
/**
* @var SensitiveSerializer
*/
@@ -81,40 +69,37 @@ class System implements ConfigTypeInterface
*
* @var array
*/
- private $availableDataScopes = null;
+ private $availableDataScopes;
/**
- * @param \Magento\Framework\App\Config\ConfigSourceInterface $source
- * @param \Magento\Framework\App\Config\Spi\PostProcessorInterface $postProcessor
- * @param \Magento\Store\Model\Config\Processor\Fallback $fallback
- * @param \Magento\Framework\Cache\FrontendInterface $cache
- * @param \Magento\Framework\Serialize\SerializerInterface $serializer
- * @param \Magento\Framework\App\Config\Spi\PreProcessorInterface $preProcessor
+ * @param ConfigSourceInterface $source
+ * @param PostProcessorInterface $postProcessor
+ * @param Fallback $fallback
+ * @param FrontendInterface $cache
+ * @param SerializerInterface $serializer
+ * @param PreProcessorInterface $preProcessor
* @param int $cachingNestedLevel
* @param string $configType
* @param Reader $reader
* @param SensitiveSerializerFactory|null $sensitiveFactory
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function __construct(
- \Magento\Framework\App\Config\ConfigSourceInterface $source,
- \Magento\Framework\App\Config\Spi\PostProcessorInterface $postProcessor,
- \Magento\Store\Model\Config\Processor\Fallback $fallback,
- \Magento\Framework\Cache\FrontendInterface $cache,
- \Magento\Framework\Serialize\SerializerInterface $serializer,
- \Magento\Framework\App\Config\Spi\PreProcessorInterface $preProcessor,
+ ConfigSourceInterface $source,
+ PostProcessorInterface $postProcessor,
+ Fallback $fallback,
+ FrontendInterface $cache,
+ SerializerInterface $serializer,
+ PreProcessorInterface $preProcessor,
$cachingNestedLevel = 1,
$configType = self::CONFIG_TYPE,
Reader $reader = null,
SensitiveSerializerFactory $sensitiveFactory = null
) {
- $this->source = $source;
$this->postProcessor = $postProcessor;
- $this->preProcessor = $preProcessor;
$this->cache = $cache;
- $this->cachingNestedLevel = $cachingNestedLevel;
- $this->fallback = $fallback;
$this->configType = $configType;
$this->reader = $reader ?: ObjectManager::getInstance()
->get(Reader::class);
@@ -149,27 +134,52 @@ public function get($path = '')
{
if ($path === '') {
$this->data = array_replace_recursive($this->loadAllData(), $this->data);
+
return $this->data;
}
+
+ return $this->getWithParts($path);
+ }
+
+ /**
+ * Proceed with parts extraction from path.
+ *
+ * @param string $path
+ * @return array|int|string|boolean
+ */
+ private function getWithParts($path)
+ {
$pathParts = explode('/', $path);
- if (count($pathParts) === 1 && $pathParts[0] !== 'default') {
+
+ if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) {
if (!isset($this->data[$pathParts[0]])) {
$data = $this->readData();
$this->data = array_replace_recursive($data, $this->data);
}
+
return $this->data[$pathParts[0]];
}
+
$scopeType = array_shift($pathParts);
- if ($scopeType === 'default') {
+
+ if ($scopeType === ScopeInterface::SCOPE_DEFAULT) {
if (!isset($this->data[$scopeType])) {
$this->data = array_replace_recursive($this->loadDefaultScopeData($scopeType), $this->data);
}
+
return $this->getDataByPathParts($this->data[$scopeType], $pathParts);
}
+
$scopeId = array_shift($pathParts);
+
if (!isset($this->data[$scopeType][$scopeId])) {
- $this->data = array_replace_recursive($this->loadScopeData($scopeType, $scopeId), $this->data);
+ $scopeData = $this->loadScopeData($scopeType, $scopeId);
+
+ if (!isset($this->data[$scopeType][$scopeId])) {
+ $this->data = array_replace_recursive($scopeData, $this->data);
+ }
}
+
return isset($this->data[$scopeType][$scopeId])
? $this->getDataByPathParts($this->data[$scopeType][$scopeId], $pathParts)
: null;
@@ -183,11 +193,13 @@ public function get($path = '')
private function loadAllData()
{
$cachedData = $this->cache->load($this->configType);
+
if ($cachedData === false) {
$data = $this->readData();
} else {
$data = $this->serializer->unserialize($cachedData);
}
+
return $data;
}
@@ -200,12 +212,14 @@ private function loadAllData()
private function loadDefaultScopeData($scopeType)
{
$cachedData = $this->cache->load($this->configType . '_' . $scopeType);
+
if ($cachedData === false) {
$data = $this->readData();
$this->cacheData($data);
} else {
$data = [$scopeType => $this->serializer->unserialize($cachedData)];
}
+
return $data;
}
@@ -219,6 +233,7 @@ private function loadDefaultScopeData($scopeType)
private function loadScopeData($scopeType, $scopeId)
{
$cachedData = $this->cache->load($this->configType . '_' . $scopeType . '_' . $scopeId);
+
if ($cachedData === false) {
if ($this->availableDataScopes === null) {
$cachedScopeData = $this->cache->load($this->configType . '_scopes');
@@ -234,6 +249,7 @@ private function loadScopeData($scopeType, $scopeId)
} else {
$data = [$scopeType => [$scopeId => $this->serializer->unserialize($cachedData)]];
}
+
return $data;
}
@@ -257,7 +273,7 @@ private function cacheData(array $data)
[self::CACHE_TAG]
);
$scopes = [];
- foreach (['websites', 'stores'] as $curScopeType) {
+ foreach ([StoreScope::SCOPE_WEBSITES, StoreScope::SCOPE_STORES] as $curScopeType) {
foreach ($data[$curScopeType] ?? [] as $curScopeId => $curScopeData) {
$scopes[$curScopeType][$curScopeId] = 1;
$this->cache->save(
@@ -269,7 +285,7 @@ private function cacheData(array $data)
}
$this->cache->save(
$this->serializer->serialize($scopes),
- $this->configType . "_scopes",
+ $this->configType . '_scopes',
[self::CACHE_TAG]
);
}
@@ -292,6 +308,7 @@ private function getDataByPathParts($data, $pathParts)
return null;
}
}
+
return $data;
}
diff --git a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml
new file mode 100644
index 0000000000000..35903fe33d06c
--- /dev/null
+++ b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json
index 1201c5942b558..e43c9b0382e25 100644
--- a/app/code/Magento/Config/composer.json
+++ b/app/code/Magento/Config/composer.json
@@ -13,7 +13,7 @@
"magento/module-deploy": "100.2.*"
},
"type": "magento2-module",
- "version": "101.0.5",
+ "version": "101.0.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json
index 10e6637e7558a..b2070fe7ebc44 100644
--- a/app/code/Magento/ConfigurableImportExport/composer.json
+++ b/app/code/Magento/ConfigurableImportExport/composer.json
@@ -11,7 +11,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php
index 8848fc78dad6d..7f90d96e8a23e 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php
@@ -8,22 +8,12 @@
use Magento\Ui\Component\Control\Container;
use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableType;
-use Magento\Catalog\Model\Product\Type;
/**
* Class Save
*/
class Save extends Generic
{
- /**
- * @var array
- */
- private static $availableProductTypes = [
- ConfigurableType::TYPE_CODE,
- Type::TYPE_SIMPLE,
- Type::TYPE_VIRTUAL
- ];
-
/**
* {@inheritdoc}
*/
@@ -165,6 +155,6 @@ protected function getSaveAction()
*/
protected function isConfigurableProduct()
{
- return in_array($this->getProduct()->getTypeId(), self::$availableProductTypes);
+ return !$this->getProduct()->isComposite() || $this->getProduct()->getTypeId() === ConfigurableType::TYPE_CODE;
}
}
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php
index 8df6df53cc065..2d73b61245a4b 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php
@@ -38,7 +38,7 @@ protected function setUp()
->disableOriginalConstructor()
->getMock();
$this->productMock = $this->getMockBuilder(ProductInterface::class)
- ->setMethods(['isReadonly', 'isDuplicable'])
+ ->setMethods(['isReadonly', 'isDuplicable', 'isComposite'])
->getMockForAbstractClass();
$this->registryMock->expects(static::any())
diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json
index 4c583d79ce418..33ee30a25b012 100644
--- a/app/code/Magento/ConfigurableProduct/composer.json
+++ b/app/code/Magento/ConfigurableProduct/composer.json
@@ -24,7 +24,7 @@
"magento/module-product-links-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json
index d1fbc142b627f..ca6638924b8c6 100644
--- a/app/code/Magento/ConfigurableProductSales/composer.json
+++ b/app/code/Magento/ConfigurableProductSales/composer.json
@@ -12,7 +12,7 @@
"magento/module-configurable-product": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json
index 9ceca3bdfa80b..49ac8ec40dbc4 100644
--- a/app/code/Magento/Contact/composer.json
+++ b/app/code/Magento/Contact/composer.json
@@ -10,7 +10,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json
index 23bd37234f939..cc04b0ccd5d7d 100644
--- a/app/code/Magento/Cookie/composer.json
+++ b/app/code/Magento/Cookie/composer.json
@@ -10,7 +10,7 @@
"magento/module-backend": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json
index 5faf1d15e7782..a8c124dc57207 100644
--- a/app/code/Magento/Cron/composer.json
+++ b/app/code/Magento/Cron/composer.json
@@ -10,7 +10,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json
index 3afa8c6338378..da76425436038 100644
--- a/app/code/Magento/CurrencySymbol/composer.json
+++ b/app/code/Magento/CurrencySymbol/composer.json
@@ -11,7 +11,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Date.php b/app/code/Magento/Customer/Model/Metadata/Form/Date.php
index b27f6627439e4..6f14b2e6f1dad 100644
--- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php
+++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php
@@ -12,7 +12,7 @@
class Date extends AbstractData
{
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function extractValue(\Magento\Framework\App\RequestInterface $request)
{
@@ -21,7 +21,7 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request)
}
/**
- * {@inheritdoc}
+ * @inheritdoc
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
@@ -95,21 +95,15 @@ public function validateValue($value)
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function compactValue($value)
{
- if ($value !== false) {
- if (empty($value)) {
- $value = null;
- }
- return $value;
- }
- return false;
+ return $value;
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function restoreValue($value)
{
@@ -117,7 +111,7 @@ public function restoreValue($value)
}
/**
- * {@inheritdoc}
+ * @inheritdoc
*/
public function outputValue($format = \Magento\Customer\Model\Metadata\ElementFactory::OUTPUT_FORMAT_TEXT)
{
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml
index 3f816425a81f7..085c944cd3d3b 100644
--- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml
@@ -17,6 +17,5 @@
-
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml
new file mode 100644
index 0000000000000..a53968a920806
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml
new file mode 100644
index 0000000000000..a8ee604edee0a
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml
index 7d106a35f0e13..5414b449ca470 100644
--- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml
@@ -13,5 +13,6 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml
index ba2c17051567b..73a53d334db5f 100644
--- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml
@@ -5,11 +5,15 @@
* See COPYING.txt for license details.
*/
-->
-
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml
new file mode 100644
index 0000000000000..7951c91aab61a
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php
index 6329970e0ca9c..553efea38a82b 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php
@@ -12,6 +12,9 @@ class DateTest extends AbstractFormTestCase
/** @var \Magento\Customer\Model\Metadata\Form\Date */
protected $date;
+ /**
+ * @inheritdoc
+ */
protected function setUp()
{
parent::setUp();
@@ -46,6 +49,9 @@ protected function setUp()
);
}
+ /**
+ * Test extractValue
+ */
public function testExtractValue()
{
$requestMock = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class)
@@ -174,7 +180,7 @@ public function compactAndRestoreValueDataProvider()
return [
[1, 1],
[false, false],
- ['', null],
+ [null, null],
['test', 'test'],
[['element1', 'element2'], ['element1', 'element2']]
];
@@ -191,6 +197,9 @@ public function testRestoreValue($value, $expected)
$this->assertSame($expected, $this->date->restoreValue($value));
}
+ /**
+ * Test outputValue
+ */
public function testOutputValue()
{
$this->assertEquals(null, $this->date->outputValue());
diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json
index 65cb1e257f5b6..e3d8f22088ef6 100644
--- a/app/code/Magento/Customer/composer.json
+++ b/app/code/Magento/Customer/composer.json
@@ -29,7 +29,7 @@
"magento/module-customer-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "101.0.5",
+ "version": "101.0.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json
index 3ce37a3c881ec..d9c428ffcf5b7 100644
--- a/app/code/Magento/CustomerAnalytics/composer.json
+++ b/app/code/Magento/CustomerAnalytics/composer.json
@@ -7,7 +7,7 @@
"magento/module-customer": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json
index 1bf1993ff8602..d71be31723043 100644
--- a/app/code/Magento/CustomerImportExport/composer.json
+++ b/app/code/Magento/CustomerImportExport/composer.json
@@ -12,7 +12,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json
index 829dda9dea8e7..3c28dc345cba4 100644
--- a/app/code/Magento/Deploy/composer.json
+++ b/app/code/Magento/Deploy/composer.json
@@ -10,7 +10,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json
index 0a8853064968d..e2236e248cfc3 100644
--- a/app/code/Magento/Developer/composer.json
+++ b/app/code/Magento/Developer/composer.json
@@ -8,7 +8,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php
index 6262d71c4edcc..55df0748b1f06 100644
--- a/app/code/Magento/Dhl/Model/Carrier.php
+++ b/app/code/Magento/Dhl/Model/Carrier.php
@@ -1970,6 +1970,6 @@ protected function isDutiable($origCountryId, $destCountryId)
return
self::DHL_CONTENT_TYPE_NON_DOC == $this->getConfigData('content_type')
- && !$this->_isDomestic;
+ || !$this->_isDomestic;
}
}
diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json
index 47bdcff4d6be9..fae1eb9e1454f 100644
--- a/app/code/Magento/Dhl/composer.json
+++ b/app/code/Magento/Dhl/composer.json
@@ -19,7 +19,7 @@
"magento/module-checkout": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml b/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml
new file mode 100644
index 0000000000000..732a27504a97d
--- /dev/null
+++ b/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml b/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml
new file mode 100644
index 0000000000000..e48b2a0a80084
--- /dev/null
+++ b/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json
index c2749673cb062..c6de1d1eefe6c 100644
--- a/app/code/Magento/Directory/composer.json
+++ b/app/code/Magento/Directory/composer.json
@@ -10,7 +10,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json
index 9be657435161b..e737c3121f454 100644
--- a/app/code/Magento/Downloadable/composer.json
+++ b/app/code/Magento/Downloadable/composer.json
@@ -25,7 +25,7 @@
"magento/module-downloadable-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json
index a91c87f60c065..763eceaea8460 100644
--- a/app/code/Magento/DownloadableImportExport/composer.json
+++ b/app/code/Magento/DownloadableImportExport/composer.json
@@ -12,7 +12,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php
index c1f693b92d2a1..563f973abda24 100644
--- a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php
+++ b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php
@@ -222,7 +222,7 @@ public function setInAllAttributeSetsFilter(array $setIds)
$setIds
)
->group('entity_attribute.attribute_id')
- ->having('count = ' . count($setIds));
+ ->having(new \Zend_Db_Expr('COUNT(*)') . ' = ' . count($setIds));
}
//$this->getSelect()->distinct(true);
diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php
index 138e1363bb6dd..4a0fd5469767e 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php
@@ -150,8 +150,8 @@ public function testSetInAllAttributeSetsFilter()
$this->selectMock->expects($this->atLeastOnce())->method('group')->with('entity_attribute.attribute_id')
->willReturnSelf();
- $this->selectMock->expects($this->atLeastOnce())->method('having')->with('count = ' . count($setIds))
- ->willReturnSelf();
+ $this->selectMock->expects($this->atLeastOnce())->method('having')
+ ->with(new \Zend_Db_Expr('COUNT(*)') . ' = ' . count($setIds))->willReturnSelf();
$this->model->setInAllAttributeSetsFilter($setIds);
}
diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json
index 516bd7c9493b0..2f0a7fa3c79a9 100644
--- a/app/code/Magento/Eav/composer.json
+++ b/app/code/Magento/Eav/composer.json
@@ -11,7 +11,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "101.0.4",
+ "version": "101.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php
index 9f248f2cebc3d..eedcf5009ccfa 100644
--- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php
+++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php
@@ -22,21 +22,21 @@ public function execute()
if (count($template->getSystemConfigPathsWhereCurrentlyUsed()) == 0) {
$template->delete();
// display success message
- $this->messageManager->addSuccess(__('You deleted the email template.'));
+ $this->messageManager->addSuccessMessage(__('You deleted the email template.'));
$this->_objectManager->get(\Magento\Framework\App\ReinitableConfig::class)->reinit();
// go to grid
$this->_redirect('adminhtml/*/');
return;
}
// display error message
- $this->messageManager->addError(__('The email template is currently being used.'));
+ $this->messageManager->addErrorMessage(__('The email template is currently being used.'));
// redirect to edit form
$this->_redirect('adminhtml/*/edit', ['id' => $template->getId()]);
return;
} catch (\Magento\Framework\Exception\LocalizedException $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
- $this->messageManager->addError(
+ $this->messageManager->addErrorMessage(
__('We can\'t delete email template data right now. Please review log and try again.')
);
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
@@ -52,7 +52,7 @@ public function execute()
}
}
// display error message
- $this->messageManager->addError(__('We can\'t find an email template to delete.'));
+ $this->messageManager->addErrorMessage(__('We can\'t find an email template to delete.'));
// go to grid
$this->_redirect('adminhtml/*/');
}
diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php
index e23cd6cf17eb2..404f97c937167 100644
--- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php
+++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php
@@ -21,7 +21,9 @@ public function execute()
$this->_view->renderLayout();
$this->getResponse()->setHeader('Content-Security-Policy', "script-src 'none'");
} catch (\Exception $e) {
- $this->messageManager->addError(__('An error occurred. The email template can not be opened for preview.'));
+ $this->messageManager->addErrorMessage(
+ __('An error occurred. The email template can not be opened for preview.')
+ );
$this->_redirect('adminhtml/*/');
}
}
diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php
index cf31259b7885d..135506f4068a8 100644
--- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php
+++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php
@@ -22,7 +22,7 @@ public function execute()
$template = $this->_initTemplate('id');
if (!$template->getId() && $id) {
- $this->messageManager->addError(__('This email template no longer exists.'));
+ $this->messageManager->addErrorMessage(__('This email template no longer exists.'));
$this->_redirect('adminhtml/*/');
return;
}
@@ -55,7 +55,7 @@ public function execute()
$template->save();
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData(false);
- $this->messageManager->addSuccess(__('You saved the email template.'));
+ $this->messageManager->addSuccessMessage(__('You saved the email template.'));
$this->_redirect('adminhtml/*');
} catch (\Exception $e) {
$this->_objectManager->get(
@@ -64,7 +64,7 @@ public function execute()
'email_template_form_data',
$request->getParams()
);
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
$this->_forward('new');
}
}
diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json
index 6b96387a80728..bffc825a4c872 100644
--- a/app/code/Magento/Email/composer.json
+++ b/app/code/Magento/Email/composer.json
@@ -15,7 +15,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json
index 931fc8888af43..57298d2a9736b 100644
--- a/app/code/Magento/EncryptionKey/composer.json
+++ b/app/code/Magento/EncryptionKey/composer.json
@@ -8,7 +8,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json
index a28a124552e10..55ff9fb83eb68 100644
--- a/app/code/Magento/Fedex/composer.json
+++ b/app/code/Magento/Fedex/composer.json
@@ -15,7 +15,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json
index 49067e3f64a1b..6a098af78e28b 100644
--- a/app/code/Magento/GiftMessage/composer.json
+++ b/app/code/Magento/GiftMessage/composer.json
@@ -17,7 +17,7 @@
"magento/module-multishipping": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json
index 6a72acaae8747..da44eb6c785d2 100644
--- a/app/code/Magento/GoogleAdwords/composer.json
+++ b/app/code/Magento/GoogleAdwords/composer.json
@@ -8,7 +8,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json
index 221eea4b0e09d..a5ab4caff2927 100644
--- a/app/code/Magento/GoogleAnalytics/composer.json
+++ b/app/code/Magento/GoogleAnalytics/composer.json
@@ -12,7 +12,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json
index 4ee4ab5f4f7e5..a84645b897298 100644
--- a/app/code/Magento/GoogleOptimizer/composer.json
+++ b/app/code/Magento/GoogleOptimizer/composer.json
@@ -12,7 +12,7 @@
"magento/module-ui": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json
index c8c9c0148b79f..09d5f8894b354 100644
--- a/app/code/Magento/GroupedImportExport/composer.json
+++ b/app/code/Magento/GroupedImportExport/composer.json
@@ -11,7 +11,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json
index 828f65544eb07..c2031fc3332f0 100644
--- a/app/code/Magento/GroupedProduct/composer.json
+++ b/app/code/Magento/GroupedProduct/composer.json
@@ -21,7 +21,7 @@
"magento/module-grouped-product-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json
index 2e89ba92a1e10..affe85aed48bd 100644
--- a/app/code/Magento/ImportExport/composer.json
+++ b/app/code/Magento/ImportExport/composer.json
@@ -12,7 +12,7 @@
"ext-ctype": "*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json
index a884ca1ca5f0d..1667f8a05a5e8 100644
--- a/app/code/Magento/Indexer/composer.json
+++ b/app/code/Magento/Indexer/composer.json
@@ -7,7 +7,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json
index 6ec2364232169..cd7684254e408 100644
--- a/app/code/Magento/InstantPurchase/composer.json
+++ b/app/code/Magento/InstantPurchase/composer.json
@@ -2,7 +2,7 @@
"name": "magento/module-instant-purchase",
"description": "N/A",
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json
index 4bc2269af9822..75bd7a04d0dcc 100644
--- a/app/code/Magento/Integration/composer.json
+++ b/app/code/Magento/Integration/composer.json
@@ -12,7 +12,7 @@
"magento/module-authorization": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json
index 23d6c79c58443..b8dfc77532784 100644
--- a/app/code/Magento/LayeredNavigation/composer.json
+++ b/app/code/Magento/LayeredNavigation/composer.json
@@ -8,7 +8,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json
index 951b51c474e24..5ce8666ec1bb2 100644
--- a/app/code/Magento/Marketplace/composer.json
+++ b/app/code/Magento/Marketplace/composer.json
@@ -7,7 +7,7 @@
"magento/module-backend": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json
index a06d12add7b9f..afb290a682274 100644
--- a/app/code/Magento/MediaStorage/composer.json
+++ b/app/code/Magento/MediaStorage/composer.json
@@ -9,7 +9,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json
index 05aee8b3ffe53..97bc64e48ce01 100644
--- a/app/code/Magento/Msrp/composer.json
+++ b/app/code/Magento/Msrp/composer.json
@@ -16,7 +16,7 @@
"magento/module-msrp-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json
index 9fd762d631657..111204915e4c8 100644
--- a/app/code/Magento/Multishipping/composer.json
+++ b/app/code/Magento/Multishipping/composer.json
@@ -15,7 +15,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json
index d8bed94a368fa..18a1a2df57336 100644
--- a/app/code/Magento/NewRelicReporting/composer.json
+++ b/app/code/Magento/NewRelicReporting/composer.json
@@ -13,7 +13,7 @@
"magento/magento-composer-installer": "*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php
index 3452d9821ef5a..427c32e7c9e6c 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php
@@ -8,6 +8,11 @@
use Magento\Framework\App\TemplateTypesInterface;
use Magento\Framework\Mail\MessageInterface;
+/**
+ * Tests \Magento\Newsletter\Model\Queue\TransportBuilder.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
class TransportBuilderTest extends \PHPUnit\Framework\TestCase
{
/**
@@ -45,6 +50,11 @@ class TransportBuilderTest extends \PHPUnit\Framework\TestCase
*/
protected $mailTransportFactoryMock;
+ /**
+ * @var \Magento\Framework\Mail\MessageInterfaceFactory | \PHPUnit_Framework_MockObject_MockObject
+ */
+ private $messageFactoryMock;
+
/**
* @return void
*/
@@ -52,7 +62,10 @@ public function setUp()
{
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->templateFactoryMock = $this->createMock(\Magento\Framework\Mail\Template\FactoryInterface::class);
- $this->messageMock = $this->createMock(\Magento\Framework\Mail\Message::class);
+ $this->messageMock = $this->getMockBuilder(\Magento\Framework\Mail\MessageInterface::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['setMessageType', 'setSubject', 'setBody'])
+ ->getMockForAbstractClass();
$this->objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class);
$this->senderResolverMock = $this->createMock(\Magento\Framework\Mail\Template\SenderResolverInterface::class);
$this->mailTransportFactoryMock = $this->getMockBuilder(
@@ -60,6 +73,11 @@ public function setUp()
)->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
+ $this->messageFactoryMock = $this->getMockBuilder(\Magento\Framework\Mail\MessageInterfaceFactory::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['create'])
+ ->getMockForAbstractClass();
+ $this->messageFactoryMock->expects($this->atLeastOnce())->method('create')->willReturn($this->messageMock);
$this->builder = $objectManagerHelper->getObject(
$this->builderClassName,
[
@@ -67,7 +85,8 @@ public function setUp()
'message' => $this->messageMock,
'objectManager' => $this->objectManagerMock,
'senderResolver' => $this->senderResolverMock,
- 'mailTransportFactory' => $this->mailTransportFactoryMock
+ 'mailTransportFactory' => $this->mailTransportFactoryMock,
+ 'messageFactory' => $this->messageFactoryMock,
]
);
}
@@ -95,95 +114,33 @@ public function testGetTransport(
$vars = ['reason' => 'Reason', 'customer' => 'Customer'];
$options = ['area' => 'frontend', 'store' => 1];
$template = $this->createMock(\Magento\Email\Model\Template::class);
- $template->expects($this->once())->method('setVars')->with($this->equalTo($vars))->will($this->returnSelf());
- $template->expects(
- $this->once()
- )->method(
- 'setOptions'
- )->with(
- $this->equalTo($options)
- )->will(
- $this->returnSelf()
- );
- $template->expects($this->once())->method('getSubject')->will($this->returnValue('Email Subject'));
- $template->expects($this->once())->method('setData')->with($this->equalTo($data))->will($this->returnSelf());
+ $template->expects($this->once())->method('setVars')->with($vars)->willReturnSelf();
+ $template->expects($this->once())->method('setOptions')->with($options)->willReturnSelf();
+ $template->expects($this->once())->method('getSubject')->willReturn('Email Subject');
+ $template->expects($this->once())->method('setData')->with($data)->willReturnSelf();
$template->expects($this->once())
->method('getProcessedTemplate')
->with($vars)
- ->will($this->returnValue($bodyText));
+ ->willReturn($bodyText);
$template->expects($this->once())
->method('setTemplateFilter')
->with($filter);
- $this->templateFactoryMock->expects(
- $this->once()
- )->method(
- 'get'
- )->with(
- $this->equalTo('identifier')
- )->will(
- $this->returnValue($template)
- );
+ $this->templateFactoryMock->expects($this->once())->method('get')->with('identifier')->willReturn($template);
- $this->messageMock->expects(
- $this->once()
- )->method(
- 'setSubject'
- )->with(
- $this->equalTo('Email Subject')
- )->will(
- $this->returnSelf()
- );
- $this->messageMock->expects(
- $this->once()
- )->method(
- 'setMessageType'
- )->with(
- $this->equalTo($messageType)
- )->will(
- $this->returnSelf()
- );
- $this->messageMock->expects(
- $this->once()
- )->method(
- 'setBody'
- )->with(
- $this->equalTo($bodyText)
- )->will(
- $this->returnSelf()
- );
+ $this->messageMock->expects($this->once())->method('setSubject')->with('Email Subject')->willReturnSelf();
+ $this->messageMock->expects($this->once())->method('setMessageType')->with($messageType)->willReturnSelf();
+ $this->messageMock->expects($this->once())->method('setBody')->with($bodyText)->willReturnSelf();
$transport = $this->createMock(\Magento\Framework\Mail\TransportInterface::class);
- $this->mailTransportFactoryMock->expects(
- $this->at(0)
- )->method(
- 'create'
- )->with(
- $this->equalTo(['message' => $this->messageMock])
- )->will(
- $this->returnValue($transport)
- );
+ $this->mailTransportFactoryMock->expects($this->at(0))->method('create')
+ ->with(['message' => $this->messageMock])->willReturn($transport);
- $this->objectManagerMock->expects(
- $this->at(0)
- )->method(
- 'create'
- )->with(
- $this->equalTo(\Magento\Framework\Mail\Message::class)
- )->will(
- $this->returnValue($transport)
- );
-
- $this->builder->setTemplateIdentifier(
- 'identifier'
- )->setTemplateVars(
- $vars
- )->setTemplateOptions(
- $options
- )->setTemplateData(
- $data
- );
+ $this->builder->setTemplateIdentifier('identifier')
+ ->setTemplateVars($vars)
+ ->setTemplateOptions($options)
+ ->setTemplateData($data);
$result = $this->builder->getTransport();
diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json
index 5b3a4ae3561f7..ef6158960aeee 100644
--- a/app/code/Magento/Newsletter/composer.json
+++ b/app/code/Magento/Newsletter/composer.json
@@ -14,7 +14,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json
index b84a064960d7e..b737149d30a94 100644
--- a/app/code/Magento/OfflinePayments/composer.json
+++ b/app/code/Magento/OfflinePayments/composer.json
@@ -11,7 +11,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json
index f364424736fde..24b5f877c1279 100644
--- a/app/code/Magento/OfflineShipping/composer.json
+++ b/app/code/Magento/OfflineShipping/composer.json
@@ -19,7 +19,7 @@
"magento/module-offline-shipping-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json
index e2557a3e85cf9..d492f3bc23a5f 100644
--- a/app/code/Magento/PageCache/composer.json
+++ b/app/code/Magento/PageCache/composer.json
@@ -9,7 +9,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json
index bb0bbdac328ae..678aaa01c2ae8 100644
--- a/app/code/Magento/Payment/composer.json
+++ b/app/code/Magento/Payment/composer.json
@@ -12,7 +12,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json
index fb9b2f08f730c..281b7084e7f1b 100644
--- a/app/code/Magento/Paypal/composer.json
+++ b/app/code/Magento/Paypal/composer.json
@@ -26,7 +26,7 @@
"magento/module-checkout-agreements": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json
index 7077d13b5e21d..9debadd193a9d 100644
--- a/app/code/Magento/Persistent/composer.json
+++ b/app/code/Magento/Persistent/composer.json
@@ -12,7 +12,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json
index fb74623ce4550..11dc94edcbcd3 100644
--- a/app/code/Magento/ProductAlert/composer.json
+++ b/app/code/Magento/ProductAlert/composer.json
@@ -13,7 +13,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json
index 71a73c9d19a6a..811422d160d8d 100644
--- a/app/code/Magento/ProductVideo/composer.json
+++ b/app/code/Magento/ProductVideo/composer.json
@@ -16,7 +16,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php
index 9bdcb083808ad..e2ee8bbad01b9 100644
--- a/app/code/Magento/Quote/Model/QuoteManagement.php
+++ b/app/code/Magento/Quote/Model/QuoteManagement.php
@@ -565,6 +565,10 @@ protected function _prepareCustomerQuote($quote)
//Make provided address as default shipping address
$shippingAddress->setIsDefaultShipping(true);
$hasDefaultShipping = true;
+ if (!$hasDefaultBilling && !$billing->getSaveInAddressBook()) {
+ $shippingAddress->setIsDefaultBilling(true);
+ $hasDefaultBilling = true;
+ }
}
//save here new customer address
$shippingAddress->setCustomerId($quote->getCustomerId());
diff --git a/app/code/Magento/Quote/Model/QuoteValidator.php b/app/code/Magento/Quote/Model/QuoteValidator.php
index ac3820c842967..1d5ff86b17429 100644
--- a/app/code/Magento/Quote/Model/QuoteValidator.php
+++ b/app/code/Magento/Quote/Model/QuoteValidator.php
@@ -12,7 +12,7 @@
use Magento\Framework\Message\Error;
use Magento\Quote\Model\Quote as QuoteEntity;
use Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage as OrderAmountValidationMessage;
-use Magento\Store\Model\ScopeInterface;
+use Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface;
/**
* @api
@@ -35,20 +35,29 @@ class QuoteValidator
*/
private $minimumAmountMessage;
+ /**
+ * @var QuoteValidationRuleInterface
+ */
+ private $quoteValidationRule;
+
/**
* QuoteValidator constructor.
*
* @param AllowedCountries|null $allowedCountryReader
* @param OrderAmountValidationMessage|null $minimumAmountMessage
+ * @param QuoteValidationRuleInterface|null $quoteValidationRule
*/
public function __construct(
AllowedCountries $allowedCountryReader = null,
- OrderAmountValidationMessage $minimumAmountMessage = null
+ OrderAmountValidationMessage $minimumAmountMessage = null,
+ QuoteValidationRuleInterface $quoteValidationRule = null
) {
$this->allowedCountryReader = $allowedCountryReader ?: ObjectManager::getInstance()
->get(AllowedCountries::class);
$this->minimumAmountMessage = $minimumAmountMessage ?: ObjectManager::getInstance()
->get(OrderAmountValidationMessage::class);
+ $this->quoteValidationRule = $quoteValidationRule ?: ObjectManager::getInstance()
+ ->get(QuoteValidationRuleInterface::class);
}
/**
@@ -82,66 +91,24 @@ public function validateBeforeSubmit(QuoteEntity $quote)
throw new LocalizedException(__($errors ?: 'Something went wrong. Please try to place the order again.'));
}
- if (!$quote->isVirtual()) {
- $this->validateShippingAddress($quote);
- }
-
- $billingAddress = $quote->getBillingAddress();
- $billingAddress->setStoreId($quote->getStoreId());
- if ($billingAddress->validate() !== true) {
- throw new LocalizedException(
- __(
- 'Please check the billing address information. %1',
- implode(' ', $quote->getBillingAddress()->validate())
- )
- );
- }
- if (!$quote->getPayment()->getMethod()) {
- throw new LocalizedException(__('Please select a valid payment method.'));
- }
- if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
- throw new LocalizedException($this->minimumAmountMessage->getMessage());
+ foreach ($this->quoteValidationRule->validate($quote) as $validationResult) {
+ if ($validationResult->isValid()) {
+ continue;
+ }
+
+ $messages = $validationResult->getErrors();
+ $defaultMessage = array_shift($messages);
+ if ($defaultMessage && !empty($messages)) {
+ $defaultMessage .= ' %1';
+ }
+ if ($defaultMessage) {
+ throw new LocalizedException(__($defaultMessage, implode(' ', $messages)));
+ }
}
return $this;
}
- /**
- * Validates shipping address.
- *
- * @param Quote $quote
- * @throws LocalizedException
- */
- private function validateShippingAddress(QuoteEntity $quote)
- {
- $address = $quote->getShippingAddress();
- $address->setStoreId($quote->getStoreId());
- if ($address->validate() !== true) {
- throw new LocalizedException(
- __(
- 'Please check the shipping address information. %1',
- implode(' ', $address->validate())
- )
- );
- }
-
- // Checks if country id present in the allowed countries list.
- if (!in_array(
- $address->getCountryId(),
- $this->allowedCountryReader->getAllowedCountries(ScopeInterface::SCOPE_STORE, $quote->getStoreId())
- )) {
- throw new LocalizedException(
- __('Some addresses cannot be used due to country-specific configurations.')
- );
- }
-
- $method = $address->getShippingMethod();
- $rate = $address->getShippingRateByCode($method);
- if (!$method || !$rate) {
- throw new LocalizedException(__('Please specify a shipping method.'));
- }
- }
-
/**
* Parses quote error messages and concatenates them into single string.
*
diff --git a/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php
new file mode 100644
index 0000000000000..840e94e3ece1f
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php
@@ -0,0 +1,69 @@
+allowedCountryReader = $allowedCountryReader;
+ $this->validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+
+ if (!$quote->isVirtual()) {
+ $validationResult =
+ in_array(
+ $quote->getShippingAddress()->getCountryId(),
+ $this->allowedCountryReader->getAllowedCountries()
+ );
+ if (!$validationResult) {
+ $validationErrors = [__($this->generalMessage)];
+ }
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php
new file mode 100644
index 0000000000000..fbacbf1c8d30c
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php
@@ -0,0 +1,56 @@
+validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+ $validationResult = $quote->getBillingAddress()->validate();
+ if ($validationResult !== true) {
+ $validationErrors = [__($this->generalMessage)];
+ }
+ if (is_array($validationResult)) {
+ $validationErrors = array_merge($validationErrors, $validationResult);
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php
new file mode 100644
index 0000000000000..34e953be43c74
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php
@@ -0,0 +1,66 @@
+amountValidationMessage = $amountValidationMessage;
+ $this->validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ * @throws \Zend_Currency_Exception
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+ $validationResult = $quote->validateMinimumAmount($quote->getIsMultiShipping());
+ if (!$validationResult) {
+ if (!$this->generalMessage) {
+ $this->generalMessage = $this->amountValidationMessage->getMessage();
+ }
+ $validationErrors = [__($this->generalMessage)];
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php
new file mode 100644
index 0000000000000..bf2b813541fb0
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php
@@ -0,0 +1,53 @@
+validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+ $validationResult = $quote->getPayment()->getMethod();
+ if (!$validationResult) {
+ $validationErrors = [__($this->generalMessage)];
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php
new file mode 100644
index 0000000000000..6a75be3acce89
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php
@@ -0,0 +1,59 @@
+validationRules = $validationRules;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $aggregateResult = [];
+
+ foreach ($this->validationRules as $validationRule) {
+ $ruleValidationResult = $validationRule->validate($quote);
+ foreach ($ruleValidationResult as $item) {
+ if (!$item->isValid()) {
+ array_push($aggregateResult, $item);
+ }
+ }
+ }
+
+ return $aggregateResult;
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php
new file mode 100644
index 0000000000000..1a777e3f1a5fe
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php
@@ -0,0 +1,25 @@
+validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+
+ if (!$quote->isVirtual()) {
+ $validationResult = $quote->getShippingAddress()->validate();
+ if ($validationResult !== true) {
+ $validationErrors = [__($this->generalMessage)];
+ }
+ if (is_array($validationResult)) {
+ $validationErrors = array_merge($validationErrors, $validationResult);
+ }
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php
new file mode 100644
index 0000000000000..6df7f663b0630
--- /dev/null
+++ b/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php
@@ -0,0 +1,58 @@
+validationResultFactory = $validationResultFactory;
+ $this->generalMessage = $generalMessage;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function validate(Quote $quote): array
+ {
+ $validationErrors = [];
+
+ if (!$quote->isVirtual()) {
+ $shippingMethod = $quote->getShippingAddress()->getShippingMethod();
+ $shippingRate = $quote->getShippingAddress()->getShippingRateByCode($shippingMethod);
+ $validationResult = $shippingMethod && $shippingRate;
+ if (!$validationResult) {
+ $validationErrors = [__($this->generalMessage)];
+ }
+ }
+
+ return [$this->validationResultFactory->create(['errors' => $validationErrors])];
+ }
+}
diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php
index ba70779351804..41a8d73d2de26 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php
@@ -92,233 +92,4 @@ public function testCheckQuoteAmountExistingError()
$this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER + 1)
);
}
-
- public function testCheckQuoteAmountAmountLessThanAvailable()
- {
- $this->quote->method('getHasError')
- ->willReturn(false);
-
- $this->quote->expects(self::never())
- ->method('setHasError');
-
- $this->quote->expects(self::never())
- ->method('addMessage');
-
- self::assertSame(
- $this->quoteValidator,
- $this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER - 1)
- );
- }
-
- public function testCheckQuoteAmountAmountGreaterThanAvailable()
- {
- $this->quote ->method('getHasError')
- ->willReturn(false);
-
- $this->quote->method('setHasError')
- ->with(true);
-
- $this->quote->method('addMessage')
- ->with(__('This item price or quantity is not valid for checkout.'));
-
- self::assertSame(
- $this->quoteValidator,
- $this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER + 1)
- );
- }
-
- /**
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Please check the shipping address information.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfShippingAddressIsInvalid()
- {
- $shippingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['setStoreId', 'validate'])
- ->getMock();
- $this->quote->method('getShippingAddress')
- ->willReturn($shippingAddress);
- $this->quote->method('isVirtual')
- ->willReturn(false);
- $shippingAddress->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $shippingAddress->method('validate')
- ->willReturn(['Invalid Shipping Address']);
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
-
- /**
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Please specify a shipping method.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfShippingRateIsNotSelected()
- {
- $shippingMethod = 'checkmo';
- $shippingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['setStoreId', 'validate', 'getCountryId', 'getShippingMethod', 'getShippingRateByCode'])
- ->getMock();
-
- $this->allowedCountryReader->method('getAllowedCountries')
- ->willReturn(['US' => 'US']);
-
- $this->quote ->method('getShippingAddress')
- ->willReturn($shippingAddress);
- $this->quote->method('isVirtual')
- ->willReturn(false);
- $shippingAddress->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $shippingAddress->method('validate')
- ->willReturn(true);
- $shippingAddress->method('getCountryId')
- ->willReturn('US');
- $shippingAddress->method('getShippingMethod')
- ->willReturn($shippingMethod);
- $shippingAddress->method('getShippingRateByCode')
- ->with($shippingMethod);
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
-
- /**
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Please check the billing address information.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfBillingAddressIsNotValid()
- {
- $billingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['setStoreId', 'validate'])
- ->getMock();
- $this->quote->method('getBillingAddress')
- ->willReturn($billingAddress);
- $this->quote->method('isVirtual')
- ->willReturn(true);
- $billingAddress->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $billingAddress->method('validate')
- ->willReturn(['Invalid Billing Address']);
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
-
- /**
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Please select a valid payment method.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfPaymentMethodIsNotSelected()
- {
- $payment = $this->createMock(Payment::class);
- $billingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['setStoreId', 'validate'])
- ->getMock();
- $billingAddress->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $billingAddress->method('validate')
- ->willReturn(true);
-
- $this->quote->method('getBillingAddress')
- ->willReturn($billingAddress);
- $this->quote->method('getPayment')
- ->willReturn($payment);
- $this->quote->method('isVirtual')
- ->willReturn(true);
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
-
- /**
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Minimum Order Amount Exceeded.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfMinimumOrderAmount()
- {
- $payment = $this->createMock(Payment::class);
- $payment->method('getMethod')
- ->willReturn('checkmo');
-
- $billingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['validate', 'setStoreId'])
- ->getMock();
- $billingAddress->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $billingAddress->method('validate')
- ->willReturn(true);
-
- $this->quote->method('getBillingAddress')
- ->willReturn($billingAddress);
- $this->quote->method('getPayment')
- ->willReturn($payment);
- $this->quote->method('isVirtual')
- ->willReturn(true);
-
- $this->quote->method('getIsMultiShipping')
- ->willReturn(false);
- $this->quote->method('validateMinimumAmount')
- ->willReturn(false);
-
- $this->orderAmountValidationMessage->method('getMessage')
- ->willReturn(__("Minimum Order Amount Exceeded."));
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
-
- /**
- * Test case when country id not present in allowed countries list.
- *
- * @expectedException \Magento\Framework\Exception\LocalizedException
- * @expectedExceptionMessage Some addresses cannot be used due to country-specific configurations.
- */
- public function testValidateBeforeSubmitThrowsExceptionIfCountrySpecificConfigurations()
- {
- $this->allowedCountryReader->method('getAllowedCountries')
- ->with('store', self::$storeId)
- ->willReturn(['EE' => 'EE']);
-
- $address = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['setStoreId', 'validate', 'getCountryId'])
- ->getMock();
- $address->expects(self::atLeastOnce())
- ->method('setStoreId')
- ->with(self::$storeId);
- $address->method('validate')
- ->willReturn(true);
- $address->method('getCountryId')
- ->willReturn('EU');
-
- $payment = $this->getMockBuilder(Payment::class)
- ->setMethods(['getMethod'])
- ->disableOriginalConstructor()
- ->getMock();
- $payment->method('getMethod')
- ->willReturn(true);
-
- $billingAddress = $this->getMockBuilder(Address::class)
- ->disableOriginalConstructor()
- ->setMethods(['validate'])
- ->getMock();
- $billingAddress->method('validate')
- ->willReturn(true);
-
- $this->quote->method('getShippingAddress')
- ->willReturn($address);
- $this->quote->method('isVirtual')
- ->willReturn(false);
- $this->quote->method('getBillingAddress')
- ->willReturn($billingAddress);
- $this->quote->method('getPayment')
- ->willReturn($payment);
-
- $this->quoteValidator->validateBeforeSubmit($this->quote);
- }
}
diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json
index 9481442963d6b..0d67eaaf6ec74 100644
--- a/app/code/Magento/Quote/composer.json
+++ b/app/code/Magento/Quote/composer.json
@@ -23,7 +23,7 @@
"magento/module-webapi": "100.2.*"
},
"type": "magento2-module",
- "version": "101.0.4",
+ "version": "101.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Quote/etc/adminhtml/di.xml b/app/code/Magento/Quote/etc/adminhtml/di.xml
new file mode 100644
index 0000000000000..fb6c118fb92e9
--- /dev/null
+++ b/app/code/Magento/Quote/etc/adminhtml/di.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ - Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule
+ - Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule
+ - Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule
+ - Magento\Quote\Model\ValidationRules\BillingAddressValidationRule
+ - Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule
+
+
+
+
diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml
index aa6fafb5dd051..ecc6426855679 100644
--- a/app/code/Magento/Quote/etc/di.xml
+++ b/app/code/Magento/Quote/etc/di.xml
@@ -41,6 +41,7 @@
+
@@ -95,4 +96,41 @@
+
+
+
+ - Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule
+ - Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule
+ - Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule
+ - Magento\Quote\Model\ValidationRules\BillingAddressValidationRule
+ - Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule
+ - Magento\Quote\Model\ValidationRules\MinimumAmountValidationRule
+
+
+
+
+
+ Some addresses can't be used due to the configurations for specific countries.
+
+
+
+
+ Please check the shipping address information.
+
+
+
+
+ The shipping method is missing. Select the shipping method and try again.
+
+
+
+
+ Please check the billing address information.
+
+
+
+
+ Enter a valid payment method and try again.
+
+
diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json
index 952b0b6a950ce..65978de6d0785 100644
--- a/app/code/Magento/QuoteAnalytics/composer.json
+++ b/app/code/Magento/QuoteAnalytics/composer.json
@@ -7,7 +7,7 @@
"magento/module-quote": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json
index 7b86ff3486965..45452997757cd 100644
--- a/app/code/Magento/ReleaseNotification/composer.json
+++ b/app/code/Magento/ReleaseNotification/composer.json
@@ -8,7 +8,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid.php
index 2bb4dcd1efbf1..a895ef2d75906 100644
--- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php
+++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php
@@ -127,8 +127,8 @@ protected function _prepareCollection()
* Validate from and to date
*/
try {
- $from = $this->_localeDate->scopeDate(null, $this->getFilter('report_from'), false);
- $to = $this->_localeDate->scopeDate(null, $this->getFilter('report_to'), false);
+ $from = $this->_localeDate->date($this->getFilter('report_from'), null, false, false);
+ $to = $this->_localeDate->date($this->getFilter('report_to'), null, false, false);
$collection->setInterval($from, $to);
} catch (\Exception $e) {
diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json
index d532ab9e8aad3..6b5a43f040109 100644
--- a/app/code/Magento/Reports/composer.json
+++ b/app/code/Magento/Reports/composer.json
@@ -22,7 +22,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json
index 84d088c4ccd92..4c6afcd77b4fa 100644
--- a/app/code/Magento/RequireJs/composer.json
+++ b/app/code/Magento/RequireJs/composer.json
@@ -6,7 +6,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json
index 1b1efcbe4e66a..c6c8c920ed138 100644
--- a/app/code/Magento/Review/composer.json
+++ b/app/code/Magento/Review/composer.json
@@ -18,7 +18,7 @@
"magento/module-review-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json
index 85f401a5a8968..229b486e3f8d4 100644
--- a/app/code/Magento/ReviewAnalytics/composer.json
+++ b/app/code/Magento/ReviewAnalytics/composer.json
@@ -7,7 +7,7 @@
"magento/module-review": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json
index 8230b11736796..ccf8356419581 100644
--- a/app/code/Magento/Robots/composer.json
+++ b/app/code/Magento/Robots/composer.json
@@ -10,7 +10,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json
index 31b345d66ee81..d75274856e793 100644
--- a/app/code/Magento/Rss/composer.json
+++ b/app/code/Magento/Rss/composer.json
@@ -9,7 +9,7 @@
"magento/module-customer": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json
index 1a12d67070021..2589db8fe86e6 100644
--- a/app/code/Magento/Rule/composer.json
+++ b/app/code/Magento/Rule/composer.json
@@ -11,7 +11,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml
index 838e7196f553d..02f2e108e1dc8 100644
--- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml
+++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml
@@ -17,6 +17,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -91,4 +105,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml b/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml
new file mode 100644
index 0000000000000..035c3949820f6
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml
@@ -0,0 +1,27 @@
+
+
+
+
+ EnableMinimumOrderCheck
+ MinimumOrderAmount500
+
+
+ 1
+
+
+ 500
+
+
+
+ DisableMinimumOrderCheck
+
+
+ 0
+
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml b/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml
new file mode 100644
index 0000000000000..77c8c8fa1c959
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml
new file mode 100644
index 0000000000000..a9755bbbc1b61
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml
new file mode 100644
index 0000000000000..e339f8056e96d
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json
index f3fda78f89dc1..a0e40d283da68 100644
--- a/app/code/Magento/Sales/composer.json
+++ b/app/code/Magento/Sales/composer.json
@@ -33,7 +33,7 @@
"magento/module-sales-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "101.0.4",
+ "version": "101.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json
index dec1ae1d09ffe..242e2d811a718 100644
--- a/app/code/Magento/SalesAnalytics/composer.json
+++ b/app/code/Magento/SalesAnalytics/composer.json
@@ -7,7 +7,7 @@
"magento/module-sales": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json
index cc47daf9eb638..4dc2c7b9445b5 100644
--- a/app/code/Magento/SalesInventory/composer.json
+++ b/app/code/Magento/SalesInventory/composer.json
@@ -10,7 +10,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml
new file mode 100644
index 0000000000000..26a71e4167ffa
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml
index f4dc41225997e..d769e18c0cec3 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml
@@ -38,4 +38,11 @@
SalesRuleLabelDefault
SalesRuleLabelStore1
+
+ TestSalesRule
+ Main Website
+ 'NOT LOGGED IN', 'General', 'Wholesale', 'Retailer'
+ Percent of product price discount
+ 50
+
diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json
index d5e1c908a1b52..3751aca28aef2 100644
--- a/app/code/Magento/SalesRule/composer.json
+++ b/app/code/Magento/SalesRule/composer.json
@@ -25,7 +25,7 @@
"magento/module-sales-rule-sample-data": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "101.0.3",
+ "version": "101.0.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json
index e0cb249340961..8c4993966d4bb 100644
--- a/app/code/Magento/SalesSequence/composer.json
+++ b/app/code/Magento/SalesSequence/composer.json
@@ -6,7 +6,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json
index ed0823367613f..7d9e64740f240 100644
--- a/app/code/Magento/SampleData/composer.json
+++ b/app/code/Magento/SampleData/composer.json
@@ -9,7 +9,7 @@
"magento/sample-data-media": "Sample Data version:100.2.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php
index bb476423692d1..9d8b612cefadf 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php
@@ -60,16 +60,18 @@ public function execute()
/** @var \Magento\Search\Model\SynonymGroup $synGroupModel */
$synGroupModel = $this->synGroupRepository->get($id);
$this->synGroupRepository->delete($synGroupModel);
- $this->messageManager->addSuccess(__('The synonym group has been deleted.'));
+ $this->messageManager->addSuccessMessage(__('The synonym group has been deleted.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
$this->logger->error($e);
} catch (\Exception $e) {
- $this->messageManager->addError(__('An error was encountered while performing delete operation.'));
+ $this->messageManager->addErrorMessage(
+ __('An error was encountered while performing delete operation.')
+ );
$this->logger->error($e);
}
} else {
- $this->messageManager->addError(__('We can\'t find a synonym group to delete.'));
+ $this->messageManager->addErrorMessage(__('We can\'t find a synonym group to delete.'));
}
return $resultRedirect->setPath('*/*/');
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php
index 506976247327f..3e6ac0abf2126 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php
@@ -66,7 +66,7 @@ public function execute()
// 2. Initial checking
if ($groupId && (!$synGroup->getGroupId())) {
- $this->messageManager->addError(__('This synonyms group no longer exists.'));
+ $this->messageManager->addErrorMessage(__('This synonyms group no longer exists.'));
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
return $resultRedirect->setPath('*/*/');
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php
index 4add418d95325..f2770f77cc533 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php
@@ -72,17 +72,17 @@ public function execute()
$this->synGroupRepository->delete($synonymGroup);
$deletedItems++;
} catch (\Exception $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
}
}
if ($deletedItems != 0) {
if ($collectionSize != $deletedItems) {
- $this->messageManager->addError(
+ $this->messageManager->addErrorMessage(
__('Failed to delete %1 synonym group(s).', $collectionSize - $deletedItems)
);
}
- $this->messageManager->addSuccess(
+ $this->messageManager->addSuccessMessage(
__('A total of %1 synonym group(s) have been deleted.', $deletedItems)
);
}
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php
index ffa97ceb3e0e1..0ed73fd0cee32 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php
@@ -59,7 +59,7 @@ public function execute()
$synGroup = $this->synGroupRepository->get($synGroupId);
if (!$synGroup->getGroupId() && $synGroupId) {
- $this->messageManager->addError(__('This synonym group no longer exists.'));
+ $this->messageManager->addErrorMessage(__('This synonym group no longer exists.'));
return $resultRedirect->setPath('*/*/');
}
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php
index 3a1b80df2ea7e..c7adf32da0fb0 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php
@@ -23,16 +23,16 @@ public function execute()
$model = $this->_objectManager->create(\Magento\Search\Model\Query::class);
$model->setId($id);
$model->delete();
- $this->messageManager->addSuccess(__('You deleted the search.'));
+ $this->messageManager->addSuccessMessage(__('You deleted the search.'));
$resultRedirect->setPath('search/*/');
return $resultRedirect;
} catch (\Exception $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
$resultRedirect->setPath('search/*/edit', ['id' => $this->getRequest()->getParam('id')]);
return $resultRedirect;
}
}
- $this->messageManager->addError(__('We can\'t find a search term to delete.'));
+ $this->messageManager->addErrorMessage(__('We can\'t find a search term to delete.'));
$resultRedirect->setPath('search/*/');
return $resultRedirect;
}
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php
index 85e14ae9fe0b0..3ee0ea240377f 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php
@@ -43,7 +43,7 @@ public function execute()
if ($id) {
$model->load($id);
if (!$model->getId()) {
- $this->messageManager->addError(__('This search no longer exists.'));
+ $this->messageManager->addErrorMessage(__('This search no longer exists.'));
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$resultRedirect->setPath('search/*');
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php b/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php
index b38d883b8faae..f6874078f2f64 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php
@@ -17,16 +17,16 @@ public function execute()
{
$searchIds = $this->getRequest()->getParam('search');
if (!is_array($searchIds)) {
- $this->messageManager->addError(__('Please select searches.'));
+ $this->messageManager->addErrorMessage(__('Please select searches.'));
} else {
try {
foreach ($searchIds as $searchId) {
$model = $this->_objectManager->create(\Magento\Search\Model\Query::class)->load($searchId);
$model->delete();
}
- $this->messageManager->addSuccess(__('Total of %1 record(s) were deleted.', count($searchIds)));
+ $this->messageManager->addSuccessMessage(__('Total of %1 record(s) were deleted.', count($searchIds)));
} catch (\Exception $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
}
}
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php
index 42e9373a20fe2..cd9b1347ed1ed 100644
--- a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php
+++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php
@@ -45,12 +45,15 @@ public function execute()
$model->addData($data);
$model->setIsProcessed(0);
$model->save();
- $this->messageManager->addSuccess(__('You saved the search term.'));
+ $this->messageManager->addSuccessMessage(__('You saved the search term.'));
} catch (LocalizedException $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
return $this->proceedToEdit($data);
} catch (\Exception $e) {
- $this->messageManager->addException($e, __('Something went wrong while saving the search query.'));
+ $this->messageManager->addExceptionMessage(
+ $e,
+ __('Something went wrong while saving the search query.')
+ );
return $this->proceedToEdit($data);
}
}
diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php
index a7f71941dc6b2..38c78b986faf4 100644
--- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php
+++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php
@@ -107,10 +107,10 @@ public function testDeleteAction()
$this->repository->expects($this->once())->method('get')->with(10)->willReturn($this->synonymGroupMock);
$this->messageManagerMock->expects($this->once())
- ->method('addSuccess')
+ ->method('addSuccessMessage')
->with(__('The synonym group has been deleted.'));
- $this->messageManagerMock->expects($this->never())->method('addError');
+ $this->messageManagerMock->expects($this->never())->method('addErrorMessage');
$this->resultRedirectMock->expects($this->once())->method('setPath')->with('*/*/')->willReturnSelf();
@@ -124,10 +124,10 @@ public function testDeleteActionNoId()
->willReturn(null);
$this->messageManagerMock->expects($this->once())
- ->method('addError')
+ ->method('addErrorMessage')
->with(__('We can\'t find a synonym group to delete.'));
$this->messageManagerMock->expects($this->never())
- ->method('addSuccess');
+ ->method('addSuccessMessage');
$this->resultRedirectMock->expects($this->once())
->method('setPath')
diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php
index efda8f52fcfe9..60cc958a6187c 100644
--- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php
+++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php
@@ -54,7 +54,7 @@ protected function setUp()
->getMockForAbstractClass();
$this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class)
->disableOriginalConstructor()
- ->setMethods(['addSuccess', 'addError'])
+ ->setMethods(['addSuccessMessage', 'addErrorMessage'])
->getMockForAbstractClass();
$this->pageFactory = $this->getMockBuilder(\Magento\Framework\View\Result\PageFactory::class)
->setMethods([])
@@ -107,7 +107,7 @@ public function testExecute()
$this->createQuery(0, 1);
$this->createQuery(1, 2);
$this->messageManager->expects($this->once())
- ->method('addSuccess')
+ ->method('addSuccessMessage')
->will($this->returnSelf());
$this->resultRedirectMock->expects($this->once())
->method('setPath')
diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php
index 09ae2c38fe525..28f4b65cd412f 100644
--- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php
+++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php
@@ -75,7 +75,7 @@ protected function setUp()
$this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class)
->disableOriginalConstructor()
- ->setMethods(['addSuccess', 'addError', 'addException'])
+ ->setMethods(['addSuccessMessage', 'addErrorMessage', 'addExceptionMessage'])
->getMockForAbstractClass();
$this->context->expects($this->any())
->method('getMessageManager')
@@ -143,7 +143,7 @@ public function testExecuteLoadQueryQueryId()
$this->query->expects($this->once())->method('getId')->willReturn(false);
$this->query->expects($this->once())->method('load')->with($queryId);
- $this->messageManager->expects($this->once())->method('addSuccess');
+ $this->messageManager->expects($this->once())->method('addSuccessMessage');
$this->redirect->expects($this->once())->method('setPath')->willReturnSelf();
$this->assertSame($this->redirect, $this->controller->execute());
@@ -161,7 +161,7 @@ public function testExecuteLoadQueryQueryIdQueryText()
$this->query->expects($this->once())->method('loadByQueryText')->with($queryText);
$this->query->expects($this->any())->method('getId')->willReturn($queryId);
- $this->messageManager->expects($this->once())->method('addSuccess');
+ $this->messageManager->expects($this->once())->method('addSuccessMessage');
$this->redirect->expects($this->once())->method('setPath')->willReturnSelf();
$this->assertSame($this->redirect, $this->controller->execute());
@@ -180,7 +180,7 @@ public function testExecuteLoadQueryQueryIdQueryText2()
$this->query->expects($this->any())->method('getId')->willReturn(false);
$this->query->expects($this->once())->method('load')->with($queryId);
- $this->messageManager->expects($this->once())->method('addSuccess');
+ $this->messageManager->expects($this->once())->method('addSuccessMessage');
$this->redirect->expects($this->once())->method('setPath')->willReturnSelf();
$this->assertSame($this->redirect, $this->controller->execute());
@@ -199,7 +199,7 @@ public function testExecuteLoadQueryQueryIdQueryTextException()
$this->query->expects($this->once())->method('loadByQueryText')->with($queryText);
$this->query->expects($this->any())->method('getId')->willReturn($anotherQueryId);
- $this->messageManager->expects($this->once())->method('addError');
+ $this->messageManager->expects($this->once())->method('addErrorMessage');
$this->session->expects($this->once())->method('setPageData');
$this->redirect->expects($this->once())->method('setPath')->willReturnSelf();
$this->assertSame($this->redirect, $this->controller->execute());
@@ -216,7 +216,7 @@ public function testExecuteException()
$this->query->expects($this->once())->method('setStoreId');
$this->query->expects($this->once())->method('loadByQueryText')->willThrowException(new \Exception());
- $this->messageManager->expects($this->once())->method('addException');
+ $this->messageManager->expects($this->once())->method('addExceptionMessage');
$this->session->expects($this->once())->method('setPageData');
$this->redirect->expects($this->once())->method('setPath')->willReturnSelf();
$this->assertSame($this->redirect, $this->controller->execute());
diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json
index 5bafa7bc96bbe..2b474fdba93dc 100644
--- a/app/code/Magento/Search/composer.json
+++ b/app/code/Magento/Search/composer.json
@@ -11,7 +11,7 @@
"magento/module-ui": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php b/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php
index c533e740b2251..35d8f22d84d51 100644
--- a/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php
+++ b/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php
@@ -38,11 +38,11 @@ public function execute()
{
try {
$this->sessionsManager->logoutOtherUserSessions();
- $this->messageManager->addSuccess(__('All other open sessions for this account were terminated.'));
+ $this->messageManager->addSuccessMessage(__('All other open sessions for this account were terminated.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
- $this->messageManager->addException($e, __("We couldn't logout because of an error."));
+ $this->messageManager->addExceptionMessage($e, __("We couldn't logout because of an error."));
}
$this->_redirect('*/*/activity');
}
diff --git a/app/code/Magento/Security/Model/Plugin/AuthSession.php b/app/code/Magento/Security/Model/Plugin/AuthSession.php
index 64645396dceb6..08a81f12d9cfc 100644
--- a/app/code/Magento/Security/Model/Plugin/AuthSession.php
+++ b/app/code/Magento/Security/Model/Plugin/AuthSession.php
@@ -82,7 +82,7 @@ private function addUserLogoutNotification()
$this->sessionsManager->getCurrentSession()->getStatus()
);
} elseif ($message = $this->sessionsManager->getLogoutReasonMessage()) {
- $this->messageManager->addError($message);
+ $this->messageManager->addErrorMessage($message);
}
return $this;
diff --git a/app/code/Magento/Security/Model/Plugin/LoginController.php b/app/code/Magento/Security/Model/Plugin/LoginController.php
index ab9c6e2857bce..ba1a18c4f0c06 100644
--- a/app/code/Magento/Security/Model/Plugin/LoginController.php
+++ b/app/code/Magento/Security/Model/Plugin/LoginController.php
@@ -53,7 +53,7 @@ public function beforeExecute(Login $login)
{
$logoutReasonCode = $this->securityCookie->getLogoutReasonCookie();
if ($this->isLoginForm($login) && $logoutReasonCode >= 0) {
- $this->messageManager->addError(
+ $this->messageManager->addErrorMessage(
$this->sessionsManager->getLogoutReasonMessageByStatus($logoutReasonCode)
);
$this->securityCookie->deleteLogoutReasonCookie();
diff --git a/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php b/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php
index 8c2119bde667e..02335ef55aa93 100644
--- a/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php
+++ b/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php
@@ -74,7 +74,7 @@ public function setUp()
$this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class)
->disableOriginalConstructor()
- ->setMethods(['addSuccess', 'addError', 'addException'])
+ ->setMethods(['addSuccessMessage', 'addErrorMessage', 'addExceptionMessage'])
->getMockForAbstractClass();
$this->contextMock->expects($this->any())
->method('getMessageManager')
@@ -132,12 +132,12 @@ public function testExecute()
$this->sessionsManager->expects($this->once())
->method('logoutOtherUserSessions');
$this->messageManager->expects($this->once())
- ->method('addSuccess')
+ ->method('addSuccessMessage')
->with($successMessage);
$this->messageManager->expects($this->never())
- ->method('addError');
+ ->method('addErrorMessage');
$this->messageManager->expects($this->never())
- ->method('addException');
+ ->method('addExceptionMessage');
$this->responseMock->expects($this->once())
->method('setRedirect');
$this->actionFlagMock->expects($this->once())
@@ -158,7 +158,7 @@ public function testExecuteLocalizedException()
->method('logoutOtherUserSessions')
->willThrowException(new LocalizedException($phrase));
$this->messageManager->expects($this->once())
- ->method('addError')
+ ->method('addErrorMessage')
->with($phrase);
$this->controller->execute();
}
@@ -173,7 +173,7 @@ public function testExecuteException()
->method('logoutOtherUserSessions')
->willThrowException(new \Exception());
$this->messageManager->expects($this->once())
- ->method('addException')
+ ->method('addExceptionMessage')
->with(new \Exception(), $phrase);
$this->controller->execute();
}
diff --git a/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php b/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php
index 5cb06d6143023..0f7f590b71de4 100644
--- a/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php
+++ b/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php
@@ -112,7 +112,7 @@ public function testAroundProlongSessionIsNotActiveAndIsNotAjaxRequest()
->willReturn($errorMessage);
$this->messageManagerMock->expects($this->once())
- ->method('addError')
+ ->method('addErrorMessage')
->with($errorMessage);
$this->model->aroundProlong($this->authSessionMock, $proceed);
diff --git a/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php b/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php
index 2bb2bc3cafac7..aa066e23f67cb 100644
--- a/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php
+++ b/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php
@@ -103,7 +103,7 @@ public function testBeforeExecute()
->willReturn($errorMessage);
$this->messageManagerMock->expects($this->once())
- ->method('addError')
+ ->method('addErrorMessage')
->with($errorMessage);
$this->securityCookieMock->expects($this->once())
diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json
index 0ef75d3e2bb8f..5422b6d606551 100644
--- a/app/code/Magento/Security/composer.json
+++ b/app/code/Magento/Security/composer.json
@@ -11,7 +11,7 @@
"magento/module-customer": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json
index df9bdf023a0e9..324465885f82f 100644
--- a/app/code/Magento/SendFriend/composer.json
+++ b/app/code/Magento/SendFriend/composer.json
@@ -9,7 +9,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json
index 2935df2e45542..b4e77dfdeb2d9 100644
--- a/app/code/Magento/Shipping/composer.json
+++ b/app/code/Magento/Shipping/composer.json
@@ -25,7 +25,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.5",
+ "version": "100.2.6",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Signifyd/composer.json b/app/code/Magento/Signifyd/composer.json
index cded060a54518..51e290957ec9a 100644
--- a/app/code/Magento/Signifyd/composer.json
+++ b/app/code/Magento/Signifyd/composer.json
@@ -17,7 +17,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.2",
+ "version": "100.2.3",
"license": [
"proprietary"
],
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
index f0be0fe7ab682..a885aa30dae5e 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
@@ -61,20 +61,20 @@ public function execute()
}
$sitemap->delete();
// display success message
- $this->messageManager->addSuccess(__('You deleted the sitemap.'));
+ $this->messageManager->addSuccessMessage(__('You deleted the sitemap.'));
// go to grid
$this->_redirect('adminhtml/*/');
return;
} catch (\Exception $e) {
// display error message
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
// go back to edit form
$this->_redirect('adminhtml/*/edit', ['sitemap_id' => $id]);
return;
}
}
// display error message
- $this->messageManager->addError(__('We can\'t find a sitemap to delete.'));
+ $this->messageManager->addErrorMessage(__('We can\'t find a sitemap to delete.'));
// go to grid
$this->_redirect('adminhtml/*/');
}
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php
index 04ab4f8725e0e..111353550b9cd 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php
@@ -41,7 +41,7 @@ public function execute()
if ($id) {
$model->load($id);
if (!$model->getId()) {
- $this->messageManager->addError(__('This sitemap no longer exists.'));
+ $this->messageManager->addErrorMessage(__('This sitemap no longer exists.'));
$this->_redirect('adminhtml/*/');
return;
}
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php
index d19b248c8008f..9592ab6f57c55 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php
@@ -52,18 +52,18 @@ public function execute()
);
$sitemap->generateXml();
- $this->messageManager->addSuccess(
+ $this->messageManager->addSuccessMessage(
__('The sitemap "%1" has been generated.', $sitemap->getSitemapFilename())
);
} catch (\Magento\Framework\Exception\LocalizedException $e) {
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
- $this->messageManager->addException($e, __('We can\'t generate the sitemap right now.'));
+ $this->messageManager->addExceptionMessage($e, __('We can\'t generate the sitemap right now.'));
} finally {
$this->appEmulation->stopEnvironmentEmulation();
}
} else {
- $this->messageManager->addError(__('We can\'t find a sitemap to generate.'));
+ $this->messageManager->addErrorMessage(__('We can\'t find a sitemap to generate.'));
}
// go to grid
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
index 5c38cc68e6ef7..1e0d1cb248f00 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
@@ -30,7 +30,7 @@ protected function validatePath(array $data)
$validator->setPaths($helper->getValidPaths());
if (!$validator->isValid($path)) {
foreach ($validator->getMessages() as $message) {
- $this->messageManager->addError($message);
+ $this->messageManager->addErrorMessage($message);
}
// save data in session
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData($data);
@@ -83,13 +83,13 @@ protected function saveData($data)
// save the data
$model->save();
// display success message
- $this->messageManager->addSuccess(__('You saved the sitemap.'));
+ $this->messageManager->addSuccessMessage(__('You saved the sitemap.'));
// clear previously saved data from session
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData(false);
return $model->getId();
} catch (\Exception $e) {
// display error message
- $this->messageManager->addError($e->getMessage());
+ $this->messageManager->addErrorMessage($e->getMessage());
// save data in session
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData($data);
}
diff --git a/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php b/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php
index 36e3aa0312627..f77954101df7c 100644
--- a/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php
+++ b/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php
@@ -154,7 +154,7 @@ public function testTryToSaveInvalidDataShouldFailWithErrors()
->willReturnMap([[$helperClass, $helper], [$sessionClass, $session]]);
$this->messageManagerMock->expects($this->at(0))
- ->method('addError')
+ ->method('addErrorMessage')
->withConsecutive(
[$messages[0]],
[$messages[1]]
diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json
index 08fa3badf78e2..cda61e63e35cf 100644
--- a/app/code/Magento/Sitemap/composer.json
+++ b/app/code/Magento/Sitemap/composer.json
@@ -18,7 +18,7 @@
"magento/module-config": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json
index 875b4bb03d454..6f2d88d6f6fcb 100644
--- a/app/code/Magento/Store/composer.json
+++ b/app/code/Magento/Store/composer.json
@@ -14,7 +14,7 @@
"magento/module-deploy": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.4",
+ "version": "100.2.5",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json
index b30ea4cfe46b6..0cdf3dadb2b8a 100644
--- a/app/code/Magento/Swagger/composer.json
+++ b/app/code/Magento/Swagger/composer.json
@@ -6,7 +6,7 @@
"magento/framework": "101.0.*"
},
"type": "magento2-module",
- "version": "100.2.3",
+ "version": "100.2.4",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js
index 6d9e786f707e5..453934ea53626 100644
--- a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js
+++ b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js
@@ -96,4 +96,4 @@ if(String.fromCodePoint)e.exports=function(e){try{return String.fromCodePoint(e)
* Licensed under the MIT License.
*/
var i,o="";e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,n){"use strict";function r(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function i(e,t){return{}.hasOwnProperty.call(e,t)}function o(e,t){var n=[];return r(e,function(e){t(e)&&n.push(e)}),n}function a(e,t,n){function g(e,t){var n=this;this.tag=e,this.attribs=t||{},this.tagPosition=E.length,this.text="",this.updateParentNodeText=function(){if(P.length){P[P.length-1].text+=n.text}}}function y(e){return"string"!=typeof e&&(e+=""),e.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}function _(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!!n.match(/^[\/\\]{2}/)&&!t.allowProtocolRelative;var o=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function b(e,t){if(!t)return e;var n,r=c(e),i=e.nodes[0];return n=t[i.selector]&&t["*"]?p(c(t[i.selector]),t["*"],function(e,t){if(Array.isArray(e))return e.concat(t)}):t[i.selector]||t["*"],n&&(r.nodes[0].nodes=i.nodes.reduce(w(n),[])),r}function x(e){return e.nodes[0].nodes.reduce(function(e,t){return e.push(t.prop+":"+t.value+";"),e},[]).join("")}function w(e){return function(t,n){if(e.hasOwnProperty(n.prop)){e[n.prop].some(function(e){return e.test(n.value)})&&t.push(n)}return t}}function k(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return-1!==t.indexOf(e)}).join(" ")):e}var E="";t?(t=u(a.defaults,t),t.parser?t.parser=u(v,t.parser):t.parser=v):(t=a.defaults,t.parser=v);var S,C,A=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(S={},C={},r(t.allowedAttributes,function(e,t){S[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(l(e).replace(/\\\*/g,".*")):S[t].push(e)}),C[t]=new RegExp("^("+n.join("|")+")$")}));var D={};r(t.allowedClasses,function(e,t){S&&(i(S,t)||(S[t]=[]),S[t].push("class")),D[t]=e});var O,M={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=a.simpleTransform(e)),"*"===t?O=n:M[t]=n});var T=0,P=[],I={},R={},j=!1,F=0,N=new s.Parser({onopentag:function(e,n){if(j)return void F++;var a=new g(e,n);P.push(a);var s,u=!1,l=!!a.text;i(M,e)&&(s=M[e](e,n),a.attribs=n=s.attribs,void 0!==s.text&&(a.innerText=s.text),e!==s.tagName&&(a.name=e=s.tagName,R[T]=s.tagName)),O&&(s=O(e,n),a.attribs=n=s.attribs,e!==s.tagName&&(a.name=e=s.tagName,R[T]=s.tagName)),t.allowedTags&&-1===t.allowedTags.indexOf(e)&&(u=!0,-1!==A.indexOf(e)&&(j=!0,F=1),I[T]=!0),T++,u||(E+="<"+e,(!S||i(S,e)||S["*"])&&r(n,function(n,s){if(!m.test(s))return void delete a.attribs[s];var u;if(!S||i(S,e)&&-1!==S[e].indexOf(s)||S["*"]&&-1!==S["*"].indexOf(s)||i(C,e)&&C[e].test(s)||C["*"]&&C["*"].test(s)){if(("href"===s||"src"===s)&&_(e,n))return void delete a.attribs[s];if("iframe"===e&&"src"===s){if("//"===n.substring(0,2)){n="https:".concat(n)}try{if(u=d.parse(n),t.allowedIframeHostnames){if(!t.allowedIframeHostnames.find(function(e){return e===u.hostname}))return void delete a.attribs[s]}}catch(e){return void delete a.attribs[s]}}if("srcset"===s)try{if(u=f.parse(n),r(u,function(e){_("srcset",e.url)&&(e.evil=!0)}),u=o(u,function(e){return!e.evil}),!u.length)return void delete a.attribs[s];n=f.stringify(o(u,function(e){return!e.evil})),a.attribs[s]=n}catch(e){return void delete a.attribs[s]}if("class"===s&&(n=k(n,D[e]),!n.length))return void delete a.attribs[s];if("style"===s)try{if(n=x(b(h.parse(e+" {"+n+"}"),t.allowedStyles)),0===n.length)return void delete a.attribs[s]}catch(e){return void delete a.attribs[s]}E+=" "+s,n.length&&(E+='="'+y(n)+'"')}else delete a.attribs[s]}),-1!==t.selfClosing.indexOf(e)?E+=" />":(E+=">",!a.innerText||l||t.textFilter||(E+=a.innerText)))},ontext:function(e){if(!j){var n,r=P[P.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)E+=e;else{var i=y(e);t.textFilter?E+=t.textFilter(i):E+=i}if(P.length){P[P.length-1].text+=e}}},onclosetag:function(e){if(j){if(--F)return;j=!1}var n=P.pop();if(n){if(j=!1,T--,I[T])return delete I[T],void n.updateParentNodeText();if(R[T]&&(e=R[T],delete R[T]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(E=E.substr(0,n.tagPosition));n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)&&(E+=""+e+">")}}},t.parser);return N.write(e),N.end(),E}var s=n(116),u=n(1200),l=n(825),c=n(824),p=n(827),f=n(1181),h=n(982),d=n(497);e.exports=a;var m=/^[^\0\t\n\f\r \/<=>]+$/,v={decodeEntities:!0};a.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre","iframe"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},a.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;ni)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,n){"use strict";(function(t){function r(e){e=e||t.location||{};var n,r={},i=typeof e;if("blob:"===e.protocol)r=new a(unescape(e.pathname),{});else if("string"===i){r=new a(e,{});for(n in d)delete r[n]}else if("object"===i){for(n in e)n in d||(r[n]=e[n]);void 0===r.slashes&&(r.slashes=f.test(e.href))}return r}function i(e){var t=p.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function o(e,t){for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}function a(e,t,n){if(!(this instanceof a))return new a(e,t,n);var s,u,p,f,d,m,v=h.slice(),g=typeof t,y=this,_=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=c.parse),t=r(t),u=i(e||""),s=!u.protocol&&!u.slashes,y.slashes=u.slashes||s&&t.slashes,y.protocol=u.protocol||t.protocol||"",e=u.rest,u.slashes||(v[2]=[/(.*)/,"pathname"]);_=55296&&r<=56319&&n+1=56320&&i<=57343){var o=1024*(r-55296)+i-56320+65536;t.push(240+Math.floor(o/64/64/64),128+Math.floor(o/64/64)%64,128+Math.floor(o/64)%64,128+o%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){function e(e,t){function n(e,t){return r(e,new RegExp(a.source,"g"),t)}function r(e,t,n){if(!i(e))return n;var r=0,o=0;do{var a=t.exec(e);if(null===a)break;if(!(o=e.length?-1:r}function i(e){return s.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(a.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!i(e))return t;for(var n=o(),r=0;null!==n.exec(e)&&!(n.lastIndex>t);)r++;return r},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:r(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),i=s.exec(r);return null===i?r[0]:i[0]},e.charCodeAt=function(e,t){var r=n(e,t);if(r<0)return NaN;var i=e.charCodeAt(r);if(55296<=i&&i<=56319){return 1024*(i-55296)+(e.charCodeAt(r+1)-56320)+65536}return i},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),i=e.indexOf(t,r);return i<0?-1:this.findCharIndex(e,i)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var i=this.findByteIndex(e,n);r=e.lastIndexOf(t,i)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,i=this.findByteIndex(e,t);return i<0&&(i=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(i,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n0;)i.push(255&r),r>>=8;1==i.length&&i.push(0),t=t.concat(i.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=l(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(C(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return c(n)}var g="",y=!1,b=["{","}"];if(d(n)&&(y=!0,b=["[","]"]),C(n)){g=" [Function"+(n.name?": "+n.name:"")+"]"}if(w(n)&&(g=" "+RegExp.prototype.toString.call(n)),E(n)&&(g=" "+Date.prototype.toUTCString.call(n)),S(n)&&(g=" "+c(n)),0===a.length&&(!y||0==n.length))return b[0]+g+b[1];if(r<0)return w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var x;return x=y?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,y)}),e.seen.pop(),h(x,g,b)}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function g(e){return null==e}function y(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===D(e)}function k(e){return"object"==typeof e&&null!==e}function E(e){return k(e)&&"[object Date]"===D(e)}function S(e){return k(e)&&("[object Error]"===D(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function D(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function M(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n]+>)/g).filter(function(e){return""!==e.trim()})},s=function(e){return/<[^>!]+>/.test(e)},u=function(e){return/<\/+[^>]+>/.test(e)},l=function(e){return/<[^>]+\/>/.test(e)},c=function(e){return s(e)&&!u(e)&&!l(e)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.indentor,i=t.textNodesOnSameLine,a=0,s=[];n=n||" ";var u=r(e).map(function(e,t,r){var u=e.value,l=e.type;"ClosingTag"===l&&a--;var c=o(n,a),p=c+u;if("OpeningTag"===l&&a++,i){var f=r[t-1],h=r[t-2];"ClosingTag"===l&&"Text"===f.type&&"OpeningTag"===h.type&&(p=""+c+h.value+f.value+u,s.push(t-2,t-1))}return p});return s.forEach(function(e){return u[e]=null}),u.filter(function(e){return!!e}).join("\n")}},function(e,t){function n(e){return e&&e.replace?e.replace(/([&"<>'])/g,function(e,t){return r[t]}):e}var r={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=n},function(e,t,n){(function(t){function r(e,n){function r(e){m?t.nextTick(e):e()}function i(e,t){if(void 0!==t&&(f+=t),e&&!h&&(l=l||new c,h=!0),e&&h){var n=f;r(function(){l.emit("data",n)}),f=""}}function o(e,t){s(i,a(e,d,d?1:0),t)}function u(){if(l){var e=f;r(function(){l.emit("data",e),l.emit("end"),l.readable=!1,l.emit("close")})}}"object"!=typeof n&&(n={indent:n});var l=n.stream?new c:null,f="",h=!1,d=n.indent?!0===n.indent?p:n.indent:"",m=!0;return r(function(){m=!1}),n.declaration&&function(e){var t=e.encoding||"UTF-8",n={version:"1.0",encoding:t};e.standalone&&(n.standalone=e.standalone),o({"?xml":{_attr:n}}),f=f.replace("/>","?>")}(n.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=u),o(t,r)}):o(e,u),l?(l.readable=!0,l):f}function i(){var e=Array.prototype.slice.call(arguments),t={_elem:a(e)};return t.push=function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;s(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},t.close=function(e){void 0!==e&&this.push(e),this.end&&this.end()},t}function o(e,t){return new Array(t||0).join(e||"")}function a(e,t,n){function r(e){Object.keys(e).forEach(function(t){f.push(u(t,e[t]))})}n=n||0;var i,s=o(t,n),c=e;if("object"==typeof e){if(i=Object.keys(e)[0],(c=e[i])&&c._elem)return c._elem.name=i,c._elem.icount=n,c._elem.indent=t,c._elem.indents=s,c._elem.interrupt=c,c._elem}var p,f=[],h=[];switch(typeof c){case"object":if(null===c)break;c._attr&&r(c._attr),c._cdata&&h.push(("/g,"]]]]>")+"]]>"),c.forEach&&(p=!1,h.push(""),c.forEach(function(e){if("object"==typeof e){"_attr"==Object.keys(e)[0]?r(e._attr):h.push(a(e,t,n+1))}else h.pop(),p=!0,h.push(l(e))}),p||h.push(""));break;default:h.push(l(c))}return{name:i,interrupt:!1,attributes:f,content:h,icount:n,indents:s,indent:t}}function s(e,t,n){function r(){for(;t.content.length;){var r=t.content.shift();if(void 0!==r){if(i(r))return;s(e,r)}}e(!1,(o>1?t.indents:"")+(t.name?""+t.name+">":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=r,t.interrupt=!1,e(!0),!0)}if("object"!=typeof t)return e(!1,t);var o=t.interrupt?1:t.content.length;if(e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(o?t.name?">":"":t.name?"/>":"")+(t.indent&&o>1?"\n":"")),!o)return e(!1,t.indent?"\n":"");i(t)||r()}function u(e,t){return e+'="'+l(t)+'"'}var l=n(1197),c=n(493).Stream,p=" ";e.exports=r,e.exports.element=e.exports.Element=i}).call(t,n(33))},function(e,t){function n(e,t,n){return r.yubl(t((n||r.yufull)(e)))}t._getPrivFilters=function(){function e(e){var t=e.split(k,2);return!t[0]||2!==t.length&&e.length===t[0].length?null:t[0]}function t(e,t,n,r){function i(e,n,i,a){return n?(n=Number(n[0]<="9"?n:"0"+n),r?A(n):128===n?"€":130===n?"‚":131===n?"ƒ":132===n?"„":133===n?"…":134===n?"†":135===n?"‡":136===n?"ˆ":137===n?"‰":138===n?"Š":139===n?"‹":140===n?"Œ":142===n?"Ž":145===n?"‘":146===n?"’":147===n?"“":148===n?"”":149===n?"•":150===n?"–":151===n?"—":152===n?"˜":153===n?"™":154===n?"š":155===n?"›":156===n?"œ":158===n?"ž":159===n?"Ÿ":n>=55296&&n<=57343||13===n?"�":o.frCoPt(n)):t[i||a]||e}return t=t||m,n=n||d,void 0===e?"undefined":null===e?"null":e.toString().replace(c,"�").replace(n,i)}function n(e){return"\\"+e.charCodeAt(0).toString(16).toLowerCase()+" "}function r(e){return e.replace(_,function(e){return"-x-"+e})}function i(n){n=o.yufull(t(n));var r=e(n);return r&&w[r.toLowerCase()]?"##"+n:n}var o,a=/])/g,f=/[&<>"'`]/g,h=/(?:\x00|^-*!?>|--!?>|--?!?$|\]>|\]$)/g,d=/&(?:#([xX][0-9A-Fa-f]+|\d+);?|(Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast|ensp|emsp|thinsp);|(nbsp|amp|AMP|lt|LT|gt|GT|quot|QUOT);?)/g,m={Tab:"\t",NewLine:"\n",colon:":",semi:";",lpar:"(",rpar:")",apos:"'",sol:"/",comma:",",excl:"!",ast:"*",midast:"*",ensp:" ",emsp:" ",thinsp:" ",nbsp:" ",amp:"&",lt:"<",gt:">",quot:'"',QUOT:'"'},v=/^(?:(?!-*expression)#?[-\w]+|[+-]?(?:\d+|\d*\.\d+)(?:r?em|ex|ch|cm|mm|in|px|pt|pc|%|vh|vw|vmin|vmax)?|!important|)$/i,g=/[\x00-\x1F\x7F\[\]{}\\"]/g,y=/[\x00-\x1F\x7F\[\]{}\\']/g,_=/url[\(\u207D\u208D]+/g,b=/['\(\)]/g,x=/\/\/%5[Bb]([A-Fa-f0-9:]+)%5[Dd]/,w={javascript:1,data:1,vbscript:1,mhtml:1,"x-schema":1},k=/(?::|[xX]0*3[aA];?|*58;?|:)/,E=/(?:^[\x00-\x20]+|[\t\n\r\x00]+)/g,S={Tab:"\t",NewLine:"\n"},C=function(e,t,n){return void 0===e?"undefined":null===e?"null":e.toString().replace(t,n)},A=String.fromCodePoint||function(e){return 0===arguments.length?"":e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),e%1024+56320))};return o={frCoPt:function(e){return void 0===e||null===e?"":!isFinite(e=Number(e))||e<=0||e>1114111||e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||11===e||65535==(65535&e)||65534==(65535&e)?"�":A(e)},d:t,yup:function(n){return n=e(n.replace(c,"")),n?t(n,S,null,!0).replace(E,"").toLowerCase():null},y:function(e){return C(e,f,function(e){return"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":"`"})},ya:function(e){return C(e,l,"&")},yd:function(e){return C(e,a,"<")},yc:function(e){return C(e,h,function(e){return"\0"===e?"�":"--!"===e||"--"===e||"-"===e||"]"===e?e+" ":e.slice(0,-1)+" >"})},yavd:function(e){return C(e,s,""")},yavs:function(e){return C(e,u,"'")},yavu:function(e){return C(e,p,function(e){return"\t"===e?" ":"\n"===e?"
":"\v"===e?"":"\f"===e?"":"\r"===e?"
":" "===e?" ":"="===e?"=":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":"`"===e?"`":"�"})},yu:encodeURI,yuc:encodeURIComponent,yubl:function(e){return w[o.yup(e)]?"x-"+e:e},yufull:function(e){return o.yu(e).replace(x,function(e,t){return"//["+t+"]"})},yublf:function(e){return o.yubl(o.yufull(e))},yceu:function(e){return e=t(e),v.test(e)?e:";-x:'"+r(e.replace(y,n))+"';-v:"},yced:function(e){return r(t(e).replace(g,n))},yces:function(e){return r(t(e).replace(y,n))},yceuu:function(e){return i(e).replace(b,function(e){return"'"===e?"\\27 ":"("===e?"%28":"%29"})},yceud:function(e){return i(e)},yceus:function(e){return i(e).replace(u,"\\27 ")}}};var r=t._privFilters=t._getPrivFilters();t.inHTMLData=r.yd,t.inHTMLComment=r.yc,t.inSingleQuotedAttr=r.yavs,t.inDoubleQuotedAttr=r.yavd,t.inUnQuotedAttr=r.yavu,t.uriInSingleQuotedAttr=function(e){return n(e,r.yavs)},t.uriInDoubleQuotedAttr=function(e){return n(e,r.yavd)},t.uriInUnQuotedAttr=function(e){return n(e,r.yavu)},t.uriInHTMLData=r.yufull,t.uriInHTMLComment=function(e){return r.yc(r.yufull(e))},t.uriPathInSingleQuotedAttr=function(e){return n(e,r.yavs,r.yu)},t.uriPathInDoubleQuotedAttr=function(e){return n(e,r.yavd,r.yu)},t.uriPathInUnQuotedAttr=function(e){return n(e,r.yavu,r.yu)},t.uriPathInHTMLData=r.yu,t.uriPathInHTMLComment=function(e){return r.yc(r.yu(e))},t.uriQueryInSingleQuotedAttr=t.uriPathInSingleQuotedAttr,t.uriQueryInDoubleQuotedAttr=t.uriPathInDoubleQuotedAttr,t.uriQueryInUnQuotedAttr=t.uriPathInUnQuotedAttr,t.uriQueryInHTMLData=t.uriPathInHTMLData,t.uriQueryInHTMLComment=t.uriPathInHTMLComment,t.uriComponentInSingleQuotedAttr=function(e){return r.yavs(r.yuc(e))},t.uriComponentInDoubleQuotedAttr=function(e){return r.yavd(r.yuc(e))},t.uriComponentInUnQuotedAttr=function(e){return r.yavu(r.yuc(e))},t.uriComponentInHTMLData=r.yuc,t.uriComponentInHTMLComment=function(e){return r.yc(r.yuc(e))},t.uriFragmentInSingleQuotedAttr=function(e){return r.yubl(r.yavs(r.yuc(e)))},t.uriFragmentInDoubleQuotedAttr=function(e){return r.yubl(r.yavd(r.yuc(e)))},t.uriFragmentInUnQuotedAttr=function(e){return r.yubl(r.yavu(r.yuc(e)))},t.uriFragmentInHTMLData=t.uriComponentInHTMLData,t.uriFragmentInHTMLComment=t.uriComponentInHTMLComment},function(e,t){function n(){for(var e={},t=0;t2*this.indent?t.width:80,this.best_line_break="\r"===(n=t.line_break)||"\n"===n||"\r\n"===n?t.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}var r,a,l;return r="\0 \t\r\n
\u2028\u2029",a={"!":"!","tag:yaml.org,2002:":"!!"},l={"\0":"0","":"a","\b":"b","\t":"t","\n":"n","\v":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","
":"N"," ":"_","\u2028":"L","\u2029":"P"},n.prototype.dispose=function(){return this.states=[],this.state=null},n.prototype.emit=function(e){var t;for(this.events.push(e),t=[];!this.need_more_events();)this.event=this.events.shift(),this.state(),t.push(this.event=null);return t},n.prototype.need_more_events=function(){var e;return 0===this.events.length||(e=this.events[0],e instanceof i.DocumentStartEvent?this.need_events(1):e instanceof i.SequenceStartEvent?this.need_events(2):e instanceof i.MappingStartEvent&&this.need_events(3))},n.prototype.need_events=function(e){var t,n,r,o,a;for(o=0,a=this.events.slice(1),n=0,r=a.length;nthis.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},n.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_sequence=function(){var e;return e=this.mapping_context&&!this.indentation,this.increase_indent({indentless:e}),this.state=this.expect_first_block_sequence_item},n.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},n.prototype.expect_block_sequence_item=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},n.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},n.prototype.expect_block_mapping_key=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.check_empty_document=function(){var e;return this.event instanceof i.DocumentStartEvent&&0!==this.events.length&&((e=this.events[0])instanceof i.ScalarEvent&&null==e.anchor&&null==e.tag&&e.implicit&&""===e.value)},n.prototype.check_empty_sequence=function(){return this.event instanceof i.SequenceStartEvent&&this.events[0]instanceof i.SequenceEndEvent},n.prototype.check_empty_mapping=function(){return this.event instanceof i.MappingStartEvent&&this.events[0]instanceof i.MappingEndEvent},n.prototype.check_simple_key=function(){var e;return e=0,this.event instanceof i.NodeEvent&&null!=this.event.anchor&&(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),e+=this.prepared_anchor.length),null!=this.event.tag&&(this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent)&&(null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(this.event.tag)),e+=this.prepared_tag.length),this.event instanceof i.ScalarEvent&&(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),e+=this.analysis.scalar.length),e<128&&(this.event instanceof i.AliasEvent||this.event instanceof i.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},n.prototype.process_anchor=function(e){return null==this.event.anchor?void(this.prepared_anchor=null):(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+e+this.prepared_anchor,!0),this.prepared_anchor=null)},n.prototype.process_tag=function(){var e;if(e=this.event.tag,this.event instanceof i.ScalarEvent){if(null==this.style&&(this.style=this.choose_scalar_style()),(!this.canonical||null==e)&&(""===this.style&&this.event.implicit[0]||""!==this.style&&this.event.implicit[1]))return void(this.prepared_tag=null);this.event.implicit[0]&&null==e&&(e="!",this.prepared_tag=null)}else if((!this.canonical||null==e)&&this.event.implicit)return void(this.prepared_tag=null);return null==e&&this.error("tag is not specified"),null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(e)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},n.prototype.process_scalar=function(){var e;switch(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),null==this.style&&(this.style=this.choose_scalar_style()),e=!this.simple_key_context,this.style){case'"':this.write_double_quoted(this.analysis.scalar,e);break;case"'":this.write_single_quoted(this.analysis.scalar,e);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,e)}return this.analysis=null,this.style=null},n.prototype.choose_scalar_style=function(){var e;return null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),'"'===this.event.style||this.canonical?'"':this.event.style||!this.event.implicit[0]||this.simple_key_context&&(this.analysis.empty||this.analysis.multiline)||!(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?this.event.style&&(e=this.event.style,u.call("|>",e)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:this.event.style&&"'"!==this.event.style||!this.analysis.allow_single_quoted||this.simple_key_context&&this.analysis.multiline?'"':"'":""},n.prototype.prepare_version=function(e){var t,n,r;return t=e[0],n=e[1],r=t+"."+n,1===t?r:this.error("unsupported YAML version",r)},n.prototype.prepare_tag_handle=function(e){var t,n,r,i;for(e||this.error("tag handle must not be empty"),"!"===e[0]&&"!"===e.slice(-1)||this.error("tag handle must start and end with '!':",e),i=e.slice(1,-1),n=0,r=i.length;n=0||this.error("invalid character '"+t+"' in the tag handle:",e);return e},n.prototype.prepare_tag_prefix=function(e){var t,n,r,i;for(e||this.error("tag prefix must not be empty"),n=[],i=0,r=+("!"===e[0]);r=0?r++:(i=0||"!"===t&&"!"!==i?r++:(f"},n.prototype.prepare_anchor=function(e){var t,n,r;for(e||this.error("anchor must not be empty"),n=0,r=e.length;n=0||this.error("invalid character '"+t+"' in the anchor:",e);return e},n.prototype.analyze_scalar=function(t){var n,i,o,a,s,l,c,p,f,h,d,m,v,g,y,_,b,x,w,k,E,S,C,A,D;for(t||new e(t,!0,!1,!1,!0,!0,!0,!1),l=!1,f=!1,_=!1,C=!1,!1,g=!1,v=!1,D=!1,A=!1,c=!1,S=!1,0!==t.indexOf("---")&&0!==t.indexOf("...")||(l=!0,f=!0),b=!0,h=1===t.length||(k=t[1],u.call("\0 \t\r\n
\u2028\u2029",k)>=0),w=!1,x=!1,m=0,m=d=0,y=t.length;d'\"%@`",p)>=0||"-"===p&&h?(f=!0,l=!0):u.call("?:",p)>=0&&(f=!0,h&&(l=!0)):u.call(",?[]{}",p)>=0?f=!0:":"===p?(f=!0,h&&(l=!0)):"#"===p&&b&&(f=!0,l=!0),u.call("\n
\u2028\u2029",p)>=0&&(_=!0),"\n"===p||" "<=p&&p<="~"||("\ufeff"!==p&&("
"===p||" "<=p&&p<=""||""<=p&&p<="�")?(!0,this.allow_unicode||(C=!0)):C=!0)," "===p?(0===m&&(g=!0),m===t.length-1&&(D=!0),x&&(c=!0),x=!1,w=!0):u.call("\n
\u2028\u2029",p)>=0?(0===m&&(v=!0),m===t.length-1&&(A=!0),w&&(S=!0),x=!0,w=!1):(x=!1,w=!1),b=u.call(r,p)>=0,h=m+2>=t.length||(E=t[m+2],u.call(r,E)>=0);return a=!0,i=!0,s=!0,o=!0,n=!0,(g||v||D||A)&&(a=i=!1),D&&(n=!1),c&&(a=i=s=!1),(S||C)&&(a=i=s=n=!1),_&&(a=i=!1),f&&(a=!1),l&&(i=!1),new e(t,!1,_,a,i,s,o,n)},n.prototype.write_stream_start=function(){if(this.encoding&&0===this.encoding.indexOf("utf-16"))return this.stream.write("\ufeff",this.encoding)},n.prototype.write_stream_end=function(){return this.flush_stream()},n.prototype.write_indicator=function(e,t,n){var r;return null==n&&(n={}),r=this.whitespace||!t?e:" "+e,this.whitespace=!!n.whitespace,this.indentation&&(this.indentation=!!n.indentation),this.column+=r.length,this.open_ended=!1,this.stream.write(r,this.encoding)},n.prototype.write_indent=function(){var e,t,n;if(t=null!=(n=this.indent)?n:0,(!this.indentation||this.column>t||this.column===t&&!this.whitespace)&&this.write_line_break(),this.columnthis.best_width&&t&&0!==f&&a!==e.length?this.write_indent():(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding)),f=a);else if(r){if(null==i||u.call("\n
\u2028\u2029",i)<0){for("\n"===e[f]&&this.write_line_break(),c=e.slice(f,a),s=0,l=c.length;s=0||"'"===i)&&f=0),a++}return this.write_indicator("'",!1)},n.prototype.write_double_quoted=function(e,t){var n,r,i,a;for(null==t&&(t=!0),this.write_indicator('"',!0),a=i=0;i<=e.length;)n=e[i],(null==n||u.call('"\\
\u2028\u2029\ufeff',n)>=0||!(" "<=n&&n<="~"||this.allow_unicode&&(" "<=n&&n<=""||""<=n&&n<="�")))&&(a=i)&&this.column+(i-a)>this.best_width&&(r=e.slice(a,i)+"\\",a"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),l=!0,n=!0,h=!1,d=o=0,f=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n
\u2028\u2029",r)<0){for(l||null==r||" "===r||"\n"!==e[d]||this.write_line_break(),l=" "===r,p=e.slice(d,o),s=0,c=p.length;sthis.best_width?this.write_indent():(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding)),d=o):(null==r||u.call(" \n
\u2028\u2029",r)>=0)&&(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding),null==r&&this.write_line_break(),d=o);null!=r&&(n=u.call("\n
\u2028\u2029",r)>=0,h=" "===r),f.push(o++)}return f},n.prototype.write_literal=function(e){var t,n,r,i,o,a,s,l,c,p,f;for(a=this.determine_block_hints(e),this.write_indicator("|"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),n=!0,f=o=0,p=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n
\u2028\u2029",r)<0){for(c=e.slice(f,o),s=0,l=c.length;s=0)&&(i=e.slice(f,o),this.stream.write(i,this.encoding),null==r&&this.write_line_break(),f=o);null!=r&&(n=u.call("\n
\u2028\u2029",r)>=0),p.push(o++)}return p},n.prototype.write_plain=function(e,t){var n,r,i,o,a,s,l,c,p,f,h;if(null==t&&(t=!0),e){for(this.root_context&&(this.open_ended=!0),this.whitespace||(o=" ",this.column+=o.length,this.stream.write(o,this.encoding)),this.whitespace=!1,this.indentation=!1,f=!1,r=!1,h=a=0,p=[];a<=e.length;){if(i=e[a],f)" "!==i&&(h+1===a&&this.column>this.best_width&&t?(this.write_indent(),this.whitespace=!1,this.indentation=!1):(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding)),h=a);else if(r){if(u.call("\n
\u2028\u2029",i)<0){for("\n"===e[h]&&this.write_line_break(),c=e.slice(h,a),s=0,l=c.length;s=0)&&(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding),h=a);null!=i&&(f=" "===i,r=u.call("\n
\u2028\u2029",i)>=0),p.push(a++)}return p}},n.prototype.determine_block_hints=function(e){var t,n,r,i,o;return n="",t=e[0],r=e.length-2,o=e[r++],i=e[r++],u.call(" \n
\u2028\u2029",t)>=0&&(n+=this.best_indent),u.call("\n
\u2028\u2029",i)<0?n+="-":(1===e.length||u.call("\n
\u2028\u2029",o)>=0)&&(n+="+"),n},n.prototype.flush_stream=function(){var e;return"function"==typeof(e=this.stream).flush?e.flush():void 0},n.prototype.error=function(e,n){var r,i;throw n&&(n=null!=(r=null!=n&&null!=(i=n.constructor)?i.name:void 0)?r:o.inspect(n)),new t.EmitterError(e+(n?" "+n:""))},n}(),e=function(){function e(e,t,n,r,i,o,a,s){this.scalar=e,this.empty=t,this.multiline=n,this.allow_flow_plain=r,this.allow_block_plain=i,this.allow_single_quoted=o,this.allow_double_quoted=a,this.allow_block=s}return e}()}).call(this)},function(e,t,n){(function(){var e,t,r,i,o,a,s,u=[].slice;s=n(61),i=n(501),a=n(502),r=n(500),e=n(498),o=n(266),t=n(499),this.make_loader=function(n,l,c,p,f,h){var d;return null==n&&(n=i.Reader),null==l&&(l=a.Scanner),null==c&&(c=r.Parser),null==p&&(p=e.Composer),null==f&&(f=o.Resolver),null==h&&(h=t.Constructor),d=[n,l,c,p,f,h],function(){function e(e){var n,r,i;for(d[0].call(this,e),i=d.slice(1),n=0,r=i.length;nc?l(e,n,i):a+r>f?u(a-c+r,n,i):i&&i()},p=function(e,n,r,i){u(Math.max(0,t.getTopOf(e)-t.getHeight()/2+(r||e.getBoundingClientRect().height/2)),n,i)};return{setup:function(e,t){return(0===e||e)&&(n=e),(0===t||t)&&(r=t),{defaultDuration:n,edgeOffset:r}},to:l,toY:u,intoView:c,center:p,stop:a,moving:function(){return!!i},getY:t.getY,getTopOf:t.getTopOf}},n=document.documentElement,r=function(){return window.scrollY||n.scrollTop},i=t({body:document.scrollingElement||document.body,toY:function(e){window.scrollTo(0,e)},getY:r,getHeight:function(){return window.innerHeight||n.clientHeight},getTopOf:function(e){return e.getBoundingClientRect().top+r()-n.offsetTop}});if(i.createScroller=function(e,r,i){return t({body:e,toY:function(t){e.scrollTop=t},getY:function(){return e.scrollTop},getHeight:function(){return Math.min(e.clientHeight,window.innerHeight||n.clientHeight)},getTopOf:function(e){return e.offsetTop}},r,i)},"addEventListener"in window&&!window.noZensmooth&&!e(document.body)){var o="scrollRestoration"in history;o&&(history.scrollRestoration="auto"),window.addEventListener("load",function(){o&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(e){e.state&&"zenscrollY"in e.state&&i.toY(e.state.zenscrollY)},!1)),window.location.hash&&setTimeout(function(){var e=i.setup().edgeOffset;if(e){var t=document.getElementById(window.location.href.split("#")[1]);if(t){var n=Math.max(0,i.getTopOf(t)-e),r=i.getY()-n;0<=r&&r<9&&window.scrollTo(0,n)}}},9)},!1);var a=new RegExp("(^|\\s)noZensmooth(\\s|$)");window.addEventListener("click",function(e){for(var t=e.target;t&&"A"!==t.tagName;)t=t.parentNode;if(!(!t||1!==e.which||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){if(o)try{history.replaceState({zenscrollY:i.getY()},"")}catch(e){}var n=t.getAttribute("href")||"";if(0===n.indexOf("#")&&!a.test(t.className)){var r=0,s=document.getElementById(n.substring(1));if("#"!==n){if(!s)return;r=i.getTopOf(s)}e.preventDefault();var u=function(){window.location=n},l=i.setup().edgeOffset;l&&(r=Math.max(0,r-l),u=function(){history.pushState(null,"",n)}),i.toY(r,null,u)}}},!1)}return i})},function(e,t,n){function r(e){return n(i(e))}function i(e){var t=o[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var o={"./all.js":271,"./ast/ast.js":272,"./ast/index.js":273,"./ast/jump-to-path.jsx":274,"./auth/actions.js":168,"./auth/index.js":275,"./auth/reducers.js":276,"./auth/selectors.js":277,"./auth/spec-wrap-actions.js":278,"./configs/actions.js":169,"./configs/index.js":279,"./configs/reducers.js":280,"./configs/selectors.js":281,"./deep-linking/helpers.js":282,"./deep-linking/index.js":283,"./deep-linking/layout-wrap-actions.js":284,"./deep-linking/spec-wrap-actions.js":285,"./download-url.js":286,"./err/actions.js":128,"./err/error-transformers/hook.js":287,"./err/error-transformers/transformers/not-of-type.js":288,"./err/error-transformers/transformers/parameter-oneof.js":289,"./err/error-transformers/transformers/strip-instance.js":290,"./err/index.js":291,"./err/reducers.js":292,"./err/selectors.js":293,"./layout/actions.js":170,"./layout/index.js":294,"./layout/reducers.js":295,"./layout/selectors.js":296,"./logs/index.js":297,"./oas3/actions.js":171,"./oas3/auth-extensions/wrap-selectors.js":298,"./oas3/components/callbacks.jsx":299,"./oas3/components/http-auth.jsx":300,"./oas3/components/index.js":301,"./oas3/components/operation-link.jsx":302,"./oas3/components/operation-servers.jsx":303,"./oas3/components/request-body-editor.jsx":304,"./oas3/components/request-body.jsx":305,"./oas3/components/servers.jsx":306,"./oas3/helpers.js":34,"./oas3/index.js":307,"./oas3/reducers.js":308,"./oas3/selectors.js":309,"./oas3/spec-extensions/selectors.js":310,"./oas3/spec-extensions/wrap-selectors.js":311,"./oas3/wrap-components/auth-item.jsx":312,"./oas3/wrap-components/index.js":313,"./oas3/wrap-components/markdown.js":314,"./oas3/wrap-components/model.jsx":315,"./oas3/wrap-components/online-validator-badge.js":316,"./oas3/wrap-components/parameters.jsx":317,"./oas3/wrap-components/version-stamp.jsx":318,"./samples/fn.js":172,"./samples/index.js":319,"./spec/actions.js":173,"./spec/index.js":320,"./spec/reducers.js":321,"./spec/selectors.js":322,"./spec/wrap-actions.js":323,"./split-pane-mode/components/split-pane-mode.jsx":324,"./split-pane-mode/index.js":325,"./swagger-js/index.js":326,"./util/index.js":327,"./view/index.js":328,"./view/root-injects.js":329};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=1208},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){n(505),e.exports=n(504)}])});
-//# sourceMappingURL=swagger-ui-bundle.js.map
\ No newline at end of file
+//# sourceMappingURL=swagger-ui-bundle.js.map
diff --git a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js
index b24fd08faf240..cd5a1d0859910 100644
--- a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js
+++ b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js
@@ -10,4 +10,4 @@ var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.pr
* @license MIT
*/
var V=n(134),$=n(232),Z=n(234);e.Buffer=o,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return s(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,s=Math.min(n,r);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var s=i-r,a=n-e,u=Math.min(s,a),c=this.slice(r,i),h=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return A(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),$.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),$.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),$.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),$.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){N(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var s;if("number"==typeof t)for(s=e;sh;)if((a=u[h++])!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e,n){var r=n(49),i=n(7)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(54),i=n(87),o=n(55);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(6).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(49);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(49);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(53),i=n(37),o=n(56),s={};n(18)(s,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(38)("meta"),i=n(19),o=n(10),s=n(11).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(26)(function(){return u(Object.preventExtensions({}))}),h=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";h(t)}return t[r].i},p=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;h(t)}return t[r].w},f=function(t){return c&&d.NEED&&u(t)&&!o(t,r)&&h(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:f}},function(t,e,n){var r=n(11),i=n(16),o=n(54);t.exports=n(9)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(20),i=n(86).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):i(r(t))}},function(t,e,n){var r=n(17),i=n(5),o=n(26);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(19),i=n(16),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(81)(Function.call,n(85).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(59),i=n(50);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){var r=n(59),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(59),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(148),i=n(7)("iterator"),o=n(36);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(16),i=n(163);t.exports=n(5).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){"use strict";var r=n(146),i=n(154),o=n(36),s=n(20);t.exports=n(84)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(17);r(r.S,"Object",{create:n(53)})},function(t,e,n){var r=n(17);r(r.S+r.F*!n(9),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(91),i=n(88);n(158)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(17);r(r.S,"Object",{setPrototypeOf:n(159).set})},function(t,e){},function(t,e,n){"use strict";var r=n(6),i=n(10),o=n(9),s=n(17),a=n(90),u=n(155).KEY,c=n(26),h=n(58),l=n(56),p=n(38),f=n(7),d=n(62),m=n(61),y=n(149),v=n(152),x=n(16),g=n(19),D=n(20),E=n(60),A=n(37),S=n(53),w=n(157),C=n(85),_=n(11),b=n(54),F=C.f,k=_.f,I=w.f,T=r.Symbol,B=r.JSON,M=B&&B.stringify,P=f("_hidden"),N=f("toPrimitive"),O={}.propertyIsEnumerable,R=h("symbol-registry"),U=h("symbols"),j=h("op-symbols"),L=Object.prototype,z="function"==typeof T,J=r.QObject,X=!J||!J.prototype||!J.prototype.findChild,q=o&&c(function(){return 7!=S(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=F(L,e);r&&delete L[e],k(t,e,n),r&&t!==L&&k(L,e,r)}:k,K=function(t){var e=U[t]=S(T.prototype);return e._k=t,e},Y=z&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},W=function(t,e,n){return t===L&&W(j,e,n),x(t),e=E(e,!0),x(n),i(U,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=S(n,{enumerable:A(0,!1)})):(i(t,P)||k(t,P,A(1,{})),t[P][e]=!0),q(t,e,n)):k(t,e,n)},G=function(t,e){x(t);for(var n,r=y(e=D(e)),i=0,o=r.length;o>i;)W(t,n=r[i++],e[n]);return t},H=function(t,e){return void 0===e?S(t):G(S(t),e)},V=function(t){var e=O.call(this,t=E(t,!0));return!(this===L&&i(U,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,P)&&this[P][t])||e)},$=function(t,e){if(t=D(t),e=E(e,!0),t!==L||!i(U,e)||i(j,e)){var n=F(t,e);return!n||!i(U,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(D(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==P||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===L,r=I(n?j:D(t)),o=[],s=0;r.length>s;)!i(U,e=r[s++])||n&&!i(L,e)||o.push(U[e]);return o};z||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===L&&e.call(j,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),q(this,t,A(1,n))};return o&&X&&q(L,t,{configurable:!0,set:e}),K(t)},a(T.prototype,"toString",function(){return this._k}),C.f=$,_.f=W,n(86).f=w.f=Z,n(55).f=V,n(87).f=Q,o&&!n(52)&&a(L,"propertyIsEnumerable",V,!0),d.f=function(t){return K(f(t))}),s(s.G+s.W+s.F*!z,{Symbol:T});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)f(tt[et++]);for(var nt=b(f.store),rt=0;nt.length>rt;)m(nt[rt++]);s(s.S+s.F*!z,"Symbol",{for:function(t){return i(R,t+="")?R[t]:R[t]=T(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){X=!0},useSimple:function(){X=!1}}),s(s.S+s.F*!z,"Object",{create:H,defineProperty:W,defineProperties:G,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:Q}),B&&s(s.S+s.F*(!z||c(function(){var t=T();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!Y(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Y(e))return e}),r[1]=e,M.apply(B,r)}}),T.prototype[N]||n(18)(T.prototype,N,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){n(61)("asyncIterator")},function(t,e,n){n(61)("observable")},function(t,e,n){var r=n(1)("unscopables"),i=Array.prototype;void 0==i[r]&&n(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(44),i=n(32),o=n(107);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),h=o(s,c);if(t&&n!=n){for(;c>h;)if((a=u[h++])!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e,n){var r=n(40),i=n(182),o=n(181),s=n(12),a=n(32),u=n(198),c={},h={},e=t.exports=function(t,e,n,l,p){var f,d,m,y,v=p?function(){return t}:u(t),x=r(n,l,e?2:1),g=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(f=a(t.length);f>g;g++)if((y=e?x(s(d=t[g])[0],d[1]):x(t[g]))===c||y===h)return y}else for(m=v.call(t);!(d=m.next()).done;)if((y=i(m,x,d.value,e))===c||y===h)return y};e.BREAK=c,e.RETURN=h},function(t,e,n){t.exports=!n(28)&&!n(29)(function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(31),i=n(1)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(12);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(187),i=n(102),o=n(67),s={};n(14)(s,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(1)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(106).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(27)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var h=a.resolve();n=function(){h.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(12),i=n(188),o=n(94),s=n(68)("IE_PROTO"),a=function(){},u=function(){var t,e=n(64)("iframe"),r=o.length;for(e.style.display="none",n(95).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("