-
= /* @escapeNotVerified */ __('Payment & Shipping Information') ?>
+
+
+ = $block->getChildHtml('shipping_method') ?>
-
-
- = $block->getChildHtml('billing_method') ?>
-
-
- = $block->getChildHtml('shipping_method') ?>
-
+
+
+
+
+ = $block->getChildHtml('billing_method') ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
index 9e0394f6430bd..65d3a612e5133 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
@@ -100,12 +100,8 @@ require(['prototype'], function(){
diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
index 259ca2165e647..c508a5ecdfa58 100644
--- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
+++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
@@ -4,14 +4,17 @@
*/
define([
- "jquery",
+ 'jquery',
'Magento_Ui/js/modal/confirm',
'Magento_Ui/js/modal/alert',
- "mage/translate",
- "prototype",
- "Magento_Catalog/catalog/product/composite/configure",
+ 'mage/template',
+ 'text!Magento_Sales/templates/order/create/shipping/reload.html',
+ 'text!Magento_Sales/templates/order/create/payment/reload.html',
+ 'mage/translate',
+ 'prototype',
+ 'Magento_Catalog/catalog/product/composite/configure',
'Magento_Ui/js/lib/view/utils/async'
-], function(jQuery, confirm, alert){
+], function (jQuery, confirm, alert, template, shippingTemplate, paymentTemplate) {
window.AdminOrder = new Class.create();
@@ -29,7 +32,7 @@ define([
this.gridProducts = $H({});
this.gridProductsGift = $H({});
this.billingAddressContainer = '';
- this.shippingAddressContainer= '';
+ this.shippingAddressContainer = '';
this.isShippingMethodReseted = data.shipping_method_reseted ? data.shipping_method_reseted : false;
this.overlayData = $H({});
this.giftMessageDataChanged = false;
@@ -39,7 +42,19 @@ define([
this.isOnlyVirtualProduct = false;
this.excludedPaymentMethods = [];
this.summarizePrice = true;
- this.timerId = null;
+ this.shippingTemplate = template(shippingTemplate, {
+ data: {
+ title: jQuery.mage.__('Shipping Method'),
+ linkText: jQuery.mage.__('Get shipping methods and rates')
+ }
+ });
+ this.paymentTemplate = template(paymentTemplate, {
+ data: {
+ title: jQuery.mage.__('Payment Method'),
+ linkText: jQuery.mage.__('Get available payment methods')
+ }
+ });
+
jQuery.async('#order-items', (function(){
this.dataArea = new OrderFormArea('data', $(this.getAreaId('data')), this);
this.itemsArea = Object.extend(new OrderFormArea('items', $(this.getAreaId('items')), this), {
@@ -168,43 +183,51 @@ define([
var data = this.serializeData(container);
data[el.name] = id;
- if(this.isShippingField(container) && !this.isShippingMethodReseted){
+
+ this.resetPaymentMethod();
+ if (this.isShippingField(container) && !this.isShippingMethodReseted) {
this.resetShippingMethod(data);
- }
- else{
+ } else{
this.saveData(data);
}
},
- isShippingField : function(fieldId){
- if(this.shippingAsBilling){
+ /**
+ * Checks if the field belongs to the shipping address.
+ *
+ * @param {String} fieldId
+ * @return {Boolean}
+ */
+ isShippingField: function (fieldId) {
+ if (this.shippingAsBilling) {
return fieldId.include('billing');
}
+
return fieldId.include('shipping');
},
- isBillingField : function(fieldId){
+ /**
+ * Checks if the field belongs to the billing address.
+ *
+ * @param {String} fieldId
+ * @return {Boolean}
+ */
+ isBillingField: function (fieldId) {
return fieldId.include('billing');
},
- bindAddressFields : function(container) {
- var fields = $(container).select('input', 'select', 'textarea');
- for(var i=0;i
+
+
+ <%- data.title %>
+
+
diff --git a/app/code/Magento/Sales/view/adminhtml/web/templates/order/create/shipping/reload.html b/app/code/Magento/Sales/view/adminhtml/web/templates/order/create/shipping/reload.html
new file mode 100644
index 0000000000000..6b191ee81a45a
--- /dev/null
+++ b/app/code/Magento/Sales/view/adminhtml/web/templates/order/create/shipping/reload.html
@@ -0,0 +1,19 @@
+
+
+
+ <%- data.title %>
+
+
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
index be2588dc48711..27047ae46bf1f 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
@@ -184,11 +184,11 @@ public function setActiveFlag($code = 'active')
/**
* Return code of carrier
*
- * @return string
+ * @return string|null
*/
public function getCarrierCode()
{
- return isset($this->_code) ? $this->_code : null;
+ return $this->_code ?? null;
}
/**
@@ -216,6 +216,7 @@ public function getTrackingInfo($tracking)
/**
* Check if carrier has shipping tracking option available
+ *
* All \Magento\Usa carriers have shipping tracking option available
*
* @return boolean
@@ -399,8 +400,8 @@ protected function _getQuotesCacheKey($requestParams)
/**
* Checks whether some request to rates have already been done, so we have cache for it
- * Used to reduce number of same requests done to carrier service during one session
*
+ * Used to reduce number of same requests done to carrier service during one session
* Returns cached response or null
*
* @param string|array $requestParams
@@ -410,7 +411,7 @@ protected function _getCachedQuotes($requestParams)
{
$key = $this->_getQuotesCacheKey($requestParams);
- return isset(self::$_quotesCache[$key]) ? self::$_quotesCache[$key] : null;
+ return self::$_quotesCache[$key] ?? null;
}
/**
@@ -443,8 +444,7 @@ protected function _prepareServiceName($name)
}
/**
- * Prepare shipment request.
- * Validate and correct request information
+ * Prepare shipment request. Validate and correct request information
*
* @param \Magento\Framework\DataObject $request
* @return void
@@ -558,8 +558,7 @@ public function returnOfShipment($request)
}
/**
- * For multi package shipments. Delete requested shipments if the current shipment
- * request is failed
+ * For multi package shipments. Delete requested shipments if the current shipment. Request is failed
*
* @param array $data
* @return bool
@@ -625,6 +624,8 @@ public function isGirthAllowed($countyDest = null, $carrierMethodCode = null)
}
/**
+ * Set Raw Request
+ *
* @param \Magento\Framework\DataObject|null $request
* @return $this
* @api
@@ -680,6 +681,7 @@ public function parseXml($xmlContent, $customSimplexml = 'SimpleXMLElement')
/**
* Checks if shipping method can collect rates
+ *
* @return bool
*/
public function canCollectRates()
@@ -689,6 +691,7 @@ public function canCollectRates()
/**
* Debug errors if showmethod is unset
+ *
* @param Error $errors
*
* @return void
diff --git a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/AddressBuilder.php b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/AddressBuilder.php
index f95968d4a1bf7..482f243f6f05d 100644
--- a/app/code/Magento/Signifyd/Model/SignifydGateway/Request/AddressBuilder.php
+++ b/app/code/Magento/Signifyd/Model/SignifydGateway/Request/AddressBuilder.php
@@ -41,6 +41,6 @@ private function getStreetLine($number, $street)
{
$lines = is_array($street) ? $street : [];
- return isset($lines[$number - 1]) ? $lines[$number - 1] : '';
+ return $lines[$number - 1] ?? '';
}
}
diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php
index c92d62cd0bbe3..29a1f4a9c666e 100644
--- a/app/code/Magento/Store/Model/Store.php
+++ b/app/code/Magento/Store/Model/Store.php
@@ -464,6 +464,7 @@ protected function _getSession()
* Validation rules for store
*
* @return \Zend_Validate_Interface|null
+ * @throws \Zend_Validate_Exception
*/
protected function _getValidationRulesBeforeSave()
{
@@ -489,9 +490,11 @@ protected function _getValidationRulesBeforeSave()
/**
* Loading store data
*
- * @param mixed $key
- * @param string $field
- * @return $this
+ * @param mixed $key
+ * @param string $field
+ *
+ * @return $this
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function load($key, $field = null)
{
@@ -566,6 +569,7 @@ public function setWebsite(Website $website)
* Retrieve store website
*
* @return Website|bool
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getWebsite()
{
@@ -578,9 +582,11 @@ public function getWebsite()
/**
* Retrieve url using store configuration specific
*
- * @param string $route
- * @param array $params
- * @return string
+ * @param string $route
+ * @param array $params
+ *
+ * @return string
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getUrl($route = '', $params = [])
{
@@ -880,8 +886,10 @@ public function getDefaultCurrency()
/**
* Set current store currency code
*
- * @param string $code
- * @return string
+ * @param string $code
+ *
+ * @return string
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function setCurrentCurrencyCode($code)
{
@@ -966,6 +974,7 @@ public function getAllowedCurrencies()
* Retrieve store current currency
*
* @return Currency
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function getCurrentCurrency()
{
@@ -988,6 +997,7 @@ public function getCurrentCurrency()
* Retrieve current currency rate
*
* @return float
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function getCurrentCurrencyRate()
{
@@ -998,6 +1008,7 @@ public function getCurrentCurrencyRate()
* Retrieve root category identifier
*
* @return int
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getRootCategoryId()
{
@@ -1023,6 +1034,7 @@ public function setGroup(Group $group)
* Retrieve group model
*
* @return Group|bool
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getGroup()
{
@@ -1130,6 +1142,7 @@ public function getDefaultGroupId()
* Check if store can be deleted
*
* @return boolean
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function isCanDelete()
{
@@ -1145,6 +1158,7 @@ public function isCanDelete()
*
* @return boolean
* @since 100.1.0
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function isDefault()
{
@@ -1158,9 +1172,11 @@ public function isDefault()
* Retrieve current url for store
*
* @param bool $fromStore
+ *
* @return string
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getCurrentUrl($fromStore = true)
{
@@ -1236,6 +1252,7 @@ public function isActive()
* Protect delete from non admin area
*
* @return $this
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function beforeDelete()
{
@@ -1247,6 +1264,7 @@ public function beforeDelete()
* Rewrite in order to clear configuration cache
*
* @return $this
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function afterDelete()
{
@@ -1306,6 +1324,7 @@ public function isReadOnly($value = null)
* Retrieve store group name
*
* @return string
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getFrontendName()
{
@@ -1338,14 +1357,14 @@ public function getIdentities()
}
/**
- * Get store path
+ * Return Store Path
*
* @return string
*/
public function getStorePath()
{
$parsedUrl = parse_url($this->getBaseUrl());
- return isset($parsedUrl['path']) ? $parsedUrl['path'] : '/';
+ return $parsedUrl['path'] ?? '/';
}
/**
diff --git a/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js b/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js
index a7ac45176316c..f795f99e8112d 100644
--- a/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js
+++ b/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js
@@ -432,7 +432,7 @@ define([
swatchProductAttributes.bindAttributeInputType();
- // @todo: refactor collapsable component
+ // @todo: refactor collapsible component
$('.attribute-popup .collapse, [data-role="advanced_fieldset-content"]')
.collapsable()
.collapse('hide');
diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminCustomerTaxClassActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminCustomerTaxClassActionGroup.xml
new file mode 100644
index 0000000000000..04d497b4b5246
--- /dev/null
+++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminCustomerTaxClassActionGroup.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml
index 4f724fb0047e6..b3395bd4afaa9 100644
--- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml
+++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml
@@ -95,6 +95,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml
index 36929ef2e3fa1..27c89162b5cea 100644
--- a/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml
@@ -8,6 +8,18 @@
+
+ California
+ United Kingdom
+ *
+ 50
+
+
+ California
+ United Kingdom
+ *
+ 0
+
New York
United States
diff --git a/app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml b/app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml
index b3f341b687ba7..e11f856c5f57c 100644
--- a/app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml
@@ -23,4 +23,10 @@
true
+
+ TaxName
+
+
+ TaxNameZeroRate
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml
index 681b3a37f506c..bfb082c145f07 100644
--- a/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml
@@ -57,5 +57,10 @@
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Section/AdminProductTaxClassSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminProductTaxClassSection.xml
new file mode 100644
index 0000000000000..f32caf88f2133
--- /dev/null
+++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminProductTaxClassSection.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml
index 3d58238c96ff9..29c53242b90f6 100644
--- a/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml
@@ -9,6 +9,11 @@
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/CheckCreditMemoTotalsTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/CheckCreditMemoTotalsTest.xml
new file mode 100644
index 0000000000000..83fcfbff6de62
--- /dev/null
+++ b/app/code/Magento/Tax/Test/Mftf/Test/CheckCreditMemoTotalsTest.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml
index 7263db10073e0..a2b100143a306 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml
@@ -75,7 +75,7 @@
-
+
@@ -193,7 +193,7 @@
-
+
@@ -300,7 +300,7 @@
-
+
@@ -407,7 +407,7 @@
-
+
diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml
index 1ce94001e55d1..73e1ba8e8e3ff 100644
--- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml
+++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml
@@ -66,7 +66,7 @@
-
+
@@ -178,7 +178,7 @@
-
+
@@ -289,7 +289,7 @@
-
+
@@ -409,7 +409,7 @@
-
+
diff --git a/app/code/Magento/Theme/Block/Html/Header/Logo.php b/app/code/Magento/Theme/Block/Html/Header/Logo.php
index 0a0e71f44ba32..b51f624c20339 100644
--- a/app/code/Magento/Theme/Block/Html/Header/Logo.php
+++ b/app/code/Magento/Theme/Block/Html/Header/Logo.php
@@ -43,6 +43,10 @@ public function __construct(
/**
* Check if current url is url for home page
*
+ * @deprecated This function is no longer used. It was previously used by
+ * Magento/Theme/view/frontend/templates/html/header/logo.phtml
+ * to check if the logo should be clickable on the homepage.
+ *
* @return bool
*/
public function isHomePage()
diff --git a/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml b/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml
index 17f8d7c70f574..79b891b7e55e6 100644
--- a/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml
@@ -12,19 +12,11 @@
?>
getThemeName() ? $block->getThemeName() : $block->getLogoAlt();?>
= /* @escapeNotVerified */ __('Toggle Nav') ?>
-isHomePage()):?>
-
-
-
-
- getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
- = $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
- />
-isHomePage()):?>
-
-
-
-
+
+ getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
+ = $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
+ />
+
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/Formatter.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/Formatter.js
index 5f05d3f3015ad..f74282afd32a6 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/Formatter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/Formatter.js
@@ -1856,7 +1856,7 @@
}
};
- // Applies formatting to the caret postion
+ // Applies formatting to the caret position
function applyCaretFormat() {
var rng, caretContainer, textNode, offset, bookmark, container, text;
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/html/Writer.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/html/Writer.js
index 2abfac6478a0a..f37607f73270b 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/html/Writer.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/classes/html/Writer.js
@@ -110,7 +110,7 @@ tinymce.html.Writer = function(settings) {
*
* @method text
* @param {String} text String to write out.
- * @param {Boolean} raw Optional raw state if true the contents wont get encoded.
+ * @param {Boolean} raw Optional raw state if true the contents won't get encoded.
*/
text: function(text, raw) {
if (text.length > 0)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/example/editor_plugin_src.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/example/editor_plugin_src.js
index edc1e776e5524..bd805e6370274 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/example/editor_plugin_src.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/example/editor_plugin_src.js
@@ -49,7 +49,7 @@
},
/**
- * Creates control instances based in the incomming name. This method is normally not
+ * Creates control instances based in the incoming name. This method is normally not
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
* method can be used to create those.
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_jquery_src.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_jquery_src.js
index b3d77f6ce3139..2d9d859caa6fa 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_jquery_src.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_jquery_src.js
@@ -15682,7 +15682,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
}
};
- // Applies formatting to the caret postion
+ // Applies formatting to the caret position
function applyCaretFormat() {
var rng, caretContainer, textNode, offset, bookmark, container, text;
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_prototype_src.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_prototype_src.js
index daf2ad4e71bac..aaa207da3e4a9 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_prototype_src.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_prototype_src.js
@@ -16532,7 +16532,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
}
};
- // Applies formatting to the caret postion
+ // Applies formatting to the caret position
function applyCaretFormat() {
var rng, caretContainer, textNode, offset, bookmark, container, text;
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_src.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_src.js
index 2634633d8eee5..8448152ed5d2f 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_src.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/tiny_mce_src.js
@@ -16506,7 +16506,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
}
};
- // Applies formatting to the caret postion
+ // Applies formatting to the caret position
function applyCaretFormat() {
var rng, caretContainer, textNode, offset, bookmark, container, text;
diff --git a/app/code/Magento/Ui/Component/Form/Element/DataType/Media.php b/app/code/Magento/Ui/Component/Form/Element/DataType/Media.php
index c2460fd8385c1..d4b1937bd06ba 100644
--- a/app/code/Magento/Ui/Component/Form/Element/DataType/Media.php
+++ b/app/code/Magento/Ui/Component/Form/Element/DataType/Media.php
@@ -31,14 +31,16 @@ public function prepare()
{
if ($this->getData('config/uploaderConfig/url')) {
$url = $this->getContext()->getUrl($this->getData('config/uploaderConfig/url'), ['_secure' => true]);
+ $updateConfig = [
+ 'uploaderConfig' => ['url' => $url]
+ ];
+ if (!isset($this->getConfiguration()['dataScope'])) {
+ $updateConfig['dataScope'] = $this->getName();
+ }
$data = array_replace_recursive(
$this->getData(),
[
- 'config' => [
- 'uploaderConfig' => [
- 'url' => $url
- ],
- ],
+ 'config' => $updateConfig,
]
);
$this->setData($data);
diff --git a/app/code/Magento/Ui/Component/Form/Fieldset.php b/app/code/Magento/Ui/Component/Form/Fieldset.php
index 745068ca0fa8a..2525d0a4923c1 100644
--- a/app/code/Magento/Ui/Component/Form/Fieldset.php
+++ b/app/code/Magento/Ui/Component/Form/Fieldset.php
@@ -5,13 +5,11 @@
*/
namespace Magento\Ui\Component\Form;
-use Magento\Ui\Component\Container;
use Magento\Ui\Component\AbstractComponent;
-use Magento\Framework\View\Element\UiComponentFactory;
-use Magento\Framework\View\Element\UiComponentInterface;
-use Magento\Framework\View\Element\UiComponent\ContextInterface;
/**
+ * Fieldset UI Component.
+ *
* @api
* @since 100.0.2
*/
diff --git a/app/code/Magento/Ui/Component/Layout/Tabs.php b/app/code/Magento/Ui/Component/Layout/Tabs.php
index 8ceac716ae218..0d176d7241653 100644
--- a/app/code/Magento/Ui/Component/Layout/Tabs.php
+++ b/app/code/Magento/Ui/Component/Layout/Tabs.php
@@ -5,18 +5,17 @@
*/
namespace Magento\Ui\Component\Layout;
-use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\UiComponent\BlockWrapperInterface;
use Magento\Framework\View\Element\UiComponent\DataSourceInterface;
-use Magento\Framework\View\Element\UiComponent\LayoutInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Framework\View\Element\UiComponentInterface;
+use Magento\Framework\View\Element\ComponentVisibilityInterface;
use Magento\Ui\Component\Layout\Tabs\TabInterface;
/**
* Class Tabs
*/
-class Tabs extends \Magento\Framework\View\Layout\Generic implements LayoutInterface
+class Tabs extends \Magento\Framework\View\Layout\Generic
{
/**
* @var string
@@ -89,58 +88,15 @@ protected function addChildren(array &$topNode, UiComponentInterface $component,
$this->addWrappedBlock($childComponent, $childrenAreas);
continue;
}
+ if ($childComponent instanceof ComponentVisibilityInterface && !$childComponent->isComponentVisible()) {
+ continue;
+ }
$name = $childComponent->getName();
$config = $childComponent->getData('config');
$collectedComponents[$name] = true;
- if (isset($config['is_collection']) && $config['is_collection'] === true) {
- $label = $childComponent->getData('config/label');
- $this->component->getContext()->addComponentDefinition(
- 'collection',
- [
- 'component' => 'Magento_Ui/js/form/components/collection',
- 'extends' => $this->namespace
- ]
- );
-
- /**
- * @var UiComponentInterface $childComponent
- * @var array $structure
- */
- list($childComponent, $structure) = $this->prepareChildComponents($childComponent, $name);
-
- $childrenStructure = $structure[$name]['children'];
-
- $structure[$name]['children'] = [
- $name . '_collection' => [
- 'type' => 'collection',
- 'config' => [
- 'active' => 1,
- 'removeLabel' => __('Remove %1', $label),
- 'addLabel' => __('Add New %1', $label),
- 'removeMessage' => $childComponent->getData('config/removeMessage'),
- 'itemTemplate' => 'item_template',
- ],
- 'children' => [
- 'item_template' => ['type' => $this->namespace,
- 'isTemplate' => true,
- 'component' => 'Magento_Ui/js/form/components/collection/item',
- 'childType' => 'group',
- 'config' => [
- 'label' => __('New %1', $label),
- ],
- 'children' => $childrenStructure
- ]
- ]
- ]
- ];
- } else {
- /**
- * @var UiComponentInterface $childComponent
- * @var array $structure
- */
- list($childComponent, $structure) = $this->prepareChildComponents($childComponent, $name);
- }
+
+ [$childComponent, $structure] = $this->buildChildComponentStructure($config, $childComponent);
$tabComponent = $this->createTabComponent($childComponent, $name);
@@ -168,6 +124,67 @@ protected function addChildren(array &$topNode, UiComponentInterface $component,
$topNode = $this->structure;
}
+ /**
+ * Build child components structure of the tab
+ *
+ * @param array $config
+ * @param UiComponentInterface $childComponent
+ * @return array
+ */
+ private function buildChildComponentStructure(array $config, $childComponent): array
+ {
+ $name = $childComponent->getName();
+ if (isset($config['is_collection']) && $config['is_collection'] === true) {
+ $label = $childComponent->getData('config/label');
+ $this->component->getContext()->addComponentDefinition(
+ 'collection',
+ [
+ 'component' => 'Magento_Ui/js/form/components/collection',
+ 'extends' => $this->namespace
+ ]
+ );
+ /**
+ * @var UiComponentInterface $childComponent
+ * @var array $structure
+ */
+ [$childComponent, $structure] = $this->prepareChildComponents($childComponent, $name);
+
+ $childrenStructure = $structure[$name]['children'];
+
+ $structure[$name]['children'] = [
+ $name . '_collection' => [
+ 'type' => 'collection',
+ 'config' => [
+ 'active' => 1,
+ 'removeLabel' => __('Remove %1', $label),
+ 'addLabel' => __('Add New %1', $label),
+ 'removeMessage' => $childComponent->getData('config/removeMessage'),
+ 'itemTemplate' => 'item_template',
+ ],
+ 'children' => [
+ 'item_template' => ['type' => $this->namespace,
+ 'isTemplate' => true,
+ 'component' => 'Magento_Ui/js/form/components/collection/item',
+ 'childType' => 'group',
+ 'config' => [
+ 'label' => __('New %1', $label),
+ ],
+ 'children' => $childrenStructure
+ ]
+ ]
+ ]
+ ];
+ } else {
+ /**
+ * @var UiComponentInterface $childComponent
+ * @var array $structure
+ */
+ [$childComponent, $structure] = $this->prepareChildComponents($childComponent, $name);
+ }
+
+ return [$childComponent, $structure];
+ }
+
/**
* Add wrapped layout block
*
diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/MediaTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/MediaTest.php
index 7af173cf2a96f..9653ecd7ded44 100644
--- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/MediaTest.php
+++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/DataType/MediaTest.php
@@ -21,6 +21,9 @@ class MediaTest extends \PHPUnit\Framework\TestCase
/** @var Media */
protected $media;
+ /**
+ * @inheritdoc
+ */
public function setUp()
{
$this->context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class)
@@ -29,8 +32,13 @@ public function setUp()
->getMockForAbstractClass();
$this->media = new Media($this->context);
+ }
+
+ public function testPrepareWithoutDataScope()
+ {
$this->media->setData(
[
+ 'name' => 'test_name',
'config' => [
'uploaderConfig' => [
'url' => 'module/actionPath/path'
@@ -38,19 +46,54 @@ public function setUp()
],
]
);
+ $url = 'http://magento2.com/module/actionPath/path/key/34523456234523trdg';
+ $expectedConfig = [
+ 'uploaderConfig' => ['url' => $url],
+ 'dataScope' => 'test_name'
+ ];
+
+ $this->processor = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\Processor::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->context->expects($this->atLeastOnce())->method('getProcessor')->willReturn($this->processor);
+ $this->context->expects($this->once())
+ ->method('getUrl')
+ ->with('module/actionPath/path', ['_secure' => true])
+ ->willReturn($url);
+ $this->media->prepare();
+ $configuration = $this->media->getConfiguration();
+ $this->assertEquals($expectedConfig, $configuration);
}
- public function testPrepare()
+ public function testPrepareWithDataScope()
{
+ $this->media->setData(
+ [
+ 'name' => 'test_name',
+ 'config' => [
+ 'dataScope' => 'other_data_scope',
+ 'uploaderConfig' => [
+ 'url' => 'module/actionPath/path'
+ ],
+ ],
+ ]
+ );
+ $url = 'http://magento2.com/module/actionPath/path/key/34523456234523trdg';
+ $expectedConfig = [
+ 'uploaderConfig' => ['url' => $url],
+ 'dataScope' => 'other_data_scope'
+ ];
+
$this->processor = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\Processor::class)
->disableOriginalConstructor()
->getMock();
$this->context->expects($this->atLeastOnce())->method('getProcessor')->willReturn($this->processor);
- $url = 'http://magento2.com/module/actionPath/path/key/34523456234523trdg';
$this->context->expects($this->once())
->method('getUrl')
->with('module/actionPath/path', ['_secure' => true])
->willReturn($url);
$this->media->prepare();
+ $configuration = $this->media->getConfiguration();
+ $this->assertEquals($expectedConfig, $configuration);
}
}
diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/FieldsetTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/FieldsetTest.php
new file mode 100644
index 0000000000000..d243507580807
--- /dev/null
+++ b/app/code/Magento/Ui/Test/Unit/Component/Form/FieldsetTest.php
@@ -0,0 +1,58 @@
+context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class)
+ ->getMockForAbstractClass();
+
+ $this->fieldset = new Fieldset(
+ $this->context,
+ [],
+ []
+ );
+ }
+
+ /**
+ * Run test for getComponentName() method
+ *
+ * @return void
+ *
+ */
+ public function testGetComponentName()
+ {
+ $this->assertEquals(self::NAME, $this->fieldset->getComponentName());
+ }
+}
diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/area.js b/app/code/Magento/Ui/view/base/web/js/form/components/area.js
index 5967b8c57b5d3..741e6d3065023 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/components/area.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/components/area.js
@@ -44,7 +44,7 @@ define([
/**
* Calls parent's initElement method.
- * Assignes callbacks on various events of incoming element.
+ * Assigns callbacks on various events of incoming element.
* @param {Object} elem
* @return {Object} - reference to instance
*/
diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/collection.js b/app/code/Magento/Ui/view/base/web/js/form/components/collection.js
index 2c12486ceb519..c31963e98627d 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/components/collection.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/components/collection.js
@@ -91,7 +91,7 @@ define([
},
/**
- * Returnes true if current set of items differ from initial one,
+ * Returns true if current set of items differ from initial one,
* or if some child has been changed.
*
* @returns {Boolean}
@@ -153,6 +153,7 @@ define([
* Creates function that removes element
* from collection using '_removeChild' method.
* @param {Object} elem - Element that should be removed.
+ * @deprecated Not used anymore
*/
removeAddress: function (elem) {
var self = this;
@@ -169,7 +170,7 @@ define([
},
/**
- * Removes elememt from both collection and data storage,
+ * Removes element from both collection and data storage,
* activates first element if removed one was active,
* triggers 'update' event.
*
diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/collection/item.js b/app/code/Magento/Ui/view/base/web/js/form/components/collection/item.js
index c2a65371471c5..045c25ab7911f 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/components/collection/item.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/components/collection/item.js
@@ -19,7 +19,7 @@ define([
};
/**
- * Parses incoming data and returnes result merged with default preview config
+ * Parses incoming data and returns result merged with default preview config
*
* @param {Object|String} data
* @return {Object}
diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js b/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js
index 6d33386fa1f1c..1ddc4dc247b24 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js
@@ -68,7 +68,7 @@ define([
/**
* Calls parent's initElement method.
- * Assignes callbacks on various events of incoming element.
+ * Assigns callbacks on various events of incoming element.
*
* @param {Object} elem
* @return {Object} - reference to instance
diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js b/app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js
index 6492d0821fc21..357571350a268 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js
@@ -324,7 +324,7 @@ define([
/**
* Handler which is invoked when files are choosed for upload.
- * May be used for implementation of aditional validation rules,
+ * May be used for implementation of additional validation rules,
* e.g. total files and a total size rules.
*
* @param {Event} e - Event object.
diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js b/app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js
index 070761fff53e3..3d02afcc40a9e 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js
@@ -20,7 +20,7 @@ define([
return Abstract.extend({
defaults: {
elementSelector: 'textarea',
- suffixRegExpPattern: '\\${ \\$.wysiwygUniqueSuffix }',
+ suffixRegExpPattern: '${ $.wysiwygUniqueSuffix }',
$wysiwygEditorButton: '',
links: {
value: '${ $.provider }:${ $.dataScope }'
@@ -65,6 +65,7 @@ define([
initConfig: function (config) {
var pattern = config.suffixRegExpPattern || this.constructor.defaults.suffixRegExpPattern;
+ pattern = pattern.replace(/\$/g, '\\$&');
config.content = config.content.replace(new RegExp(pattern, 'g'), this.getUniqueSuffix(config));
this._super();
diff --git a/app/code/Magento/Ui/view/base/web/js/form/provider.js b/app/code/Magento/Ui/view/base/web/js/form/provider.js
index d070e23c708bb..49765f589bd9d 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/provider.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/provider.js
@@ -82,7 +82,7 @@ define([
},
/**
- * Set data to provder based on current data.
+ * Set data to provider based on current data.
*
* @param {Object} oldData
* @param {Object} newData
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/dnd.js b/app/code/Magento/Ui/view/base/web/js/grid/dnd.js
index 5a71fca673ec9..660e3cb3bd2bb 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/dnd.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/dnd.js
@@ -406,7 +406,7 @@ define([
*
* @param {Number} x - X coordinate of a grabbed point.
* @param {Number} y - Y coordinate of a grabbed point.
- * @param {HTMLElement} elem - Grabbed elemenet.
+ * @param {HTMLElement} elem - Grabbed element.
*/
grab: function (x, y, elem) {
this.initDrag = true;
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/editing/editor.js b/app/code/Magento/Ui/view/base/web/js/grid/editing/editor.js
index 589aed4c9837b..a4785aea03743 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/editing/editor.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/editing/editor.js
@@ -164,7 +164,7 @@ define([
},
/**
- * Adds listeners on a new recrod.
+ * Adds listeners on a new record.
*
* @param {Record} record
* @returns {Editor} Chainable.
@@ -208,7 +208,7 @@ define([
},
/**
- * Starts editing of a specfied record. If records'
+ * Starts editing of a specified record. If records'
* instance doesn't exist, than it will be created.
*
* @param {(Number|String)} id - See 'getId' method.
@@ -401,7 +401,7 @@ define([
},
/**
- * Disables editing of specfied fields.
+ * Disables editing of specified fields.
*
* @param {Array} fields - An array of fields indeces to be disabled.
* @returns {Editor} Chainable.
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/editing/record.js b/app/code/Magento/Ui/view/base/web/js/grid/editing/record.js
index 390aedf193b91..aa83083cac3c9 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/editing/record.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/editing/record.js
@@ -141,7 +141,7 @@ define([
},
/**
- * Creates fields for the specfied columns.
+ * Creates fields for the specified columns.
*
* @param {Array} columns - An array of column instances.
* @returns {Record} Chainable.
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/massactions.js b/app/code/Magento/Ui/view/base/web/js/grid/massactions.js
index f26ca8697c2ff..3626f52806881 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/massactions.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/massactions.js
@@ -95,7 +95,7 @@ define([
},
/**
- * Adds new action. If action with a specfied identifier
+ * Adds new action. If action with a specified identifier
* already exists, than the original one will be overrided.
*
* @param {Object} action - Action object.
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/resize.js b/app/code/Magento/Ui/view/base/web/js/grid/resize.js
index 50781c9afd8c3..792c997f060c6 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/resize.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/resize.js
@@ -624,7 +624,7 @@ define([
},
/**
- * Generate index that will indentify context
+ * Generate index that will identify context
*
* @param {Object} ctx
* @return {String}
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
index fa445a2577adb..19536e7ff8c18 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
@@ -102,7 +102,7 @@ define([
/**
* Applies search query.
*
- * @param {String} [value=inputValue] - If not specfied, then
+ * @param {String} [value=inputValue] - If not specified, then
* value of the input field will be used.
* @returns {Search} Chainable.
*/
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/toolbar.js b/app/code/Magento/Ui/view/base/web/js/grid/toolbar.js
index 8a17e3ed46f29..fd2d09c6a65f6 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/toolbar.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/toolbar.js
@@ -557,7 +557,7 @@ define([
},
/**
- * Handles changes of windows' top scroll postion.
+ * Handles changes of windows' top scroll position.
*/
onWindowScrollTop: function () {
this.updateTableOffset()
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/core/collection.js b/app/code/Magento/Ui/view/base/web/js/lib/core/collection.js
index 607d217837fcc..eb4f2b39128e2 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/core/collection.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/core/collection.js
@@ -15,7 +15,7 @@ define([
'use strict';
/**
- * Removes non plain object items from the specfied array.
+ * Removes non plain object items from the specified array.
*
* @param {Array} container - Array whose value should be filtered.
* @returns {Array}
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/core/storage/local.js b/app/code/Magento/Ui/view/base/web/js/lib/core/storage/local.js
index 34ceced2c6873..87b5b2f5fe8fe 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/core/storage/local.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/core/storage/local.js
@@ -51,7 +51,7 @@ define([
},
/**
- * Retrieves specfied item.
+ * Retrieves specified item.
*
* @param {String} key - Key of the property to be retrieved.
*/
@@ -60,7 +60,7 @@ define([
},
/**
- * Removes specfied item.
+ * Removes specified item.
*
* @param {String} key - Key of the property to be removed.
*/
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/outer_click.js b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/outer_click.js
index cc9dc5e0a2202..98e86de23221d 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/outer_click.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/outer_click.js
@@ -42,7 +42,7 @@ define([
/**
* Document click handler which in case if event target is not
* a descendant of provided container element,
- * invokes specfied in configuration callback.
+ * invokes specified in configuration callback.
*
* @param {HTMLElement} container
* @param {Object} config
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/knockout/template/observable_source.js b/app/code/Magento/Ui/view/base/web/js/lib/knockout/template/observable_source.js
index 98ffd83b56466..916666d70d1bd 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/knockout/template/observable_source.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/knockout/template/observable_source.js
@@ -29,7 +29,7 @@ define([
* Else, writes into it.
* @param {String} key - key to write to or to read from
* @param {*} value
- * @return {*} - if 1 arg provided, returnes _data[key] property
+ * @return {*} - if 1 arg provided, Returns _data[key] property
*/
data: function (key, value) {
if (arguments.length === 1) {
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/validator.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/validator.js
index 31362644d415a..be8fd2ce9fcef 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/validation/validator.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/validator.js
@@ -60,7 +60,7 @@ define([
}
/**
- * Validates provied value by a specfied set of rules.
+ * Validates provied value by a specified set of rules.
*
* @param {(String|Object)} rules - One or many validation rules.
* @param {*} value - Value to be checked.
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/view/utils/bindings.js b/app/code/Magento/Ui/view/base/web/js/lib/view/utils/bindings.js
index f6afdf7846388..77de8a1ceb0ed 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/view/utils/bindings.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/view/utils/bindings.js
@@ -88,7 +88,7 @@ define([
};
/**
- * Adds specfied bindings to each DOM elemenet in
+ * Adds specified bindings to each DOM element in
* collection and evalutes them with provided context.
*
* @param {(Object|Function)} data - Either bindings object or a function
diff --git a/app/code/Magento/Ui/view/base/web/templates/form/insert.html b/app/code/Magento/Ui/view/base/web/templates/form/insert.html
index e19b2784e6bc6..e590b5e2adedf 100644
--- a/app/code/Magento/Ui/view/base/web/templates/form/insert.html
+++ b/app/code/Magento/Ui/view/base/web/templates/form/insert.html
@@ -6,9 +6,6 @@
-->
diff --git a/app/code/Magento/Widget/Model/ResourceModel/Layout/Update.php b/app/code/Magento/Widget/Model/ResourceModel/Layout/Update.php
index d7e3bf94f548f..6c0aef9e67186 100644
--- a/app/code/Magento/Widget/Model/ResourceModel/Layout/Update.php
+++ b/app/code/Magento/Widget/Model/ResourceModel/Layout/Update.php
@@ -51,7 +51,9 @@ protected function _construct()
* @param string $handle
* @param \Magento\Framework\View\Design\ThemeInterface $theme
* @param \Magento\Framework\App\ScopeInterface $store
+ *
* @return string
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function fetchUpdatesByHandle(
$handle,
@@ -69,14 +71,16 @@ public function fetchUpdatesByHandle(
$this->layoutUpdateCache[$cacheKey][$layout['handle']] .= $layout['xml'];
}
}
- return isset($this->layoutUpdateCache[$cacheKey][$handle]) ? $this->layoutUpdateCache[$cacheKey][$handle] : '';
+ return $this->layoutUpdateCache[$cacheKey][$handle] ?? '';
}
/**
* Get select to fetch updates by handle
*
* @param bool $loadAllUpdates
+ *
* @return \Magento\Framework\DB\Select
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _getFetchUpdatesByHandleSelect($loadAllUpdates = false)
{
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml
new file mode 100644
index 0000000000000..4407991ff5a93
--- /dev/null
+++ b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/design/adminhtml/Magento/backend/Magento_Customer/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Customer/web/css/source/_module.less
index a80cc9a5163f8..c8f2530df22e0 100644
--- a/app/design/adminhtml/Magento/backend/Magento_Customer/web/css/source/_module.less
+++ b/app/design/adminhtml/Magento/backend/Magento_Customer/web/css/source/_module.less
@@ -3,14 +3,77 @@
// * See COPYING.txt for license details.
// */
-// General rule hides group legend and shows first field label instead
-// in app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
-// This must be reset for Customer Address page
-.address-item-edit-content {
+.customer_form_areas_address_address_customer_address_update_modal_update_customer_address_form_loader {
.admin__field {
- legend {
- &.admin__field-label {
- opacity: 1;
+ .admin__field {
+ .admin__field-label {
+ background: none;
+ }
+ }
+ }
+}
+
+.customer-address-form {
+
+ *,
+ *:after,
+ *:before {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+
+ address {
+ font-style: normal;
+ }
+
+ .customer-default-address-wrapper {
+ align-items: flex-start;
+ display: flex;
+ float: left;
+ position: relative;
+ width: 50%;
+
+ .action-additional {
+ margin: 2px 0 0 2px;
+ }
+ }
+
+ .edit-default-billing-address-button,
+ .edit-default-shipping-address-button {
+ position: absolute;
+ }
+
+ .edit-default-billing-address-button {
+ left: 210px;
+ }
+
+ .edit-default-shipping-address-button {
+ left: 230px;
+ }
+
+ .customer_form_areas_address_address_customer_address_listing {
+ clear: both;
+ }
+
+ .add-new-address-button {
+ clear: both;
+ float: right;
+ margin-bottom: 30px;
+ position: relative;
+ }
+
+ .address-information {
+ float: left;
+ margin-bottom: 20px;
+
+ address {
+ float: left;
+
+ .address_caption {
+ font-size: 18px;
+ font-weight: bold;
+ margin-bottom: 16px;
}
}
}
diff --git a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less
index 984556816b035..1e76679f594c1 100644
--- a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less
+++ b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less
@@ -55,7 +55,6 @@
}
.order-billing-address,
- .order-billing-method,
.order-history,
.order-information,
.order-payment-method,
@@ -65,7 +64,6 @@
}
.order-shipping-address,
- .order-shipping-method,
.order-totals,
.order-view-account-information .order-account-information {
float: right;
@@ -300,38 +298,4 @@
}
}
-// ToDo UI: review the collapsible block
-//.order-subtotal {
-// .summary-collapse {
-// cursor: pointer;
-// display: inline-block;
-// &:before {
-// @iconsize: 16px;
-//
-// -webkit-font-smoothing: antialiased;
-// background: #f2ebde;
-// border-radius: 2px;
-// border: 1px solid #ada89e;
-// color: #816063;
-// content: '+';
-// display: inline-block;
-// font-size: @iconsize;
-// font-style: normal;
-// font-weight: normal;
-// height: @iconsize;
-// line-height: @iconsize;
-// margin-right: 7px;
-// overflow: hidden;
-// speak: none;
-// text-indent: 0;
-// vertical-align: top;
-// width: @iconsize;
-// }
-// &:hover:before {
-// background: #cac3b4;
-// }
-// }
-// &.show-details .summary-collapse:before {
-// content: '\e03a';
-// }
-//}
+// ToDo: MAGETWO-32299 UI: review the collapsible block
diff --git a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/order/_payment-shipping.less b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/order/_payment-shipping.less
index 1e40fe1fa3403..029594625ed1c 100644
--- a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/order/_payment-shipping.less
+++ b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/order/_payment-shipping.less
@@ -9,6 +9,7 @@
.admin__payment-method-wrapper {
margin: 0;
+ width: calc(50% - @indent__l);
.admin__field {
margin-left: 0;
&:first-child {
@@ -34,6 +35,7 @@
margin: 0;
}
+.order-billing-method-summary,
.order-shipping-method-summary {
padding-top: @field-option__padding-top;
}
@@ -43,6 +45,7 @@
position: relative;
}
+.order-billing-method-summary,
.order-shipping-method-summary,
.order-shipping-method-info {
.action-default {
diff --git a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/components/tooltips/_tooltips.less b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/components/tooltips/_tooltips.less
index c535047e37682..0049022204619 100644
--- a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/components/tooltips/_tooltips.less
+++ b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/components/tooltips/_tooltips.less
@@ -93,7 +93,7 @@
}
}
-// ToDo UI: Only right tooltip arrow is styled, if we will neeed more need to add another ones
+// ToDo UI: Only right tooltip arrow is styled, if we will need more need to add another ones
.tooltip {
&.top {
diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
index fe9cbe9b9771d..02925881253ea 100644
--- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
+++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
@@ -685,9 +685,11 @@
margin: 0;
opacity: 1;
position: static;
- text-align: left;
}
}
+ & > .admin__field-label {
+ text-align: left;
+ }
&:nth-child(n + 2) {
&:not(.admin__field-option):not(.admin__field-group-show-label):not(.admin__field-date) {
diff --git a/app/design/adminhtml/Magento/backend/web/css/styles-old.less b/app/design/adminhtml/Magento/backend/web/css/styles-old.less
index cb718a646ae5c..26381367c72f5 100644
--- a/app/design/adminhtml/Magento/backend/web/css/styles-old.less
+++ b/app/design/adminhtml/Magento/backend/web/css/styles-old.less
@@ -1188,7 +1188,7 @@
}
//
- // Collapsable fieldset-wrapper
+ // collapsible fieldset-wrapper
// --------------------------------------
// Fieldset styles in another fieldset
@@ -2544,6 +2544,8 @@
.order-summary:after,
.order-methods:before,
.order-methods:after,
+ .payment-methods:before,
+ .payment-methods:after,
.grid-actions:before,
.grid-actions:after,
.fieldset-wrapper-title:before,
@@ -2559,6 +2561,7 @@
.order-addresses:after,
.order-summary:after,
.order-methods:after,
+ .payment-methods:after,
.grid-actions:after,
.fieldset-wrapper-title:after {
clear: both;
@@ -2898,6 +2901,7 @@
.style28();
}
+ #order-billing-method-summary a,
#order-shipping-method-summary a {
.style3();
}
@@ -2936,7 +2940,8 @@
margin: 0 0 0 20px;
}
- #order-data .order-methods ul {
+ #order-data .order-methods ul,
+ #order-data .payment-methods ul {
list-style: none;
margin: 0;
padding: 0;
diff --git a/app/design/adminhtml/Magento/backend/web/js/theme.js b/app/design/adminhtml/Magento/backend/web/js/theme.js
index a2511e27e9f67..8e3b89dcf7e4e 100644
--- a/app/design/adminhtml/Magento/backend/web/js/theme.js
+++ b/app/design/adminhtml/Magento/backend/web/js/theme.js
@@ -599,7 +599,7 @@ define('js/theme', [
], function ($, keyboardHandler) {
'use strict';
- /* @TODO refactor collapsable as widget and avoid logic binding with such a general selectors */
+ /* @TODO refactor collapsible as widget and avoid logic binding with such a general selectors */
$('.collapse').collapsable();
$.each($('.entry-edit'), function (i, entry) {
diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less
index 2468d2a3104e4..8e7f36389c417 100644
--- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less
+++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module/_toolbar.less
@@ -65,6 +65,11 @@
.products.wrapper ~ .toolbar & {
display: none;
}
+
+ .sorter-action {
+ position: relative;
+ top: -2px;
+ }
}
.sorter-options {
diff --git a/app/design/frontend/Magento/blank/web/css/source/_extends.less b/app/design/frontend/Magento/blank/web/css/source/_extends.less
index 5f24c0db8cc88..74dfd48d87a87 100644
--- a/app/design/frontend/Magento/blank/web/css/source/_extends.less
+++ b/app/design/frontend/Magento/blank/web/css/source/_extends.less
@@ -253,7 +253,7 @@
}
//
-// Marging for blocks & widgets
+// Margin for blocks & widgets
// ---------------------------------------------
& when (@media-common = true) {
diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_toolbar.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_toolbar.less
index 0997b9739125d..6bddc46003cbf 100644
--- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_toolbar.less
+++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/module/_toolbar.less
@@ -38,7 +38,10 @@
.lib-css(box-shadow, @button__shadow);
border-radius: 3px;
}
-
+ .sorter-action {
+ position: relative;
+ top: -2px;
+ }
&-amount {
left: 0;
line-height: @toolbar-mode-icon-font-size + 2;
diff --git a/app/design/frontend/Magento/luma/web/css/source/_extends.less b/app/design/frontend/Magento/luma/web/css/source/_extends.less
index ad677b45e52db..3eb189468a9f7 100644
--- a/app/design/frontend/Magento/luma/web/css/source/_extends.less
+++ b/app/design/frontend/Magento/luma/web/css/source/_extends.less
@@ -277,7 +277,7 @@
}
//
-// Marging for blocks & widgets
+// Margin for blocks & widgets
// ---------------------------------------------
& when (@media-common = true) {
diff --git a/composer.json b/composer.json
index 07aaa31f28fa4..0519980e00152 100644
--- a/composer.json
+++ b/composer.json
@@ -167,6 +167,7 @@
"magento/module-cms-graph-ql": "*",
"magento/module-grouped-import-export": "*",
"magento/module-grouped-product": "*",
+ "magento/module-grouped-catalog-inventory": "*",
"magento/module-grouped-product-graph-ql": "*",
"magento/module-import-export": "*",
"magento/module-indexer": "*",
diff --git a/composer.lock b/composer.lock
index f26b71f1cc392..a844a8c737e64 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "93418bd14ad2d9f54f4059550ded7061",
+ "content-hash": "d39adccaf053de23715ebdd9df4725b6",
"packages": [
{
"name": "braintree/braintree_php",
@@ -257,16 +257,16 @@
},
{
"name": "composer/composer",
- "version": "1.7.2",
+ "version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2"
+ "reference": "e965b9aaa8854c3067f1ed2ae45f436572d73eb7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/576aab9b5abb2ed11a1c52353a759363216a4ad2",
- "reference": "576aab9b5abb2ed11a1c52353a759363216a4ad2",
+ "url": "https://api.github.com/repos/composer/composer/zipball/e965b9aaa8854c3067f1ed2ae45f436572d73eb7",
+ "reference": "e965b9aaa8854c3067f1ed2ae45f436572d73eb7",
"shasum": ""
},
"require": {
@@ -333,7 +333,7 @@
"dependency",
"package"
],
- "time": "2018-08-16T14:57:12+00:00"
+ "time": "2018-11-01T09:05:06+00:00"
},
{
"name": "composer/semver",
@@ -399,16 +399,16 @@
},
{
"name": "composer/spdx-licenses",
- "version": "1.4.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
- "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b"
+ "reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/cb17687e9f936acd7e7245ad3890f953770dec1b",
- "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b",
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7a9556b22bd9d4df7cad89876b00af58ef20d3a2",
+ "reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2",
"shasum": ""
},
"require": {
@@ -456,7 +456,7 @@
"spdx",
"validator"
],
- "time": "2018-04-30T10:33:04+00:00"
+ "time": "2018-11-01T09:45:54+00:00"
},
{
"name": "composer/xdebug-handler",
@@ -919,16 +919,16 @@
},
{
"name": "monolog/monolog",
- "version": "1.23.0",
+ "version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
+ "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
- "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
+ "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
@@ -993,7 +993,7 @@
"logging",
"psr-3"
],
- "time": "2017-06-19T01:22:40+00:00"
+ "time": "2018-11-05T09:00:11+00:00"
},
{
"name": "oyejorge/less.php",
@@ -1375,16 +1375,16 @@
},
{
"name": "phpseclib/phpseclib",
- "version": "2.0.11",
+ "version": "2.0.12",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "7053f06f91b3de78e143d430e55a8f7889efc08b"
+ "reference": "8814dc7841db159daed0b32c2b08fb7e03c6afe7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7053f06f91b3de78e143d430e55a8f7889efc08b",
- "reference": "7053f06f91b3de78e143d430e55a8f7889efc08b",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/8814dc7841db159daed0b32c2b08fb7e03c6afe7",
+ "reference": "8814dc7841db159daed0b32c2b08fb7e03c6afe7",
"shasum": ""
},
"require": {
@@ -1463,7 +1463,7 @@
"x.509",
"x509"
],
- "time": "2018-04-15T16:55:05+00:00"
+ "time": "2018-11-04T05:45:48+00:00"
},
{
"name": "psr/container",
@@ -1566,16 +1566,16 @@
},
{
"name": "psr/log",
- "version": "1.0.2",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": ""
},
"require": {
@@ -1609,7 +1609,7 @@
"psr",
"psr-3"
],
- "time": "2016-10-10T12:19:37+00:00"
+ "time": "2018-11-20T15:27:04+00:00"
},
{
"name": "ramsey/uuid",
@@ -1834,16 +1834,16 @@
},
{
"name": "symfony/console",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b"
+ "reference": "c74f4d1988dfcd8760273e53551694da32b056d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/dc7122fe5f6113cfaba3b3de575d31112c9aa60b",
- "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c74f4d1988dfcd8760273e53551694da32b056d0",
+ "reference": "c74f4d1988dfcd8760273e53551694da32b056d0",
"shasum": ""
},
"require": {
@@ -1898,20 +1898,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2018-10-03T08:15:46+00:00"
+ "time": "2018-11-26T14:00:40+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e"
+ "reference": "8b93ce06506d58485893e2da366767dcc5390862"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bfb30c2ad377615a463ebbc875eba64a99f6aa3e",
- "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8b93ce06506d58485893e2da366767dcc5390862",
+ "reference": "8b93ce06506d58485893e2da366767dcc5390862",
"shasum": ""
},
"require": {
@@ -1961,20 +1961,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2018-07-26T09:10:45+00:00"
+ "time": "2018-11-26T10:26:29+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "596d12b40624055c300c8b619755b748ca5cf0b5"
+ "reference": "71cc7693940bdad4dac4b038acd46b4f1ae7d2ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/596d12b40624055c300c8b619755b748ca5cf0b5",
- "reference": "596d12b40624055c300c8b619755b748ca5cf0b5",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/71cc7693940bdad4dac4b038acd46b4f1ae7d2ca",
+ "reference": "71cc7693940bdad4dac4b038acd46b4f1ae7d2ca",
"shasum": ""
},
"require": {
@@ -2011,20 +2011,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T12:40:59+00:00"
+ "time": "2018-11-11T19:51:29+00:00"
},
{
"name": "symfony/finder",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "1f17195b44543017a9c9b2d437c670627e96ad06"
+ "reference": "68fbdcafe915db67adb13fddaec4532e684f6689"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/1f17195b44543017a9c9b2d437c670627e96ad06",
- "reference": "1f17195b44543017a9c9b2d437c670627e96ad06",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/68fbdcafe915db67adb13fddaec4532e684f6689",
+ "reference": "68fbdcafe915db67adb13fddaec4532e684f6689",
"shasum": ""
},
"require": {
@@ -2060,11 +2060,11 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2018-10-03T08:47:56+00:00"
+ "time": "2018-11-11T19:51:29+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.9.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
@@ -2122,16 +2122,16 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.9.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
+ "reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
+ "reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
"shasum": ""
},
"require": {
@@ -2177,20 +2177,20 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2018-09-21T13:07:52+00:00"
},
{
"name": "symfony/process",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "ee33c0322a8fee0855afcc11fff81e6b1011b529"
+ "reference": "471f6e24172366a97365baaae588ddaafbba9b20"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/ee33c0322a8fee0855afcc11fff81e6b1011b529",
- "reference": "ee33c0322a8fee0855afcc11fff81e6b1011b529",
+ "url": "https://api.github.com/repos/symfony/process/zipball/471f6e24172366a97365baaae588ddaafbba9b20",
+ "reference": "471f6e24172366a97365baaae588ddaafbba9b20",
"shasum": ""
},
"require": {
@@ -2226,7 +2226,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T12:40:59+00:00"
+ "time": "2018-11-20T16:14:00+00:00"
},
{
"name": "tedivm/jshrink",
@@ -4804,20 +4804,20 @@
},
{
"name": "consolidation/annotated-command",
- "version": "2.9.1",
+ "version": "2.10.0",
"source": {
"type": "git",
"url": "https://github.com/consolidation/annotated-command.git",
- "reference": "4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac"
+ "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac",
- "reference": "4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac",
+ "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873",
+ "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873",
"shasum": ""
},
"require": {
- "consolidation/output-formatters": "^3.1.12",
+ "consolidation/output-formatters": "^3.4",
"php": ">=5.4.0",
"psr/log": "^1",
"symfony/console": "^2.8|^3|^4",
@@ -4852,7 +4852,7 @@
}
],
"description": "Initialize Symfony Console commands from annotated command class methods.",
- "time": "2018-09-19T17:47:18+00:00"
+ "time": "2018-11-15T01:46:18+00:00"
},
{
"name": "consolidation/config",
@@ -5015,16 +5015,16 @@
},
{
"name": "consolidation/robo",
- "version": "1.3.1",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/consolidation/Robo.git",
- "reference": "31f2d2562c4e1dcde70f2659eefd59aa9c7f5b2d"
+ "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/Robo/zipball/31f2d2562c4e1dcde70f2659eefd59aa9c7f5b2d",
- "reference": "31f2d2562c4e1dcde70f2659eefd59aa9c7f5b2d",
+ "url": "https://api.github.com/repos/consolidation/Robo/zipball/a9bd9ecf00751aa92754903c0d17612c4e840ce8",
+ "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8",
"shasum": ""
},
"require": {
@@ -5033,7 +5033,6 @@
"consolidation/log": "~1",
"consolidation/output-formatters": "^3.1.13",
"consolidation/self-update": "^1",
- "g1a/composer-test-scenarios": "^2",
"grasmash/yaml-expander": "^1.3",
"league/container": "^2.2",
"php": ">=5.5.0",
@@ -5050,14 +5049,15 @@
"codeception/aspect-mock": "^1|^2.1.1",
"codeception/base": "^2.3.7",
"codeception/verify": "^0.3.2",
+ "g1a/composer-test-scenarios": "^3",
"goaop/framework": "~2.1.2",
"goaop/parser-reflection": "^1.1.0",
"natxet/cssmin": "3.0.4",
"nikic/php-parser": "^3.1.5",
"patchwork/jsqueeze": "~2",
"pear/archive_tar": "^1.4.2",
+ "php-coveralls/php-coveralls": "^1",
"phpunit/php-code-coverage": "~2|~4",
- "satooshi/php-coveralls": "^2",
"squizlabs/php_codesniffer": "^2.8"
},
"suggest": {
@@ -5071,9 +5071,36 @@
],
"type": "library",
"extra": {
+ "scenarios": {
+ "symfony4": {
+ "require": {
+ "symfony/console": "^4"
+ },
+ "config": {
+ "platform": {
+ "php": "7.1.3"
+ }
+ }
+ },
+ "symfony2": {
+ "require": {
+ "symfony/console": "^2.8"
+ },
+ "remove": [
+ "goaop/framework"
+ ],
+ "config": {
+ "platform": {
+ "php": "5.5.9"
+ }
+ },
+ "scenario-options": {
+ "create-lockfile": "false"
+ }
+ }
+ },
"branch-alias": {
- "dev-master": "1.x-dev",
- "dev-state": "1.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -5092,7 +5119,7 @@
}
],
"description": "Modern task runner",
- "time": "2018-08-17T18:44:18+00:00"
+ "time": "2018-11-22T05:43:44+00:00"
},
{
"name": "consolidation/self-update",
@@ -5734,39 +5761,6 @@
],
"time": "2018-07-12T10:23:15+00:00"
},
- {
- "name": "g1a/composer-test-scenarios",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/g1a/composer-test-scenarios.git",
- "reference": "a166fd15191aceab89f30c097e694b7cf3db4880"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/a166fd15191aceab89f30c097e694b7cf3db4880",
- "reference": "a166fd15191aceab89f30c097e694b7cf3db4880",
- "shasum": ""
- },
- "bin": [
- "scripts/create-scenario",
- "scripts/dependency-licenses",
- "scripts/install-scenario"
- ],
- "type": "library",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Greg Anderson",
- "email": "greg.1.anderson@greenknowe.org"
- }
- ],
- "description": "Useful scripts for testing multiple sets of Composer dependencies.",
- "time": "2018-08-08T23:37:23+00:00"
- },
{
"name": "grasmash/expander",
"version": "1.0.0",
@@ -8228,16 +8222,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd"
+ "reference": "1c4e2f368a09cd33bf4b6e4a4a32b361a16ef1db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c55fe9257003b2d95c0211b3f6941e8dfd26dffd",
- "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/1c4e2f368a09cd33bf4b6e4a4a32b361a16ef1db",
+ "reference": "1c4e2f368a09cd33bf4b6e4a4a32b361a16ef1db",
"shasum": ""
},
"require": {
@@ -8281,20 +8275,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2018-07-26T09:10:45+00:00"
+ "time": "2018-11-26T10:26:29+00:00"
},
{
"name": "symfony/config",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96"
+ "reference": "7e415fa42def2c89be6cfbd8286c616e86664b81"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/b3d4d7b567d7a49e6dfafb6d4760abc921177c96",
- "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96",
+ "url": "https://api.github.com/repos/symfony/config/zipball/7e415fa42def2c89be6cfbd8286c616e86664b81",
+ "reference": "7e415fa42def2c89be6cfbd8286c616e86664b81",
"shasum": ""
},
"require": {
@@ -8344,20 +8338,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2018-09-08T13:24:10+00:00"
+ "time": "2018-11-26T10:26:29+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a"
+ "reference": "9e4dc57949853315561f0cd5eb84d0707465502a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/d67de79a70a27d93c92c47f37ece958bf8de4d8a",
- "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/9e4dc57949853315561f0cd5eb84d0707465502a",
+ "reference": "9e4dc57949853315561f0cd5eb84d0707465502a",
"shasum": ""
},
"require": {
@@ -8397,20 +8391,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T16:36:10+00:00"
+ "time": "2018-11-11T19:51:29+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "f6b9d893ad28aefd8942dc0469c8397e2216fe30"
+ "reference": "9508a26af7e2546babf67a1494683ffabcd5a0a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f6b9d893ad28aefd8942dc0469c8397e2216fe30",
- "reference": "f6b9d893ad28aefd8942dc0469c8397e2216fe30",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9508a26af7e2546babf67a1494683ffabcd5a0a3",
+ "reference": "9508a26af7e2546babf67a1494683ffabcd5a0a3",
"shasum": ""
},
"require": {
@@ -8468,20 +8462,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T12:40:59+00:00"
+ "time": "2018-11-20T16:14:00+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "80e60271bb288de2a2259662cff125cff4f93f95"
+ "reference": "a9f533524dcc3970a2c06ee1ec0bba35d3f5910e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/80e60271bb288de2a2259662cff125cff4f93f95",
- "reference": "80e60271bb288de2a2259662cff125cff4f93f95",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a9f533524dcc3970a2c06ee1ec0bba35d3f5910e",
+ "reference": "a9f533524dcc3970a2c06ee1ec0bba35d3f5910e",
"shasum": ""
},
"require": {
@@ -8525,20 +8519,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T12:40:59+00:00"
+ "time": "2018-11-26T10:26:29+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "d528136617ff24f530e70df9605acc1b788b08d4"
+ "reference": "26062b9527b6797fc6239ed698c9c0a3c5e891e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d528136617ff24f530e70df9605acc1b788b08d4",
- "reference": "d528136617ff24f530e70df9605acc1b788b08d4",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/26062b9527b6797fc6239ed698c9c0a3c5e891e0",
+ "reference": "26062b9527b6797fc6239ed698c9c0a3c5e891e0",
"shasum": ""
},
"require": {
@@ -8579,20 +8573,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2018-10-03T08:48:45+00:00"
+ "time": "2018-11-26T10:26:29+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "40f0e40d37c1c8a762334618dea597d64bbb75ff"
+ "reference": "31e5523373cb06163079ef46d0a2d507d70fe064"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/40f0e40d37c1c8a762334618dea597d64bbb75ff",
- "reference": "40f0e40d37c1c8a762334618dea597d64bbb75ff",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/31e5523373cb06163079ef46d0a2d507d70fe064",
+ "reference": "31e5523373cb06163079ef46d0a2d507d70fe064",
"shasum": ""
},
"require": {
@@ -8633,20 +8627,20 @@
"configuration",
"options"
],
- "time": "2018-09-18T12:45:12+00:00"
+ "time": "2018-11-11T19:51:29+00:00"
},
{
"name": "symfony/polyfill-php70",
- "version": "v1.9.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
- "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934"
+ "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
- "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224",
+ "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224",
"shasum": ""
},
"require": {
@@ -8692,20 +8686,20 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2018-09-21T06:26:08+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.9.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae"
+ "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae",
- "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
+ "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
"shasum": ""
},
"require": {
@@ -8747,20 +8741,20 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2018-09-21T13:07:52+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v4.1.6",
+ "version": "v4.1.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b"
+ "reference": "87a801786adb053576dc025892e01fedde9b4fc7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5bfc064125b73ff81229e19381ce1c34d3416f4b",
- "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/87a801786adb053576dc025892e01fedde9b4fc7",
+ "reference": "87a801786adb053576dc025892e01fedde9b4fc7",
"shasum": ""
},
"require": {
@@ -8796,20 +8790,20 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T12:40:59+00:00"
+ "time": "2018-11-11T19:51:29+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.4.17",
+ "version": "v3.4.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f"
+ "reference": "291e13d808bec481eab83f301f7bff3e699ef603"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/640b6c27fed4066d64b64d5903a86043f4a4de7f",
- "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/291e13d808bec481eab83f301f7bff3e699ef603",
+ "reference": "291e13d808bec481eab83f301f7bff3e699ef603",
"shasum": ""
},
"require": {
@@ -8855,7 +8849,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2018-10-02T16:33:53+00:00"
+ "time": "2018-11-11T19:48:54+00:00"
},
{
"name": "theseer/fdomdocument",
diff --git a/dev/tests/api-functional/testsuite/Magento/GroupedProduct/Api/CartItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GroupedProduct/Api/CartItemRepositoryTest.php
new file mode 100644
index 0000000000000..602493481449f
--- /dev/null
+++ b/dev/tests/api-functional/testsuite/Magento/GroupedProduct/Api/CartItemRepositoryTest.php
@@ -0,0 +1,68 @@
+objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+ }
+
+ /**
+ * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php
+ * @magentoApiDataFixture Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock.php
+ */
+ public function testAddGroupedProductToCartThatHasAnOutOfStockItemInTheGroup()
+ {
+ $this->_markTestAsRestOnly();
+
+ /** @var \Magento\Catalog\Model\Product $product */
+ $product = $this->objectManager->create(\Magento\Catalog\Model\Product::class)->load('100000003');
+ $productSku = $product->getSku();
+ /** @var Quote $quote */
+ $quote = $this->objectManager->create(Quote::class);
+ $quote->load('test_order_1', 'reserved_order_id');
+ $cartId = $quote->getId();
+ $serviceInfo = [
+ 'rest' => [
+ 'resourcePath' => self::RESOURCE_PATH . $cartId . '/items',
+ 'httpMethod' => Request::HTTP_METHOD_POST,
+ ],
+ 'soap' => [
+ 'service' => self::SERVICE_NAME,
+ 'serviceVersion' => self::SERVICE_VERSION,
+ 'operation' => self::SERVICE_NAME . 'Save',
+ ],
+ ];
+
+ $requestData = [
+ 'cartItem' => [
+ 'sku' => $productSku,
+ 'qty' => 1,
+ 'quote_id' => $cartId,
+ ],
+ ];
+ $this->_webApiCall($serviceInfo, $requestData);
+ $this->assertTrue($quote->hasProductId('100000001'));
+ $this->assertFalse($quote->hasProductId('100000002'));
+ }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php
index 0770de7f7d7a6..f79cf8d7eb7fa 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php
@@ -117,7 +117,6 @@ private function processLogin()
if ($this->checkoutMethod === 'login') {
if ($this->checkoutOnepage->getAuthenticationPopupBlock()->isVisible()) {
$this->checkoutOnepage->getAuthenticationPopupBlock()->loginCustomer($this->customer);
- sleep(5);
$this->clickProceedToCheckoutStep->run();
} else {
$this->checkoutOnepage->getLoginBlock()->loginCustomer($this->customer);
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php
index 83d86669aa8e5..f456635882ed9 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php
@@ -65,6 +65,7 @@ class CustomerForm extends FormTabs
* @param FixtureInterface $customer
* @param FixtureInterface|FixtureInterface[]|null $address
* @return $this
+ * @throws \Exception
*/
public function fillCustomer(FixtureInterface $customer, $address = null)
{
@@ -76,12 +77,29 @@ public function fillCustomer(FixtureInterface $customer, $address = null)
}
if (null !== $address) {
$this->openTab('addresses');
- $this->getTab('addresses')->fillAddresses($address);
+ $this->fillCustomerAddress($address);
}
return $this;
}
+ /**
+ * Fill customer address by provided in parameter data
+ *
+ * @param FixtureInterface|FixtureInterface[] $address
+ * @return $this
+ * @throws \Exception
+ */
+ public function fillCustomerAddress($address)
+ {
+ $addressesTab = $this->getTab('addresses');
+ $this->openTab('addresses');
+ $addressesTab->waitForAddressesGrid();
+ $addressesTab->fillAddresses($address);
+
+ return $this;
+ }
+
/**
* Update Customer forms on tabs by customer, addresses data.
*
@@ -98,13 +116,16 @@ public function updateCustomer(FixtureInterface $customer, $address = null, Addr
if ($isHasData) {
parent::fill($customer);
}
+ $addressesTab = $this->getTab('addresses');
if ($addressToDelete !== null) {
$this->openTab('addresses');
- $this->getTab('addresses')->deleteCustomerAddress($addressToDelete);
+ $addressesTab->waitForAddressesGrid();
+ $addressesTab->deleteCustomerAddress($addressToDelete);
}
if ($address !== null) {
$this->openTab('addresses');
- $this->getTab('addresses')->updateAddresses($address);
+ $addressesTab->waitForAddressesGrid();
+ $addressesTab->updateAddresses($address);
}
return $this;
@@ -124,6 +145,9 @@ public function getDataCustomer(FixtureInterface $customer, $address = null)
$data = ['customer' => $customer->hasData() ? parent::getData($customer) : parent::getData()];
if (null !== $address) {
$this->openTab('addresses');
+ $this->waitForElementNotVisible($this->tabReadiness);
+ $this->waitForm();
+ $this->getTab('addresses')->waitForAddressesGrid();
$data['addresses'] = $this->getTab('addresses')->getDataAddresses($address);
}
@@ -148,8 +172,10 @@ protected function waitForm()
*/
public function openTab($tabName)
{
+ $this->waitForElementNotVisible($this->tabReadiness);
parent::openTab($tabName);
$this->waitForElementNotVisible($this->tabReadiness);
+ $this->waitForm();
return $this;
}
@@ -161,13 +187,10 @@ public function openTab($tabName)
*/
public function getJsErrors()
{
- $tabs = ['account_information', 'addresses'];
$jsErrors = [];
- foreach ($tabs as $tabName) {
- $tab = $this->getTab($tabName);
- $this->openTab($tabName);
- $jsErrors = array_merge($jsErrors, $tab->getJsErrors());
- }
+ $tab = $this->getTab('account_information');
+ $this->openTab('account_information');
+ $jsErrors = array_merge($jsErrors, $tab->getJsErrors());
return $jsErrors;
}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php
index 86df3ea912104..99a79a8a4a85c 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.php
@@ -29,7 +29,7 @@ class Addresses extends Tab
*
* @var string
*/
- protected $addNewAddress = '.address-list-actions .add';
+ protected $addNewAddress = '.add-new-address-button';
/**
* Selector for address block.
@@ -48,25 +48,32 @@ class Addresses extends Tab
protected $deleteAddress = '.action-delete';
/**
- * Accept button selector.
+ * Open customer address.
*
* @var string
*/
- private $confirmModal = '.confirm._show[data-role=modal]';
+ protected $customerAddress = '//*[contains(@class, "address-list-item")][%d]';
/**
- * Open customer address.
+ * Magento loader.
*
* @var string
*/
- protected $customerAddress = '//*[contains(@class, "address-list-item")][%d]';
+ protected $loader = '//ancestor::body/div[@data-role="loader"]';
/**
- * Magento loader.
+ * Customer address modal window.
*
* @var string
*/
- protected $loader = '//ancestor::body/div[@data-role="loader"]';
+ private $customerAddressModalForm = '.customer_form_areas_address_address_customer_address_update_modal';
+
+ /**
+ * Customer addresses list grid.
+ *
+ * @var string
+ */
+ private $customerAddressesGrid = '.customer_form_areas_address_address_customer_address_listing';
/**
* Object Manager.
@@ -107,9 +114,11 @@ public function __construct(
public function fillAddresses($address)
{
$addresses = is_array($address) ? $address : [$address];
+ $customerAddressForm = $this->getCustomerAddressModalForm();
foreach ($addresses as $address) {
$this->addNewAddress();
- $this->setFieldsData($address->getData(), $this->_rootElement);
+ $customerAddressForm->fillAddressData($address);
+ $customerAddressForm->saveAddress();
}
return $this;
@@ -136,8 +145,9 @@ public function updateAddresses($address)
if (!$this->isVisibleCustomerAddress($addressNumber)) {
$this->addNewAddress();
+ } else {
+ $this->openCustomerAddress($addressNumber);
}
- $this->openCustomerAddress($addressNumber);
$defaultAddress = ['default_billing' => 'No', 'default_shipping' => 'No'];
$addressData = $address->getData();
@@ -146,9 +156,10 @@ public function updateAddresses($address)
$defaultAddress[$key] = $value;
}
}
- $this->_fill($this->dataMapping($defaultAddress));
-
- $this->setFieldsData(array_diff($addressData, $defaultAddress), $this->_rootElement);
+ $customerAddressForm = $this->getCustomerAddressModalForm();
+ $customerAddressForm->setFieldsData($this->dataMapping($defaultAddress));
+ $customerAddressForm->setFieldsData(array_diff($addressData, $defaultAddress));
+ $customerAddressForm->saveAddress();
}
return $this;
@@ -168,6 +179,10 @@ public function getDataAddresses($address = null)
foreach ($addresses as $addressNumber => $address) {
$hasData = (null !== $address) && $address->hasData();
+ $customerAddressesGrid = $this->getCustomerAddressesGrid();
+ if ($hasData) {
+ $customerAddressesGrid->search($address->getData());
+ }
$isVisibleCustomerAddress = $this->isVisibleCustomerAddress($addressNumber);
if ($hasData && !$isVisibleCustomerAddress) {
@@ -177,14 +192,36 @@ public function getDataAddresses($address = null)
if (!$hasData && !$isVisibleCustomerAddress) {
$data[$addressNumber] = [];
} else {
- $this->openCustomerAddress($addressNumber);
- $data[$addressNumber] = $this->getData($address, $this->_rootElement);
+ $customerAddressesGrid->openFirstRow();
+ $data[$addressNumber] = $this->getCustomerAddressModalForm()
+ ->getData($address, $this->browser->find($this->customerAddressModalForm));
+ $this->getCustomerAddressModalForm()->clickCancelButton();
}
}
return $data;
}
+ /**
+ * Get data from Customer addresses.
+ *
+ * @param FixtureInterface|FixtureInterface[]|null $address
+ * @return array|null
+ * @throws \Exception
+ */
+ public function getAddressFromFirstRow($address = null)
+ {
+ $customerAddressesGrid = $this->getCustomerAddressesGrid();
+ $customerAddressesGrid->resetFilter();
+ $customerAddressesGrid->openFirstRow();
+ if ($this->getCustomerAddressModalForm()->isVisible()) {
+ $address = $this->getCustomerAddressModalForm()
+ ->getData($address, $this->browser->find($this->customerAddressModalForm));
+ }
+
+ return $address;
+ }
+
/**
* Get data to fields on tab.
*
@@ -206,6 +243,7 @@ public function getFieldsData($fields = null, SimpleElement $element = null)
protected function addNewAddress()
{
$this->_rootElement->find($this->addNewAddress)->click();
+ $this->waitForElementVisible($this->customerAddressModalForm);
}
/**
@@ -216,31 +254,24 @@ protected function addNewAddress()
*/
protected function openCustomerAddress($addressNumber)
{
- $addressTab = $this->_rootElement->find(
- sprintf($this->customerAddress, $addressNumber),
- Locator::SELECTOR_XPATH
- );
-
- if (!$addressTab->isVisible()) {
+ $customerAddressesGrid = $this->getCustomerAddressesGrid();
+ if (!$customerAddressesGrid->getFirstRow()->isVisible()) {
throw new \Exception("Can't open customer address #{$addressNumber}");
}
- $addressTab->click();
+ $customerAddressesGrid->openFirstRow();
}
/**
* Check is visible customer address.
*
- * @param int $addressNumber
* @return bool
*/
- protected function isVisibleCustomerAddress($addressNumber)
+ protected function isVisibleCustomerAddress()
{
- $addressTab = $this->_rootElement->find(
- sprintf($this->customerAddress, $addressNumber),
- Locator::SELECTOR_XPATH
- );
+ $customerAddressesGrid = $this->getCustomerAddressesGrid();
+ $customerAddressesGrid->isFirstRowVisible();
- return $addressTab->isVisible();
+ return $customerAddressesGrid->isFirstRowVisible();
}
/**
@@ -279,24 +310,43 @@ public function getCountriesList($addressNumber)
*/
public function deleteCustomerAddress(Address $addressToDelete)
{
- $addressRenderer = $this->objectManager->create(
- \Magento\Customer\Test\Block\Address\Renderer::class,
- ['address' => $addressToDelete, 'type' => 'html']
- );
- $addressToDelete = $addressRenderer->render();
+ $customerAddressesGrid = $this->getCustomerAddressesGrid();
+ $customerAddressesGrid->deleteCustomerAddress($addressToDelete->getData());
- $dataList = explode("\n", $addressToDelete);
- $dataList = implode("') and contains(.,'", $dataList);
+ return $this;
+ }
- $this->_rootElement
- ->find(sprintf($this->addressSelector, $dataList), Locator::SELECTOR_XPATH)
- ->find($this->deleteAddress)->click();
+ /**
+ * Get new/update customer address modal form.
+ *
+ * @return \Magento\Customer\Test\Block\Adminhtml\Edit\Tab\Addresses\AddressForm
+ */
+ public function getCustomerAddressModalForm()
+ {
+ return $this->blockFactory->create(
+ \Magento\Customer\Test\Block\Adminhtml\Edit\Tab\Addresses\AddressForm::class,
+ ['element' => $this->browser->find($this->customerAddressModalForm)]
+ );
+ }
- $element = $this->browser->find($this->confirmModal);
- /** @var \Magento\Ui\Test\Block\Adminhtml\Modal $modal */
- $modal = $this->blockFactory->create(\Magento\Ui\Test\Block\Adminhtml\Modal::class, ['element' => $element]);
- $modal->acceptAlert();
+ /**
+ * Get customer addresses grid.
+ *
+ * @return \Magento\Customer\Test\Block\Adminhtml\Edit\Tab\Addresses\AddressesGrid
+ */
+ public function getCustomerAddressesGrid()
+ {
+ return $this->blockFactory->create(
+ \Magento\Customer\Test\Block\Adminhtml\Edit\Tab\Addresses\AddressesGrid::class,
+ ['element' => $this->browser->find($this->customerAddressesGrid)]
+ );
+ }
- return $this;
+ /**
+ * Wait for addresses grid rendering
+ */
+ public function waitForAddressesGrid()
+ {
+ $this->waitForElementVisible($this->customerAddressesGrid);
}
}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.xml
deleted file mode 100644
index 8e16226adcc3f..0000000000000
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[prefix]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[firstname]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[middlename]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[lastname]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[suffix]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[company]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[street][0]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[city]"]
- css selector
-
-
- select
- .address-item-edit:not([style="display: none;"]) [name$="[country_id]"]
- css selector
-
-
- select
- .address-item-edit:not([style="display: none;"]) [name$="[region_id]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[region]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[postcode]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[telephone]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[fax]"]
- css selector
-
-
- .address-item-edit:not([style="display: none;"]) [name$="[vat_id]"]
- css selector
-
-
- .ui-state-active [name$="[default_billing]"]
- checkbox
-
-
- .ui-state-active [name$="[default_shipping]"]
- checkbox
-
-
-
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.php
new file mode 100644
index 0000000000000..029836d21433c
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.php
@@ -0,0 +1,126 @@
+waitForElementNotVisible($this->loader);
+ $this->setFieldsData($address->getData(), $this->_rootElement);
+ }
+
+ /**
+ * Fill data into fields in the container.
+ *
+ * @param array $fields
+ * @param \Magento\Mtf\Client\Element\SimpleElement|null $contextElement
+ * @return void
+ * @throws \Exception
+ */
+ public function setFieldsData(array $fields, \Magento\Mtf\Client\Element\SimpleElement $contextElement = null): void
+ {
+ $data = $this->dataMapping($fields);
+ $this->_fill($data, $contextElement);
+ }
+
+ /**
+ * Save customer address
+ *
+ * @return void
+ */
+ public function saveAddress(): void
+ {
+ $this->_rootElement->find($this->saveAddressButton)->click();
+ $this->waitForElementNotVisible($this->loader);
+ }
+
+ /**
+ * Close create/update address modal
+ *
+ * @return void
+ */
+ public function clickCancelButton(): void
+ {
+ $this->_rootElement->find($this->cancelButton)->click();
+ }
+
+ /**
+ * Get array of label => js error text.
+ *
+ * @return array
+ */
+ public function getJsErrors(): array
+ {
+ $data = [];
+ $elements = $this->_rootElement->getElements($this->mageErrorField, Locator::SELECTOR_XPATH);
+ foreach ($elements as $element) {
+ $error = $element->find($this->mageErrorText, Locator::SELECTOR_XPATH);
+ if ($error->isVisible()) {
+ $label = $element->find($this->mageErrorLabel, Locator::SELECTOR_XPATH)->getText();
+ $data[$label] = $error->getText();
+ }
+ }
+ return $data;
+ }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.xml
new file mode 100644
index 0000000000000..c56c6479dcb38
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressForm.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="prefix"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="firstname"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="middlename"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="lastname"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="suffix"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="company"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="street[0]"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="city"]
+ css selector
+
+
+ select
+ .admin__fieldset:not([style="display: none;"]) [name="country_id"]
+ css selector
+
+
+ select
+ .admin__fieldset:not([style="display: none;"]) [name="region_id"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="region"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="postcode"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="telephone"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="fax"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) [name="vat_id"]
+ css selector
+
+
+ .admin__fieldset:not([style="display: none;"]) input[name='default_billing']
+ switcher
+
+
+ .admin__fieldset:not([style="display: none;"]) input[name='default_shipping']
+ switcher
+
+
+
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressesGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressesGrid.php
new file mode 100644
index 0000000000000..ef1fb09c8f839
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/Tab/Addresses/AddressesGrid.php
@@ -0,0 +1,174 @@
+ [
+ 'selector' => '.admin__data-grid-filters input[name*=firstname]',
+ ],
+ 'lastname' => [
+ 'selector' => '.admin__data-grid-filters input[name*=lastname]',
+ ],
+ 'street' => [
+ 'selector' => '.admin__data-grid-filters input[name*=street]',
+ ],
+ 'city' => [
+ 'selector' => '.admin__data-grid-filters input[name*=city]',
+ ],
+ 'region_id' => [
+ 'selector' => '.admin__data-grid-filters input[name*=region]',
+ ],
+ 'postcode' => [
+ 'selector' => '.admin__data-grid-filters input[name*=postcode]',
+ ],
+ 'telephone' => [
+ 'selector' => '.admin__data-grid-filters input[name*=telephone]',
+ ],
+ 'country_id' => [
+ 'selector' => '.admin__data-grid-filters select[name*=country]',
+ 'input' => 'select',
+ ],
+
+ ];
+
+ /**
+ * Select action toggle.
+ *
+ * @var string
+ */
+ private $selectAction = '.action-select';
+
+ /**
+ * Delete action toggle.
+ *
+ * @var string
+ */
+ private $deleteAddress = '[data-action="item-delete"]';
+
+ /**
+ * Locator value for "Edit" link inside action column.
+ *
+ * @var string
+ */
+ private $editAddress = '[data-action="item-edit"]';
+
+ /**
+ * Customer address modal window.
+ *
+ * @var string
+ */
+ private $customerAddressModalForm = '.customer_form_areas_address_address_customer_address_update_modal';
+
+ /**
+ * Search customer address by filter.
+ *
+ * @param array $filter
+ * @return void
+ */
+ public function search(array $filter): void
+ {
+ parent::search(array_intersect_key($filter, $this->filters));
+ }
+
+ /**
+ * Delete customer address by filter
+ *
+ * @param array $filter
+ * @return void
+ * @throws \Exception
+ */
+ public function deleteCustomerAddress(array $filter): void
+ {
+ $this->search($filter);
+ $rowItem = $this->getRow([$filter['firstname']]);
+ if ($rowItem->isVisible()) {
+ $this->deleteRowItemAddress($rowItem);
+ } else {
+ throw new \Exception("Searched item was not found by filter\n" . print_r($filter, true));
+ }
+ }
+
+ /**
+ * @param \Magento\Mtf\Client\Element\SimpleElement $rowItem
+ * @return void
+ */
+ public function deleteRowItemAddress(\Magento\Mtf\Client\Element\SimpleElement $rowItem): void
+ {
+ $rowItem->find($this->selectAction)->click();
+ $rowItem->find($this->deleteAddress)->click();
+ $modalElement = $this->browser->find($this->confirmModal);
+ /** @var \Magento\Ui\Test\Block\Adminhtml\Modal $modal */
+ $modal = $this->blockFactory->create(
+ \Magento\Ui\Test\Block\Adminhtml\Modal::class,
+ ['element' => $modalElement]
+ );
+ $modal->acceptAlert();
+ $this->waitLoader();
+ }
+
+ /**
+ * Open first row from the addresses grid
+ *
+ * @return void
+ */
+ public function openFirstRow(): void
+ {
+ $firstRow = $this->getFirstRow();
+ if ($firstRow->isVisible()) {
+ $firstRow->find($this->selectAction)->click();
+ $firstRow->find($this->editAddress)->click();
+ $this->waitForElementVisible($this->customerAddressModalForm);
+ $this->waitLoader();
+ }
+ }
+
+ /**
+ * Get first row from the grid
+ *
+ * @return \Magento\Mtf\Client\Element\SimpleElement
+ */
+ public function getFirstRow(): \Magento\Mtf\Client\Element\SimpleElement
+ {
+ return $this->_rootElement->find($this->firstRowSelector, \Magento\Mtf\Client\Locator::SELECTOR_XPATH);
+ }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressBackendRequiredFields.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressBackendRequiredFields.php
new file mode 100644
index 0000000000000..46bb8ce72abb1
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerAddressBackendRequiredFields.php
@@ -0,0 +1,56 @@
+getCustomerForm()->getTab('addresses')
+ ->getCustomerAddressModalForm()->getJsErrors();
+ foreach ($expectedRequiredFields as $field) {
+ \PHPUnit\Framework\Assert::assertTrue(
+ isset($actualRequiredFields[$field]),
+ "Field '$field' is not highlighted with an JS error."
+ );
+ \PHPUnit\Framework\Assert::assertEquals(
+ self::REQUIRE_MESSAGE,
+ $actualRequiredFields[$field],
+ "Field '$field' is not highlighted as required."
+ );
+ }
+ }
+
+ /**
+ * Return string representation of object.
+ *
+ * @return string
+ */
+ public function toString(): string
+ {
+ return 'All required fields on customer form are highlighted.';
+ }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
index f1a8b17ae2855..ccc6da81038f8 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
@@ -112,15 +112,15 @@ public function __inject(
* Create customer on backend.
*
* @param Customer $customer
- * @param string $customerAction
- * @param Address $address
+ * @param null $customerAction
+ * @param Address|null $address
* @param array $steps
* @param array $beforeActionCallback
- * @return void
+ * @throws \Exception
*/
public function test(
Customer $customer,
- $customerAction,
+ $customerAction = null,
Address $address = null,
array $steps = [],
array $beforeActionCallback = []
@@ -135,7 +135,12 @@ public function test(
$this->pageCustomerIndex->open();
$this->pageCustomerIndex->getPageActionsBlock()->addNew();
- $this->pageCustomerIndexNew->getCustomerForm()->fillCustomer($customer, $address);
+ $this->pageCustomerIndexNew->getCustomerForm()->fillCustomer($customer);
+ if (null !== $address) {
+ $this->pageCustomerIndexNew->getPageActionsBlock()->saveAndContinue();
+ $this->pageCustomerIndexNew->getMessagesBlock()->waitSuccessMessage();
+ $this->pageCustomerIndexNew->getCustomerForm()->fillCustomerAddress($address);
+ }
$this->address = $address;
$this->customer = $customer;
@@ -144,8 +149,9 @@ public function test(
call_user_func([$this, $methodName]);
}
}
-
- $this->pageCustomerIndexNew->getPageActionsBlock()->$customerAction();
+ if (null !== $customerAction) {
+ $this->pageCustomerIndexNew->getPageActionsBlock()->$customerAction();
+ }
}
/**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml
index 502ac2495357a..5bb96dc13c739 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml
@@ -115,8 +115,7 @@
-
- save
+
Main Website
General
John%isolation%
@@ -131,7 +130,7 @@
- Zip/Postal Code
- Phone Number
-
+
to_maintain:yes
diff --git a/dev/tests/functional/tests/app/Magento/CustomerImportExport/Test/Constraint/AssertImportCustomerAddresses.php b/dev/tests/functional/tests/app/Magento/CustomerImportExport/Test/Constraint/AssertImportCustomerAddresses.php
index 18b2d44a22ff1..f73609b3ba2cf 100644
--- a/dev/tests/functional/tests/app/Magento/CustomerImportExport/Test/Constraint/AssertImportCustomerAddresses.php
+++ b/dev/tests/functional/tests/app/Magento/CustomerImportExport/Test/Constraint/AssertImportCustomerAddresses.php
@@ -116,8 +116,7 @@ private function getPrepareAddresses()
foreach ($customers as $customer) {
$this->customerIndexEdit->open(['id' => $customer->getId()]);
$customerForm->openTab('addresses');
- $addresses = $customerForm->getTab('addresses')->getDataAddresses($addressTemplate);
- $address = array_shift($addresses);
+ $address = $customerForm->getTab('addresses')->getAddressFromFirstRow($addressTemplate);
if (!empty($address)) {
$resultAddressesArray[] = $address;
}
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
index 5b9ae99a2e868..14bc04cfed70c 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
@@ -105,7 +105,7 @@ class Create extends Block
*
* @var string
*/
- protected $orderMethodsSelector = '#order-methods';
+ protected $orderMethodsSelector = '#shipping-methods';
/**
* Page header.
@@ -323,7 +323,6 @@ public function fillShippingAddress(FixtureInterface $shippingAddress)
*/
public function selectShippingMethod(array $shippingMethod)
{
- $this->_rootElement->find($this->orderMethodsSelector)->click();
$this->getShippingMethodBlock()->selectShippingMethod($shippingMethod);
$this->getTemplateBlock()->waitLoader();
}
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php
index dee1336c14e4c..e5c414c4807d6 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Billing/Method.php
@@ -22,6 +22,13 @@ class Method extends Block
*/
private $paymentMethod = '#p_method_%s';
+ /**
+ * Get available payment methods link.
+ *
+ * @var string
+ */
+ private $billingMethodsLink = '#order-billing_method_summary a';
+
/**
* Purchase order number selector.
*
@@ -59,6 +66,13 @@ class Method extends Block
*/
public function selectPaymentMethod(array $payment, CreditCard $creditCard = null)
{
+ $this->waitForElementNotVisible($this->loader);
+ $billingMethodsLink = $this->_rootElement->find($this->billingMethodsLink);
+ if ($billingMethodsLink->isPresent()) {
+ $billingMethodsLink->click();
+ $this->waitForElementNotVisible($this->loader);
+ }
+
$paymentMethod = $payment['method'];
$paymentInput = $this->_rootElement->find(sprintf($this->paymentMethod, $paymentMethod));
if ($paymentInput->isVisible()) {
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php
index daa58a3447c02..61c48d62630f4 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items.php
@@ -73,6 +73,7 @@ function () use ($element, $selector) {
return $addProductsButton->isVisible() ? true : null;
}
);
+ $this->getTemplateBlock()->waitLoader();
$this->_rootElement->find($this->addProducts, Locator::SELECTOR_XPATH)->click();
$this->getTemplateBlock()->waitLoader();
}
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php
index a0520e1c7ef8f..b5acaf01f5483 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Shipping/Method.php
@@ -44,13 +44,12 @@ class Method extends Block
public function selectShippingMethod(array $shippingMethod)
{
$this->waitFormLoading();
- $this->_rootElement->waitUntil(
- function () {
- return $this->_rootElement->find($this->shippingMethodsLink)->isVisible() ? true : null;
- }
- );
+ $shippingMethodsLink = $this->_rootElement->find($this->shippingMethodsLink);
+ if ($shippingMethodsLink->isPresent()) {
+ $shippingMethodsLink->click();
+ $this->waitFormLoading();
+ }
- $this->_rootElement->find($this->shippingMethodsLink)->click();
$selector = sprintf(
$this->shippingMethod,
$shippingMethod['shipping_service'],
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Webapi.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Webapi.php
index 073fb0967144c..972dc0f510b36 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Webapi.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Webapi.php
@@ -200,7 +200,7 @@ protected function setBillingAddress(OrderInjectable $order)
$this->webapiTransport->close();
if (!is_numeric($response)) {
$this->eventManager->dispatchEvent(['webapi_failed'], [$response]);
- throw new \Exception("Could not set billing addresss to quote!");
+ throw new \Exception("Could not set billing address to quote!");
}
}
diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Paypal/PlaceOrderTest.php b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Paypal/PlaceOrderTest.php
new file mode 100644
index 0000000000000..4f2b0fd67840d
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Paypal/PlaceOrderTest.php
@@ -0,0 +1,173 @@
+session = $this->getMockBuilder(Session::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['getQuote', 'setLastOrderStatus', 'unsLastBillingAgreementReferenceId'])
+ ->getMock();
+
+ $adapterFactory = $this->getMockBuilder(BraintreeAdapterFactory::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->adapter = $this->getMockBuilder(BraintreeAdapter::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $adapterFactory->method('create')
+ ->willReturn($this->adapter);
+
+ $this->_objectManager->addSharedInstance($this->session, Session::class);
+ $this->_objectManager->addSharedInstance($adapterFactory, BraintreeAdapterFactory::class);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ protected function tearDown()
+ {
+ $this->_objectManager->removeSharedInstance(Session::class);
+ $this->_objectManager->removeSharedInstance(BraintreeAdapterFactory::class);
+ parent::tearDown();
+ }
+
+ /**
+ * Tests a negative scenario for a place order flow when exception throws after placing an order.
+ *
+ * @magentoDataFixture Magento/Braintree/Fixtures/paypal_quote.php
+ */
+ public function testExecuteWithFailedOrder()
+ {
+ $reservedOrderId = 'test01';
+ $quote = $this->getQuote($reservedOrderId);
+
+ $this->session->method('getQuote')
+ ->willReturn($quote);
+
+ $this->adapter->method('sale')
+ ->willReturn($this->getTransactionStub('authorized'));
+ $this->adapter->method('void')
+ ->willReturn($this->getTransactionStub('voided'));
+
+ // emulates an error after placing the order
+ $this->session->method('setLastOrderStatus')
+ ->willThrowException(new \Exception('Test Exception'));
+
+ $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
+ $this->dispatch('braintree/paypal/placeOrder');
+
+ self::assertRedirect(self::stringContains('checkout/cart'));
+ self::assertSessionMessages(
+ self::equalTo(['The order #' . $reservedOrderId . ' cannot be processed.']),
+ MessageInterface::TYPE_ERROR
+ );
+
+ $order = $this->getOrder($reservedOrderId);
+ self::assertEquals('canceled', $order->getState());
+ }
+
+ /**
+ * Gets quote by reserved order ID.
+ *
+ * @param string $reservedOrderId
+ * @return CartInterface
+ */
+ private function getQuote(string $reservedOrderId): CartInterface
+ {
+ $searchCriteria = $this->_objectManager->get(SearchCriteriaBuilder::class)
+ ->addFilter('reserved_order_id', $reservedOrderId)
+ ->create();
+
+ /** @var CartRepositoryInterface $quoteRepository */
+ $quoteRepository = $this->_objectManager->get(CartRepositoryInterface::class);
+ $items = $quoteRepository->getList($searchCriteria)
+ ->getItems();
+
+ return array_pop($items);
+ }
+
+ /**
+ * Gets order by increment ID.
+ *
+ * @param string $incrementId
+ * @return OrderInterface
+ */
+ private function getOrder(string $incrementId): OrderInterface
+ {
+ $searchCriteria = $this->_objectManager->get(SearchCriteriaBuilder::class)
+ ->addFilter('increment_id', $incrementId)
+ ->create();
+
+ /** @var OrderRepositoryInterface $repository */
+ $repository = $this->_objectManager->get(OrderRepositoryInterface::class);
+ $items = $repository->getList($searchCriteria)
+ ->getItems();
+
+ return array_pop($items);
+ }
+
+ /**
+ * Creates stub for Braintree Transaction.
+ *
+ * @param string $status
+ * @return Successful
+ */
+ private function getTransactionStub(string $status): Successful
+ {
+ $transaction = $this->getMockBuilder(Transaction::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $transaction->status = $status;
+ $transaction->paypal = [
+ 'paymentId' => 'pay-001',
+ 'payerEmail' => 'test@test.com'
+ ];
+ $response = new Successful();
+ $response->success = true;
+ $response->transaction = $transaction;
+
+ return $response;
+ }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote.php b/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote.php
new file mode 100644
index 0000000000000..e4c64d0e33d8b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote.php
@@ -0,0 +1,31 @@
+getShippingAddress()
+ ->setShippingMethod('flatrate_flatrate')
+ ->setCollectShippingRates(true);
+$quote->getPayment()
+ ->setMethod(ConfigProvider::PAYPAL_VAULT_CODE)
+ ->setAdditionalInformation(
+ [
+ 'customer_id' => $quote->getCustomerId(),
+ 'public_hash' => $paymentToken->getPublicHash()
+ ]
+ );
+
+$quote->collectTotals();
+
+/** @var CartRepositoryInterface $quoteRepository */
+$quoteRepository = $objectManager->get(CartRepositoryInterface::class);
+$quoteRepository->save($quote);
diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote_rollback.php b/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote_rollback.php
new file mode 100644
index 0000000000000..5d0fa8cca85d9
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Braintree/Fixtures/paypal_quote_rollback.php
@@ -0,0 +1,9 @@
+customerRepository = Bootstrap::getObjectManager()->get(
+ \Magento\Customer\Api\CustomerRepositoryInterface::class
+ );
+ $this->accountManagement = Bootstrap::getObjectManager()->get(
+ \Magento\Customer\Api\AccountManagementInterface::class
+ );
+ $this->objectManager = Bootstrap::getObjectManager();
+ $this->customerAddress = $this->objectManager->get(\Magento\Customer\Controller\Adminhtml\Address\Save::class);
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function tearDown()
+ {
+ /**
+ * Unset customer data
+ */
+ Bootstrap::getObjectManager()->get(\Magento\Backend\Model\Session::class)->setCustomerData(null);
+
+ /**
+ * Unset messages
+ */
+ Bootstrap::getObjectManager()->get(\Magento\Backend\Model\Session::class)->getMessages(true);
+ }
+
+ /**
+ * @magentoDataFixture Magento/Customer/_files/customer_no_address.php
+ *
+ * Check that customer id set and addresses saved
+ */
+ public function testSaveActionWithValidAddressData()
+ {
+ $customer = $this->customerRepository->get('customer5@example.com');
+ $customerId = $customer->getId();
+ $post = [
+ 'parent_id' => $customerId,
+ 'firstname' => 'test firstname',
+ 'lastname' => 'test lastname',
+ 'street' => ['test street'],
+ 'city' => 'test city',
+ 'region_id' => 10,
+ 'country_id' => 'US',
+ 'postcode' => '01001',
+ 'telephone' => '+7000000001',
+ ];
+ $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
+
+ $this->objectManager->get(\Magento\Backend\Model\Session::class)->setCustomerFormData($post);
+
+ $this->customerAddress->execute();
+
+ $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
+
+ /** Check that customer data were cleaned after it was saved successfully*/
+ $this->assertEmpty($this->objectManager->get(\Magento\Backend\Model\Session::class)->getCustomerData());
+
+ $customer = $this->customerRepository->getById($customerId);
+
+ $this->assertEquals('Firstname', $customer->getFirstname());
+ $addresses = $customer->getAddresses();
+ $this->assertCount(1, $addresses);
+ $this->assertNull($this->accountManagement->getDefaultBillingAddress($customerId));
+ $this->assertNull($this->accountManagement->getDefaultShippingAddress($customerId));
+ }
+
+ /**
+ * @magentoDataFixture Magento/Customer/_files/customer_no_address.php
+ *
+ * Check that customer id set and addresses saved
+ */
+ public function testSaveActionWithDefaultShippingAndBilling()
+ {
+ $customer = $this->customerRepository->get('customer5@example.com');
+ $customerId = $customer->getId();
+ $post = [
+ 'parent_id' => $customerId,
+ 'firstname' => 'test firstname',
+ 'lastname' => 'test lastname',
+ 'street' => ['test street'],
+ 'city' => 'test city',
+ 'region_id' => 10,
+ 'country_id' => 'US',
+ 'postcode' => '01001',
+ 'telephone' => '+7000000001',
+ 'default_billing' => true,
+ 'default_shipping' => true
+ ];
+ $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
+
+ $this->objectManager->get(\Magento\Backend\Model\Session::class)->setCustomerFormData($post);
+
+ $this->customerAddress->execute();
+ /**
+ * Check that errors was generated and set to session
+ */
+ $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
+
+ /**
+ * Check that customer data were cleaned after it was saved successfully
+ */
+ $this->assertEmpty($this->objectManager->get(\Magento\Backend\Model\Session::class)->getCustomerData());
+
+ /**
+ * Remove stored customer from registry
+ */
+ $this->objectManager->get(\Magento\Customer\Model\CustomerRegistry::class)->remove($customerId);
+ $customer = $this->customerRepository->get('customer5@example.com');
+ $this->assertEquals('Firstname', $customer->getFirstname());
+ $addresses = $customer->getAddresses();
+ $this->assertCount(1, $addresses);
+
+ $this->assertNotNull($this->accountManagement->getDefaultBillingAddress($customerId));
+ $this->assertNotNull($this->accountManagement->getDefaultShippingAddress($customerId));
+ }
+
+ /**
+ * @magentoDataFixture Magento/Customer/_files/customer_sample.php
+ *
+ * Check that customer id set and addresses saved
+ */
+ public function testSaveActionWithExistingAdresses()
+ {
+ $customer = $this->customerRepository->get('customer@example.com');
+ $customerId = $customer->getId();
+ $post = [
+ 'parent_id' => $customerId,
+ 'firstname' => 'test firstname',
+ 'lastname' => 'test lastname',
+ 'street' => ['test street'],
+ 'city' => 'test city',
+ 'region_id' => 10,
+ 'country_id' => 'US',
+ 'postcode' => '01001',
+ 'telephone' => '+7000000001',
+ ];
+ $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
+
+ $this->objectManager->get(\Magento\Backend\Model\Session::class)->setCustomerFormData($post);
+
+ $this->customerAddress->execute();
+ /**
+ * Check that errors was generated and set to session
+ */
+ $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
+
+ /**
+ * Check that customer data were cleaned after it was saved successfully
+ */
+ $this->assertEmpty($this->objectManager->get(\Magento\Backend\Model\Session::class)->getCustomerData());
+
+ $customer = $this->customerRepository->getById($customerId);
+
+ $this->assertEquals('test firstname', $customer->getFirstname());
+ $addresses = $customer->getAddresses();
+ $this->assertCount(4, $addresses);
+ }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
index 2fe49efd74a6d..292d61c392d06 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
@@ -122,226 +122,6 @@ public function testSaveActionWithInvalidFormData()
$this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'new'));
}
- /**
- * @magentoDbIsolation enabled
- */
- public function testSaveActionWithInvalidCustomerAddressData()
- {
- $post = [
- 'customer' => [
- 'middlename' => 'test middlename',
- 'group_id' => 1,
- 'website_id' => 0,
- 'firstname' => 'test firstname',
- 'lastname' => 'test lastname',
- 'email' => 'example@domain.com',
- 'default_billing' => '_item1',
- ],
- 'address' => ['_item1' => []],
- ];
- $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
- $this->dispatch('backend/customer/index/save');
- /**
- * Check that errors was generated and set to session
- */
- $this->assertSessionMessages(
- $this->logicalNot($this->isEmpty()),
- \Magento\Framework\Message\MessageInterface::TYPE_ERROR
- );
- /**
- * Check that customer data were set to session
- */
- $this->assertArraySubset(
- $post,
- $this->objectManager->get(\Magento\Backend\Model\Session::class)->getCustomerFormData()
- );
- $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'new'));
- }
-
- /**
- * @magentoDbIsolation enabled
- */
- public function testSaveActionWithValidCustomerDataAndValidAddressData()
- {
- $post = [
- 'customer' => [
- 'middlename' => 'test middlename',
- 'group_id' => 1,
- 'website_id' => 0,
- 'firstname' => 'test firstname',
- 'lastname' => 'test lastname',
- 'email' => 'example@domain.com',
- 'default_billing' => '_item1',
- 'password' => 'password',
- ],
- 'address' => [
- '_item1' => [
- 'firstname' => 'test firstname',
- 'lastname' => 'test lastname',
- 'street' => ['test street'],
- 'city' => 'test city',
- 'region_id' => 10,
- 'country_id' => 'US',
- 'postcode' => '01001',
- 'telephone' => '+7000000001',
- 'default_billing' => 'true',
- ],
- ],
- ];
- $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
- $this->getRequest()->setParam('back', '1');
-
- // Emulate setting customer data to session in editAction
- $this->objectManager->get(\Magento\Backend\Model\Session::class)->setCustomerFormData($post);
-
- $this->dispatch('backend/customer/index/save');
- /**
- * Check that errors was generated and set to session
- */
- $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
-
- /**
- * Check that customer data were cleaned after it was saved successfully
- */
- $this->assertEmpty($this->objectManager->get(\Magento\Backend\Model\Session::class)->getCustomerData());
-
- /**
- * Check that success message is set
- */
- $this->assertSessionMessages(
- $this->logicalNot($this->isEmpty()),
- \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS
- );
-
- /**
- * Check that customer id set and addresses saved
- */
- $registry = $this->objectManager->get(\Magento\Framework\Registry::class);
- $customerId = $registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
- $customer = $this->customerRepository->getById($customerId);
- $this->assertEquals('test firstname', $customer->getFirstname());
- $addresses = $customer->getAddresses();
- $this->assertEquals(1, count($addresses));
- $this->assertNotEquals(0, $this->accountManagement->getDefaultBillingAddress($customerId));
- $this->assertNull($this->accountManagement->getDefaultShippingAddress($customerId));
-
- $urlPatternParts = [
- $this->_baseControllerUrl . 'edit',
- 'id/' . $customerId,
- 'back/1',
- ];
- $urlPattern = '/^' . str_replace('/', '\/', implode('(/.*/)|/', $urlPatternParts)) . '/';
-
- $this->assertRedirect(
- $this->matchesRegularExpression($urlPattern)
- );
-
- /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
- $subscriber = $this->objectManager->get(\Magento\Newsletter\Model\SubscriberFactory::class)->create();
- $this->assertEmpty($subscriber->getId());
- $subscriber->loadByCustomerId($customerId);
- $this->assertEmpty($subscriber->getId());
- }
-
- /**
- * @magentoDataFixture Magento/Customer/_files/customer_sample.php
- */
- public function testSaveActionExistingCustomerAndExistingAddressData()
- {
- $post = [
- 'customer' => [
- 'entity_id' => '1',
- 'middlename' => 'test middlename',
- 'group_id' => 1,
- 'website_id' => 1,
- 'firstname' => 'test firstname',
- 'lastname' => 'test lastname',
- 'email' => 'customer@example.com',
- 'new_password' => 'auto',
- 'sendemail_store_id' => '1',
- 'sendemail' => '1',
- 'created_at' => '2000-01-01 00:00:00',
- 'default_shipping' => '_item1',
- 'default_billing' => 1,
- ],
- 'address' => [
- '1' => [
- 'firstname' => 'update firstname',
- 'lastname' => 'update lastname',
- 'street' => ['update street'],
- 'city' => 'update city',
- 'region_id' => 10,
- 'country_id' => 'US',
- 'postcode' => '01001',
- 'telephone' => '+7000000001',
- 'default_billing' => 'true',
- ],
- '_item1' => [
- 'firstname' => 'new firstname',
- 'lastname' => 'new lastname',
- 'street' => ['new street'],
- 'city' => 'new city',
- 'region_id' => 10,
- 'country_id' => 'US',
- 'postcode' => '01001',
- 'telephone' => '+7000000001',
- 'default_shipping' => 'true',
- ],
- '_template_' => [
- 'firstname' => '',
- 'lastname' => '',
- 'street' => [],
- 'city' => '',
- 'region_id' => 10,
- 'country_id' => 'US',
- 'postcode' => '',
- 'telephone' => '',
- ],
- ],
- 'subscription' => '',
- ];
- $this->getRequest()->setPostValue($post)->setMethod(HttpRequest::METHOD_POST);
- $this->getRequest()->setParam('id', 1);
- $this->dispatch('backend/customer/index/save');
-
- /** Check that success message is set */
- $this->assertSessionMessages(
- $this->equalTo(['You saved the customer.']),
- \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS
- );
-
- /** Check that customer id set and addresses saved */
- $registry = $this->objectManager->get(\Magento\Framework\Registry::class);
- $customerId = $registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
- $customer = $this->customerRepository->getById($customerId);
- $this->assertEquals('test firstname', $customer->getFirstname());
-
- /**
- * Addresses should be removed by
- * \Magento\Customer\Model\ResourceModel\Customer::_saveAddresses during _afterSave
- * addressOne - updated
- * addressTwo - removed
- * addressThree - removed
- * _item1 - new address
- */
- $addresses = $customer->getAddresses();
- $this->assertEquals(2, count($addresses));
- $updatedAddress = $this->addressRepository->getById(1);
- $this->assertEquals('update firstname', $updatedAddress->getFirstname());
- $this->assertTrue($updatedAddress->isDefaultBilling());
- $this->assertEquals($updatedAddress->getId(), $customer->getDefaultBilling());
- $newAddress = $this->accountManagement->getDefaultShippingAddress($customerId);
- $this->assertEquals('new firstname', $newAddress->getFirstname());
-
- /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
- $subscriber = $this->objectManager->get(\Magento\Newsletter\Model\SubscriberFactory::class)->create();
- $this->assertEmpty($subscriber->getId());
- $subscriber->loadByCustomerId($customerId);
- $this->assertNotEmpty($subscriber->getId());
- $this->assertEquals(1, $subscriber->getStatus());
- $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'index/key/'));
- }
-
/**
* @magentoDataFixture Magento/Newsletter/_files/subscribers.php
*/
@@ -544,7 +324,7 @@ public function testNewAction()
/**
* Test the editing of a new customer that has not been saved but the page has been reloaded
*/
- public function testNewActionWithCustomerData()
+ public function te1stNewActionWithCustomerData()
{
$customerData = [
'customer_id' => 0,
@@ -679,59 +459,6 @@ public function testValidateCustomerWithAddressSuccess()
$this->assertEquals('{"error":0}', $body);
}
- /**
- * @magentoDataFixture Magento/Customer/_files/customer.php
- * @magentoDataFixture Magento/Customer/_files/customer_address.php
- */
- public function testValidateCustomerWithAddressFailure()
- {
- $customerData = [
- 'customer' => [
- 'entity_id' => '1',
- 'middlename' => 'new middlename',
- 'group_id' => 1,
- 'website_id' => 1,
- 'firstname' => '',
- 'lastname' => '',
- 'email' => '*',
- 'default_shipping' => '_item1',
- 'new_password' => 'auto',
- 'sendemail_store_id' => '1',
- 'sendemail' => '1',
- ],
- 'address' => [
- '1' => [
- 'firstname' => '',
- 'lastname' => '',
- 'street' => ['update street'],
- 'city' => 'update city',
- 'postcode' => '01001',
- 'telephone' => '',
- ],
- '_template_' => [
- 'lastname' => '',
- 'street' => [],
- 'city' => '',
- 'country_id' => 'US',
- 'postcode' => '',
- 'telephone' => '',
- ],
- ],
- ];
- /**
- * set customer data
- */
- $this->getRequest()->setPostValue($customerData)->setMethod(HttpRequest::METHOD_POST);
- $this->dispatch('backend/customer/index/validate');
- $body = $this->getResponse()->getBody();
-
- $this->assertContains('{"error":true,"messages":', $body);
- $this->assertContains('\"First Name\" is a required value', $body);
- $this->assertContains('\"Last Name\" is a required value.', $body);
- $this->assertContains('\"Country\" is a required value.', $body);
- $this->assertContains('\"Phone Number\" is a required value.', $body);
- }
-
/**
* @magentoDbIsolation enabled
*/
diff --git a/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock.php
new file mode 100644
index 0000000000000..6ef9b5cd5b0a8
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock.php
@@ -0,0 +1,75 @@
+get(ProductRepositoryInterface::class);
+
+$productLinkFactory = Bootstrap::getObjectManager()
+ ->get(\Magento\Catalog\Api\Data\ProductLinkInterfaceFactory::class);
+$productConfigs = [
+ [
+ 'id' => '100000001',
+ 'stock_config' => ['use_config_manage_stock' => 1, 'qty' => 100, 'is_qty_decimal' => 0, 'is_in_stock' => 1]
+ ],
+ [
+ 'id' => '100000002',
+ 'stock_config' => ['use_config_manage_stock' => 1, 'qty' => 0, 'is_qty_decimal' => 0, 'is_in_stock' => 0]
+ ]
+];
+
+foreach ($productConfigs as $productConfig) {
+ /** @var $product Product */
+ $product = Bootstrap::getObjectManager()->create(Product::class);
+ $product->setTypeId(Type::TYPE_SIMPLE)
+ ->setId($productConfig['id'])
+ ->setWebsiteIds([1])
+ ->setAttributeSetId(4)
+ ->setName('Simple ' . $productConfig['id'])
+ ->setSku('simple_' . $productConfig['id'])
+ ->setPrice(100)
+ ->setVisibility(Visibility::VISIBILITY_BOTH)
+ ->setStatus(Status::STATUS_ENABLED)
+ ->setStockData($productConfig['stock_config']);
+
+ $linkedProducts[] = $productRepository->save($product);
+}
+
+/** @var $product Product */
+$product = Bootstrap::getObjectManager()->create(Product::class);
+
+$product->setTypeId(Grouped::TYPE_CODE)
+ ->setId('100000003')
+ ->setWebsiteIds([1])
+ ->setAttributeSetId(4)
+ ->setName('Grouped Product')
+ ->setSku('grouped')
+ ->setVisibility(Visibility::VISIBILITY_BOTH)
+ ->setStatus(Status::STATUS_ENABLED)
+ ->setStockData(['use_config_manage_stock' => 1, 'is_in_stock' => 1]);
+
+foreach ($linkedProducts as $linkedProduct) {
+ /** @var \Magento\Catalog\Api\Data\ProductLinkInterface $productLink */
+ $productLink = $productLinkFactory->create();
+ $productLink->setSku($product->getSku())
+ ->setLinkType('associated')
+ ->setLinkedProductSku($linkedProduct->getSku())
+ ->setLinkedProductType($linkedProduct->getTypeId())
+ ->getExtensionAttributes()
+ ->setQty(1);
+ $newLinks[] = $productLink;
+}
+
+$product->setProductLinks($newLinks);
+
+$productRepository->save($product);
diff --git a/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock_rollback.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock_rollback.php
new file mode 100644
index 0000000000000..b81c008cf1ab6
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock_rollback.php
@@ -0,0 +1,34 @@
+get(\Magento\Framework\Registry::class);
+
+/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
+$productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+ ->get(\Magento\Catalog\Api\ProductRepositoryInterface::class);
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', true);
+
+$skuList = ['simple_100000001', 'simple_100000002', 'grouped'];
+foreach ($skuList as $sku) {
+ try {
+ $product = $productRepository->get($sku, false, null, true);
+
+ $stockStatus = $objectManager->create(\Magento\CatalogInventory\Model\Stock\Status::class);
+ $stockStatus->load($product->getData('entity_id'), 'product_id');
+ $stockStatus->delete();
+
+ $productRepository->delete($product);
+ } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
+ //Product already removed
+ }
+}
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', false);
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js
index ff420c4830476..9b9b1ce5b1614 100644
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js
@@ -12,7 +12,7 @@ require.config({
}
});
-define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
+define(['squire', 'ko', 'jquery', 'uiRegistry', 'jquery/validate'], function (Squire, ko, $, registry) {
'use strict';
var injector = new Squire(),
@@ -28,7 +28,17 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
'Magento_Checkout/js/model/address-converter': jasmine.createSpy(),
'Magento_Checkout/js/model/quote': {
isVirtual: jasmine.createSpy(),
- shippingMethod: ko.observable()
+ shippingMethod: ko.observable(),
+
+ /**
+ * Stub
+ */
+ shippingAddress: function () {
+
+ return {
+ 'countryId': 'AD'
+ };
+ }
},
'Magento_Checkout/js/action/create-shipping-address': jasmine.createSpy().and.returnValue(
jasmine.createSpyObj('newShippingAddress', ['getKey'])
@@ -52,7 +62,7 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
'checkoutData',
['setSelectedShippingAddress', 'setNewCustomerShippingAddress', 'setSelectedShippingRate']
),
- 'uiRegistry': jasmine.createSpy(),
+ 'Magento_Ui/js/lib/registry/registry': registry,
'Magento_Checkout/js/model/shipping-rate-service': jasmine.createSpy()
},
obj;
@@ -63,6 +73,7 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
obj = new Constr({
provider: 'provName',
name: '',
+ parentName: 'test',
index: '',
popUpForm: {
options: {
@@ -156,12 +167,26 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
describe('"setShippingInformation" method', function () {
it('Check method call.', function () {
+ spyOn(obj, 'validateShippingInformation').and.returnValue(false);
expect(obj.setShippingInformation()).toBeUndefined();
});
});
describe('"validateShippingInformation" method', function () {
it('Check method call on negative cases.', function () {
+ var country = {
+ 'indexedOptions': {
+ 'AD':
+ {
+ label: 'Andorra',
+ labeltitle: 'Andorra',
+ value: 'AD'
+ }
+ }
+ };
+
+ registry.set('test.shippingAddress.shipping-address-fieldset.country_id', country);
+ registry.set('checkout.errors', {});
obj.source = {
get: jasmine.createSpy().and.returnValue(true),
set: jasmine.createSpy(),
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Customer/adminhtml/js/view/form/components/form.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/adminhtml/js/view/form/components/form.test.js
new file mode 100644
index 0000000000000..2ef8736b4f0b8
--- /dev/null
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/adminhtml/js/view/form/components/form.test.js
@@ -0,0 +1,71 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'underscore',
+ 'uiRegistry',
+ 'Magento_Customer/js/form/components/form',
+ 'jquery'
+], function (_, registry, Constr, $) {
+ 'use strict';
+
+ describe('Magento_Customer/js/form/components/form', function () {
+
+ var obj,
+ originaljQueryAjax;
+
+ beforeEach(function () {
+ originaljQueryAjax = $.ajax;
+ obj = new Constr({
+ provider: 'provName',
+ name: '',
+ index: ''
+ });
+ });
+
+ afterEach(function () {
+ $.ajax = originaljQueryAjax;
+ });
+
+ registry.set('provName', {
+ /** Stub */
+ on: function () {},
+
+ /** Stub */
+ get: function () {},
+
+ /** Stub */
+ set: function () {}
+ });
+
+ describe('"deleteAddress" method', function () {
+ it('Check for defined ', function () {
+ expect(obj.hasOwnProperty('deleteAddress')).toBeDefined();
+ });
+ it('Check method type', function () {
+ var type = typeof obj.deleteAddress;
+
+ expect(type).toEqual('function');
+ });
+ it('Check returned value if method called without arguments', function () {
+ expect(obj.deleteAddress()).toBeUndefined();
+ });
+ it('Check returned value type if method called without arguments', function () {
+ var type = typeof obj.deleteAddress();
+
+ expect(type).toEqual('undefined');
+ });
+ it('Should call not call ajax if arguments are empty', function () {
+ $.ajax = jasmine.createSpy();
+
+ spyOn(obj, 'deleteAddress');
+
+ expect(obj.deleteAddress()).toBeUndefined();
+
+ expect($.ajax).not.toHaveBeenCalled();
+ });
+ });
+ });
+});
diff --git a/dev/tests/static/testsuite/Magento/Test/Less/_files/blacklist/old.txt b/dev/tests/static/testsuite/Magento/Test/Less/_files/blacklist/old.txt
index db5c1cab06655..4c00371faede0 100644
--- a/dev/tests/static/testsuite/Magento/Test/Less/_files/blacklist/old.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Less/_files/blacklist/old.txt
@@ -4,6 +4,7 @@ app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/
app/design/adminhtml/Magento/backend/Magento_Developer/web/css/source/_module-old.less
app/design/adminhtml/Magento/backend/Magento_Enterprise/web/css/source/_module-old.less
app/design/adminhtml/Magento/backend/Magento_Msrp/web/css/source/_module-old.less
+app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less
app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module-old.less
app/design/adminhtml/Magento/backend/Magento_Theme/web/css/source/_module-old.less
app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/_module-old.less
@@ -22,4 +23,4 @@ app/design/adminhtml/Magento/backend/web/mui/clearless/_settings.less
app/design/adminhtml/Magento/backend/web/mui/clearless/_sprites.less
app/design/adminhtml/Magento/backend/web/mui/styles/_abstract.less
app/design/adminhtml/Magento/backend/web/mui/styles/_table.less
-app/design/adminhtml/Magento/backend/web/mui/styles/_vars.less
+app/design/adminhtml/Magento/backend/web/mui/styles/_vars.less
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
index 14531deda45bb..4820b83ceb7a8 100644
--- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
+++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
@@ -75,7 +75,7 @@ public function run()
/**
* we need these fake initializations because all magento's files in filesystem will be deleted and autoloader
- * wont be able to load classes that we need for unpacking
+ * won't be able to load classes that we need for unpacking
*/
new Tar();
new Gz();
@@ -94,6 +94,8 @@ public function run()
}
/**
+ * Get file system helper instance
+ *
* @return Helper
* @deprecated 100.2.0
*/
diff --git a/lib/internal/Magento/Framework/View/Element/ComponentVisibilityInterface.php b/lib/internal/Magento/Framework/View/Element/ComponentVisibilityInterface.php
new file mode 100644
index 0000000000000..29d14553481d7
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Element/ComponentVisibilityInterface.php
@@ -0,0 +1,20 @@
+
false
admin_customer_address_entity_id
- "address":\{"\d+":{"entity_id":"(\d+)".+?"parent_id":"${admin_customer_entity_id}"
+ _address":\{"entity_id":"(\d+)".+?"parent_id":"${admin_customer_entity_id}"
$1$
1
@@ -33518,7 +33518,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_created_at
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"created_at":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"created_at":"([^"]+)"
$1$
1
@@ -33527,7 +33527,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_updated_at
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"updated_at":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"updated_at":"([^"]+)"
$1$
1
@@ -33536,7 +33536,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_is_active
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"is_active":"(\d+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"is_active":"(\d+)"
$1$
1
@@ -33545,7 +33545,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_city
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"city":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"city":"([^"]+)"
$1$
1
@@ -33554,7 +33554,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_country_id
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"country_id":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"country_id":"([^"]+)"
$1$
1
@@ -33563,7 +33563,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_firstname
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"firstname":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"firstname":"([^"]+)"
$1$
1
@@ -33572,7 +33572,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_lastname
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"lastname":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"lastname":"([^"]+)"
$1$
1
@@ -33581,7 +33581,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_postcode
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"postcode":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"postcode":"([^"]+)"
$1$
1
@@ -33590,7 +33590,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_region
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"region":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"region":"([^"]+)"
$1$
1
@@ -33599,7 +33599,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_region_id
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"region_id":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"region_id":"([^"]+)"
$1$
1
@@ -33608,7 +33608,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_street
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"street":\["([^"]+)"\]
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"street":\["([^"]+)"\]
$1$
1
@@ -33617,7 +33617,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_telephone
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"telephone":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"telephone":"([^"]+)"
$1$
1
@@ -33626,7 +33626,7 @@ vars.put("admin_user", adminUser);
false
admin_customer_address_customer_id
- "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"customer_id":"([^"]+)"
+ _address":\{.+?"parent_id":"${admin_customer_entity_id}".+?"customer_id":"([^"]+)"
$1$
1