From e71e2d7685380a5e26fbb975d31ca48cd09272a2 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Tue, 26 Dec 2017 12:09:31 -0600
Subject: [PATCH 001/277] MAGETWO-85007: Add Content Section
- fix ui component wysiwyg element setDisabled
---
.../view/base/web/js/form/element/wysiwyg.js | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
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 9e9427f5ce72c..ee3c414140fb5 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
@@ -7,12 +7,13 @@
* @api
*/
define([
+ 'wysiwygAdapter',
'Magento_Ui/js/lib/view/utils/async',
'underscore',
'ko',
'./abstract',
- 'Magento_Variable/variables'
-], function ($, _, ko, Abstract) {
+ 'Magento_Variable/variables',
+], function (wysiwyg, $, _, ko, Abstract) {
'use strict';
return Abstract.extend({
@@ -94,14 +95,16 @@ define([
this.$wysiwygEditorButton.attr('disabled', status);
/* eslint-disable no-undef */
- if (wysiwygAdapter) {
- _.each(wysiwygAdapter.activeEditor().controlManager.controls, function (property, index, controls) {
- controls[property.id].setDisabled(status);
- });
+ if (typeof wysiwyg != 'undefined' && wysiwyg.activeEditor()) {
- wysiwygAdapter.activeEditor().getBody().setAttribute('contenteditable', !status);
- }
+ if(typeof wysiwyg.activeEditor().controlManager !== 'undefined') {
+ _.each(wysiwyg.activeEditor().controlManager.controls, function (property, index, controls) {
+ controls[property.id].setDisabled(status);
+ });
+ }
+ wysiwyg.activeEditor().getBody().setAttribute('contenteditable', !status);
+ }
/* eslint-enable no-undef*/
}
});
From 2603f91e3d470873c012c054f3e72916f79336ed Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Tue, 26 Dec 2017 17:05:28 -0600
Subject: [PATCH 002/277] MAGETWO-85007: Add Content Section
- make sure the wysiwygEditorButton is not empty
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 ee3c414140fb5..30d90be661d34 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
@@ -92,7 +92,9 @@ define([
* @param {Boolean} status
*/
setDisabled: function (status) {
- this.$wysiwygEditorButton.attr('disabled', status);
+ if (this.$wysiwygEditorButton != '') {
+ this.$wysiwygEditorButton.attr('disabled', status);
+ }
/* eslint-disable no-undef */
if (typeof wysiwyg != 'undefined' && wysiwyg.activeEditor()) {
From 8d3a2376fd383f1e152058471add0095af199100 Mon Sep 17 00:00:00 2001
From: Vincent MARMIESSE
Date: Thu, 4 Jan 2018 17:30:19 +0100
Subject: [PATCH 003/277] #42 - Dynamically fill the image keys
---
.../Model/Import/Product.php | 26 +++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index ff18035686bd1..ea46a14f5d466 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -425,7 +425,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
*
* @var string[]
*/
- protected $_imagesArrayKeys = ['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image'];
+ protected $_imagesArrayKeys = [];
/**
* Permanent entity columns.
@@ -833,7 +833,8 @@ public function __construct(
$this->_initAttributeSets()
->_initTypeModels()
- ->_initSkus();
+ ->_initSkus()
+ ->_initImagesArrayKeys();
$this->validator->init($this);
}
@@ -1076,6 +1077,27 @@ protected function _initSkus()
return $this;
}
+ /**
+ * Initialize image array keys.
+ *
+ * @return $this
+ */
+ protected function _initImagesArrayKeys()
+ {
+ $select = $this->_connection->select()->from(
+ $this->getResource()->getTable('eav_attribute'),
+ ['code' => 'attribute_code']
+ )->where(
+ 'frontend_input = :frontend_input'
+ );
+ $bind = [':frontend_input' => 'media_image'];
+
+ $this->_imagesArrayKeys = $this->_connection->fetchCol($select, $bind);
+ $this->_imagesArrayKeys[] = '_media_image';
+
+ return $this;
+ }
+
/**
* Initialize product type models.
*
From 79b0a41f6feb8f4f4b5244567a2811dbb751e7c6 Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Fri, 5 Jan 2018 00:25:39 -0600
Subject: [PATCH 004/277] MAGETWO-85452: QA Activities
- Clear preReqData after each test
---
.../AdminAddImageToWYSIWYGCatalogCest.xml | 21 +++++------
.../AdminAddImageToWYSIWYGProductCest.xml | 35 ++++++++++---------
...dminEditTextEditorProductAttributeCest.xml | 8 +++--
...erifyDefaultWYSIWYGToolbarOnProducCest.xml | 6 ++--
...yTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml | 8 +++--
...yTinyMCEv4IsNativeWYSIWYGOnProductCest.xml | 5 +--
.../Cest/AdminAddImageToWYSIWYGBlockCest.xml | 3 +-
.../Cest/AdminAddImageToWYSIWYGCMSCest.xml | 17 ++++-----
.../AdminAddVariableToWYSIWYGBlockCest.xml | 3 +-
.../Cest/AdminAddWidgetToWYSIWYGBlockCest.xml | 4 +--
...getToWYSIWYGWithCMSStaticBlockTypeCest.xml | 3 +-
...WYSIWYGWithCatalogCategoryLinkTypeCest.xml | 1 +
...oWYSIWYGWithCatalogProductLinkTypeCest.xml | 2 ++
...oWYSIWYGWithCatalogProductListTypeCest.xml | 3 ++
...YGWithRecentlyComparedProductsTypeCest.xml | 2 ++
...IWYGWithRecentlyViewedProductsTypeCest.xml | 2 ++
...ifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml | 3 +-
.../Cms/Metadata/block-meta.xml | 4 +++
.../FunctionalTest/Cms/Metadata/cms-meta.xml | 2 +-
.../AdminAddImageToWYSIWYGNewsletterCest.xml | 16 ++++-----
20 files changed, 89 insertions(+), 59 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
index 6000f3ea1c310..7f719f1fd021e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
@@ -28,18 +28,18 @@
-
-
+
+
-
+
-
-
+
+
@@ -47,7 +47,7 @@
-
+
@@ -63,18 +63,19 @@
-
+
-
+
-
+
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
index fbc835ff8b55c..85b8f2a70e8fe 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
@@ -28,17 +28,18 @@
-
+
+
-
-
+
+
@@ -52,9 +53,9 @@
-
+
-
+
@@ -64,28 +65,29 @@
-
+
-
+
-
+
+
-
-
+
+
+
-
-
+
@@ -93,18 +95,19 @@
-
+
-
+
-
+
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
index e4bba1ddc4d97..2b8ef929051f8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
@@ -40,7 +40,7 @@
-
+
@@ -52,6 +52,7 @@
+
@@ -65,9 +66,9 @@
-
+
-
+
@@ -75,6 +76,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
index 87c7b470305cc..e2c402422c22b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
@@ -30,7 +30,8 @@
-
+
+
@@ -56,7 +57,8 @@
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
index 108d3172d468d..90f517521f210 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
@@ -12,10 +12,11 @@
-
+
+
@@ -30,8 +31,8 @@
-
-
+
+
@@ -61,6 +62,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
index df57f7b241f77..478110dd9a12a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -29,11 +29,12 @@
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
index 1cac975dab8e0..699c2e23989b2 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
@@ -16,7 +16,7 @@
-
+
@@ -108,6 +108,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
index 80e6d971cc4c9..dfa358c5caf40 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
@@ -28,14 +28,14 @@
-
+
-
+
-
+
@@ -49,9 +49,9 @@
-
+
-
+
@@ -61,7 +61,7 @@
-
+
@@ -69,13 +69,14 @@
-
+
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
index 9c01494b749dd..05b8f2e027c6a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
@@ -16,7 +16,7 @@
-
+
@@ -121,6 +121,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
index 5d3e60220faef..83d0eaf2c44c9 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -16,7 +16,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
index 0bf617bf29ca4..29b96d3aff72a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
@@ -17,7 +17,7 @@
-
+
@@ -69,6 +69,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
index 425226f3527eb..8fcf656cd1cc7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
@@ -66,6 +66,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
index 9521b0a8afd47..0fbc7c2d0b869 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
@@ -74,6 +74,8 @@
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
index 8772efe0a2aa5..25769100f2707 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
@@ -79,6 +79,9 @@
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index f2518c94385c5..c3a91eadd4bd5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -84,6 +84,8 @@
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
index 82cd169d0a933..577f5560567a0 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
@@ -74,6 +74,8 @@
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
index 24fe3223c768e..2edde1df3355b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
@@ -18,7 +18,7 @@
-
+
@@ -92,6 +92,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml
index 0b8a174b60da3..0d2bc1bb3532c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml
@@ -16,4 +16,8 @@
true
+
+
+ application/json
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml
index c9ac524a161e8..da69bf2049598 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml
@@ -17,7 +17,7 @@
string
-
+
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
index b93ff0a5fff6e..e238228ff6846 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
@@ -35,10 +35,10 @@
-
+
-
+
@@ -53,9 +53,9 @@
-
+
-
+
@@ -65,7 +65,7 @@
-
+
@@ -73,14 +73,14 @@
-
+
-
+
-
+
From 5d9247a1cddabfe5358981254572d8f9e12d3cd0 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Fri, 5 Jan 2018 10:39:39 -0600
Subject: [PATCH 005/277] MAGETWO-86383: Admin are unable to add variable to
CMS Page and Block on Firefox
Use jQuery global explicitly
---
.../tiny_mce/plugins/magentovariable/editor_plugin.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
index d96ab6dcc5353..2168c5794241d 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
@@ -171,18 +171,18 @@ tinymce.create('tinymce.plugins.magentovariable', {
el = spans[i];
if (el.hasClassName('magento-custom-var')) {
- $(el).replaceWith(
+ jQuery(el).replaceWith(
this.customDirectiveGenerator.processConfig(
Base64.idDecode(
- $(el).getAttribute('id')
+ jQuery(el).attr('id')
)
)
);
} else {
- $(el).replaceWith(
+ jQuery(el).replaceWith(
this.configDirectiveGenerator.processConfig(
Base64.idDecode(
- $(el).getAttribute('id')
+ jQuery(el).attr('id')
)
)
);
From 34d85dc072d367d00454008060a84977d6ef4ba0 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Fri, 5 Jan 2018 13:12:37 -0600
Subject: [PATCH 006/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Move toolbar enabling/disabling into respective adapters. TinyMCE4 functionality needs to be implemented.
---
.../Tinymce3/view/base/web/tinymce3Adapter.js | 26 +++++++-
.../view/base/web/js/form/element/wysiwyg.js | 32 ++++++----
.../wysiwyg/tiny_mce/tinymce4Adapter.js | 59 +++++++++++++------
3 files changed, 85 insertions(+), 32 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index 08bbb95888d8d..b5c74af6c3dd3 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -244,6 +244,13 @@ define([
return tinyMCE3.get(id);
},
+ /**
+ * @return {String}
+ */
+ getId: function () {
+ return this.id || (this.activeEditor() ? this.activeEditor().id : null) || tinyMceEditors.values()[0].id;
+ },
+
/**
* @return {Object}
*/
@@ -261,6 +268,16 @@ define([
this.activeEditor().execCommand('mceInsertContent', typeof ui !== 'undefined' ? ui : false, content);
},
+ /**
+ * Set the status of the toolbar to disabled or enabled (true for enabled, false for disabled)
+ * @param {Boolean} enabled
+ */
+ setToolbarStatus: function (enabled) {
+ _.each(this.activeEditor().controlManager.controls, function (property, index, controls) {
+ controls[property.id].setDisabled(!enabled);
+ });
+ },
+
/**
* Set caret location in WYSIWYG editor.
*
@@ -558,7 +575,14 @@ define([
content = editor.getContent();
content = this.decodeContent(content);
- jQuery('#' + this.id).val(content).trigger('change');
+ this.getTextArea().val(content).trigger('change');
+ },
+
+ /**
+ * @return {Object} jQuery textarea element
+ */
+ getTextArea: function () {
+ return jQuery('#' + this.id);
},
/**
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 9e9427f5ce72c..107761e714ce5 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
@@ -7,12 +7,13 @@
* @api
*/
define([
+ 'wysiwygAdapter',
'Magento_Ui/js/lib/view/utils/async',
'underscore',
'ko',
'./abstract',
- 'Magento_Variable/variables'
-], function ($, _, ko, Abstract) {
+ 'Magento_Variable/variables',
+], function (wysiwyg, $, _, ko, Abstract) {
'use strict';
return Abstract.extend({
@@ -88,21 +89,26 @@ define([
/**
* Set disabled property to wysiwyg component
*
- * @param {Boolean} status
+ * @param {Boolean} disabled
*/
- setDisabled: function (status) {
- this.$wysiwygEditorButton.attr('disabled', status);
+ setDisabled: function (disabled) {
+ if (this.$wysiwygEditorButton) {
+ this.$wysiwygEditorButton.attr('disabled', disabled);
+ }
/* eslint-disable no-undef */
- if (wysiwygAdapter) {
- _.each(wysiwygAdapter.activeEditor().controlManager.controls, function (property, index, controls) {
- controls[property.id].setDisabled(status);
- });
-
- wysiwygAdapter.activeEditor().getBody().setAttribute('contenteditable', !status);
+ if (typeof wysiwyg !== 'undefined') {
+ if (disabled) {
+ wysiwyg.setToolbarStatus(false);
+ wysiwyg.getPluginButtons().attr('disabled', 'disabled');
+ wysiwyg.getTextArea().attr('disabled', 'disabled');
+ } else {
+ wysiwyg.setToolbarStatus(true);
+ wysiwyg.getPluginButtons().removeAttr('disabled');
+ wysiwyg.getTextArea().removeAttr('disabled');
+ }
}
-
/* eslint-enable no-undef*/
}
});
-});
+});
\ No newline at end of file
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 2ea9d434dc179..c2a3032049bdb 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -67,14 +67,14 @@ define([
* Setup TinyMCE4 editor
*/
setup: function (mode) {
- var settings;
+ var settings,
+ self = this;
this.turnOff();
if (typeof mode === 'undefined') {
mode = this.mode;
}
- var self = this;
if (this.config.plugins) {
this.config.plugins.forEach(function (plugin) {
@@ -92,16 +92,17 @@ define([
pluginConstructor.adapter = self;
});
}
-
});
-
}
if (jQuery.isReady) {
tinyMCE4.dom.Event.domLoaded = true;
}
-settings = this.getSettings();
- settings.mode = mode; tinyMCE4.init(settings);this.getPluginButtons().hide();
+
+ settings = this.getSettings();
+ settings.mode = mode;
+ tinyMCE4.init(settings);
+ this.getPluginButtons().hide();
},
/**
@@ -126,6 +127,14 @@ settings = this.getSettings();
this.config.tinymce4.toolbar = toolbar.join(' ');
},
+ /**
+ * Set the status of the toolbar to disabled or enabled (true for enabled, false for disabled)
+ * @param {Boolean} enabled
+ */
+ setToolbarStatus: function (enabled) {
+ // TODO
+ },
+
/**
* @return {Object}
*/
@@ -133,7 +142,7 @@ settings = this.getSettings();
var settings;
settings = {
- selector: 'textarea#' + this.id,
+ selector: 'textarea#' + this.getId(),
theme: 'modern',
'entity_encoding': 'raw',
'convert_urls': false,
@@ -240,6 +249,13 @@ settings = this.getSettings();
return tinyMCE4.get(id);
},
+ /**
+ * @return {String}
+ */
+ getId: function () {
+ return this.id || (this.activeEditor() ? this.activeEditor().id : null) || tinyMceEditors.values()[0].id;
+ },
+
/**
* @return {Object}
*/
@@ -275,7 +291,7 @@ settings = this.getSettings();
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
frameDialog = jQuery('div.mce-container[role="dialog"]'),
wUrl = this.config['files_browser_window_url'] +
- 'target_element_id/' + this.id + '/' +
+ 'target_element_id/' + this.getId() + '/' +
'store/' + storeId + '/';
this.mediaBrowserOpener = o.win;
@@ -327,14 +343,14 @@ settings = this.getSettings();
* @return {jQuery|*|HTMLElement}
*/
getToggleButton: function () {
- return $('toggle' + this.id);
+ return $('toggle' + this.getId());
},
/**
* Get plugins button.
*/
getPluginButtons: function () {
- return jQuery('#buttons' + this.id + ' > button.plugin');
+ return jQuery('#buttons' + this.getId() + ' > button.plugin');
},
/**
@@ -348,7 +364,7 @@ settings = this.getSettings();
this.getPluginButtons().hide();
- tinyMCE4.execCommand('mceAddControl', false, this.id);
+ tinyMCE4.execCommand('mceAddControl', false, this.getId());
return this;
},
@@ -370,7 +386,7 @@ settings = this.getSettings();
this.getPluginButtons().show();
- tinyMCE4.execCommand('mceRemoveEditor', false, this.id);
+ tinyMCE4.execCommand('mceRemoveEditor', false, this.getId());
return this;
},
@@ -381,14 +397,14 @@ settings = this.getSettings();
closePopups: function () {
// close all popups to avoid problems with updating parent content area
varienGlobalEvents.fireEvent('wysiwygClosePopups');
- this.closeEditorPopup('browser_window' + this.id);
+ this.closeEditorPopup('browser_window' + this.getId());
},
/**
* @return {Boolean}
*/
toggle: function () {
- if (!tinyMCE4.get(this.id)) {
+ if (!tinyMCE4.get(this.getId())) {
this.turnOn();
return true;
@@ -402,8 +418,8 @@ settings = this.getSettings();
* On form validation.
*/
onFormValidation: function () {
- if (tinyMCE4.get(this.id)) {
- $(this.id).value = tinyMCE4.get(this.id).getContent();
+ if (tinyMCE4.get(this.getId())) {
+ $(this.getId()).value = tinyMCE4.get(this.getId()).getContent();
}
},
@@ -481,7 +497,7 @@ settings = this.getSettings();
* Update text area.
*/
updateTextArea: function () {
- var editor = tinyMCE4.get(this.id),
+ var editor = tinyMCE4.get(this.getId()),
content;
if (!editor) {
@@ -494,7 +510,14 @@ settings = this.getSettings();
content = editor.getContent();
content = this.decodeContent(content);
- jQuery('#' + this.id).val(content).trigger('change');
+ this.getTextArea().val(content).trigger('change');
+ },
+
+ /**
+ * @return {Object} jQuery textarea element
+ */
+ getTextArea: function () {
+ return jQuery('#' + this.getId());
},
/**
From a7742e7a1a047644f7aa645b1b97122d5e40e286 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Fri, 5 Jan 2018 14:58:02 -0600
Subject: [PATCH 007/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Implement TinyMCE4 functionality
---
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index c2a3032049bdb..164fc11cf4f1e 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -132,7 +132,10 @@ define([
* @param {Boolean} enabled
*/
setToolbarStatus: function (enabled) {
- // TODO
+ var controlIds = this.get(this.getId()).theme.panel.rootControl.controlIdLookup;
+ _.each(controlIds, function (controlId) {
+ controlId.disabled(!enabled);
+ });
},
/**
From a8bcf6817024b0d3bd5891a385e2967ff124469d Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Sat, 6 Jan 2018 17:07:01 -0600
Subject: [PATCH 008/277] MAGETWO-85452: QA Activities
- Clean up created data tests, added actions support firefox browser
---
.../acceptance/tests/_suite/sampleSuite.xml | 1 +
.../AdminAddImageToWYSIWYGCatalogCest.xml | 2 +-
.../AdminAddImageToWYSIWYGProductCest.xml | 2 +-
.../Catalog/Cest/AdminCreateCategoryCest.xml | 2 +-
.../Cest/AdminCreateSimpleProductCest.xml | 2 +-
...dminEditTextEditorProductAttributeCest.xml | 2 +-
...erifyDefaultWYSIWYGToolbarOnProducCest.xml | 2 +-
...yTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml | 2 +-
...yTinyMCEv4IsNativeWYSIWYGOnProductCest.xml | 2 +-
.../Cest/AdminAddImageToWYSIWYGBlockCest.xml | 16 +++++----
.../Cest/AdminAddImageToWYSIWYGCMSCest.xml | 5 ++-
.../AdminAddVariableToWYSIWYGBlockCest.xml | 35 ++++++++++---------
.../Cest/AdminAddVariableToWYSIWYGCMSCest.xml | 6 ++--
.../Cest/AdminAddWidgetToWYSIWYGBlockCest.xml | 24 +++++++------
...WidgetToWYSIWYGWithCMSPageLinkTypeCest.xml | 14 ++++----
...getToWYSIWYGWithCMSStaticBlockTypeCest.xml | 10 +++---
...WYSIWYGWithCatalogCategoryLinkTypeCest.xml | 12 +++----
...oWYSIWYGWithCatalogProductLinkTypeCest.xml | 20 +++++------
...oWYSIWYGWithCatalogProductListTypeCest.xml | 16 ++++-----
...YGWithRecentlyComparedProductsTypeCest.xml | 24 ++++++-------
...IWYGWithRecentlyViewedProductsTypeCest.xml | 16 ++++-----
.../Cest/AdminSwitchWYSIWYGOptionsCest.xml | 10 +++---
...ifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml | 24 ++++++++-----
...yTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml | 3 +-
.../Section/CmsPagesPageActionsSection.xml | 5 +++
...dminAddVariableToWYSIWYGNewsletterCest.xml | 22 ++++++------
.../AdminAddWidgetToWYSIWYGNewsletterCest.xml | 10 +++---
27 files changed, 155 insertions(+), 134 deletions(-)
diff --git a/dev/tests/acceptance/tests/_suite/sampleSuite.xml b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
index d42f6d00132b9..b122c7002f92f 100644
--- a/dev/tests/acceptance/tests/_suite/sampleSuite.xml
+++ b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
@@ -35,6 +35,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
index 7f719f1fd021e..a217085ed227a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
index 85b8f2a70e8fe..6781c91ffe734 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml
index 1d12792785104..114cd0478cebe 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml
index 0c6238f07a59b..0cb5fb05ca8b7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
index 2b8ef929051f8..7d8fd32a6455b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminEditTextEditorProductAttributeCest.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
index e2c402422c22b..aa2354a06b9a7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
index 90f517521f210..e21b0f47f5d2c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
index 478110dd9a12a..4d453f42f7a59 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
index 699c2e23989b2..5e603a761ca7b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -78,11 +78,13 @@
-
-
-
-
-
+
+
+
+
+
+
+
@@ -102,7 +104,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
index dfa358c5caf40..f3065163d778e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -73,8 +73,7 @@
-
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
index 05b8f2e027c6a..8ebfae731d64c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -30,15 +30,15 @@
-
-
+
+
-
+
@@ -46,7 +46,7 @@
-
+
@@ -60,14 +60,15 @@
-
+
+
-
+
@@ -82,11 +83,13 @@
-
-
-
-
-
+
+
+
+
+
+
+
@@ -94,18 +97,18 @@
-
+
-
+
-
+
@@ -115,7 +118,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
index 4c35cd634cc00..f933a58d00123 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
@@ -92,7 +92,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
index 83d0eaf2c44c9..07240974758a3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -46,16 +46,18 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
@@ -63,18 +65,18 @@
-
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
index 50ca32ce4050d..1814c3f038794 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -30,14 +30,14 @@
-
+
-
+
@@ -45,23 +45,23 @@
-
+
-
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
index 29b96d3aff72a..f14330ce207e8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -51,9 +51,9 @@
-
-
-
+
+
+
@@ -66,7 +66,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
index 8fcf656cd1cc7..04b0b968cfc03 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -30,14 +30,14 @@
-
+
-
+
@@ -45,11 +45,11 @@
-
+
-
+
@@ -60,7 +60,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
index 0fbc7c2d0b869..5fa3c07e53e3e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -34,41 +34,41 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
index 25769100f2707..108ee114a7ec4 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -36,14 +36,14 @@
-
+
-
+
@@ -51,28 +51,28 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index c3a91eadd4bd5..0b139b1501713 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -34,23 +34,23 @@
-
+
-
+
-
+
-
+
@@ -58,28 +58,28 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
index 577f5560567a0..670a0ecc35898 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -34,14 +34,14 @@
-
+
-
+
@@ -49,7 +49,7 @@
-
+
@@ -57,19 +57,19 @@
-
+
-
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
index a0e641bd0c1a6..ba6a1a3847379 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
@@ -36,7 +36,7 @@
-
+
@@ -47,9 +47,10 @@
+
-
+
@@ -61,7 +62,7 @@
-
+
@@ -72,9 +73,10 @@
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
index 2edde1df3355b..f2381eb347164 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -61,12 +61,17 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -75,18 +80,19 @@
-
+
+
-
+
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
index 790d87bab4b12..cde0e5360e796 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
@@ -12,7 +12,7 @@
-
+
@@ -61,6 +61,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml
index ad22c451fe65c..0e8ebc3fb2877 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml
@@ -9,6 +9,11 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddVariableToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddVariableToWYSIWYGNewsletterCest.xml
index 8bf3b6ac035ff..8105f0c6bd18a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddVariableToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddVariableToWYSIWYGNewsletterCest.xml
@@ -29,15 +29,15 @@
-
-
+
+
-
+
@@ -47,7 +47,7 @@
-
+
@@ -61,31 +61,31 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -97,7 +97,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
index 48d989431504c..e45f5314088db 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
@@ -35,10 +35,10 @@
-
+
-
+
@@ -46,14 +46,14 @@
-
+
-
+
-
+
From 4e8dc706401dcdbe1c7595fc7ebdd4b2c4fb7a1f Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Sun, 7 Jan 2018 12:48:08 -0600
Subject: [PATCH 009/277] MAGETWO-85452: QA Activities
- Added conditions for Firefox browser
---
dev/tests/acceptance/tests/_suite/sampleSuite.xml | 1 -
.../Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml | 3 +--
.../Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml | 2 ++
.../Catalog/Section/StorefrontProductInfoMainSection.xml | 1 +
.../Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml | 1 +
...nAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml | 2 +-
.../FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml | 2 +-
7 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dev/tests/acceptance/tests/_suite/sampleSuite.xml b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
index b122c7002f92f..d42f6d00132b9 100644
--- a/dev/tests/acceptance/tests/_suite/sampleSuite.xml
+++ b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
@@ -35,7 +35,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
index 6781c91ffe734..8a8c10b036819 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
@@ -74,8 +74,7 @@
-
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
index 4d453f42f7a59..83d9f8dd086a7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnProductCest.xml
@@ -47,6 +47,7 @@
+
@@ -56,6 +57,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml
index d7382de429340..37381af2fce24 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml
@@ -8,6 +8,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
index f933a58d00123..387f939441fa3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
@@ -92,6 +92,7 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index 0b139b1501713..484cc6e9b536d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -80,7 +80,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
index ba6a1a3847379..50504c51b6d2e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
@@ -54,7 +54,7 @@
-
+
From 6c781b47a6e14aaa52fbda331deb60233c840a7f Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Sun, 7 Jan 2018 15:22:59 -0600
Subject: [PATCH 010/277] MAGETWO-85452: QA Activities
- Added scrollTo on Storefront to recognize elements
---
.../Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml | 4 ++--
...AddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml | 1 -
.../Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml | 1 +
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
index 8a8c10b036819..26fc706daf1d2 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGProductCest.xml
@@ -60,7 +60,7 @@
-
+
@@ -91,7 +91,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index 484cc6e9b536d..1e9f8f3ec128d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -14,7 +14,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
index e45f5314088db..93bd61704fb40 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
@@ -45,6 +45,7 @@
+
From ea2460819ff6575464b2b36afa3f3dc927b2e060 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Mon, 8 Jan 2018 14:57:44 -0600
Subject: [PATCH 011/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Support encoding/decoding of double quote delimiters for parameters on frontend and backend.
---
.../Magento/Catalog/Model/Template/Filter.php | 2 +-
app/code/Magento/Cms/Model/Template/Filter.php | 2 +-
.../Test/Unit/Model/Template/FilterTest.php | 16 ++++++++++++++++
.../Magento/Email/Model/Template/Filter.php | 2 +-
.../Tinymce3/view/base/web/tinymce3Adapter.js | 15 +++++++++------
.../Magento/Widget/Model/Template/Filter.php | 2 +-
.../Test/Unit/Model/Template/FilterTest.php | 18 ++++++++++++++++++
.../Widget/Model/Template/FilterTest.php | 14 ++++++++++++++
.../plugins/magentowidget/editor_plugin.js | 2 +-
.../wysiwyg/tiny_mce/tinymce4Adapter.js | 13 ++++++++-----
10 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php
index b4445510d49e2..1eb30ff95a40b 100644
--- a/app/code/Magento/Catalog/Model/Template/Filter.php
+++ b/app/code/Magento/Catalog/Model/Template/Filter.php
@@ -125,7 +125,7 @@ public function viewDirective($construction)
*/
public function mediaDirective($construction)
{
- $params = $this->getParameters($construction[2]);
+ $params = $this->getParameters(html_entity_decode($construction[2], ENT_QUOTES));
return $this->_storeManager->getStore()
->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $params['url'];
}
diff --git a/app/code/Magento/Cms/Model/Template/Filter.php b/app/code/Magento/Cms/Model/Template/Filter.php
index 2dcbfbc4ab598..f93972bade2af 100644
--- a/app/code/Magento/Cms/Model/Template/Filter.php
+++ b/app/code/Magento/Cms/Model/Template/Filter.php
@@ -37,7 +37,7 @@ public function setUseSessionInUrl($flag)
*/
public function mediaDirective($construction)
{
- $params = $this->getParameters($construction[2]);
+ $params = $this->getParameters(html_entity_decode($construction[2], ENT_QUOTES));
return $this->_storeManager->getStore()->getBaseMediaDir() . '/' . $params['url'];
}
}
diff --git a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
index 009a740305a82..09476f291fb06 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
@@ -62,4 +62,20 @@ public function testMediaDirective()
->willReturn($baseMediaDir);
$this->assertEquals($expectedResult, $this->filter->mediaDirective($construction));
}
+
+ public function testMediaDirectiveWithEncodedQuotes()
+ {
+ $baseMediaDir = 'pub/media';
+ $construction = [
+ '{{media url="wysiwyg/image.jpg"}}',
+ 'media',
+ ' url="wysiwyg/image.jpg"'
+ ];
+ $expectedResult = 'pub/media/wysiwyg/image.jpg';
+
+ $this->storeMock->expects($this->once())
+ ->method('getBaseMediaDir')
+ ->willReturn($baseMediaDir);
+ $this->assertEquals($expectedResult, $this->filter->mediaDirective($construction));
+ }
}
diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php
index 11a7416f79e7a..1d8218f90a0b2 100644
--- a/app/code/Magento/Email/Model/Template/Filter.php
+++ b/app/code/Magento/Email/Model/Template/Filter.php
@@ -516,7 +516,7 @@ public function viewDirective($construction)
*/
public function mediaDirective($construction)
{
- $params = $this->getParameters($construction[2]);
+ $params = $this->getParameters(html_entity_decode($construction[2], ENT_QUOTES));
return $this->_storeManager->getStore()
->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $params['url'];
}
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index 08bbb95888d8d..dfa3626c95ab1 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -448,21 +448,23 @@ define([
},
/**
+ * Convert {{directive}} style attributes syntax to absolute URLs
* @param {Object} content
* @return {*}
*/
encodeDirectives: function (content) {
// collect all HTML tags with attributes that contain directives
- return content.gsub(/<([a-z0-9\-\_]+.+?)([a-z0-9\-\_]+=".*?\{\{.+?\}\}.*?".*?)>/i, function (match) {
- var attributesString = match[2];
+ return content.gsub(/<([a-z0-9\-\_]+[^>]+?)([a-z0-9\-\_]+=".*?\{\{.+?\}\}.*?".*?)>/i, function (match) {
+ var attributesString = match[2],
+ decodedDirectiveString;
// process tag attributes string
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
- return m[1] + '="' + m[2] + this.makeDirectiveUrl(Base64.mageEncode(m[3])) + m[4] + '"';
+ decodedDirectiveString = encodeURIComponent(Base64.mageEncode((m[3].replace(/"/g, '"'))));
+ return m[1] + '="' + m[2] + this.makeDirectiveUrl(decodedDirectiveString) + m[4] + '"';
}.bind(this));
return '<' + match[1] + attributesString + '>';
-
}.bind(this));
},
@@ -493,16 +495,17 @@ define([
},
/**
+ * Convert absolute URLs to {{directive}} style attributes syntax
* @param {Object} content
* @return {*}
*/
decodeDirectives: function (content) {
// escape special chars in directives url to use it in regular expression
var url = this.makeDirectiveUrl('%directive%').replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
- reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9,_-]+)'));
+ reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)'));
return content.gsub(reg, function (match) { //eslint-disable-line no-extra-bind
- return Base64.mageDecode(match[1]);
+ return Base64.mageDecode(decodeURIComponent(match[1])).replace(/"/g, '"');
});
},
diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php
index 7cd8276ffef3d..7c3e8e467e038 100644
--- a/app/code/Magento/Widget/Model/Template/Filter.php
+++ b/app/code/Magento/Widget/Model/Template/Filter.php
@@ -136,7 +136,7 @@ public function widgetDirective($construction)
*/
public function mediaDirective($construction)
{
- $params = $this->getParameters($construction[2]);
+ $params = $this->getParameters(html_entity_decode($construction[2], ENT_QUOTES));
return $this->_storeManager->getStore()
->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $params['url'];
}
diff --git a/app/code/Magento/Widget/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Widget/Test/Unit/Model/Template/FilterTest.php
index a7fccf0bc14ca..db2f468da663c 100644
--- a/app/code/Magento/Widget/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Widget/Test/Unit/Model/Template/FilterTest.php
@@ -270,4 +270,22 @@ public function testMediaDirective()
$result = $this->filter->mediaDirective($construction);
$this->assertEquals($baseUrl . $image, $result);
}
+
+ public function testMediaDirectiveWithEncodedQuotes()
+ {
+ $image = 'wysiwyg/VB.png';
+ $construction = ['{{media url="' . $image . '"}}', 'media', ' url="' . $image . '"'];
+ $baseUrl = 'http://localhost/pub/media/';
+
+ $this->storeMock->expects($this->once())
+ ->method('getBaseUrl')
+ ->with(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA)
+ ->willReturn($baseUrl);
+ $this->storeManagerMock->expects($this->once())
+ ->method('getStore')
+ ->willReturn($this->storeMock);
+
+ $result = $this->filter->mediaDirective($construction);
+ $this->assertEquals($baseUrl . $image, $result);
+ }
}
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Template/FilterTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Template/FilterTest.php
index 095193ca0e764..fc3b0399d0497 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Template/FilterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Template/FilterTest.php
@@ -20,4 +20,18 @@ public function testMediaDirective()
$result = $filter->mediaDirective($construction);
$this->assertEquals($baseUrl . $image, $result);
}
+
+ public function testMediaDirectiveWithEncodedQuotes()
+ {
+ $image = 'wysiwyg/VB.png';
+ $construction = ['{{media url="' . $image . '"}}', 'media', ' url="' . $image . '"'];
+ $baseUrl = 'http://localhost/pub/media/';
+
+ /** @var \Magento\Widget\Model\Template\Filter $filter */
+ $filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+ \Magento\Widget\Model\Template\Filter::class
+ );
+ $result = $filter->mediaDirective($construction);
+ $this->assertEquals($baseUrl . $image, $result);
+ }
}
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
index af8078c0a022d..69b3c3331013e 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
@@ -205,7 +205,7 @@ tinymce.create('tinymce.plugins.magentowidget', {
widgetEl.parentNode.removeChild(widgetEl);
});
- return doc.body.innerHTML;
+ return doc.body ? doc.body.innerHTML : content;
},
/**
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 4139b58a20aec..294709df3c975 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -510,35 +510,38 @@ define([
},
/**
+ * Convert {{directive}} style attributes syntax to absolute URLs
* @param {Object} content
* @return {*}
*/
encodeDirectives: function (content) {
// collect all HTML tags with attributes that contain directives
return content.gsub(/<([a-z0-9\-\_]+[^>]+?)([a-z0-9\-\_]+=".*?\{\{.+?\}\}.*?".*?)>/i, function (match) {
- var attributesString = match[2];
+ var attributesString = match[2],
+ decodedDirectiveString;
// process tag attributes string
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
- return m[1] + '="' + m[2] + this.makeDirectiveUrl(Base64.mageEncode(m[3])) + m[4] + '"';
+ decodedDirectiveString = encodeURIComponent(Base64.mageEncode((m[3].replace(/"/g, '"'))));
+ return m[1] + '="' + m[2] + this.makeDirectiveUrl(decodedDirectiveString) + m[4] + '"';
}.bind(this));
return '<' + match[1] + attributesString + '>';
-
}.bind(this));
},
/**
+ * Convert absolute URLs to {{directive}} style attributes syntax
* @param {Object} content
* @return {*}
*/
decodeDirectives: function (content) {
// escape special chars in directives url to use it in regular expression
var url = this.makeDirectiveUrl('%directive%').replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
- reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9,_-]+)'));
+ reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)'));
return content.gsub(reg, function (match) { //eslint-disable-line no-extra-bind
- return Base64.mageDecode(match[1]);
+ return Base64.mageDecode(decodeURIComponent(match[1])).replace(/"/g, '"');
});
},
From 70108d6c58a40710c0bb6119bbc7eb37ad5a7129 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Mon, 8 Jan 2018 16:27:45 -0600
Subject: [PATCH 012/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Fix JS static build failures
---
app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js | 3 ++-
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index dfa3626c95ab1..91dcc07adf01b 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -460,7 +460,8 @@ define([
// process tag attributes string
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
- decodedDirectiveString = encodeURIComponent(Base64.mageEncode((m[3].replace(/"/g, '"'))));
+ decodedDirectiveString = encodeURIComponent(Base64.mageEncode(m[3].replace(/"/g, '"')));
+
return m[1] + '="' + m[2] + this.makeDirectiveUrl(decodedDirectiveString) + m[4] + '"';
}.bind(this));
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 294709df3c975..b73fa5609d735 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -522,7 +522,8 @@ define([
// process tag attributes string
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
- decodedDirectiveString = encodeURIComponent(Base64.mageEncode((m[3].replace(/"/g, '"'))));
+ decodedDirectiveString = encodeURIComponent(Base64.mageEncode(m[3].replace(/"/g, '"')));
+
return m[1] + '="' + m[2] + this.makeDirectiveUrl(decodedDirectiveString) + m[4] + '"';
}.bind(this));
From b878cffa5be248555ac02ddb144bc3c4a9249a0d Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Tue, 9 Jan 2018 12:08:50 -0600
Subject: [PATCH 013/277] MAGETWO-85421: Build Stabilization
- fix javascript formatting
---
.../Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 30d90be661d34..5463e80c43946 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
@@ -12,7 +12,7 @@ define([
'underscore',
'ko',
'./abstract',
- 'Magento_Variable/variables',
+ 'Magento_Variable/variables'
], function (wysiwyg, $, _, ko, Abstract) {
'use strict';
@@ -92,14 +92,14 @@ define([
* @param {Boolean} status
*/
setDisabled: function (status) {
- if (this.$wysiwygEditorButton != '') {
+ if (this.$wysiwygEditorButton !== '') {
this.$wysiwygEditorButton.attr('disabled', status);
}
/* eslint-disable no-undef */
- if (typeof wysiwyg != 'undefined' && wysiwyg.activeEditor()) {
+ if (typeof wysiwyg !== 'undefined' && wysiwyg.activeEditor()) {
- if(typeof wysiwyg.activeEditor().controlManager !== 'undefined') {
+ if (typeof wysiwyg.activeEditor().controlManager !== 'undefined') {
_.each(wysiwyg.activeEditor().controlManager.controls, function (property, index, controls) {
controls[property.id].setDisabled(status);
});
From 076d5810ca25352f302158ddd572d77ff76801f5 Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Wed, 10 Jan 2018 01:14:19 -0600
Subject: [PATCH 014/277] MAGETWO-85452: QA Activities
- Organize TinyMCE tests
---
.../Cms/Section/TinyMCESection.xml | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
new file mode 100644
index 0000000000000..cf4e21fe5e702
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From f29209b982d4610faaf779f94e631d0a0db220e2 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Wed, 10 Jan 2018 08:08:25 -0600
Subject: [PATCH 015/277] MAGETWO-85007: Add Content Section
- fix after CR
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 5463e80c43946..8662071c2b2b6 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
@@ -92,7 +92,7 @@ define([
* @param {Boolean} status
*/
setDisabled: function (status) {
- if (this.$wysiwygEditorButton !== '') {
+ if (this.$wysiwygEditorButton) {
this.$wysiwygEditorButton.attr('disabled', status);
}
From 41d40673b55697cdb69228e603c79f495fb237f5 Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Wed, 10 Jan 2018 09:26:54 -0600
Subject: [PATCH 016/277] MAGETWO-85452: QA Activities
- Updated TinyMCE Section
---
.../Magento/FunctionalTest/Cms/Section/TinyMCESection.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
index cf4e21fe5e702..df8e2bee8ec05 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
@@ -9,10 +9,11 @@
+
-
-
+
+
@@ -21,6 +22,7 @@
+
@@ -47,7 +49,6 @@
-
From 54a038d21e2a4a229734fb9ca72792e9b25eaf45 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 10 Jan 2018 10:55:12 -0600
Subject: [PATCH 017/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Fix JS static build failures
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 2 +-
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
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 107761e714ce5..713edc393470b 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
@@ -12,7 +12,7 @@ define([
'underscore',
'ko',
'./abstract',
- 'Magento_Variable/variables',
+ 'Magento_Variable/variables'
], function (wysiwyg, $, _, ko, Abstract) {
'use strict';
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 164fc11cf4f1e..b1032b81d02fb 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -133,6 +133,7 @@ define([
*/
setToolbarStatus: function (enabled) {
var controlIds = this.get(this.getId()).theme.panel.rootControl.controlIdLookup;
+
_.each(controlIds, function (controlId) {
controlId.disabled(!enabled);
});
From b67b0d58728ca02346c115926354daeeff65315d Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Wed, 10 Jan 2018 16:20:26 -0600
Subject: [PATCH 018/277] MAGETWO-85452: QA Activities Redesign TinyMCE section
and Media Gallery section
---
.../AdminAddImageToWYSIWYGCatalogCest.xml | 39 +--------
...yTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml | 15 +---
.../VerifyMediaGalleryActionGroup.xml | 13 +++
.../ActionGroup/VerifyTinyMCEActionGroup.xml | 31 +++++++
.../Cest/AdminAddImageToWYSIWYGBlockCest.xml | 56 ++++++-------
.../AdminAddVariableToWYSIWYGBlockCest.xml | 12 +--
.../Cest/AdminAddWidgetToWYSIWYGBlockCest.xml | 4 +-
...ifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml | 30 ++-----
...yTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml | 18 +---
.../Section/BlockNewPageContentSection.xml | 39 ---------
.../Section/CmsNewPagePageContentSection.xml | 53 ------------
.../Cms/Section/TinyMCESection.xml | 83 +++++++++++++++----
...nyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml | 20 +----
13 files changed, 163 insertions(+), 250 deletions(-)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyMediaGalleryActionGroup.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
index a217085ed227a..0031093405d23 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminAddImageToWYSIWYGCatalogCest.xml
@@ -34,44 +34,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
index e21b0f47f5d2c..6eeac0388971d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogCest.xml
@@ -38,20 +38,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyMediaGalleryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyMediaGalleryActionGroup.xml
new file mode 100644
index 0000000000000..6785f691fd385
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyMediaGalleryActionGroup.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml
new file mode 100644
index 0000000000000..a5f47667c9d80
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
index 5e603a761ca7b..0407e5421d9e3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
@@ -33,47 +33,47 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
index 8ebfae731d64c..b14e0bd2711f3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
@@ -42,9 +42,9 @@
-
-
-
+
+
+
@@ -62,7 +62,7 @@
-
+
@@ -78,8 +78,8 @@
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
index 07240974758a3..c221c9c46194d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -33,8 +33,8 @@
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
index f2381eb347164..05032947ec2b7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
@@ -35,29 +35,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
@@ -65,8 +51,6 @@
-
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
index cde0e5360e796..143e7d5c70eb2 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
@@ -36,22 +36,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockNewPageContentSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockNewPageContentSection.xml
index 3053688a0c7b6..90c82a12a67da 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockNewPageContentSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockNewPageContentSection.xml
@@ -9,45 +9,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
index 1d189754b2fdf..7b3b10b78ed6e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
@@ -56,57 +56,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
index df8e2bee8ec05..398dbf3cfd668 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml
@@ -9,29 +9,16 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -45,10 +32,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
index c5cd17bd2c2f1..5f0d48d0ee2d6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
@@ -11,7 +11,7 @@
-
+
@@ -35,22 +35,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
From 6c24c0e765f93afcba74a0085362b7abd46f6665 Mon Sep 17 00:00:00 2001
From: Anton Evers
Date: Mon, 11 Dec 2017 13:11:02 +0100
Subject: [PATCH 019/277] Ranged selects always miss the last range
Fix unit test. 11 batches expected to handle 105 items:
1: 1-10
2: 11-20
3: 21-30
4: 31-40
5: 41-50
6: 51-60
7: 61-70
8: 71-80
9: 81-90
10: 91-100
11: 101-105
---
.../Magento/Framework/DB/Query/BatchRangeIterator.php | 4 ++--
.../Framework/Test/Unit/DB/Query/BatchRangeIteratorTest.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php b/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
index 9871df1b16841..5176c85cfa702 100644
--- a/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
+++ b/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
@@ -113,7 +113,7 @@ public function __construct(
public function current()
{
if (null === $this->currentSelect) {
- $this->isValid = ($this->currentOffset + $this->batchSize) <= $this->totalItemCount;
+ $this->isValid = $this->currentOffset < $this->totalItemCount;
$this->currentSelect = $this->initSelectObject();
}
return $this->currentSelect;
@@ -144,7 +144,7 @@ public function next()
if (null === $this->currentSelect) {
$this->current();
}
- $this->isValid = ($this->batchSize + $this->currentOffset) <= $this->totalItemCount;
+ $this->isValid = $this->currentOffset < $this->totalItemCount;
$select = $this->initSelectObject();
if ($this->isValid) {
$this->iteration++;
diff --git a/lib/internal/Magento/Framework/Test/Unit/DB/Query/BatchRangeIteratorTest.php b/lib/internal/Magento/Framework/Test/Unit/DB/Query/BatchRangeIteratorTest.php
index 22fdf0a05686a..9e2014c1b070a 100644
--- a/lib/internal/Magento/Framework/Test/Unit/DB/Query/BatchRangeIteratorTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/DB/Query/BatchRangeIteratorTest.php
@@ -116,6 +116,6 @@ public function testIterations()
$iterations++;
}
- $this->assertEquals(10, $iterations);
+ $this->assertEquals(11, $iterations);
}
}
From f0358bddde42a981fc807f9bccb10d8701489787 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 08:24:47 -0600
Subject: [PATCH 020/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Remove eslint-disable and use underscore's _.isUndefined
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 713edc393470b..c6dd3e5f7c0bd 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
@@ -96,8 +96,7 @@ define([
this.$wysiwygEditorButton.attr('disabled', disabled);
}
- /* eslint-disable no-undef */
- if (typeof wysiwyg !== 'undefined') {
+ if (!_.isUndefined(wysiwyg)) {
if (disabled) {
wysiwyg.setToolbarStatus(false);
wysiwyg.getPluginButtons().attr('disabled', 'disabled');
From 37640341be562ce7160afaca0afb68aaa58c8c31 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 08:25:16 -0600
Subject: [PATCH 021/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Remove stray redundant eslint-enable
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 1 -
1 file changed, 1 deletion(-)
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 c6dd3e5f7c0bd..050334e43e466 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
@@ -107,7 +107,6 @@ define([
wysiwyg.getTextArea().removeAttr('disabled');
}
}
- /* eslint-enable no-undef*/
}
});
});
\ No newline at end of file
From 88418ad4bda29dc91bffabdf4f3129dfe9e687fb Mon Sep 17 00:00:00 2001
From: Ievgen Sentiabov
Date: Thu, 11 Jan 2018 16:51:45 +0200
Subject: [PATCH 022/277] Removed "Object" usage as class name
---
.../Framework/Code/Reader/SourceArgumentsReaderTest.php | 4 ++--
.../Code/Reader/_files/SourceArgumentsReaderTest.php.sample | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/SourceArgumentsReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/SourceArgumentsReaderTest.php
index 2f7f040d82c24..d1b22e853ce1d 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/SourceArgumentsReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/SourceArgumentsReaderTest.php
@@ -41,8 +41,8 @@ public function getConstructorArgumentTypesDataProvider()
'\Imported\Name\Space\One',
'\Imported\Name\Space\AnotherTest\Extended',
'\Imported\Name\Space\Test',
- '\Imported\Name\Space\Object\Under\Test',
- '\Imported\Name\Space\Object',
+ '\Imported\Name\Space\ClassName\Under\Test',
+ '\Imported\Name\Space\ClassName',
'\Some\Testing\Name\Space\Test',
'array',
''
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/_files/SourceArgumentsReaderTest.php.sample b/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/_files/SourceArgumentsReaderTest.php.sample
index 8bf978150d003..47c059de2034b 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/_files/SourceArgumentsReaderTest.php.sample
+++ b/dev/tests/integration/testsuite/Magento/Framework/Code/Reader/_files/SourceArgumentsReaderTest.php.sample
@@ -6,7 +6,7 @@
namespace Some\Testing\Name\Space;
use Imported\Name\Space\One as FirstImport;
-use Imported\Name\Space\Object;
+use Imported\Name\Space\ClassName;
use Imported\Name\Space\Test as Testing, \Imported\Name\Space\AnotherTest ;
class AnotherSimpleClass
@@ -16,8 +16,8 @@ class AnotherSimpleClass
FirstImport $itemTwo,
AnotherTest\Extended $itemThree,
Testing $itemFour,
- Object\Under\Test $itemFive,
- Object $itemSix,
+ ClassName\Under\Test $itemFive,
+ ClassName $itemSix,
Test $itemSeven,
array $itemEight = [],
$itemNine = 'test'
From 76e50e36e5d896c1718695aab6d4e217ac26313f Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Thu, 11 Jan 2018 09:35:20 -0600
Subject: [PATCH 023/277] MAGETWO-85452: QA Activities
- Move general sections out of CMS section to have access from other TESTs
---
.../Cest/AdminAddImageToWYSIWYGBlockCest.xml | 6 +--
.../Cest/AdminAddImageToWYSIWYGCMSCest.xml | 52 +++++++++---------
.../AdminAddVariableToWYSIWYGBlockCest.xml | 6 +--
.../Cest/AdminAddVariableToWYSIWYGCMSCest.xml | 8 +--
.../Cest/AdminAddWidgetToWYSIWYGBlockCest.xml | 6 +--
...WidgetToWYSIWYGWithCMSPageLinkTypeCest.xml | 6 +--
...getToWYSIWYGWithCMSStaticBlockTypeCest.xml | 6 +--
...WYSIWYGWithCatalogCategoryLinkTypeCest.xml | 6 +--
...oWYSIWYGWithCatalogProductLinkTypeCest.xml | 6 +--
...oWYSIWYGWithCatalogProductListTypeCest.xml | 6 +--
...YGWithRecentlyComparedProductsTypeCest.xml | 6 +--
...IWYGWithRecentlyViewedProductsTypeCest.xml | 6 +--
.../Cest/AdminSwitchWYSIWYGOptionsCest.xml | 8 +--
...yTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml | 2 +-
.../Section/CmsNewPagePageContentSection.xml | 36 -------------
.../AdminAddImageToWYSIWYGNewsletterCest.xml | 54 +++++++++----------
.../AdminAddWidgetToWYSIWYGNewsletterCest.xml | 2 +-
...nyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml | 2 +-
18 files changed, 94 insertions(+), 130 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
index 0407e5421d9e3..66007231a8588 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGBlockCest.xml
@@ -87,9 +87,9 @@
-
-
-
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
index f3065163d778e..f0db340b6588c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddImageToWYSIWYGCMSCest.xml
@@ -31,44 +31,44 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
index b14e0bd2711f3..d543b77fc03c7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGBlockCest.xml
@@ -92,9 +92,9 @@
-
-
-
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
index 387f939441fa3..7336ed648ca82 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddVariableToWYSIWYGCMSCest.xml
@@ -41,10 +41,10 @@
-
+
-
-
+
+
@@ -61,7 +61,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
index c221c9c46194d..daf91b2f53cd0 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -60,9 +60,9 @@
-
-
-
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
index 1814c3f038794..3d1de1a70a7c5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeCest.xml
@@ -33,10 +33,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
index f14330ce207e8..c4a31f5797334 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeCest.xml
@@ -34,10 +34,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
index 04b0b968cfc03..872d374810d82 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeCest.xml
@@ -33,10 +33,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
index 5fa3c07e53e3e..73b20b1324fbf 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeCest.xml
@@ -37,10 +37,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
index 108ee114a7ec4..f2254a4e1bc0f 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeCest.xml
@@ -39,10 +39,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index 1e9f8f3ec128d..d344ffa725480 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -36,10 +36,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
index 670a0ecc35898..02dceb9ead976 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeCest.xml
@@ -37,10 +37,10 @@
-
+
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
index 50504c51b6d2e..774d08b21dee6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminSwitchWYSIWYGOptionsCest.xml
@@ -39,8 +39,8 @@
-
-
+
+
@@ -65,8 +65,8 @@
-
-
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
index 143e7d5c70eb2..f643b3141181b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageCest.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
index 7b3b10b78ed6e..3388a0cf7c741 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml
@@ -15,45 +15,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
index e238228ff6846..4277c16138aa0 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddImageToWYSIWYGNewsletterCest.xml
@@ -34,45 +34,45 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
index 93bd61704fb40..3e38d4712a82c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/AdminAddWidgetToWYSIWYGNewsletterCest.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
index 5f0d48d0ee2d6..2dcc47b5afc55 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Cest/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterCest.xml
@@ -34,7 +34,7 @@
-
+
From 3be2328adb0970bee9e5bf4ef26451b26939863e Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 12:56:57 -0600
Subject: [PATCH 024/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Fix editor editability
---
.../Tinymce3/view/base/web/tinymce3Adapter.js | 20 +++++++++++++++++
.../view/base/web/js/form/element/wysiwyg.js | 15 +++++++++----
.../wysiwyg/tiny_mce/tinymce4Adapter.js | 22 +++++++++++++++++++
3 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index b5c74af6c3dd3..d406f995b501a 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -132,6 +132,10 @@ define([
ed.onInit.add(self.onEditorInit.bind(self));
+ ed.onInit.add(function (editor) {
+ varienGlobalEvents.fireEvent('wysiwygEditorInitialized', editor);
+ });
+
ed.onSubmit.add(function (edi, e) {
varienGlobalEvents.fireEvent('tinymceSubmit', e);
});
@@ -278,6 +282,22 @@ define([
});
},
+ /**
+ * Set the status of the editor and toolbar
+ */
+ setEditorStatus: function (enabled) {
+ if (this.activeEditor()) {
+ this.get(this.getId()).getBody().setAttribute('contenteditable', enabled);
+ this.setToolbarStatus(enabled);
+ }
+
+ if (enabled) {
+ this.getTextArea().removeAttr('disabled');
+ } else {
+ this.getTextArea().attr('disabled', 'disabled');
+ }
+ },
+
/**
* Set caret location in WYSIWYG editor.
*
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 050334e43e466..9fe075925ae17 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
@@ -3,6 +3,8 @@
* See COPYING.txt for license details.
*/
+/* global varienGlobalEvents */
+
/**
* @api
*/
@@ -49,6 +51,13 @@ define([
this.$wysiwygEditorButton = $(element);
}.bind(this));
+ // disable editor completely after initialization is field is disabled
+ varienGlobalEvents.attachEventHandler('wysiwygEditorInitialized', function () {
+ if (this.disabled()) {
+ this.setDisabled(true);
+ }
+ }.bind(this));
+
return this;
},
@@ -98,13 +107,11 @@ define([
if (!_.isUndefined(wysiwyg)) {
if (disabled) {
- wysiwyg.setToolbarStatus(false);
+ wysiwyg.setEditorStatus(false);
wysiwyg.getPluginButtons().attr('disabled', 'disabled');
- wysiwyg.getTextArea().attr('disabled', 'disabled');
} else {
- wysiwyg.setToolbarStatus(true);
+ wysiwyg.setEditorStatus(true);
wysiwyg.getPluginButtons().removeAttr('disabled');
- wysiwyg.getTextArea().removeAttr('disabled');
}
}
}
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index b1032b81d02fb..79154ac740bde 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -101,6 +101,12 @@ define([
settings = this.getSettings();
settings.mode = mode;
+ settings.setup = function (editor) {
+ editor.on('init', function (args) {
+ varienGlobalEvents.fireEvent('wysiwygEditorInitialized', args.target);
+ });
+ };
+
tinyMCE4.init(settings);
this.getPluginButtons().hide();
},
@@ -524,6 +530,22 @@ define([
return jQuery('#' + this.getId());
},
+ /**
+ * Set the status of the editor and toolbar
+ */
+ setEditorStatus: function (enabled) {
+ if (this.activeEditor()) {
+ this.get(this.getId()).getBody().setAttribute('contenteditable', enabled);
+ this.setToolbarStatus(enabled);
+ }
+
+ if (enabled) {
+ this.getTextArea().removeAttr('disabled');
+ } else {
+ this.getTextArea().attr('disabled', 'disabled');
+ }
+ },
+
/**
* Retrieve directives URL with substituted directive value.
*
From a76268e31f0bffd8c4b71a2a63efeb5e3fdb2f18 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 12:59:36 -0600
Subject: [PATCH 025/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Operate on activeEditor
---
app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js | 2 +-
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index d406f995b501a..a1cc9c1ca8841 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -287,7 +287,7 @@ define([
*/
setEditorStatus: function (enabled) {
if (this.activeEditor()) {
- this.get(this.getId()).getBody().setAttribute('contenteditable', enabled);
+ this.activeEditor().getBody().setAttribute('contenteditable', enabled);
this.setToolbarStatus(enabled);
}
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 79154ac740bde..c4ec062165e87 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -535,7 +535,7 @@ define([
*/
setEditorStatus: function (enabled) {
if (this.activeEditor()) {
- this.get(this.getId()).getBody().setAttribute('contenteditable', enabled);
+ this.activeEditor().getBody().setAttribute('contenteditable', enabled);
this.setToolbarStatus(enabled);
}
From d4bab7a8df5fe819e75c21df25a1b5903767fe22 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 13:29:35 -0600
Subject: [PATCH 026/277] MAGETWO-86142: Image url not encoding/decoding
correctly
HTML-encode directive on backend when asIs is true
---
app/code/Magento/Cms/Helper/Wysiwyg/Images.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index f830910ca1e4f..4c24e90ba2501 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -171,7 +171,8 @@ public function getImageHtmlDeclaration($filename, $renderAsTag = false)
$mediaPath = str_replace($mediaUrl, '', $fileurl);
$directive = sprintf('{{media url="%s"}}', $mediaPath);
if ($renderAsTag) {
- $html = sprintf('
', $this->isUsingStaticUrlsAllowed() ? $fileurl : $directive);
+ $src = $this->isUsingStaticUrlsAllowed() ? $fileurl : htmlentities($directive, ENT_QUOTES);
+ $html = sprintf('
', $src);
} else {
if ($this->isUsingStaticUrlsAllowed()) {
$html = $fileurl; // $mediaPath;
From 92913c5eab28879eaf5f69ecf1c3efe016df56e4 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 11 Jan 2018 13:32:02 -0600
Subject: [PATCH 027/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Fix test
---
app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
index 1fcc10609870a..e873ba3296257 100644
--- a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
@@ -426,7 +426,7 @@ public function providerGetImageHtmlDeclarationRenderingAsTag()
{
return [
['http://localhost', 'test.png', true, '
'],
- ['http://localhost', 'test.png', false, '
']
+ ['http://localhost', 'test.png', false, '
']
];
}
From 47c497fb44ee487a4a6334c15d839afd5025b7c6 Mon Sep 17 00:00:00 2001
From: Patrick McLain
Date: Thu, 11 Jan 2018 16:38:15 -0500
Subject: [PATCH 028/277] Log file path when image open throws exception
---
lib/internal/Magento/Framework/Image/Adapter/Gd2.php | 5 ++++-
lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
index 444ab7113d429..365fa5939b6b5 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
@@ -62,7 +62,10 @@ public function open($filename)
throw new \OverflowException('Memory limit has been reached.');
}
$this->imageDestroy();
- $this->_imageHandler = call_user_func($this->_getCallback('create'), $this->_fileName);
+ $this->_imageHandler = call_user_func(
+ $this->_getCallback('create', null, sprintf('Unsupported image format. File: %s', $this->_fileName)),
+ $this->_fileName
+ );
}
/**
diff --git a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
index 50b9a5a013273..e0ead031a9ba0 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
@@ -77,7 +77,7 @@ public function open($filename)
try {
$this->_imageHandler = new \Imagick($this->_fileName);
} catch (\ImagickException $e) {
- throw new \Exception('Unsupported image format.', $e->getCode(), $e);
+ throw new \Exception(sprintf('Unsupported image format. File: %s', $this->_fileName), $e->getCode(), $e);
}
$this->backgroundColor();
From 100e12331e0887aba4845c417ee2d3a3b1ab3c36 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Tue, 16 Jan 2018 14:36:20 +0000
Subject: [PATCH 029/277] magento-engcom/import-export-improvements#42: create
an image type processor to enable more modular testing
---
.../Model/Import/Product.php | 14 +++++++++++-
.../Import/Product/ImageTypeProcessor.php | 17 ++++++++++++++
.../Import/Product/ImageTypeProcessorTest.php | 20 +++++++++++++++++
.../Test/Unit/Model/Import/ProductTest.php | 22 +++++++++++++++++--
4 files changed, 70 insertions(+), 3 deletions(-)
create mode 100644 app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
create mode 100644 app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ImageTypeProcessorTest.php
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index ea46a14f5d466..3b307e2db9ab4 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -6,6 +6,7 @@
namespace Magento\CatalogImportExport\Model\Import;
use Magento\Catalog\Model\Product\Visibility;
+use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\ObjectManager;
@@ -699,6 +700,11 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
*/
private $catalogConfig;
+ /**
+ * @var ImageTypeProcessor
+ */
+ private $imageTypeProcessor;
+
/**
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
* @param \Magento\ImportExport\Helper\Data $importExportData
@@ -738,6 +744,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
* @param array $data
* @param array $dateAttrCodes
* @param CatalogConfig $catalogConfig
+ * @param ImageTypeProcessor $imageTypeProcessor
* @throws \Magento\Framework\Exception\LocalizedException
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -781,7 +788,8 @@ public function __construct(
\Magento\Catalog\Model\Product\Url $productUrl,
array $data = [],
array $dateAttrCodes = [],
- CatalogConfig $catalogConfig = null
+ CatalogConfig $catalogConfig = null,
+ ImageTypeProcessor $imageTypeProcessor = null
) {
$this->_eventManager = $eventManager;
$this->stockRegistry = $stockRegistry;
@@ -814,6 +822,8 @@ public function __construct(
$this->dateAttrCodes = array_merge($this->dateAttrCodes, $dateAttrCodes);
$this->catalogConfig = $catalogConfig ?: \Magento\Framework\App\ObjectManager::getInstance()
->get(CatalogConfig::class);
+ $this->imageTypeProcessor = $imageTypeProcessor ?: \Magento\Framework\App\ObjectManager::getInstance()
+ ->get(ImageTypeProcessor::class);
parent::__construct(
$jsonHelper,
@@ -1084,6 +1094,8 @@ protected function _initSkus()
*/
protected function _initImagesArrayKeys()
{
+ $this->_imagesArrayKeys = $this->imageTypeProcessor->getImageTypes();
+ return $this;
$select = $this->_connection->select()->from(
$this->getResource()->getTable('eav_attribute'),
['code' => 'attribute_code']
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
new file mode 100644
index 0000000000000..435592226f030
--- /dev/null
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
@@ -0,0 +1,17 @@
+assertEquals(
+ ['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image'],
+ $typeProcessor->getImageTypes()
+ );
+ }
+}
diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php
index 862276d35bac5..5ab3f96b8882d 100644
--- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php
+++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php
@@ -5,6 +5,7 @@
*/
namespace Magento\CatalogImportExport\Test\Unit\Model\Import;
+use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Stdlib\DateTime;
use Magento\ImportExport\Model\Import;
@@ -159,6 +160,9 @@ class ProductTest extends \Magento\ImportExport\Test\Unit\Model\Import\AbstractI
/** @var \Magento\Catalog\Model\Product\Url|\PHPUnit_Framework_MockObject_MockObject*/
protected $productUrl;
+ /** @var ImageTypeProcessor|\PHPUnit_Framework_MockObject_MockObject */
+ protected $imageTypeProcessor;
+
/**
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
@@ -326,11 +330,16 @@ protected function setUp()
$this->data = [];
+ $this->imageTypeProcessor = $this->getMockBuilder(ImageTypeProcessor::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
$this->_objectConstructor()
->_parentObjectConstructor()
->_initAttributeSets()
->_initTypeModels()
- ->_initSkus();
+ ->_initSkus()
+ ->_initImagesArrayKeys();
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -373,7 +382,8 @@ protected function setUp()
'taxClassProcessor' => $this->taxClassProcessor,
'scopeConfig' => $this->scopeConfig,
'productUrl' => $this->productUrl,
- 'data' => $this->data
+ 'data' => $this->data,
+ 'imageTypeProcessor' => $this->imageTypeProcessor
]
);
$reflection = new \ReflectionClass(\Magento\CatalogImportExport\Model\Import\Product::class);
@@ -496,6 +506,14 @@ protected function _initSkus()
return $this;
}
+ protected function _initImagesArrayKeys()
+ {
+ $this->imageTypeProcessor->expects($this->once())->method('getImageTypes')->willReturn(
+ ['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image']
+ );
+ return $this;
+ }
+
public function testSaveProductAttributes()
{
$testTable = 'test_table';
From 36a053f2b3fc6016e7089f6947c670204b46ba43 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Tue, 16 Jan 2018 14:56:21 +0000
Subject: [PATCH 030/277] magento-engcom/import-export-improvements#42:
refactor the ImageTypeProcessor so that it will actually use the database to
load the image information
---
.../Model/Import/Product.php | 12 ------
.../Import/Product/ImageTypeProcessor.php | 36 +++++++++++++++-
.../Import/Product/ImageTypeProcessorTest.php | 41 ++++++++++++++++++-
3 files changed, 75 insertions(+), 14 deletions(-)
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index 3b307e2db9ab4..eb909a4dfe8bd 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -1096,18 +1096,6 @@ protected function _initImagesArrayKeys()
{
$this->_imagesArrayKeys = $this->imageTypeProcessor->getImageTypes();
return $this;
- $select = $this->_connection->select()->from(
- $this->getResource()->getTable('eav_attribute'),
- ['code' => 'attribute_code']
- )->where(
- 'frontend_input = :frontend_input'
- );
- $bind = [':frontend_input' => 'media_image'];
-
- $this->_imagesArrayKeys = $this->_connection->fetchCol($select, $bind);
- $this->_imagesArrayKeys[] = '_media_image';
-
- return $this;
}
/**
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
index 435592226f030..ee5e18488d55c 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/ImageTypeProcessor.php
@@ -5,13 +5,47 @@
*/
namespace Magento\CatalogImportExport\Model\Import\Product;
+use Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModel;
+
class ImageTypeProcessor
{
+ /**
+ * @var \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory
+ */
+ private $resourceFactory;
+
+ /**
+ * @param \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory
+ */
+ public function __construct(
+ \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory
+ )
+ {
+ $this->resourceFactory = $resourceFactory;
+ }
+
/**
* @return array
*/
public function getImageTypes()
{
- return ['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image'];
+ $imageKeys = [];
+ /** @var ResourceModel $resource */
+ $resource = $this->resourceFactory->create();
+ $connection = $resource->getConnection();
+ $select = $connection->select();
+ $select->from(
+ $resource->getTable('eav_attribute'),
+ ['code' => 'attribute_code']
+ );
+ $select->where(
+ 'frontend_input = :frontend_input'
+ );
+ $bind = [':frontend_input' => 'media_image'];
+
+ $imageKeys = $connection->fetchCol($select, $bind);
+ $imageKeys[] = '_media_image';
+
+ return $imageKeys;
}
}
diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ImageTypeProcessorTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ImageTypeProcessorTest.php
index 6d76fbccccff0..fccfedd74fad2 100644
--- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ImageTypeProcessorTest.php
+++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ImageTypeProcessorTest.php
@@ -11,7 +11,46 @@ class ImageTypeProcessorTest extends \PHPUnit\Framework\TestCase
{
public function testGetImageTypes()
{
- $typeProcessor = new ImageTypeProcessor();
+ $resourceFactory = $this->createPartialMock(
+ \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory::class,
+ ['create']
+ );
+
+ $resource = $this->getMockBuilder(\Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModel::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['getTable', 'getConnection'])
+ ->getMock();
+ $resource->expects($this->once())
+ ->method('getTable')
+ ->with('eav_attribute')
+ ->willReturnArgument(0);
+ $connection = $this->createMock(\Magento\Framework\DB\Adapter\AdapterInterface::class);
+ $resource->expects($this->any())
+ ->method('getConnection')
+ ->willReturn($connection);
+ $resourceFactory->expects($this->once())
+ ->method('create')
+ ->willReturn($resource);
+
+ $selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $selectMock->expects($this->once())
+ ->method('from')
+ ->with('eav_attribute', ['code' => 'attribute_code'], null)
+ ->willReturnSelf();
+ $selectMock->expects($this->once())
+ ->method('where')
+ ->with('frontend_input = :frontend_input')
+ ->willReturnSelf();
+ $connection->expects($this->any())
+ ->method('fetchCol')
+ ->willReturn(['image', 'small_image', 'thumbnail', 'swatch_image']);
+ $connection->expects($this->any())
+ ->method('select')
+ ->willReturn($selectMock);
+
+ $typeProcessor = new ImageTypeProcessor($resourceFactory);
$this->assertEquals(
['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image'],
$typeProcessor->getImageTypes()
From 2bbf5e0fc5a5235ccdeb8fc50428b37705d0cc11 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Tue, 16 Jan 2018 14:58:58 +0000
Subject: [PATCH 031/277] magento-engcom/import-export-improvements#42:
refactor the initImagesArrayKeys to be private and remove the _ in the name
---
app/code/Magento/CatalogImportExport/Model/Import/Product.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index eb909a4dfe8bd..fc9b13e97a8ec 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -844,7 +844,7 @@ public function __construct(
$this->_initAttributeSets()
->_initTypeModels()
->_initSkus()
- ->_initImagesArrayKeys();
+ ->initImagesArrayKeys();
$this->validator->init($this);
}
@@ -1092,7 +1092,7 @@ protected function _initSkus()
*
* @return $this
*/
- protected function _initImagesArrayKeys()
+ private function initImagesArrayKeys()
{
$this->_imagesArrayKeys = $this->imageTypeProcessor->getImageTypes();
return $this;
From 80b56d33c067073aa04f00bf035272b4747b2e8f Mon Sep 17 00:00:00 2001
From: Cari Spruiell
Date: Tue, 16 Jan 2018 11:01:04 -0600
Subject: [PATCH 032/277] MAGETWO-85423: Create or update functional tests
- add new store view action group
---
.../AdminCreateStoreViewActionGroup.xml | 24 +++++++++++++
.../Store/Cest/AdminCreateStoreViewCest.xml | 34 +++++++++++++++++++
.../Store/Page/AdminSystemStoreViewPage.xml | 13 +++++++
.../AdminNewStoreViewActionsSection.xml | 14 ++++++++
4 files changed, 85 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Cest/AdminCreateStoreViewCest.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
new file mode 100644
index 0000000000000..4ade252788a5b
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Cest/AdminCreateStoreViewCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Cest/AdminCreateStoreViewCest.xml
new file mode 100644
index 0000000000000..c540de62d670c
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Cest/AdminCreateStoreViewCest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
new file mode 100644
index 0000000000000..f44ed06277617
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml
new file mode 100644
index 0000000000000..5c2a04b034e5a
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
From e69be2804b5bcdbf7f8559daec3883a31ee71115 Mon Sep 17 00:00:00 2001
From: Roman Ganin
Date: Tue, 16 Jan 2018 19:01:55 +0200
Subject: [PATCH 033/277] MAGETWO-86754: Variable icon still gets selected
after deleting variable from WYSIWYG content area
---
.../plugins/magentovariable/editor_plugin.js | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
index d96ab6dcc5353..fabb672ee724f 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
@@ -56,15 +56,22 @@ tinymce.create('tinymce.plugins.magentovariable', {
* Highlight or dismiss Insert Variable button when variable is selected or deselected.
*/
onPostRender: function () {
- var _this = this;
-
- editor.on('click', function (e) {
- _this.active(false);
-
- if (jQuery(e.target).hasClass('magento-variable')) {
- _this.active(true);
- }
- });
+ var _this = this,
+ /**
+ * Toggle active state of Insert Variable button.
+ *
+ * @param {Object} e
+ */
+ toggleVariableButton = function (e) {
+ _this.active(false);
+
+ if (jQuery(e.target).hasClass('magento-variable')) {
+ _this.active(true);
+ }
+ };
+
+ editor.on('click', toggleVariableButton);
+ editor.on('change', toggleVariableButton);
}
});
From 90465e09931afe43cfa8a44e7b1f5d5b70d428cb Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Tue, 16 Jan 2018 14:03:11 -0600
Subject: [PATCH 034/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Rename encode_directives to add_directives in default config file
---
app/code/Magento/Cms/Helper/Wysiwyg/Images.php | 8 ++++----
app/code/Magento/Cms/Model/Wysiwyg/Config.php | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index 4c24e90ba2501..012b8c04c1153 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -166,16 +166,16 @@ public function isUsingStaticUrlsAllowed()
*/
public function getImageHtmlDeclaration($filename, $renderAsTag = false)
{
- $fileurl = $this->getCurrentUrl() . $filename;
+ $fileUrl = $this->getCurrentUrl() . $filename;
$mediaUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
- $mediaPath = str_replace($mediaUrl, '', $fileurl);
+ $mediaPath = str_replace($mediaUrl, '', $fileUrl);
$directive = sprintf('{{media url="%s"}}', $mediaPath);
if ($renderAsTag) {
- $src = $this->isUsingStaticUrlsAllowed() ? $fileurl : htmlentities($directive, ENT_QUOTES);
+ $src = $this->isUsingStaticUrlsAllowed() ? $fileUrl : htmlentities($directive, ENT_QUOTES);
$html = sprintf('
', $src);
} else {
if ($this->isUsingStaticUrlsAllowed()) {
- $html = $fileurl; // $mediaPath;
+ $html = $fileUrl;
} else {
$directive = $this->urlEncoder->encode($directive);
$html = $this->_backendData->getUrl('cms/wysiwyg/directive', ['___directive' => $directive]);
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
index e326d243b3f87..9fdb27f0f02ef 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Config.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
@@ -192,7 +192,7 @@ public function getConfig($data = [])
'add_variables' => true,
'add_widgets' => true,
'no_display' => false,
- 'encode_directives' => true,
+ 'add_directives' => true,
'width' => '100%',
'height' => '500px',
'plugins' => [],
From bfca039f4f76e22292c60fcd9e979457b54a38ce Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Tue, 16 Jan 2018 15:36:21 -0600
Subject: [PATCH 035/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Set readonly attribute on editor when changing its status
---
app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js | 3 +++
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 3 +++
2 files changed, 6 insertions(+)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index a1cc9c1ca8841..cb0aefb75bab6 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -284,10 +284,13 @@ define([
/**
* Set the status of the editor and toolbar
+ *
+ * @param {Boolean} enabled
*/
setEditorStatus: function (enabled) {
if (this.activeEditor()) {
this.activeEditor().getBody().setAttribute('contenteditable', enabled);
+ this.activeEditor().readonly = !enabled;
this.setToolbarStatus(enabled);
}
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index c4ec062165e87..cc6dbc7e0cb35 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -532,10 +532,13 @@ define([
/**
* Set the status of the editor and toolbar
+ *
+ * @param {Boolean} enabled
*/
setEditorStatus: function (enabled) {
if (this.activeEditor()) {
this.activeEditor().getBody().setAttribute('contenteditable', enabled);
+ this.activeEditor().readonly = !enabled;
this.setToolbarStatus(enabled);
}
From 5b3cee1973c86b6bcdc3452d67f8cb4ca5eb50ae Mon Sep 17 00:00:00 2001
From: Cari Spruiell
Date: Tue, 16 Jan 2018 16:34:37 -0600
Subject: [PATCH 036/277] MAGETWO-85423: Create or update functional tests
- use configured backend name in url
---
.../Store/ActionGroup/AdminCreateStoreViewActionGroup.xml | 2 +-
.../FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
index 4ade252788a5b..6571e6b28a578 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
index f44ed06277617..8ee5be44c8169 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
From f148e355d098af526d9359285ccd48671c4221f3 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Wed, 17 Jan 2018 13:23:42 +0000
Subject: [PATCH 037/277] magento-engcom/import-export-improvements#43: make
the customer import work with large sets of customer data in the database on
low memory systems - replace the usage of the
CollectionByPagesIteratorFactory with a fetchAll when loading current
customers from the database, this was causing issues because of the extra
overhead that the the iterator caused by using objects to store each row's
data in this way we can use a similar approach to how the product import
loads old skus. See:
Magento\Catalog\Model\ResourceModel\Product::getProductEntitiesInfo
---
.../ResourceModel/Import/Customer/Storage.php | 21 ++++++++++---------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
index ae88e9672c9f4..67717fa371625 100644
--- a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
+++ b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
@@ -76,16 +76,17 @@ public function __construct(
public function load()
{
if ($this->_isCollectionLoaded == false) {
- $collection = clone $this->_customerCollection;
- $collection->removeAttributeToSelect();
- $tableName = $collection->getResource()->getEntityTable();
- $collection->getSelect()->from($tableName, ['entity_id', 'website_id', 'email']);
-
- $this->_byPagesIterator->iterate(
- $this->_customerCollection,
- $this->_pageSize,
- [[$this, 'addCustomer']]
- );
+ $connection = $this->_customerCollection->getConnection();
+ $select = $connection->select();
+ $select->from($this->_customerCollection->getMainTable(), ['entity_id', 'website_id', 'email']);
+ $results = $connection->fetchAll($select);
+ foreach ($results as $customer) {
+ $email = strtolower(trim($customer['email']));
+ if (!isset($this->_customerIds[$email])) {
+ $this->_customerIds[$email] = [];
+ }
+ $this->_customerIds[$email][$customer['website_id']] = $customer['entity_id'];
+ }
$this->_isCollectionLoaded = true;
}
From 62f472286daf1ac867dbdd6225fd432704dacc6a Mon Sep 17 00:00:00 2001
From: David Manners
Date: Wed, 17 Jan 2018 13:30:21 +0000
Subject: [PATCH 038/277] magento-engcom/import-export-improvements#43:
refactor the addCustomer method so that it does not use the DataObject -
replace current usage, - keep BC by using the toArray method of the
DataObject in the current public method
---
.../Model/Import/CustomerComposite.php | 3 +-
.../ResourceModel/Import/Customer/Storage.php | 28 ++++++++++++-------
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
index c10ba026fd624..f94a7357df71b 100644
--- a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
+++ b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
@@ -308,14 +308,13 @@ public function validateRow(array $rowData, $rowNumber)
// Add new customer data into customer storage for address entity instance
$websiteId = $this->_customerEntity->getWebsiteId($this->_currentWebsiteCode);
if (!$this->_addressEntity->getCustomerStorage()->getCustomerId($this->_currentEmail, $websiteId)) {
- $customerData = new \Magento\Framework\DataObject(
+ $this->_addressEntity->getCustomerStorage()->addCustomerByArray(
[
'id' => $this->_nextCustomerId,
'email' => $this->_currentEmail,
'website_id' => $websiteId,
]
);
- $this->_addressEntity->getCustomerStorage()->addCustomer($customerData);
$this->_nextCustomerId++;
}
diff --git a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
index 67717fa371625..88378deff5ab1 100644
--- a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
+++ b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
@@ -81,30 +81,38 @@ public function load()
$select->from($this->_customerCollection->getMainTable(), ['entity_id', 'website_id', 'email']);
$results = $connection->fetchAll($select);
foreach ($results as $customer) {
- $email = strtolower(trim($customer['email']));
- if (!isset($this->_customerIds[$email])) {
- $this->_customerIds[$email] = [];
- }
- $this->_customerIds[$email][$customer['website_id']] = $customer['entity_id'];
+ $this->addCustomerByArray($customer);
}
$this->_isCollectionLoaded = true;
}
}
+ /**
+ * @param array $customer
+ * @return $this
+ */
+ public function addCustomerByArray(array $customer)
+ {
+ $email = strtolower(trim($customer['email']));
+ if (!isset($this->_customerIds[$email])) {
+ $this->_customerIds[$email] = [];
+ }
+ $this->_customerIds[$email][$customer['website_id']] = $customer['entity_id'];
+
+ return $this;
+ }
+
/**
* Add customer to array
*
+ * @deprecated @see addCustomerByArray
* @param \Magento\Framework\DataObject|\Magento\Customer\Model\Customer $customer
* @return $this
*/
public function addCustomer(\Magento\Framework\DataObject $customer)
{
- $email = strtolower(trim($customer->getEmail()));
- if (!isset($this->_customerIds[$email])) {
- $this->_customerIds[$email] = [];
- }
- $this->_customerIds[$email][$customer->getWebsiteId()] = $customer->getId();
+ $this->addCustomerByArray($customer->toArray());
return $this;
}
From 0d929cc6a27d5045a59f0dcf8a36b9e9d7b22e4d Mon Sep 17 00:00:00 2001
From: Roman Ganin
Date: Wed, 17 Jan 2018 16:54:30 +0200
Subject: [PATCH 039/277] MAGETWO-86754: Variable icon still gets selected
after deleting variable from WYSIWYG content area
---
.../wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
index fabb672ee724f..bc0b44a7fc748 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
@@ -57,6 +57,7 @@ tinymce.create('tinymce.plugins.magentovariable', {
*/
onPostRender: function () {
var _this = this,
+
/**
* Toggle active state of Insert Variable button.
*
From b8fe3fa35b92be897f6c82c6afd93e8254b4bd07 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Wed, 17 Jan 2018 09:37:07 -0600
Subject: [PATCH 040/277] MAGETWO-85423: Create or update functional tests
- create cart price rule
---
.../SalesRule/Data/SalesRuleData.xml | 21 +++++++++++++++++++
.../SalesRule/Metadata/sales_rule-meta.xml | 3 +++
2 files changed, 24 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
new file mode 100644
index 0000000000000..98d27e4bb0fbd
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ SimpleSalesRule
+ true
+ No Coupon
+
+ - 1
+
+
+ - 0
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml
index 9417c61dd1537..46dc532749f70 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml
@@ -72,4 +72,7 @@
+
+ application/json
+
From b64336a80d999794a25aefd7cbea63b7a78c2786 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 10:08:28 -0600
Subject: [PATCH 041/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Integrate escaper and refactor tests
---
.../Magento/Cms/Helper/Wysiwyg/Images.php | 14 +++++-
.../Test/Unit/Helper/Wysiwyg/ImagesTest.php | 46 ++++++++++++++++---
2 files changed, 51 insertions(+), 9 deletions(-)
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index 012b8c04c1153..61d0bce4254f3 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -50,6 +50,13 @@ class Images extends \Magento\Framework\App\Helper\AbstractHelper
*/
protected $_storeManager;
+ /**
+ * String escaper
+ *
+ * @var \Magento\Framework\Escaper
+ */
+ protected $escaper;
+
/**
* Construct
*
@@ -57,16 +64,19 @@ class Images extends \Magento\Framework\App\Helper\AbstractHelper
* @param \Magento\Backend\Helper\Data $backendData
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
+ * @param \Magento\Framework\Escaper $escaper
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Backend\Helper\Data $backendData,
\Magento\Framework\Filesystem $filesystem,
- \Magento\Store\Model\StoreManagerInterface $storeManager
+ \Magento\Store\Model\StoreManagerInterface $storeManager,
+ \Magento\Framework\Escaper $escaper
) {
parent::__construct($context);
$this->_backendData = $backendData;
$this->_storeManager = $storeManager;
+ $this->escaper = $escaper;
$this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
$this->_directory->create(\Magento\Cms\Model\Wysiwyg\Config::IMAGE_DIRECTORY);
@@ -171,7 +181,7 @@ public function getImageHtmlDeclaration($filename, $renderAsTag = false)
$mediaPath = str_replace($mediaUrl, '', $fileUrl);
$directive = sprintf('{{media url="%s"}}', $mediaPath);
if ($renderAsTag) {
- $src = $this->isUsingStaticUrlsAllowed() ? $fileUrl : htmlentities($directive, ENT_QUOTES);
+ $src = $this->isUsingStaticUrlsAllowed() ? $fileUrl : $this->escaper->escapeHtml($directive);
$html = sprintf('
', $src);
} else {
if ($this->isUsingStaticUrlsAllowed()) {
diff --git a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
index e873ba3296257..fa3eca95f31c3 100644
--- a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php
@@ -67,6 +67,11 @@ class ImagesTest extends \PHPUnit\Framework\TestCase
*/
protected $backendDataMock;
+ /**
+ * @var \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject
+ */
+ protected $escaperMock;
+
/**
* @var string
*/
@@ -127,13 +132,16 @@ protected function setUp()
$this->storeMock = $this->createMock(\Magento\Store\Model\Store::class);
+ $this->escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
+
$this->imagesHelper = $this->objectManager->getObject(
\Magento\Cms\Helper\Wysiwyg\Images::class,
[
'context' => $this->contextMock,
'filesystem' => $this->filesystemMock,
'storeManager' => $this->storeManagerMock,
- 'backendData' => $this->backendDataMock
+ 'backendData' => $this->backendDataMock,
+ 'escaper' => $this->escaperMock,
]
);
}
@@ -151,6 +159,7 @@ protected function tearDown()
$this->requestMock = null;
$this->urlEncoderMock = null;
$this->backendDataMock = null;
+ $this->escaperMock = null;
}
/**
@@ -413,20 +422,38 @@ public function testGetCurrentUrl()
* @param string $baseUrl
* @param string $fileName
* @param bool $isUsingStaticUrls
+ * @param string|null $escapedValue
* @param string $expectedHtml
* @dataProvider providerGetImageHtmlDeclarationRenderingAsTag
*/
- public function testGetImageHtmlDeclarationRenderingAsTag($baseUrl, $fileName, $isUsingStaticUrls, $expectedHtml)
- {
- $this->generalSettingsGetImageHtmlDeclaration($baseUrl, $isUsingStaticUrls);
+ public function testGetImageHtmlDeclarationRenderingAsTag(
+ $baseUrl,
+ $fileName,
+ $isUsingStaticUrls,
+ $escapedValue,
+ $expectedHtml
+ ) {
+ $this->generalSettingsGetImageHtmlDeclaration($baseUrl, $isUsingStaticUrls, $escapedValue);
$this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName, true));
}
public function providerGetImageHtmlDeclarationRenderingAsTag()
{
return [
- ['http://localhost', 'test.png', true, '
'],
- ['http://localhost', 'test.png', false, '
']
+ [
+ 'http://localhost',
+ 'test.png',
+ true,
+ null,
+ '
'
+ ],
+ [
+ 'http://localhost',
+ 'test.png',
+ false,
+ '{{media url="/test.png"}}',
+ '
'
+ ]
];
}
@@ -467,8 +494,9 @@ public function providerGetImageHtmlDeclaration()
/**
* @param string $baseUrl
* @param bool $isUsingStaticUrls
+ * @param string|null $escapedValue
*/
- protected function generalSettingsGetImageHtmlDeclaration($baseUrl, $isUsingStaticUrls)
+ protected function generalSettingsGetImageHtmlDeclaration($baseUrl, $isUsingStaticUrls, $escapedValue = null)
{
$storeId = 1;
$this->imagesHelper->setStoreId($storeId);
@@ -481,6 +509,10 @@ protected function generalSettingsGetImageHtmlDeclaration($baseUrl, $isUsingStat
->method('getStore')
->willReturn($this->storeMock);
+ if ($escapedValue) {
+ $this->escaperMock->expects($this->once())->method('escapeHtml')->willReturn($escapedValue);
+ }
+
$this->generalSettingsIsUsingStaticUrlsAllowed($isUsingStaticUrls);
}
}
From 3c27ed4ea48de29c33d0e3de7df82a4c602e45a6 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 10:45:58 -0600
Subject: [PATCH 042/277] MAGETWO-86383: Admin are unable to add variable to
CMS Page and Block on Firefox
Add jQuery to global list
---
.../wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
index 2168c5794241d..c6277fbd3a434 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
@@ -3,7 +3,7 @@
* See COPYING.txt for license details.
*/
-/* global tinymce, MagentovariablePlugin, varienGlobalEvents, Base64 */
+/* global tinymce, MagentovariablePlugin, varienGlobalEvents, Base64, jQuery */
/* eslint-disable strict */
tinymce.create('tinymce.plugins.magentovariable', {
From 48e4848fe516df09346e88f5fbb209845cc9c87f Mon Sep 17 00:00:00 2001
From: Iryna Lagno
Date: Wed, 17 Jan 2018 11:23:49 -0600
Subject: [PATCH 043/277] MAGETWO-85423: Create or update functional tests
- add ability to create Catalog Price Rule
---
.../CatalogRule/Data/CatalogRuleData.xml | 24 +++++++++++++++++
.../Metadata/catalog-rule-meta.xml | 27 +++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml
new file mode 100644
index 0000000000000..289513ca14454
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+ CatalogPriceRule
+ Catalog Price Rule Description
+ 1
+
+ - 0
+
+
+ - 1
+
+ by_percent
+ 10
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml
new file mode 100644
index 0000000000000..83bfd0070a2cc
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ application/x-www-form-urlencoded
+ string
+ string
+ string
+
+ integer
+
+
+ integer
+
+ string
+ string
+
+
From f787800cdb3a6078f48312ed6ce9fa66ca672bb7 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 12:10:22 -0600
Subject: [PATCH 044/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Remove all UI feedback on hover (hide tooltip/background change)
---
.../adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index cc6dbc7e0cb35..cb7d41045d43a 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -142,6 +142,19 @@ define([
_.each(controlIds, function (controlId) {
controlId.disabled(!enabled);
+ controlId.canFocus = enabled;
+
+ if (controlId.tooltip) {
+ controlId.tooltip().state.set('rendered', enabled);
+ if (enabled) {
+ jQuery(controlId.getEl()).children('button').andSelf().removeAttr('style');
+ } else {
+ jQuery(controlId.getEl()).children('button').andSelf().attr('style', 'color: inherit;' +
+ 'background-color: inherit;' +
+ 'border-color: transparent;'
+ );
+ }
+ }
});
},
From 91a9f5adf2b951b27d720d8d327839ead543cf95 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 12:23:13 -0600
Subject: [PATCH 045/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Remove all UI feedback on hover (hide tooltip/background change) for TinyMCE3
---
.../Tinymce3/view/base/web/tinymce3Adapter.js | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index cb0aefb75bab6..b89404238d2e6 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -319,7 +319,7 @@ define([
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
wUrl = this.config['files_browser_window_url'] +
- 'target_element_id/' + this.id + '/' +
+ 'target_element_id/' + this.getId() + '/' +
'store/' + storeId + '/';
this.mediaBrowserOpener = o.win;
@@ -371,14 +371,14 @@ define([
* @return {jQuery|*|HTMLElement}
*/
getToggleButton: function () {
- return $('toggle' + this.id);
+ return $('toggle' + this.getId());
},
/**
* Get plugins button.
*/
getPluginButtons: function () {
- return $$('#buttons' + this.id + ' > button.plugin');
+ return jQuery('#buttons' + this.getId() + ' > button.plugin');
},
/**
@@ -390,7 +390,7 @@ define([
this.setup(mode);
- tinyMCE3.execCommand('mceAddControl', false, this.id);
+ tinyMCE3.execCommand('mceAddControl', false, this.getId());
this.getPluginButtons().each(function (e) {
e.hide();
@@ -405,7 +405,7 @@ define([
turnOff: function () {
this.closePopups();
- tinyMCE3.execCommand('mceRemoveControl', false, this.id);
+ tinyMCE3.execCommand('mceRemoveControl', false, this.getId());
this.getPluginButtons().each(function (e) {
e.show();
@@ -420,8 +420,8 @@ define([
closePopups: function () {
if (typeof closeEditorPopup == 'function') {
// close all popups to avoid problems with updating parent content area
- closeEditorPopup('widget_window' + this.id);
- closeEditorPopup('browser_window' + this.id);
+ closeEditorPopup('widget_window' + this.getId());
+ closeEditorPopup('browser_window' + this.getId());
}
},
@@ -429,7 +429,7 @@ define([
* @return {Boolean}
*/
toggle: function () {
- if (!tinyMCE3.get(this.id)) {
+ if (!tinyMCE3.get(this.getId())) {
this.turnOn();
return true;
@@ -455,8 +455,8 @@ define([
* On form validation.
*/
onFormValidation: function () {
- if (tinyMCE3.get(this.id)) {
- $(this.id).value = tinyMCE3.get(this.id).getContent();
+ if (tinyMCE3.get(this.getId())) {
+ $(this.getId()).value = tinyMCE3.get(this.getId()).getContent();
}
},
@@ -588,7 +588,7 @@ define([
* Update text area.
*/
updateTextArea: function () {
- var editor = tinyMCE3.get(this.id),
+ var editor = tinyMCE3.get(this.getId()),
content;
if (!editor) {
@@ -605,7 +605,7 @@ define([
* @return {Object} jQuery textarea element
*/
getTextArea: function () {
- return jQuery('#' + this.id);
+ return jQuery('#' + this.getId());
},
/**
From 0efccdf3d46e5fee82bcdf54890fdc385c4504e4 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 12:24:35 -0600
Subject: [PATCH 046/277] MAGETWO-86141: Disable/Enable TinyMCE Not Working
Refactor
---
.../Ui/view/base/web/js/form/element/wysiwyg.js | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
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 9fe075925ae17..eb60ef486f60c 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
@@ -105,14 +105,12 @@ define([
this.$wysiwygEditorButton.attr('disabled', disabled);
}
- if (!_.isUndefined(wysiwyg)) {
- if (disabled) {
- wysiwyg.setEditorStatus(false);
- wysiwyg.getPluginButtons().attr('disabled', 'disabled');
- } else {
- wysiwyg.setEditorStatus(true);
- wysiwyg.getPluginButtons().removeAttr('disabled');
- }
+ if (wysiwyg && disabled) {
+ wysiwyg.setEditorStatus(false);
+ wysiwyg.getPluginButtons().attr('disabled', 'disabled');
+ } else if (wysiwyg) {
+ wysiwyg.setEditorStatus(true);
+ wysiwyg.getPluginButtons().removeAttr('disabled');
}
}
});
From a1dc84cfa4b27f1d256d476a14b1bb3852d502d8 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Wed, 17 Jan 2018 14:16:52 -0600
Subject: [PATCH 047/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Fix directive usage on product page when static = no, dynamic = yes
---
app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js | 4 ++--
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
index 91dcc07adf01b..854a81f01576e 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tinymce3Adapter.js
@@ -444,7 +444,7 @@ define([
* @param {String} directive
*/
makeDirectiveUrl: function (directive) {
- return this.config['directives_url'].replace('directive', 'directive/___directive/' + directive);
+ return this.config['directives_url'].replace(/directive.*/, 'directive/___directive/' + directive);
},
/**
@@ -503,7 +503,7 @@ define([
decodeDirectives: function (content) {
// escape special chars in directives url to use it in regular expression
var url = this.makeDirectiveUrl('%directive%').replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
- reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)'));
+ reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)\/?'));
return content.gsub(reg, function (match) { //eslint-disable-line no-extra-bind
return Base64.mageDecode(decodeURIComponent(match[1])).replace(/"/g, '"');
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index b73fa5609d735..01546eb9e6b17 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -506,7 +506,7 @@ define([
* @param {String} directive
*/
makeDirectiveUrl: function (directive) {
- return this.config['directives_url'].replace('directive', 'directive/___directive/' + directive);
+ return this.config['directives_url'].replace(/directive.*/, 'directive/___directive/' + directive);
},
/**
@@ -539,7 +539,7 @@ define([
decodeDirectives: function (content) {
// escape special chars in directives url to use it in regular expression
var url = this.makeDirectiveUrl('%directive%').replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
- reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)'));
+ reg = new RegExp(url.replace('%directive%', '([a-zA-Z0-9%,_-]+)\/?'));
return content.gsub(reg, function (match) { //eslint-disable-line no-extra-bind
return Base64.mageDecode(decodeURIComponent(match[1])).replace(/"/g, '"');
From 3ee8961210135471751a5ae38ee98ce75a0bbc96 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 09:57:15 +0000
Subject: [PATCH 048/277] magento-engcom/import-export-improvements#43: fix the
AddressTests to work with the new methods - since we are now working with
the connection in the load method we need to correct mocks in place
---
.../Test/Unit/Model/Import/AddressTest.php | 51 ++++++++++++-------
1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
index fe8c2dedb5744..e0fd78ba5e654 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
@@ -56,8 +56,8 @@ class AddressTest extends \PHPUnit\Framework\TestCase
* @var array
*/
protected $_customers = [
- ['id' => 1, 'email' => 'test1@email.com', 'website_id' => 1],
- ['id' => 2, 'email' => 'test2@email.com', 'website_id' => 2],
+ ['entity_id' => 1, 'email' => 'test1@email.com', 'website_id' => 1],
+ ['entity_id' => 2, 'email' => 'test2@email.com', 'website_id' => 2],
];
/**
@@ -233,28 +233,43 @@ protected function _createAttrCollectionMock()
*/
protected function _createCustomerStorageMock()
{
- $customerStorage = $this->createPartialMock(
- \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::class,
- ['load']
- );
+ $customerCollection = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\Collection::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['getConnection'])
+ ->getMock();
+ $collectionFactory = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['create'])
+ ->getMock();
+ $collectionFactory
+ ->expects($this->any())
+ ->method('create')
+ ->willReturn($customerCollection);
+ $byPagesIteratorFactory = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['create'])
+ ->getMock();
+ /** @var \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
+ $customerStorage = $this->getMockBuilder(\Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::class)
+ ->setMethods(['load'])
+ ->setConstructorArgs([$collectionFactory, $byPagesIteratorFactory])
+ ->getMock();
$resourceMock = $this->createPartialMock(
\Magento\Customer\Model\ResourceModel\Customer::class,
['getIdFieldName']
);
+ $selectMock = $this->createPartialMock(\Magento\Framework\DB\Select::class, ['from']);
+ $selectMock->expects($this->any())->method('from')->will($this->returnSelf());
+ /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface */
+ $connectionMock = $this->createPartialMock(
+ \Magento\Framework\DB\Adapter\Pdo\Mysql::class,
+ ['select', 'fetchAll']
+ );
+ $connectionMock->expects($this->any())->method('select')->will($this->returnValue($selectMock));
+ $customerCollection->expects($this->any())->method('getConnection')->will($this->returnValue($connectionMock));
$resourceMock->expects($this->any())->method('getIdFieldName')->will($this->returnValue('id'));
foreach ($this->_customers as $customerData) {
- $data = [
- 'resource' => $resourceMock,
- 'data' => $customerData,
- $this->createMock(\Magento\Customer\Model\Config\Share::class),
- $this->createMock(\Magento\Customer\Model\AddressFactory::class),
- $this->createMock(\Magento\Customer\Model\ResourceModel\Address\CollectionFactory::class),
- $this->createMock(\Magento\Customer\Model\GroupFactory::class),
- $this->createMock(\Magento\Customer\Model\AttributeFactory::class),
- ];
- /** @var $customer \Magento\Customer\Model\Customer */
- $customer = $this->_objectManagerMock->getObject(\Magento\Customer\Model\Customer::class, $data);
- $customerStorage->addCustomer($customer);
+ $customerStorage->addCustomerByArray($customerData);
}
return $customerStorage;
}
From 5cc36b74dfeca0472cacc24abc4ecb2c7a2c8b70 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 10:04:46 +0000
Subject: [PATCH 049/277] magento-engcom/import-export-improvements#43:
refactor the _createCustomerStorageMock so that it - uses getMockBuilder -
only has items that are needed
---
.../Test/Unit/Model/Import/AddressTest.php | 43 ++++++++++++-------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
index e0fd78ba5e654..21622c938d081 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
@@ -233,41 +233,52 @@ protected function _createAttrCollectionMock()
*/
protected function _createCustomerStorageMock()
{
+ /** @var \Magento\Framework\DB\Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
+ $selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['from'])
+ ->getMock();
+ $selectMock->expects($this->any())->method('from')->will($this->returnSelf());
+
+ /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
+ $connectionMock = $this->getMockBuilder(\Magento\Framework\DB\Adapter\Pdo\Mysql::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['select', 'fetchAll'])
+ ->getMock();
+ $connectionMock->expects($this->any())
+ ->method('select')
+ ->will($this->returnValue($selectMock));
+
+ /** @var \Magento\Customer\Model\ResourceModel\Customer\Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
$customerCollection = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\Collection::class)
->disableOriginalConstructor()
->setMethods(['getConnection'])
->getMock();
+ $customerCollection->expects($this->any())
+ ->method('getConnection')
+ ->will($this->returnValue($connectionMock));
+
+ /** @var \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
$collectionFactory = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
- $collectionFactory
- ->expects($this->any())
+ $collectionFactory->expects($this->any())
->method('create')
->willReturn($customerCollection);
+
+ /** @var \Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
$byPagesIteratorFactory = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
+
/** @var \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
$customerStorage = $this->getMockBuilder(\Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::class)
->setMethods(['load'])
->setConstructorArgs([$collectionFactory, $byPagesIteratorFactory])
->getMock();
- $resourceMock = $this->createPartialMock(
- \Magento\Customer\Model\ResourceModel\Customer::class,
- ['getIdFieldName']
- );
- $selectMock = $this->createPartialMock(\Magento\Framework\DB\Select::class, ['from']);
- $selectMock->expects($this->any())->method('from')->will($this->returnSelf());
- /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface */
- $connectionMock = $this->createPartialMock(
- \Magento\Framework\DB\Adapter\Pdo\Mysql::class,
- ['select', 'fetchAll']
- );
- $connectionMock->expects($this->any())->method('select')->will($this->returnValue($selectMock));
- $customerCollection->expects($this->any())->method('getConnection')->will($this->returnValue($connectionMock));
- $resourceMock->expects($this->any())->method('getIdFieldName')->will($this->returnValue('id'));
+
foreach ($this->_customers as $customerData) {
$customerStorage->addCustomerByArray($customerData);
}
From d45ade079d4cb83df28c0e2a7283d6b87cad857e Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 10:22:52 +0000
Subject: [PATCH 050/277] magento-engcom/import-export-improvements#43:
refactor the StorageTests - make sure that we are testing the new method for
adding customer by array
---
.../Import/Customer/StorageTest.php | 114 ++++++++----------
1 file changed, 51 insertions(+), 63 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
index 71f8f17c85509..9ab4474eb2caa 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
@@ -26,74 +26,63 @@ class StorageTest extends \PHPUnit\Framework\TestCase
protected function setUp()
{
- $this->_model = new \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage(
- $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
- ->disableOriginalConstructor()
- ->getMock(),
- $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
- ->disableOriginalConstructor()
- ->getMock(),
- $this->_getModelDependencies()
- );
- $this->_model->load();
- }
-
- protected function tearDown()
- {
- unset($this->_model);
- }
-
- /**
- * Retrieve all necessary objects mocks which used inside customer storage
- *
- * @return array
- */
- protected function _getModelDependencies()
- {
- $select = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
+ /** @var \Magento\Framework\DB\Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
+ $selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
->disableOriginalConstructor()
->setMethods(['from'])
->getMock();
- $select->expects($this->any())->method('from')->will($this->returnCallback([$this, 'validateFrom']));
+ $selectMock->expects($this->any())->method('from')->will($this->returnSelf());
+
+ /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
+ $connectionMock = $this->getMockBuilder(\Magento\Framework\DB\Adapter\Pdo\Mysql::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['select', 'fetchAll'])
+ ->getMock();
+ $connectionMock->expects($this->any())
+ ->method('select')
+ ->will($this->returnValue($selectMock));
+ $connectionMock->expects($this->any())
+ ->method('fetchAll')
+ ->will($this->returnValue([]));
+
+ /** @var \Magento\Customer\Model\ResourceModel\Customer\Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
$customerCollection = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\Collection::class)
->disableOriginalConstructor()
- ->setMethods(['load', 'removeAttributeToSelect', 'getResource', 'getSelect'])
+ ->setMethods(['getConnection','getMainTable'])
->getMock();
+ $customerCollection->expects($this->any())
+ ->method('getConnection')
+ ->will($this->returnValue($connectionMock));
- $resourceStub = new \Magento\Framework\DataObject();
- $resourceStub->setEntityTable($this->_entityTable);
- $customerCollection->expects($this->once())->method('getResource')->will($this->returnValue($resourceStub));
+ $customerCollection->expects($this->any())
+ ->method('getMainTable')
+ ->willReturn('customer_entity');
- $customerCollection->expects($this->once())->method('getSelect')->will($this->returnValue($select));
+ /** @var \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
+ $collectionFactory = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['create'])
+ ->getMock();
+ $collectionFactory->expects($this->any())
+ ->method('create')
+ ->willReturn($customerCollection);
- $byPagesIterator = $this->createPartialMock(\stdClass::class, ['iterate']);
- $byPagesIterator->expects($this->once())
- ->method('iterate')
- ->will($this->returnCallback([$this, 'iterate']));
+ /** @var \Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
+ $byPagesIteratorFactory = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['create'])
+ ->getMock();
- return [
- 'customer_collection' => $customerCollection,
- 'collection_by_pages_iterator' => $byPagesIterator,
- 'page_size' => 10
- ];
+ $this->_model = new \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage(
+ $collectionFactory,
+ $byPagesIteratorFactory
+ );
+ $this->_model->load();
}
- /**
- * Iterate stub
- *
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- *
- * @param \Magento\Framework\Data\Collection $collection
- * @param int $pageSize
- * @param array $callbacks
- */
- public function iterate(\Magento\Framework\Data\Collection $collection, $pageSize, array $callbacks)
+ protected function tearDown()
{
- foreach ($collection as $customer) {
- foreach ($callbacks as $callback) {
- call_user_func($callback, $customer);
- }
- }
+ unset($this->_model);
}
/**
@@ -117,8 +106,7 @@ public function testAddCustomer()
$customer = $this->_addCustomerToStorage();
$this->assertAttributeCount(1, $propertyName, $this->_model);
-
- $expectedCustomerData = [$customer->getWebsiteId() => $customer->getId()];
+ $expectedCustomerData = [$customer['website_id'] => $customer['entity_id']];
$this->assertAttributeContains($expectedCustomerData, $propertyName, $this->_model);
}
@@ -127,19 +115,19 @@ public function testGetCustomerId()
$customer = $this->_addCustomerToStorage();
$this->assertEquals(
- $customer->getId(),
- $this->_model->getCustomerId($customer->getEmail(), $customer->getWebsiteId())
+ $customer['entity_id'],
+ $this->_model->getCustomerId($customer['email'], $customer['website_id'])
);
- $this->assertFalse($this->_model->getCustomerId('new@test.com', $customer->getWebsiteId()));
+ $this->assertFalse($this->_model->getCustomerId('new@test.com', $customer['website_id']));
}
/**
- * @return \Magento\Framework\DataObject
+ * @return array
*/
protected function _addCustomerToStorage()
{
- $customer = new \Magento\Framework\DataObject(['id' => 1, 'website_id' => 1, 'email' => 'test@test.com']);
- $this->_model->addCustomer($customer);
+ $customer = ['entity_id' => 1, 'website_id' => 1, 'email' => 'test@test.com'];
+ $this->_model->addCustomerByArray($customer);
return $customer;
}
From e65359171da8718c96171387eaad9161059771f9 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 10:30:52 +0000
Subject: [PATCH 051/277] magento-engcom/import-export-improvements#43: add a
fallback for when older code with a customer object is used - in the
addCustomer covert $customerData['id'] to $customerData['entity_id'] so that
older code that uses customer objects will still work as expected
---
.../ResourceModel/Import/Customer/Storage.php | 6 +++++-
.../ResourceModel/Import/Customer/StorageTest.php | 14 ++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
index 88378deff5ab1..65d7a85faf064 100644
--- a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
+++ b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
@@ -112,7 +112,11 @@ public function addCustomerByArray(array $customer)
*/
public function addCustomer(\Magento\Framework\DataObject $customer)
{
- $this->addCustomerByArray($customer->toArray());
+ $customerData = $customer->toArray();
+ if (!isset($customerData['entity_id']) && isset($customer['id'])) {
+ $customerData['entity_id'] = $customerData['id'];
+ }
+ $this->addCustomerByArray($customerData);
return $this;
}
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
index 9ab4474eb2caa..018c7b932a8c7 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
@@ -101,6 +101,20 @@ public function testLoad()
}
public function testAddCustomer()
+ {
+ $customer = new \Magento\Framework\DataObject(['id' => 1, 'website_id' => 1, 'email' => 'test@test.com']);
+ $this->_model->addCustomer($customer);
+
+ $propertyName = '_customerIds';
+ $this->assertAttributeCount(1, $propertyName, $this->_model);
+ $this->assertAttributeContains([$customer->getWebsiteId() => $customer->getId()], $propertyName, $this->_model);
+ $this->assertEquals(
+ $customer->getId(),
+ $this->_model->getCustomerId($customer->getEmail(), $customer->getWebsiteId())
+ );
+ }
+
+ public function testAddCustomerByArray()
{
$propertyName = '_customerIds';
$customer = $this->_addCustomerToStorage();
From c07b97bf9a86fdc3e5b17336e90be389ef21eacd Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 11:14:55 +0000
Subject: [PATCH 052/277] magento-engcom/import-export-improvements#43: fix
app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php -
make sure that the data format used when importing data matches the expected
format
---
.../CustomerImportExport/Model/Import/CustomerComposite.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
index f94a7357df71b..f52e5d8c8817f 100644
--- a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
+++ b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php
@@ -310,7 +310,7 @@ public function validateRow(array $rowData, $rowNumber)
if (!$this->_addressEntity->getCustomerStorage()->getCustomerId($this->_currentEmail, $websiteId)) {
$this->_addressEntity->getCustomerStorage()->addCustomerByArray(
[
- 'id' => $this->_nextCustomerId,
+ 'entity_id' => $this->_nextCustomerId,
'email' => $this->_currentEmail,
'website_id' => $websiteId,
]
From 330634b0056289aa476f18ba352e65281b77da52 Mon Sep 17 00:00:00 2001
From: David Manners
Date: Thu, 18 Jan 2018 11:21:37 +0000
Subject: [PATCH 053/277] magento-engcom/import-export-improvements#43: update
the AddressTest and StorageTest - fix up the lines of over 120 characters -
import classes that will be used to shorten lines
---
.../Test/Unit/Model/Import/AddressTest.php | 28 +++++++++++--------
.../Import/Customer/StorageTest.php | 20 +++++++------
2 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
index 21622c938d081..20625d9d7f999 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php
@@ -8,6 +8,12 @@
use Magento\CustomerImportExport\Model\Import\Address;
use Magento\ImportExport\Model\Import\AbstractEntity;
+use Magento\Framework\DB\Select;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Customer\Model\ResourceModel\Customer\Collection;
+use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory;
+use Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory;
+use Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage;
/**
* Class AddressTest
@@ -233,14 +239,14 @@ protected function _createAttrCollectionMock()
*/
protected function _createCustomerStorageMock()
{
- /** @var \Magento\Framework\DB\Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
- $selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class)
+ /** @var Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
+ $selectMock = $this->getMockBuilder(Select::class)
->disableOriginalConstructor()
->setMethods(['from'])
->getMock();
$selectMock->expects($this->any())->method('from')->will($this->returnSelf());
- /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var $connectionMock AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
$connectionMock = $this->getMockBuilder(\Magento\Framework\DB\Adapter\Pdo\Mysql::class)
->disableOriginalConstructor()
->setMethods(['select', 'fetchAll'])
@@ -249,8 +255,8 @@ protected function _createCustomerStorageMock()
->method('select')
->will($this->returnValue($selectMock));
- /** @var \Magento\Customer\Model\ResourceModel\Customer\Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
- $customerCollection = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\Collection::class)
+ /** @var Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
+ $customerCollection = $this->getMockBuilder(Collection::class)
->disableOriginalConstructor()
->setMethods(['getConnection'])
->getMock();
@@ -258,8 +264,8 @@ protected function _createCustomerStorageMock()
->method('getConnection')
->will($this->returnValue($connectionMock));
- /** @var \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
- $collectionFactory = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
+ /** @var CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
+ $collectionFactory = $this->getMockBuilder(CollectionFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
@@ -267,14 +273,14 @@ protected function _createCustomerStorageMock()
->method('create')
->willReturn($customerCollection);
- /** @var \Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
- $byPagesIteratorFactory = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
+ /** @var CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
+ $byPagesIteratorFactory = $this->getMockBuilder(CollectionByPagesIteratorFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
- /** @var \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
- $customerStorage = $this->getMockBuilder(\Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::class)
+ /** @var Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
+ $customerStorage = $this->getMockBuilder(Storage::class)
->setMethods(['load'])
->setConstructorArgs([$collectionFactory, $byPagesIteratorFactory])
->getMock();
diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
index 018c7b932a8c7..9a06ebae375a6 100644
--- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
+++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/ResourceModel/Import/Customer/StorageTest.php
@@ -6,6 +6,10 @@
namespace Magento\CustomerImportExport\Test\Unit\Model\ResourceModel\Import\Customer;
use Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Customer\Model\ResourceModel\Customer\Collection;
+use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory;
+use Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory;
class StorageTest extends \PHPUnit\Framework\TestCase
{
@@ -33,7 +37,7 @@ protected function setUp()
->getMock();
$selectMock->expects($this->any())->method('from')->will($this->returnSelf());
- /** @var $connectionMock \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var $connectionMock AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
$connectionMock = $this->getMockBuilder(\Magento\Framework\DB\Adapter\Pdo\Mysql::class)
->disableOriginalConstructor()
->setMethods(['select', 'fetchAll'])
@@ -45,8 +49,8 @@ protected function setUp()
->method('fetchAll')
->will($this->returnValue([]));
- /** @var \Magento\Customer\Model\ResourceModel\Customer\Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
- $customerCollection = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\Collection::class)
+ /** @var Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
+ $customerCollection = $this->getMockBuilder(Collection::class)
->disableOriginalConstructor()
->setMethods(['getConnection','getMainTable'])
->getMock();
@@ -58,8 +62,8 @@ protected function setUp()
->method('getMainTable')
->willReturn('customer_entity');
- /** @var \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
- $collectionFactory = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Customer\CollectionFactory::class)
+ /** @var CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
+ $collectionFactory = $this->getMockBuilder(CollectionFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
@@ -67,13 +71,13 @@ protected function setUp()
->method('create')
->willReturn($customerCollection);
- /** @var \Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
- $byPagesIteratorFactory = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIteratorFactory::class)
+ /** @var CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
+ $byPagesIteratorFactory = $this->getMockBuilder(CollectionByPagesIteratorFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
- $this->_model = new \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage(
+ $this->_model = new Storage(
$collectionFactory,
$byPagesIteratorFactory
);
From 27a94c720d3c834bf607b369924b072b0ef1a534 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 18 Jan 2018 09:59:08 -0600
Subject: [PATCH 054/277] MAGETWO-86367: Sprint 6 Build Stabilization & PR
Delivery
Build stabilization tasks
---
app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js | 2 +-
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
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 eb60ef486f60c..bdb8060d24612 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
@@ -114,4 +114,4 @@ define([
}
}
});
-});
\ No newline at end of file
+});
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index a7c8ad14c2be6..80558e1c8e157 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -101,6 +101,11 @@ define([
settings = this.getSettings();
settings.mode = mode;
+
+ /**
+ * Fire wysiwygEditorInitialized event on setup
+ * @param {Object} editor
+ */
settings.setup = function (editor) {
editor.on('init', function (args) {
varienGlobalEvents.fireEvent('wysiwygEditorInitialized', args.target);
From 6bf052a052196139773a2021a5509f3c941c5cff Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 18 Jan 2018 10:03:36 -0600
Subject: [PATCH 055/277] MAGETWO-86367: Sprint 6 Build Stabilization & PR
Delivery
Build stabilization
---
app/code/Magento/Cms/Helper/Wysiwyg/Images.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index 61d0bce4254f3..409bc93aef153 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -29,7 +29,7 @@ class Images extends \Magento\Framework\App\Helper\AbstractHelper
*
* @var int
*/
- protected $_storeId = null;
+ protected $_storeId;
/**
* @var \Magento\Framework\Filesystem\Directory\Write
@@ -158,7 +158,7 @@ public function convertIdToPath($id)
*/
public function isUsingStaticUrlsAllowed()
{
- $checkResult = new \StdClass();
+ $checkResult = (object) [];
$checkResult->isAllowed = false;
$this->_eventManager->dispatch(
'cms_wysiwyg_images_static_urls_allowed',
From 45c52db7d9ad92821a09e7b137c4ddbc3d8917ce Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 18 Jan 2018 10:55:49 -0600
Subject: [PATCH 056/277] MAGETWO-86367: Sprint 6 Build Stabilization & PR
Delivery
Build stabilization
---
lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 80558e1c8e157..13be3c16afc66 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -151,6 +151,7 @@ define([
if (controlId.tooltip) {
controlId.tooltip().state.set('rendered', enabled);
+
if (enabled) {
jQuery(controlId.getEl()).children('button').andSelf().removeAttr('style');
} else {
From c1274611a5dc46d5f6264e6cb610c3ff95fffd49 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Thu, 18 Jan 2018 11:06:29 -0600
Subject: [PATCH 057/277] MAGETWO-86367: Sprint 6 Build Stabilization & PR
Delivery
Build stabilization
---
.../adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
index 13be3c16afc66..45a14bc6f287b 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
@@ -102,16 +102,6 @@ define([
settings = this.getSettings();
settings.mode = mode;
- /**
- * Fire wysiwygEditorInitialized event on setup
- * @param {Object} editor
- */
- settings.setup = function (editor) {
- editor.on('init', function (args) {
- varienGlobalEvents.fireEvent('wysiwygEditorInitialized', args.target);
- });
- };
-
tinyMCE4.init(settings);
this.getPluginButtons().hide();
},
@@ -221,6 +211,10 @@ define([
editor.on('ExecCommand', function (cmd) {
varienGlobalEvents.fireEvent('tinymceExecCommand', cmd);
});
+
+ editor.on('init', function (args) {
+ varienGlobalEvents.fireEvent('wysiwygEditorInitialized', args.target);
+ });
}
};
From 6e635567c05a8a210ddd39d6ac96268400a5d7c4 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Fri, 19 Jan 2018 12:23:47 -0600
Subject: [PATCH 058/277] MAGETWO-86142: Image url not encoding/decoding
correctly
Fix IE11 issue where it treats encoded " as decoded and substitutes single quote delimiter for attribute
---
.../plugins/magentovariable/editor_plugin.js | 14 ++++++--------
.../plugins/magentowidget/editor_plugin.js | 4 ++--
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
index d96ab6dcc5353..1bd755710ec0e 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js
@@ -162,14 +162,12 @@ tinymce.create('tinymce.plugins.magentovariable', {
* @returns {*}
*/
decodeVariables: function (content) {
- var i, el, spans, element = document.createElement('elem');
+ var parser, doc;
- element.innerHTML = content;
- spans = element.querySelectorAll('span.magento-variable');
-
- for (i = 0; i < spans.length; i++) {
- el = spans[i];
+ parser = new DOMParser();
+ doc = parser.parseFromString(content.replace(/"/g, '"'), 'text/html');
+ [].forEach.call(doc.querySelectorAll('span.magento-variable'), function (el) {
if (el.hasClassName('magento-custom-var')) {
$(el).replaceWith(
this.customDirectiveGenerator.processConfig(
@@ -187,9 +185,9 @@ tinymce.create('tinymce.plugins.magentovariable', {
)
);
}
- }
+ });
- return element.innerHTML;
+ return doc.body ? doc.body.innerHTML.replace(/"/g, '"') : content;
},
/**
diff --git a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
index 69b3c3331013e..ddf6e2f6402fd 100644
--- a/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
+++ b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js
@@ -189,7 +189,7 @@ tinymce.create('tinymce.plugins.magentowidget', {
}
parser = new DOMParser();
- doc = parser.parseFromString(content, 'text/html');
+ doc = parser.parseFromString(content.replace(/"/g, '"'), 'text/html');
[].forEach.call(doc.querySelectorAll('.magento-widget'), function (widgetEl) {
var widgetChildEl = widgetEl.querySelector('.magento-widget');
@@ -205,7 +205,7 @@ tinymce.create('tinymce.plugins.magentowidget', {
widgetEl.parentNode.removeChild(widgetEl);
});
- return doc.body ? doc.body.innerHTML : content;
+ return doc.body ? doc.body.innerHTML.replace(/"/g, '"') : content;
},
/**
From 0dd2cd2c1bb663592856820336e2b9b6eecc62f0 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 11:45:19 +0200
Subject: [PATCH 059/277] Fix typo in variable
---
.../Magento/GraphQl/TestModule/GraphQlQueryTest.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlQueryTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlQueryTest.php
index a7e9a4481d772..c4a3eb433c60e 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlQueryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlQueryTest.php
@@ -27,9 +27,9 @@ public function testQueryTestModuleReturnsResults()
}
QUERY;
- $reponse = $this->graphQlQuery($query);
- $this->assertArrayHasKey('testItem', $reponse);
- $testItem = $reponse['testItem'];
+ $response = $this->graphQlQuery($query);
+ $this->assertArrayHasKey('testItem', $response);
+ $testItem = $response['testItem'];
$this->assertArrayHasKey('item_id', $testItem);
$this->assertArrayHasKey('name', $testItem);
$this->assertEquals(1, $testItem['item_id']);
@@ -51,9 +51,9 @@ public function testQueryTestModuleExtensionAttribute()
}
QUERY;
- $reponse = $this->graphQlQuery($query);
- $this->assertArrayHasKey('testItem', $reponse);
- $testItem = $reponse['testItem'];
+ $response = $this->graphQlQuery($query);
+ $this->assertArrayHasKey('testItem', $response);
+ $testItem = $response['testItem'];
$this->assertArrayHasKey('integer_list', $testItem);
$this->assertEquals([3, 4, 5], $testItem['integer_list']);
}
From 435171044dbbab7ed07d8758e012b7c4134e1854 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 11:46:51 +0200
Subject: [PATCH 060/277] Fix typo in test method's name
---
.../testsuite/Magento/GraphQl/Catalog/ProductViewTest.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php
index 41d1d0e8f22ac..44bc309f754cb 100644
--- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php
@@ -665,7 +665,7 @@ private function assertEavAttributes($product, $actualResponse)
$expectedAttribute = $product->getCustomAttribute($attributeCode);
$assertionMap[] = [
- 'response_field' => $this->eavAttributesToGrahQlSchemaFieldTranslator($attributeCode),
+ 'response_field' => $this->eavAttributesToGraphQlSchemaFieldTranslator($attributeCode),
'expected_value' => $expectedAttribute ? $expectedAttribute->getValue() : null
];
}
@@ -677,7 +677,7 @@ private function assertEavAttributes($product, $actualResponse)
* @param string $eavAttributeCode
* @return string
*/
- private function eavAttributesToGrahQlSchemaFieldTranslator(string $eavAttributeCode)
+ private function eavAttributesToGraphQlSchemaFieldTranslator(string $eavAttributeCode)
{
switch ($eavAttributeCode) {
case 'news_from_date':
From 7af19b65cc4081b3ecc141a392b7d8ed2f41cdce Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:08:34 +0200
Subject: [PATCH 061/277] Fix typos in DocBlocks
---
.../lib/Magento/Mtf/Client/Element/SimplifiedselectElement.php | 2 +-
.../lib/Magento/Mtf/Client/Element/SwitcherElement.php | 2 +-
.../Bundle/Test/TestCase/CancelPartiallyInvoicedOrderTest.php | 2 +-
.../Block/Adminhtml/Product/Edit/Section/Attributes/Search.php | 2 +-
.../Test/Constraint/AssertProductAttributeIsHtmlAllowed.php | 2 +-
.../app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php | 2 +-
.../Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php | 2 +-
.../TestCase/Product/ReSavingProductAfterInitialSaveTest.php | 2 +-
.../Constraint/AssertBillingAddressSameAsShippingCheckbox.php | 2 +-
.../Checkout/Test/TestStep/RemoveProductsFromTheCartStep.php | 2 +-
.../Test/TestCase/VerifyAdminAccountSharingEntityTest.php | 2 +-
.../Test/Constraint/AssertProductTierPriceOnProductPage.php | 2 +-
.../app/Magento/Customer/Test/Fixture/Customer/WebsiteId.php | 2 +-
.../Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php | 2 +-
.../Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php | 2 +-
.../Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php | 2 +-
.../app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php | 2 +-
.../Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php | 2 +-
.../Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php | 2 +-
.../Shipping/Test/TestStep/FillShippingAddressesStep.php | 2 +-
.../tests/app/Magento/Theme/Test/Block/Html/Footer.php | 2 +-
.../tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php | 2 +-
.../tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php | 2 +-
.../app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php | 2 +-
.../Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php | 2 +-
.../Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php | 2 +-
26 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/dev/tests/functional/lib/Magento/Mtf/Client/Element/SimplifiedselectElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SimplifiedselectElement.php
index c9f37e9c18945..3aa7010377fb4 100644
--- a/dev/tests/functional/lib/Magento/Mtf/Client/Element/SimplifiedselectElement.php
+++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SimplifiedselectElement.php
@@ -21,7 +21,7 @@ class SimplifiedselectElement extends SelectElement
protected $optionGroupValue = ".//*[@data-title='%s' or contains(normalize-space(.), %s)]";
/**
- * Select value in ropdown which has option groups.
+ * Select value in dropdown which has option groups.
*
* @param string $value
* @return void
diff --git a/dev/tests/functional/lib/Magento/Mtf/Client/Element/SwitcherElement.php b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SwitcherElement.php
index 6dce3d12a1fbe..36a203bb057e1 100644
--- a/dev/tests/functional/lib/Magento/Mtf/Client/Element/SwitcherElement.php
+++ b/dev/tests/functional/lib/Magento/Mtf/Client/Element/SwitcherElement.php
@@ -22,7 +22,7 @@ class SwitcherElement extends SimpleElement
protected $parentContainer = 'parent::div[@data-role="switcher"]';
/**
- * XPath selector for label text on swticher element.
+ * XPath selector for label text on switcher element.
*
* @var string
*/
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CancelPartiallyInvoicedOrderTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CancelPartiallyInvoicedOrderTest.php
index 71d9b11d12eb1..00c53c5e837d2 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CancelPartiallyInvoicedOrderTest.php
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CancelPartiallyInvoicedOrderTest.php
@@ -20,7 +20,7 @@
* 3. Open the created order.
* 4. Create partial invoice
* 4. Do cancel Order.
- * 5. Perform all assetions.
+ * 5. Perform all assertions.
*
* @group Order_Management
* @ZephyrId MAGETWO-67787
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/Attributes/Search.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/Attributes/Search.php
index d17b06456c831..7b5bcf8060e2d 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/Attributes/Search.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/Attributes/Search.php
@@ -37,7 +37,7 @@ class Search extends SuggestElement
protected $actionToggle = '.action-toggle';
/**
- * Saerch result dropdown.
+ * Search result dropdown.
*
* @var string
*/
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php
index f1999498b96df..47a4ab7be3313 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsHtmlAllowed.php
@@ -23,7 +23,7 @@ class AssertProductAttributeIsHtmlAllowed extends AbstractConstraint
/**
* Check whether html tags are using in attribute value.
- * Checked tag structure atttribute_default_value
+ * Checked tag structure attribute_default_value
*
* @param InjectableFixture $product
* @param CatalogProductAttribute $attribute
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php
index 2bd71dbf4f8a6..57fe2bb59154f 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php
@@ -37,7 +37,7 @@ class WebsiteIds extends DataSource
private $fixtureFactory;
/**
- * Rought fixture field data.
+ * Rough fixture field data.
*
* @var array
*/
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
index 001e815ce2d2b..11805a00d03cc 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
@@ -345,7 +345,7 @@ protected function preparePrice()
}
/**
- * Preparation wheather product 'Is Virtual'.
+ * Preparation weather product 'Is Virtual'.
*
* @return void
*/
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ReSavingProductAfterInitialSaveTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ReSavingProductAfterInitialSaveTest.php
index 5ca7f06effc24..ba9714672cfbb 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ReSavingProductAfterInitialSaveTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ReSavingProductAfterInitialSaveTest.php
@@ -19,7 +19,7 @@
*
* 1. Login to backend.
* 2. Create a product with invalid from and To dates
- * 3. Save the product which generates an error messsage
+ * 3. Save the product which generates an error message
* 4. Modify the dates to valid values
* 5. Save the product again
* 6. Product is saved successfully
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php
index 3e889c058ee84..9a042ab13f048 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php
@@ -37,7 +37,7 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $billingCheckbox
}
/**
- * Returns a string representation of successfull assertion.
+ * Returns a string representation of successful assertion.
*
* @return string
*/
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/RemoveProductsFromTheCartStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/RemoveProductsFromTheCartStep.php
index b4ea9ba26b0c2..6e1042eed5d83 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/RemoveProductsFromTheCartStep.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/RemoveProductsFromTheCartStep.php
@@ -30,7 +30,7 @@ class RemoveProductsFromTheCartStep implements TestStepInterface
private $cartPage;
/**
- * Quantity of items that should be removed from shoping cart.
+ * Quantity of items that should be removed from shopping cart.
*
* @var int|null
*/
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php
index 36b544dc8b2d8..3191d975826f0 100644
--- a/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php
@@ -13,7 +13,7 @@
* Steps:
* 1. Log in to Admin.
* 2. Go to Stores>Configuration>Advanced>admin>Security.
- * 3. * 7. Verify admin Acoount Sharing option availability.
+ * 3. * 7. Verify admin Account Sharing option availability.
*
* @group Config_(PS)
* @ZephyrId MAGETWO-47822
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php
index 3845cdfd2d89f..01ff832cd7db3 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php
@@ -10,7 +10,7 @@
use Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions;
/**
- * Open created configurble product on frontend and choose variation with tier price
+ * Open created configurable product on frontend and choose variation with tier price
*/
class AssertProductTierPriceOnProductPage extends AssertProductPage
{
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/WebsiteId.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/WebsiteId.php
index 72d7fdc63bc72..3e5ab87e0ed39 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/WebsiteId.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/WebsiteId.php
@@ -38,7 +38,7 @@ class WebsiteId extends DataSource
private $fixtureFactory;
/**
- * Rought fixture field data.
+ * Rough fixture field data.
*
* @var array
*/
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php
index 2eb82c04d1f81..2d2392f3328fe 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php
@@ -76,7 +76,7 @@ public function __prepare(FixtureFactory $fixtureFactory)
}
/**
- * Prepare VAT ID confguration.
+ * Prepare VAT ID configuration.
*
* @param ConfigData $vatConfig
* @param string $customerGroup
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
index 03779bd0ec674..a8c81ea14ba46 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
@@ -51,7 +51,7 @@ class ReAuthorizeTokensIntegrationEntityTest extends Injectable
*
* @param FixtureFactory $fixtureFactory
* @param IntegrationIndex $integrationIndex
- * @retun void
+ * @return void
*/
public function __inject(IntegrationIndex $integrationIndex, FixtureFactory $fixtureFactory)
{
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php
index 1dbe1dd94685a..0f748aa0a8c54 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php
@@ -36,7 +36,7 @@ abstract class Sidebar extends Block
protected $addToOrderProductName = './/tr/td[.="%s"]';
/**
- * Add productz to order.
+ * Add products to order.
*
* @param array $products
* @return void
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
index fa14fcdc34b96..20fe0c8f55ccb 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
@@ -23,7 +23,7 @@
* 2. Sales > Orders.
* 3. Open the created order.
* 4. Do cancel Order.
- * 5. Perform all assetions.
+ * 5. Perform all assertions.
*
* @group Order_Management
* @ZephyrId MAGETWO-28191
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
index 0a15196d65ae2..6f8c8cf1e53bb 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
@@ -30,7 +30,7 @@ class CreateCustomOrderStatusEntityTest extends Injectable
/* end tags */
/**
- * Order staus page.
+ * Order status page.
*
* @var OrderStatusIndex
*/
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php
index 472218205cb4f..381de91030a61 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php
@@ -10,7 +10,7 @@
use Magento\Mtf\Constraint\AbstractConstraint;
/**
- * Assert sales rule delte message.
+ * Assert sales rule delete message.
*/
class AssertCartPriceRuleSuccessDeleteMessage extends AbstractConstraint
{
diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestStep/FillShippingAddressesStep.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestStep/FillShippingAddressesStep.php
index 681b2746a4c34..abc560075d576 100644
--- a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestStep/FillShippingAddressesStep.php
+++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestStep/FillShippingAddressesStep.php
@@ -13,7 +13,7 @@
use Magento\Shipping\Test\Constraint\AssertCityBasedShippingRateChanged;
/**
- * Fill shipping addresses and assert rates relouding.
+ * Fill shipping addresses and assert rates reloading.
*/
class FillShippingAddressesStep implements TestStepInterface
{
diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php
index 0bcf20b38801e..30842af0b020d 100644
--- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php
+++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php
@@ -120,7 +120,7 @@ public function selectStoreGroup(Store $store)
}
/**
- * Check if correspondent "Store" is present in "Store" swither or not.
+ * Check if correspondent "Store" is present in "Store" switcher or not.
*
* @param Store $store
* @return bool
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php
index 15145c36afe0d..235b0d096533f 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php
@@ -332,7 +332,7 @@ public function selectMassAction($massActionSelection)
}
/**
- * Peform action using the dropdown above the grid.
+ * Perform action using the dropdown above the grid.
*
* @param array|string $action [array -> key = value from first select; value => value from subselect]
* @return void
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php
index a9c8e87f1dc97..5c27776c09620 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php
@@ -150,7 +150,7 @@ public function setAlertText($text)
}
/**
- * Wait until modal window will disapper.
+ * Wait until modal window will disappear.
*
* @return void
*/
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
index 57a170b924fe7..a54907aa49ec7 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
@@ -19,7 +19,7 @@
* Steps:
* 1. Navigate to backend.
* 2. Go to grid page
- * 3. Perfrom full text search
+ * 3. Perform full text search
* 5. Perform Asserts
*
* @group Ui
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
index 114709becde6f..988229d308250 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
@@ -39,7 +39,7 @@ protected function prepareData(FixtureInterface $fixture)
*
* @param array $data
* @param SimpleElement $context
- * @retun void
+ * @return void
*/
protected function fillFields(array $data, SimpleElement $context)
{
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php
index 411c15732f2ee..636af4e8032db 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php
@@ -12,7 +12,7 @@
use Magento\Mtf\Constraint\AbstractConstraint;
/**
- * Check that created widget displayed on frontent on Home page and on Advanced Search and
+ * Check that created widget displayed on frontend on Home page and on Advanced Search and
* after click on widget link on frontend system redirects you to cms page.
*/
class AssertWidgetCmsPageLink extends AbstractConstraint
From 1a16de17a5515220f2aaa9ebe088b4f2efa6a48e Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:12:38 +0200
Subject: [PATCH 062/277] Fix typo in variable name
---
.../Test/Constraint/AssertCityBasedShippingRateChanged.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
index a449f79ef68f3..482b7d213e671 100644
--- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
+++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
@@ -30,11 +30,11 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $shippingMethod,
'Shipping rate has not been changed.'
);
}
- $shippingAvaialability = $isShippingAvailable ? 'avaiable' : 'unavailable';
+ $shippingAvailability = $isShippingAvailable ? 'avaiable' : 'unavailable';
\PHPUnit_Framework_Assert::assertEquals(
$isShippingAvailable,
$checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvaiable($shippingMethod),
- "Shipping rates for {$shippingMethod['shipping_service']} should be $shippingAvaialability."
+ "Shipping rates for {$shippingMethod['shipping_service']} should be $shippingAvailability."
);
}
From af9dc759fcee60569ffef5a8c0026c276154c1ad Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:22:55 +0200
Subject: [PATCH 063/277] Fix typo in test's name
---
...sertConfigurableWithDisabledOptionCatalogSearchNoResult.php} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/{AssertConfigurableWithDisabledOtpionCatalogSearchNoResult.php => AssertConfigurableWithDisabledOptionCatalogSearchNoResult.php} (97%)
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOtpionCatalogSearchNoResult.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOptionCatalogSearchNoResult.php
similarity index 97%
rename from dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOtpionCatalogSearchNoResult.php
rename to dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOptionCatalogSearchNoResult.php
index 6bb947941909e..a7538508caa76 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOtpionCatalogSearchNoResult.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertConfigurableWithDisabledOptionCatalogSearchNoResult.php
@@ -19,7 +19,7 @@
/**
* Assert search has no results after disabling configurable children.
*/
-class AssertConfigurableWithDisabledOtpionCatalogSearchNoResult extends AbstractConstraint
+class AssertConfigurableWithDisabledOptionCatalogSearchNoResult extends AbstractConstraint
{
/**
* Assert search has no results and product list in absent after disabling configurable children.
From 3765f05c907ba1cffd5cf7a51d7c7e6147a91165 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:25:02 +0200
Subject: [PATCH 064/277] Fix casing in variable name
---
.../TestCase/LockAdminUserWhenEditingIntegrationTest.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenEditingIntegrationTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenEditingIntegrationTest.php
index 5f803d634fa2a..d1e9c9dee9ec2 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenEditingIntegrationTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenEditingIntegrationTest.php
@@ -84,7 +84,7 @@ public function __inject(
/**
* Run Lock user when creating new integration test.
*
- * @param Integration $initintegration
+ * @param Integration $initIntegration
* @param Integration $integration
* @param int $attempts
* @param User $customAdmin
@@ -92,7 +92,7 @@ public function __inject(
* @return void
*/
public function test(
- Integration $initintegration,
+ Integration $initIntegration,
Integration $integration,
$attempts,
User $customAdmin,
@@ -106,7 +106,7 @@ public function test(
['configData' => $this->configData]
)->run();
$customAdmin->persist();
- $initintegration->persist();
+ $initIntegration->persist();
// login to backend with new user
$this->adminAuthLogin->open();
@@ -114,7 +114,7 @@ public function test(
$this->adminAuthLogin->getLoginBlock()->submit();
// Steps
- $filter = ['name' => $initintegration->getName()];
+ $filter = ['name' => $initIntegration->getName()];
$this->integrationIndexPage->open();
$this->integrationIndexPage->getIntegrationGrid()->searchAndOpen($filter);
for ($i = 0; $i < $attempts; $i++) {
From a41a69367117f5c5da25ef93569f62d8f501567f Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:28:12 +0200
Subject: [PATCH 065/277] Fix typo in test method's name
---
.../app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php | 2 +-
.../Test/Constraint/AssertCityBasedShippingRateChanged.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php
index 3a66629116de9..f5024d3eb7b26 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php
@@ -91,7 +91,7 @@ public function selectShippingMethod(array $method)
* @param array $method
* @return bool
*/
- public function isShippingMethodAvaiable(array $method)
+ public function isShippingMethodAvailable(array $method)
{
$this->waitForShippingRates();
$selector = sprintf($this->shippingMethod, $method['shipping_method'], $method['shipping_service']);
diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
index 482b7d213e671..75e6ccf90e529 100644
--- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
+++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
@@ -33,7 +33,7 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $shippingMethod,
$shippingAvailability = $isShippingAvailable ? 'avaiable' : 'unavailable';
\PHPUnit_Framework_Assert::assertEquals(
$isShippingAvailable,
- $checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvaiable($shippingMethod),
+ $checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvailable($shippingMethod),
"Shipping rates for {$shippingMethod['shipping_service']} should be $shippingAvailability."
);
}
From a144cb6792f419d52480359bec3eedb6816a4413 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:28:36 +0200
Subject: [PATCH 066/277] Fix typo in test result
---
.../Test/Constraint/AssertCityBasedShippingRateChanged.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
index 75e6ccf90e529..ea5de8d06be00 100644
--- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
+++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertCityBasedShippingRateChanged.php
@@ -30,7 +30,7 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $shippingMethod,
'Shipping rate has not been changed.'
);
}
- $shippingAvailability = $isShippingAvailable ? 'avaiable' : 'unavailable';
+ $shippingAvailability = $isShippingAvailable ? 'available' : 'unavailable';
\PHPUnit_Framework_Assert::assertEquals(
$isShippingAvailable,
$checkoutOnepage->getShippingMethodBlock()->isShippingMethodAvailable($shippingMethod),
From 5b7f939b5abb73f06031fc607febad693f2c123f Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 12:56:47 +0200
Subject: [PATCH 067/277] Fix typos in comments
---
.../framework/Magento/TestFramework/Db/AbstractDb.php | 2 +-
.../framework/Magento/TestFramework/Db/Mysql.php | 2 +-
.../Magento/TestFramework/TestCase/AbstractConfigFiles.php | 2 +-
.../testsuite/Magento/Catalog/Model/Product/TypeTest.php | 6 +++---
.../_files/product_export_with_product_links_data.php | 2 +-
.../Magento/CatalogWidget/Block/Product/ProductListTest.php | 2 +-
.../Magento/Customer/Model/CustomerMetadataTest.php | 2 +-
.../Magento/Framework/Data/Form/Element/FieldsetTest.php | 2 +-
.../Integration/Model/ResourceModel/Oauth/TokenTest.php | 2 +-
.../Magento/Search/Model/SearchEngine/ConfigTest.php | 2 +-
10 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php
index 949d17ffb5f66..a15bdec6157a3 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php
@@ -84,7 +84,7 @@ abstract public function cleanup();
abstract protected function getSetupDbDumpFilename();
/**
- * Is dump esxists
+ * Is dump exists
*
* @return bool
*/
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php
index 69f7f2b2ed8db..6900f89a55f9d 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php
@@ -87,7 +87,7 @@ protected function getSetupDbDumpFilename()
}
/**
- * Is dump esxists
+ * Is dump exists
*
* @return bool
*/
diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
index 913c710370816..92ac7ddd468ab 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
@@ -47,7 +47,7 @@ public function setUp()
\Magento\Framework\App\Arguments\FileResolver\Primary::class
)->disableOriginalConstructor()->getMock();
- /* Enable Validation regardles of MAGE_MODE */
+ /* Enable Validation regardless of MAGE_MODE */
$validateStateMock = $this->getMockBuilder(
\Magento\Framework\Config\ValidationStateInterface::class
)->disableOriginalConstructor()->getMock();
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
index 7fe5fbc6303ad..dadee3d9b6fac 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
@@ -20,7 +20,7 @@ protected function setUp()
}
/**
- * @param sring|null $typeId
+ * @param string|null $typeId
* @param string $expectedClass
* @dataProvider factoryDataProvider
*/
@@ -52,7 +52,7 @@ public function factoryDataProvider()
}
/**
- * @param sring|null $typeId
+ * @param string|null $typeId
* @dataProvider factoryReturnsSingletonDataProvider
*/
public function testFactoryReturnsSingleton($typeId)
@@ -82,7 +82,7 @@ public function factoryReturnsSingletonDataProvider()
}
/**
- * @param sring|null $typeId
+ * @param string|null $typeId
* @param string $expectedClass
* @dataProvider priceFactoryDataProvider
*/
diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php
index d9482c40338a3..2f1f0a0b14f54 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php
@@ -7,7 +7,7 @@
require dirname(dirname(__DIR__)) . '/Catalog/_files/category.php';
/** Create fixture store */
require dirname(dirname(__DIR__)) . '/Store/_files/second_store.php';
-/** Create product with mulselect attribute */
+/** Create product with multiselect attribute */
require dirname(dirname(__DIR__)) . '/Catalog/_files/products_with_multiselect_attribute.php';
$productModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
diff --git a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php
index 6892f7b3a8a88..3a64a134d5f95 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php
@@ -68,7 +68,7 @@ public function testCreateCollection()
. '`value`:[`' . implode(',', $multiselectAttributeOptionIds) . '`]^]^]';
$this->block->setData('conditions_encoded', $encodedConditions);
- // Load products collection filtered using specified conditions and perform assesrions
+ // Load products collection filtered using specified conditions and perform assertions
$productCollection = $this->block->createCollection();
$productCollection->load();
$this->assertEquals(
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php
index d88c0934e3f69..eb62eb886fd5d 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php
@@ -159,7 +159,7 @@ public function testGetCustomAttributesMetadataWithCustomAttributes()
);
// Verify the consistency of custom attribute metadata from two services
- // after getAttrbiuteCode was called
+ // after getAttributeCode was called
foreach ($customAttributesMetadata2 as $attribute) {
$attribute->getAttributeCode();
}
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php
index 444e18927f9ee..9453b07f41fc8 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php
@@ -246,7 +246,7 @@ public function getSubFieldsetDataProvider()
$fieldsetField = $textField;
$fieldsetField[1] = 'fieldset';
$advancedFieldsetFld = $fieldsetField;
- // set isAdvenced flag
+ // set isAdvanced flag
$advancedFieldsetFld[4] = true;
$result = [[[$fieldsetField, $textField, $advancedFieldsetFld], 1]];
return $result;
diff --git a/dev/tests/integration/testsuite/Magento/Integration/Model/ResourceModel/Oauth/TokenTest.php b/dev/tests/integration/testsuite/Magento/Integration/Model/ResourceModel/Oauth/TokenTest.php
index ef93099556dd9..57fac92aaabd7 100644
--- a/dev/tests/integration/testsuite/Magento/Integration/Model/ResourceModel/Oauth/TokenTest.php
+++ b/dev/tests/integration/testsuite/Magento/Integration/Model/ResourceModel/Oauth/TokenTest.php
@@ -252,7 +252,7 @@ public function deleteExpiredTokensDataProvider()
}
/**
- * Make that only exired tokens were cleaned up
+ * Make that only expired tokens were cleaned up
*
* @param array $expectedRemovedTokenNumbers
* @param array $expectedPreservedTokenNumbers
diff --git a/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php
index 49d73e71672d4..74926abb52d41 100644
--- a/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php
@@ -17,7 +17,7 @@ protected function setUp()
$xmlPath = __DIR__ . '/../../_files/search_engine.xml';
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
- // Clear out the clache
+ // Clear out the cache
$cacheManager = $objectManager->create(\Magento\Framework\App\Cache\Manager::class);
/** @var \Magento\Framework\App\Cache\Manager $cacheManager */
$cacheManager->clean($cacheManager->getAvailableTypes());
From e5366c57c1625babd86390186a0ea9257f111174 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 13:03:04 +0200
Subject: [PATCH 068/277] Fix typos in variable names
---
.../_files/notifications.php | 28 +++++++++----------
.../Catalog/Model/Product/ImageTest.php | 6 ++--
..._configurable_with_category_and_weight.php | 4 +--
.../Framework/Mview/View/ChangelogTest.php | 4 +--
4 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php b/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php
index 4bb05645ed105..6615c24320b21 100644
--- a/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php
+++ b/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php
@@ -4,34 +4,34 @@
* See COPYING.txt for license details.
*/
$om = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(
\Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL
)->setTitle(
'Unread Critical 1'
)->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR)
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR)
->setTitle('Unread Major 1')
->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(
\Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL
)->setTitle(
'Unread Critical 2'
)->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(
\Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL
)->setTitle(
'Unread Critical 3'
)->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(
\Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL
)->setTitle(
'Read Critical 1'
@@ -39,13 +39,13 @@
1
)->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR)
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR)
->setTitle('Unread Major 2')
->save();
-$mesasge = $om->create(\Magento\AdminNotification\Model\Inbox::class);
-$mesasge->setSeverity(
+$message = $om->create(\Magento\AdminNotification\Model\Inbox::class);
+$message->setSeverity(
\Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL
)->setTitle(
'Removed Critical 1'
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php
index eb32fb98ce8fe..37fee97161b2d 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php
@@ -21,8 +21,8 @@ public function testSetBaseFilePlaceholder()
$model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
\Magento\Catalog\Model\Product\Image::class
);
- /** @var \Magento\Catalog\Model\View\Asset\Placeholder $defualtPlaceholder */
- $defualtPlaceholder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+ /** @var \Magento\Catalog\Model\View\Asset\Placeholder $defaultPlaceholder */
+ $defaultPlaceholder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
->create(
\Magento\Catalog\Model\View\Asset\Placeholder::class,
['type' => 'image']
@@ -30,7 +30,7 @@ public function testSetBaseFilePlaceholder()
$model->setDestinationSubdir('image');
$model->setBaseFile('');
- $this->assertEquals($defualtPlaceholder->getSourceFile(), $model->getBaseFile());
+ $this->assertEquals($defaultPlaceholder->getSourceFile(), $model->getBaseFile());
return $model;
}
diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_with_category_and_weight.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_with_category_and_weight.php
index 519841ddb61e4..b8449a829a227 100644
--- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_with_category_and_weight.php
+++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_with_category_and_weight.php
@@ -55,8 +55,8 @@
$eavAttributeValues = [
'category_ids' => [2]
];
- foreach ($eavAttributeValues as $eavCategoryAttributeCode => $eavCategoryAtttributeValues) {
- $product->setCustomAttribute($eavCategoryAttributeCode, $eavCategoryAtttributeValues);
+ foreach ($eavAttributeValues as $eavCategoryAttributeCode => $eavCategoryAttributeValues) {
+ $product->setCustomAttribute($eavCategoryAttributeCode, $eavCategoryAttributeValues);
}
$product = $productRepository->save($product);
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php
index b26a1cda2476d..c047bd4fffd3d 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php
@@ -126,14 +126,14 @@ public function testGetList()
$this->assertEquals(0, $this->model->getVersion());
//the same that a table is empty
$changelogName = $this->resource->getTableName($this->model->getName());
- $testChengelogData = [
+ $testChangelogData = [
['version_id' => 1, 'entity_id' => 1],
['version_id' => 2, 'entity_id' => 1],
['version_id' => 3, 'entity_id' => 2],
['version_id' => 4, 'entity_id' => 3],
['version_id' => 5, 'entity_id' => 1],
];
- foreach ($testChengelogData as $data) {
+ foreach ($testChangelogData as $data) {
$this->connection->insert($changelogName, $data);
}
$this->assertEquals(5, $this->model->getVersion());
From 25827ba9fe26bb93c8251bda5adf7bd68338de58 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 13:07:46 +0200
Subject: [PATCH 069/277] Fix typo in comment
---
.../static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php b/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php
index c696881588567..1b4fb53c45010 100644
--- a/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php
+++ b/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php
@@ -25,7 +25,7 @@ class ZeroUnitsSniff implements Sniff
const CSS_PROPERTY_UNIT_REM = 'rem';
/**
- * List of available CSS Propery units
+ * List of available CSS Property units
*
* @var array
*/
From c8ad439cc8f286ac7bb1c4548b019387f5b3a80f Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 13:08:41 +0200
Subject: [PATCH 070/277] Fix typo in property name
---
.../Test/Integrity/Magento/Backend/ControllerAclTest.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/ControllerAclTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/ControllerAclTest.php
index 620b6ad21bf75..505d3e5c3270b 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/ControllerAclTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/ControllerAclTest.php
@@ -31,7 +31,7 @@ class ControllerAclTest extends \PHPUnit\Framework\TestCase
*
* @var array
*/
- private $whiteListetBackendControllers = [];
+ private $whiteListedBackendControllers = [];
/**
* List of ACL resources collected from acl.xml files.
@@ -57,7 +57,7 @@ protected function setUp()
if (substr($item, 0, 1) === '#') {
continue;
}
- $this->whiteListetBackendControllers[$item] = 1;
+ $this->whiteListedBackendControllers[$item] = 1;
}
}
@@ -83,7 +83,7 @@ public function testAcl()
$controllerClass = $this->getClassByFilePath($controllerPath);
// skip whitelisted controllers.
- if (isset($this->whiteListetBackendControllers[$controllerClass->getName()])) {
+ if (isset($this->whiteListedBackendControllers[$controllerClass->getName()])) {
continue;
}
// we don't have to check abstract classes.
From dc67156387b9e19017d1ac29db55ca6d4b27d859 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 21:16:54 +0200
Subject: [PATCH 071/277] Fix typo in database column comment
---
app/code/Magento/Catalog/Setup/InstallSchema.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php
index a96f58ecc046a..db5359a11d15b 100644
--- a/app/code/Magento/Catalog/Setup/InstallSchema.php
+++ b/app/code/Magento/Catalog/Setup/InstallSchema.php
@@ -674,7 +674,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
- 'Attriute Set ID'
+ 'Attribute Set ID'
)
->addColumn(
'parent_id',
From c8bbc7ab616482fdbac26f31d2b461af7dcea6fd Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 21:49:31 +0200
Subject: [PATCH 072/277] Refactor getFrontName
---
lib/internal/Magento/Framework/View/Context.php | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/internal/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php
index 0c3932ffe4bd7..c3f1c3e691c84 100644
--- a/lib/internal/Magento/Framework/View/Context.php
+++ b/lib/internal/Magento/Framework/View/Context.php
@@ -332,15 +332,11 @@ public function getModuleName()
}
/**
- * Retrieve the module name
- *
- * @return string
- *
- * @todo alias of getModuleName
+ * @see getModuleName
*/
public function getFrontName()
{
- return $this->getRequest()->getModuleName();
+ return $this->getModuleName();
}
/**
From 8c03f9f8f80d5b414f38df5616f324d41172d089 Mon Sep 17 00:00:00 2001
From: Aki Ojalehto
Date: Sun, 21 Jan 2018 23:17:23 +0200
Subject: [PATCH 073/277] Remove redundant code
---
app/code/Magento/AdminNotification/Model/Feed.php | 3 ---
1 file changed, 3 deletions(-)
diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php
index 1766425fb19b1..d3b0b8501c864 100644
--- a/app/code/Magento/AdminNotification/Model/Feed.php
+++ b/app/code/Magento/AdminNotification/Model/Feed.php
@@ -214,9 +214,6 @@ public function getFeedData()
);
$curl->write(\Zend_Http_Client::GET, $this->getFeedUrl(), '1.0');
$data = $curl->read();
- if ($data === false) {
- return false;
- }
$data = preg_split('/^\r?$/m', $data, 2);
$data = trim($data[1]);
$curl->close();
From efccf1b31193e2a753d2bbd4d2d8dbc92e5ff7ca Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Mon, 22 Jan 2018 10:58:58 -0600
Subject: [PATCH 074/277] MAGETWO-86932: Refactor MFTF Tests
Remove skip group for all of our tests
---
.../Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml | 1 -
.../FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml | 1 -
.../FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSCest.xml | 2 +-
.../Cms/Test/AdminAddVariableToWYSIWYGBlockCest.xml | 1 -
.../Cms/Test/AdminAddVariableToWYSIWYGCMSCest.xml | 1 -
.../Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml | 1 -
...inAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml | 1 -
.../FunctionalTest/Cms/Test/AdminSwitchWYSIWYGOptionsCest.xml | 1 -
.../Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml | 1 -
.../Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterCest.xml | 1 -
10 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml
index 3868909a24b4b..b888881ab02d8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml
@@ -16,7 +16,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml
index c7683d847eda3..320de3bcf4f36 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml
@@ -16,7 +16,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSCest.xml
index 0fee3bc8686ec..a9bd1771aeaa5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSCest.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockCest.xml
index 77ac3ed328935..6e6971a6151f9 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockCest.xml
@@ -15,7 +15,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSCest.xml
index 6867fa376a632..435e1f6edbe15 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSCest.xml
@@ -16,7 +16,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
index 998649c7c78c3..38c410af0b083 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -16,7 +16,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
index 7dedac0e843be..411b9cb64e308 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeCest.xml
@@ -17,7 +17,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminSwitchWYSIWYGOptionsCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminSwitchWYSIWYGOptionsCest.xml
index 11cec94b91b54..76e79e06bf435 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminSwitchWYSIWYGOptionsCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminSwitchWYSIWYGOptionsCest.xml
@@ -17,7 +17,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
index 15c0b8c8e6639..88a20c6fb4aae 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml
@@ -17,7 +17,6 @@
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterCest.xml
index 2c9c0066a6622..3df8c9529b6e5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterCest.xml
@@ -15,7 +15,6 @@
-
From 1c78e30ef75b76ee06d1f63e38917d596be4d5d9 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Mon, 22 Jan 2018 14:18:21 -0600
Subject: [PATCH 075/277] MAGETWO-86932: Refactor MFTF Tests
Fix filename
---
...roducCest.xml => VerifyDefaultWYSIWYGToolbarOnProductCest.xml} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/{VerifyDefaultWYSIWYGToolbarOnProducCest.xml => VerifyDefaultWYSIWYGToolbarOnProductCest.xml} (100%)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProducCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductCest.xml
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProducCest.xml
rename to dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductCest.xml
From 754a4b9d340db184fc23ef18de24523c623949e6 Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Mon, 22 Jan 2018 14:51:35 -0600
Subject: [PATCH 076/277] MAGETWO-85423: Create or update functional tests
- Apply Cart Rule for product
---
.../acceptance/tests/_suite/sampleSuite.xml | 20 +++++++++++++++++++
.../StorefrontProductActionSection.xml | 13 ++++++++++++
.../SalesRule/Section/DiscountSection.xml | 14 +++++++++++++
3 files changed, 47 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
diff --git a/dev/tests/acceptance/tests/_suite/sampleSuite.xml b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
index d42f6d00132b9..c3a3e93b7d8f1 100644
--- a/dev/tests/acceptance/tests/_suite/sampleSuite.xml
+++ b/dev/tests/acceptance/tests/_suite/sampleSuite.xml
@@ -6,6 +6,26 @@
*/
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml
new file mode 100644
index 0000000000000..a3b3a4c1453cc
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
new file mode 100644
index 0000000000000..c4a745412f954
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
From 87a7192f68b692b94b83a6eb4562db6c2c33f4d0 Mon Sep 17 00:00:00 2001
From: Kieu Phan
Date: Mon, 22 Jan 2018 18:54:59 -0600
Subject: [PATCH 077/277] MAGETWO-85423: Create or update functional tests
- Added ActionGroup for applying cart rule on Shopping Cart
---
.../Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
index c4a745412f954..4a8770f72686e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml
@@ -8,6 +8,7 @@
From 5df0b5654c63869fe123a86807c425fde77a8d15 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote
Date: Tue, 23 Jan 2018 08:55:19 -0600
Subject: [PATCH 078/277] MAGETWO-85423: Create or update functional tests
- add coupon to sales rule data
---
.../SalesRule/Data/SalesRuleCouponData.xml | 15 +++++++++++
.../SalesRule/Data/SalesRuleData.xml | 6 ++---
.../Metadata/sales_rule_coupon-meta.xml | 27 +++++++++++++++++++
3 files changed, 45 insertions(+), 3 deletions(-)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule_coupon-meta.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml
new file mode 100644
index 0000000000000..109e1974d6cfc
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ Code
+ 1
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
index 98d27e4bb0fbd..eb84c66bd2b1c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml
@@ -10,12 +10,12 @@
SimpleSalesRule
true
- No Coupon
+ SPECIFIC_COUPON
- - 1
+ - 0
- - 0
+ - 1
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule_coupon-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule_coupon-meta.xml
new file mode 100644
index 0000000000000..55e05c92eb4b1
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule_coupon-meta.xml
@@ -0,0 +1,27 @@
+
+
+
+
+ application/json
+
+
+
+ application/json
+
+
From cfca4cf9001b87816d0980223696093a4690ca20 Mon Sep 17 00:00:00 2001
From: Dan Mooney
Date: Tue, 23 Jan 2018 09:52:46 -0600
Subject: [PATCH 079/277] MAGETWO-86932: Refactor MFTF Tests
Remove comment
---
.../FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
index 38c410af0b083..24b25d3a3ef3a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml
@@ -73,7 +73,6 @@
-
From 16d8bfc790c8bd3256a898fb80cfc50b198351c0 Mon Sep 17 00:00:00 2001
From: Cari Spruiell
Date: Tue, 23 Jan 2018 10:45:59 -0600
Subject: [PATCH 080/277] MAGETWO-85423: Create or update functional tests
- add action groups to create user and user role
---
.../AdminCreateUserActionGroup.xml | 32 +++++++++++++++
.../AdminCreateUserRoleActionGroup.xml | 24 ++++++++++++
.../User/Cest/AdminCreateUserCest.xml | 39 +++++++++++++++++++
.../User/Cest/AdminCreateUserRoleCest.xml | 36 +++++++++++++++++
.../FunctionalTest/User/Data/UserData.xml | 3 ++
.../FunctionalTest/User/Data/UserRoleData.xml | 16 ++++++++
.../User/Page/AdminEditRolePage.xml | 13 +++++++
.../User/Page/AdminEditUserPage.xml | 1 +
.../User/Page/AdminRolesPage.xml | 12 ++++++
.../User/Section/AdminEditRoleInfoSection.xml | 17 ++++++++
.../Section/AdminEditRoleResourcesSection.xml | 14 +++++++
.../User/Section/AdminEditUserRoleSection.xml | 17 ++++++++
.../User/Section/AdminEditUserSection.xml | 5 +++
.../User/Section/AdminRoleGridSection.xml | 17 ++++++++
14 files changed, 246 insertions(+)
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserRoleActionGroup.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserCest.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserRoleCest.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleResourcesSection.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml
create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml
new file mode 100644
index 0000000000000..1c76913a619c8
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserRoleActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserRoleActionGroup.xml
new file mode 100644
index 0000000000000..e461aa5de962b
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserRoleActionGroup.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserCest.xml
new file mode 100644
index 0000000000000..804d6bb8afa3d
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserCest.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserRoleCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserRoleCest.xml
new file mode 100644
index 0000000000000..144c3d271e75d
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Cest/AdminCreateUserRoleCest.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml
index a8461be7f49db..9c57d75b6fac0 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml
@@ -9,6 +9,9 @@
+ admin
+ John
+ Smith
admin@magento.com
admin123
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml
new file mode 100644
index 0000000000000..900f948d3f8e0
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ adminRole
+ 1
+ 1
+
+
\ No newline at end of file
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml
new file mode 100644
index 0000000000000..9ad319d1b953d
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml
index a3e090c566fe2..e14a3479c0641 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml
@@ -8,5 +8,6 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml
new file mode 100644
index 0000000000000..bde3493347825
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml
new file mode 100644
index 0000000000000..7a917112f0559
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleResourcesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleResourcesSection.xml
new file mode 100644
index 0000000000000..0e75aafdce452
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleResourcesSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml
new file mode 100644
index 0000000000000..7329044114075
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml
index a99af9f89372b..6cd771aa73823 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml
@@ -8,6 +8,11 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml
new file mode 100644
index 0000000000000..61af0186f3546
--- /dev/null
+++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
From 2e33a0bc5ca333e6846fd8e483faa398f85788f4 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:49:29 -0600
Subject: [PATCH 081/277] :arrow_double_up: Forwardport of
magento/magento2#11127 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11127.patch (created by @niccifor) based on commit(s):
1. 7d5fc2512cd21bd8e017ad94e4fbd1a04c3257ac
---
app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php b/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php
index 8c018ecee544b..f600c65e05f52 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php
@@ -43,6 +43,7 @@ public function getOrderItemId()
public function setOrderItemId($orderItemId)
{
$this->orderItemId = $orderItemId;
+ return $this;
}
/**
@@ -59,6 +60,7 @@ public function getQty()
public function setQty($qty)
{
$this->qty = $qty;
+ return $this;
}
/**
From 6ff253472a7f3cf8d262b1bccf76f70f38b01db2 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:49:38 -0600
Subject: [PATCH 082/277] :arrow_double_up: Forwardport of
magento/magento2#11138 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11138.patch (created by @jokeputs) based on commit(s):
1. 58d96ae476668625d285d88f77fa9b8f29799a33
---
.../Magento/Store/Model/Address/Renderer.php | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/app/code/Magento/Store/Model/Address/Renderer.php b/app/code/Magento/Store/Model/Address/Renderer.php
index 1f44b9dcec3e3..1d0fdd7284848 100644
--- a/app/code/Magento/Store/Model/Address/Renderer.php
+++ b/app/code/Magento/Store/Model/Address/Renderer.php
@@ -15,6 +15,12 @@
*/
class Renderer
{
+ const DEFAULT_TEMPLATE = "{{var name}}\n" .
+ "{{var street_line1}}\n" .
+ "{{depend street_line2}}{{var street_line2}}\n{{/depend}}" .
+ "{{depend city}}{{var city}},{{/depend}} {{var region}} {{depend postcode}}{{var postcode}},{{/depend}}\n" .
+ "{{var country}}";
+
/**
* @var EventManager
*/
@@ -25,18 +31,26 @@ class Renderer
*/
protected $filterManager;
+ /**
+ * @var string
+ */
+ private $template;
+
/**
* Constructor
*
* @param EventManager $eventManager
* @param FilterManager $filterManager
+ * @param string $template
*/
public function __construct(
EventManager $eventManager,
- FilterManager $filterManager
+ FilterManager $filterManager,
+ $template = self::DEFAULT_TEMPLATE
) {
$this->eventManager = $eventManager;
$this->filterManager = $filterManager;
+ $this->template = $template;
}
/**
@@ -50,9 +64,7 @@ public function format(DataObject $storeInfo, $type = 'html')
{
$this->eventManager->dispatch('store_address_format', ['type' => $type, 'store_info' => $storeInfo]);
$address = $this->filterManager->template(
- "{{var name}}\n{{var street_line1}}\n{{depend street_line2}}{{var street_line2}}\n{{/depend}}" .
- "{{depend city}}{{var city}},{{/depend}} {{var region}} {{depend postcode}}{{var postcode}},{{/depend}}\n" .
- "{{var country}}",
+ $this->template,
['variables' => $storeInfo->getData()]
);
From 2817416f0a46608c3de49ae3d3b118c9818ec70c Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:49:47 -0600
Subject: [PATCH 083/277] :arrow_double_up: Forwardport of
magento/magento2#11134 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11134.patch (created by @Zifius) based on commit(s):
1. 70379e3017df257cff1b418fd7c3bbfe123078a8
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#10775: 404 Forbidden sounds not right (reported by @irinikp)
---
app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php b/app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php
index e8251b5be6030..ce59d2fd48e5a 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php
@@ -34,7 +34,7 @@ public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
- $resultPage->setStatusHeader(404, '1.1', 'Forbidden');
+ $resultPage->setStatusHeader(404, '1.1', 'Not Found');
$resultPage->setHeader('Status', '404 File not found');
$resultPage->addHandle('adminhtml_noroute');
return $resultPage;
From 9701bb7dafc44e5717596607deedb583d25be537 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:49:56 -0600
Subject: [PATCH 084/277] :arrow_double_up: Forwardport of
magento/magento2#11246 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11246.patch (created by @crissanclick) based on commit(s):
1. 79f9c8ae294263386b08aaf0b84c293dae64f585
2. 154dd01fc8015ec3493e957f6e9f4584e04c9ff5
3. c17b3ebfd2ac922776def21eca730fd5ac57f353
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#11231: Can't close mobile search bar once typed (reported by @BenSpace48)
---
.../Search/view/frontend/web/form-mini.js | 80 ++++++++++---------
1 file changed, 42 insertions(+), 38 deletions(-)
diff --git a/app/code/Magento/Search/view/frontend/web/form-mini.js b/app/code/Magento/Search/view/frontend/web/form-mini.js
index 7b2c7003074cb..e8598f46eb5be 100644
--- a/app/code/Magento/Search/view/frontend/web/form-mini.js
+++ b/app/code/Magento/Search/view/frontend/web/form-mini.js
@@ -286,46 +286,50 @@ define([
$.getJSON(this.options.url, {
q: value
}, $.proxy(function (data) {
- $.each(data, function (index, element) {
- var html;
-
- element.index = index;
- html = template({
- data: element
+ if (data.length) {
+ $.each(data, function (index, element) {
+ var html;
+
+ element.index = index;
+ html = template({
+ data: element
+ });
+ dropdown.append(html);
});
- dropdown.append(html);
- });
- this.responseList.indexList = this.autoComplete.html(dropdown)
- .css(clonePosition)
- .show()
- .find(this.options.responseFieldElements + ':visible');
-
- this._resetResponseList(false);
- this.element.removeAttr('aria-activedescendant');
-
- if (this.responseList.indexList.length) {
- this._updateAriaHasPopup(true);
- } else {
- this._updateAriaHasPopup(false);
- }
- this.responseList.indexList
- .on('click', function (e) {
- this.responseList.selected = $(e.currentTarget);
- this.searchForm.trigger('submit');
- }.bind(this))
- .on('mouseenter mouseleave', function (e) {
- this.responseList.indexList.removeClass(this.options.selectClass);
- $(e.target).addClass(this.options.selectClass);
- this.responseList.selected = $(e.target);
- this.element.attr('aria-activedescendant', $(e.target).attr('id'));
- }.bind(this))
- .on('mouseout', function (e) {
- if (!this._getLastElement() && this._getLastElement().hasClass(this.options.selectClass)) {
- $(e.target).removeClass(this.options.selectClass);
- this._resetResponseList(false);
- }
- }.bind(this));
+ this.responseList.indexList = this.autoComplete.html(dropdown)
+ .css(clonePosition)
+ .show()
+ .find(this.options.responseFieldElements + ':visible');
+
+ this._resetResponseList(false);
+ this.element.removeAttr('aria-activedescendant');
+
+ if (this.responseList.indexList.length) {
+ this._updateAriaHasPopup(true);
+ } else {
+ this._updateAriaHasPopup(false);
+ }
+
+ this.responseList.indexList
+ .on('click', function (e) {
+ this.responseList.selected = $(e.currentTarget);
+ this.searchForm.trigger('submit');
+ }.bind(this))
+ .on('mouseenter mouseleave', function (e) {
+ this.responseList.indexList.removeClass(this.options.selectClass);
+ $(e.target).addClass(this.options.selectClass);
+ this.responseList.selected = $(e.target);
+ this.element.attr('aria-activedescendant', $(e.target).attr('id'));
+ }.bind(this))
+ .on('mouseout', function (e) {
+ if (!this._getLastElement() &&
+ this._getLastElement().hasClass(this.options.selectClass)) {
+ $(e.target).removeClass(this.options.selectClass);
+ this._resetResponseList(false);
+ }
+ }.bind(this));
+ }
}, this));
} else {
this._resetResponseList(true);
From ed5d239b463a6d4469bc29a5d258738ec9ecb028 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:50:10 -0600
Subject: [PATCH 085/277] :arrow_double_up: Forwardport of
magento/magento2#11084 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11084.patch (created by @rubenRP) based on commit(s):
1. 6e5c8f0e1d1b2cd157cdc4cd4751ae7c29cffd31
2. 6be876957f0746e825ca94ad3045e2cdd32ff6c9
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#9920: stripped-min-length Validation via UI Component Fails with "special" characters (reported by @bap14)
---
app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js
index c7fb51f813ba0..76b00f56e780c 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js
@@ -244,7 +244,7 @@ define([
],
'stripped-min-length': [
function (value, param) {
- return $(value).text().length >= param;
+ return _.isUndefined(value) || value.length === 0 || utils.stripHtml(value).length >= param;
},
$.mage.__('Please enter at least {0} characters')
],
From c739ef6f6917adec2ad8db143da2e3cf9c036b58 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:50:21 -0600
Subject: [PATCH 086/277] :arrow_double_up: Forwardport of
magento/magento2#11254 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11254.patch (created by @romainruaud) based on commit(s):
1. 43cfc7427dd2b7dc03633a4dcd6b170cb521ae9c
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#10317: Region is being overridden when changing from a required-state country to one that is not required (reported by @nei)
---
.../Magento/Checkout/view/frontend/web/js/region-updater.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
index 82033590b1135..79050ca087740 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
@@ -206,7 +206,7 @@ define([
regionInput.removeClass('required-entry');
}
- regionList.removeClass('required-entry').hide();
+ regionList.removeClass('required-entry').prop('disabled', 'disabled').hide();
regionInput.show();
label.attr('for', regionInput.attr('id'));
}
From 3238020aa6092f2c551df1dad7941de7c385fa8e Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:50:32 -0600
Subject: [PATCH 087/277] :arrow_double_up: Forwardport of
magento/magento2#11297 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11297.patch (created by @michielgerritsen) based on commit(s):
1. 60d66282d5c0bfcd04cd2110b378357b7e3dab98
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#5105: Error While send Invoice with Grouped Products (reported by @srbarba)
---
.../view/frontend/templates/email/items/invoice/default.phtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml
index 20c2c1869fedb..1fca65932b0b0 100644
--- a/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml
+++ b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml
@@ -31,6 +31,6 @@
= /* @escapeNotVerified */ $_item->getQty() * 1 ?> |
- = /* @escapeNotVerified */ $block->getItemPrice($_item) ?>
+ = /* @escapeNotVerified */ $block->getItemPrice($_item->getOrderItem()) ?>
|
From b9df95d3e281ceb232056777ff24ad2705f87b87 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:50:41 -0600
Subject: [PATCH 088/277] :arrow_double_up: Forwardport of
magento/magento2#11165 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11165.patch (created by @bka) based on commit(s):
1. 33dcc36b1f5214929f281c5618a31bbc6bded27b
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#7582: Payment methods in payments title in wrong language (reported by @Bartlomiejsz)
---
app/code/Magento/Quote/Model/QuoteRepository.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php
index 01c21bbbe50a7..d3967794b300a 100644
--- a/app/code/Magento/Quote/Model/QuoteRepository.php
+++ b/app/code/Magento/Quote/Model/QuoteRepository.php
@@ -212,7 +212,7 @@ protected function loadQuote($loadMethod, $loadField, $identifier, array $shared
if ($sharedStoreIds) {
$quote->setSharedStoreIds($sharedStoreIds);
}
- $quote->setStoreId($this->storeManager->getStore()->getId())->$loadMethod($identifier);
+ $quote->$loadMethod($identifier)->setStoreId($this->storeManager->getStore()->getId());
if (!$quote->getId()) {
throw NoSuchEntityException::singleField($loadField, $identifier);
}
From b68a790fca90e576702f4ae98c162bcc553c2a22 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:50:52 -0600
Subject: [PATCH 089/277] :arrow_double_up: Forwardport of
magento/magento2#11205 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11205.patch (created by @Tomasz-Silpion) based on commit(s):
1. d98858e59b0fab496d7bc5b359f09f0792a4ade7
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#11163: Magento 2.2.0 Pages showing error: Data key is missing: code-entity (reported by @kfaer)
---
.../view/adminhtml/ui_component/cms_page_form.xml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml b/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml
index 735de2bd7b177..cc9249b2d3d38 100644
--- a/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml
+++ b/app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml
@@ -13,7 +13,12 @@
-
+
+
+ Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage
+ cms_page_form
+
+
From b8e7c76b2ff2d84c3780ee5486a82b4ca1374691 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:51:01 -0600
Subject: [PATCH 090/277] :arrow_double_up: Forwardport of
magento/magento2#11390 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11390.patch (created by @jahvi) based on commit(s):
1. 51e0867597d4e0fc590afff51345fcd10ba12ef9
Fixed GitHub Issues in 2.3-develop branch:
- magento/magento2#8958: Hint mistake in english language (reported by @MighT-W315H31T)
---
.../Backend/view/adminhtml/web/template/dynamic-rows/grid.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
index 74621806fa5fb..891ad48b33eff 100644
--- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
+++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
@@ -85,7 +85,7 @@
+ translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'">
:
From 074285735cd6d33fd530302390ab8101e73d7e34 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:51:13 -0600
Subject: [PATCH 091/277] :arrow_double_up: Forwardport of
magento/magento2#11219 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11219.patch (created by @mszydlo) based on commit(s):
1. c1c5796bcf467584833ac49fc40f74187b89973b
---
.../Magento/Theme/view/frontend/templates/js/polyfill.phtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml b/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml
index 7e8854b914261..2b75bd2222e26 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml
@@ -126,7 +126,7 @@
};
window.localStorage.__proto__ = window.localStorage = new Storage('local');
- window.sessionStorage.__proto__ = window.sessionStorag = new Storage('session');
+ window.sessionStorage.__proto__ = window.sessionStorage = new Storage('session');
})();
}
From fde512eacfce36508bcec2b1c08ef381d0af3f92 Mon Sep 17 00:00:00 2001
From: Magento EngCom Team
Date: Tue, 23 Jan 2018 10:51:22 -0600
Subject: [PATCH 092/277] :arrow_double_up: Forwardport of
magento/magento2#11345 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11345.patch (created by @davidangel) based on commit(s):
1. dd6e5a36e2a3bcc1167d12897686fdb9ce1caa3d
2. 4092346a9505d190faf65930b63db881c3e3b5fd
3. 84ff52beb4adb70024060179ddff3eb1776e47db
---
app/code/Magento/Cms/i18n/en_US.csv | 2 +-
.../Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml | 2 +-
.../app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/code/Magento/Cms/i18n/en_US.csv b/app/code/Magento/Cms/i18n/en_US.csv
index 983493bb7732a..e4989777593f8 100644
--- a/app/code/Magento/Cms/i18n/en_US.csv
+++ b/app/code/Magento/Cms/i18n/en_US.csv
@@ -133,7 +133,7 @@ Block,Block
"Enable Page","Enable Page"
Content,Content
"Content Heading","Content Heading"
-"Search Engine Optimisation","Search Engine Optimisation"
+"Search Engine Optimization","Search Engine Optimization"
"Meta Title","Meta Title"
"Meta Keywords","Meta Keywords"
"Meta Description","Meta Description"
diff --git a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml
index f8c4f07bd4336..5441481f6cea2 100644
--- a/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml
+++ b/app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml
@@ -141,7 +141,7 @@