diff --git a/app/code/Magento/Catalog/Model/Observer.php b/app/code/Magento/Catalog/Model/Observer.php index dac92e427e266bdd07f63eb1e3ce3c5edf18c7dc..39e72883f68add9d3672497199eb7c744480a7db 100644 --- a/app/code/Magento/Catalog/Model/Observer.php +++ b/app/code/Magento/Catalog/Model/Observer.php @@ -5,6 +5,9 @@ */ namespace Magento\Catalog\Model; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Observer { /** @@ -62,16 +65,23 @@ class Observer protected $_productResourceFactory; /** - * @param \Magento\Catalog\Model\Resource\Category $categoryResource - * @param \Magento\Catalog\Model\Resource\Product $catalogProduct + * @var \Magento\Framework\Registry + */ + protected $_registry; + + /** + * @param \Magento\Framework\Registry $registry + * @param Resource\Category $categoryResource + * @param Resource\Product $catalogProduct * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Catalog\Model\Layer\Resolver $layerResolver + * @param Layer\Resolver $layerResolver * @param \Magento\Catalog\Helper\Category $catalogCategory * @param \Magento\Catalog\Helper\Data $catalogData * @param Indexer\Category\Flat\State $categoryFlatState - * @param \Magento\Catalog\Model\Resource\ProductFactory $productResourceFactory + * @param Resource\ProductFactory $productResourceFactory */ public function __construct( + \Magento\Framework\Registry $registry, \Magento\Catalog\Model\Resource\Category $categoryResource, \Magento\Catalog\Model\Resource\Product $catalogProduct, \Magento\Store\Model\StoreManagerInterface $storeManager, @@ -81,6 +91,7 @@ class Observer \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState, \Magento\Catalog\Model\Resource\ProductFactory $productResourceFactory ) { + $this->_registry = $registry; $this->_categoryResource = $categoryResource; $this->_catalogProduct = $catalogProduct; $this->_storeManager = $storeManager; @@ -137,11 +148,20 @@ class Observer $block->addIdentity(\Magento\Catalog\Model\Category::CACHE_TAG . '_' . $category->getId()); $tree = $parentCategoryNode->getTree(); + + $isActiveCategory = false; + /** @var \Magento\Catalog\Model\Category $currentCategory */ + $currentCategory = $this->_registry->registry('current_category'); + if ($currentCategory && $currentCategory->getId() == $category->getId()) { + $isActiveCategory = true; + } + $categoryData = [ 'name' => $category->getName(), 'id' => $nodeId, 'url' => $this->_catalogCategory->getCategoryUrl($category), - 'is_active' => $this->_isActiveMenuCategory($category), + 'has_active' => $this->hasActive($category), + 'is_active' => $isActiveCategory ]; $categoryNode = new \Magento\Framework\Data\Tree\Node($categoryData, 'id', $tree, $parentCategoryNode); $parentCategoryNode->addChild($categoryNode); @@ -162,7 +182,7 @@ class Observer * @param \Magento\Framework\Data\Tree\Node $category * @return bool */ - protected function _isActiveMenuCategory($category) + protected function hasActive($category) { if (!$this->_catalogLayer) { return false; diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml index db3a01d67c3cf61a3b8469d5b995c2dbd79b0810..b09be18c66169f4c3d0e1242cdd2585609a50499 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml @@ -26,7 +26,7 @@ require([ var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' + '<div id="<%- data.id %>" class="file-row file-row-narrow">' + '<span class="file-info">' + - '<span class="file-info-name"><%- data.name %></span>' + + '<span class="file-info-name"><%= data.name %></span>' + ' ' + '<span class="file-info-size">(<%- data.size %>)</span>' + '</span>' + @@ -41,7 +41,7 @@ var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' + '</div>'; var fileListTemplate = '<span class="file-info">' + - '<span class="file-info-name"><%- data.name %></span>' + + '<span class="file-info-name"><%= data.name %></span>' + ' ' + '<span class="file-info-size">(<%- data.size %>)</span>' + '</span>'; diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml index bf2b72140ba8a082faa3e7824016fe7310ce724b..c7db53b3b85d63a7a0a6568f3efe26dea28270e1 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml @@ -15,58 +15,61 @@ ?> <?php $_product = $block->getProduct()?> <?php $block->getConfigJson() ?> -<div class="form-inline"> - <div class="field"> - <label class="label" for="name"><span><?php echo __('Title')?></span></label> - <div class="control"> - <input type="text" class="input-text" id="downloadable_links_title" name="product[links_title]" value="<?php echo $block->getLinksTitle() ?>" <?php echo($_product->getStoreId() && $block->getUsedDefault()) ? 'disabled="disabled"' : '' ?>> - <?php if ($_product->getStoreId()): ?> - <input id="link_title_default" type="checkbox" name="use_default[]" value="links_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $block->getUsedDefault() ? 'checked="checked"' : '' ?> /> - <label class="normal" for="link_title_default"><?php echo __('Use Default Value'); ?></label> - <?php endif; ?> - </div> - <div class="field-service"> - <?php echo !$block->isSingleStoreMode() ? __('[STORE VIEW]') : ''; ?> +<div class="admin__scope"> + <fieldset class="admin__fieldset downloadable-form"> + + <div class="admin__field" <?php echo !$block->isSingleStoreMode() ? ' data-config-scope="' . __('[STORE VIEW]') . '"' : ''; ?>> + <label class="admin__field-label" for="downloadable_links_title"><span><?php echo __('Title')?></span></label> + <div class="admin__field-control"> + <input type="text" class="admin__control-text" id="downloadable_links_title" name="product[links_title]" value="<?php echo $block->getLinksTitle() ?>" <?php echo($_product->getStoreId() && $block->getUsedDefault()) ? 'disabled="disabled"' : '' ?>> + <?php if ($_product->getStoreId()): ?> + <div class="admin__field admin__field-option"> + <input id="link_title_default" class="admin__control-checkbox" type="checkbox" name="use_default[]" value="links_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $block->getUsedDefault() ? 'checked="checked"' : '' ?> /> + <label class="admin__field-label" for="link_title_default"><span><?php echo __('Use Default Value'); ?></span></label> + </div> + <?php endif; ?> + </div> </div> - </div> - <div class="field"> - <label class="label" for="name"><span><?php echo __('Links can be purchased separately')?></span></label> - <div class="control"> - <?php echo $block->getPurchasedSeparatelySelect()?> + <div class="admin__field" <?php echo !$block->isSingleStoreMode() ? ' data-config-scope="' . __('[GLOBAL]') . '"' : ''; ?>> + <label class="admin__field-label" for="downloadable_link_purchase_type"><span><?php echo __('Links can be purchased separately')?></span></label> + <div class="admin__field-control"> + <?php echo $block->getPurchasedSeparatelySelect()?> + </div> </div> - <div class="field-service"> - <?php echo !$block->isSingleStoreMode() ? __('[GLOBAL]') : ''; ?> + <div class="admin__field admin__field-wide"> + <div class="admin__field-control"> + <div class="admin__control-table-wrapper"> + <table cellspacing="0" class="admin__control-table"> + <thead> + <tr> + <th class="col-title _required"><span><?php echo __('Title') ?></span></th> + <?php if ($block->getCanReadPrice() !== false) : ?> + <th class="col-price"><span><?php echo __('Price') ?></span></th> + <?php endif; ?> + <th class="col-limit"><span><?php echo __('Max. Downloads') ?></span></th> + <th class="col-option"><span><?php echo __('Shareable') ?></span></th> + <th class="col-sample"><span><?php echo __('Sample') ?></span></th> + <th class="col-file"><span><?php echo __('File') ?></span></th> + <th class="col-sort"><span><?php echo __('Sort Order') ?></span></th> + <th class="col-actions"> </th> + </tr> + </thead> + <tfoot> + <tr> + <td class="col-actions-add" colspan="8"><?php echo $block->getAddButtonHtml() ?></td> + </tr> + </tfoot> + <tbody id="link_items_body"> + </tbody> + </table> + </div> + <div class="admin__field-note"> + <span><?php echo __('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></span> + </div> + </div> </div> - </div> - - <table cellspacing="0" class="data-table"> - <thead> - <tr> - <th><?php echo __('Title')?> <span class="required">*</span></th> - <?php if ($block->getCanReadPrice() !== false) : ?> - <th><?php echo __('Price')?></th> - <?php endif; ?> - <th><?php echo __('Max. Downloads')?></th> - <th><?php echo __('Shareable')?></th> - <th><?php echo __('Sample')?></th> - <th><?php echo __('File')?></th> - <th><?php echo __('Sort Order')?></th> - <th class="col-delete"> </th> - </tr> - </thead> - <tfoot> - <tr> - <td colspan="8" class="col-actions-add"><?php echo $block->getAddButtonHtml()?></td> - </tr> - </tfoot> - <tbody id="link_items_body"> - </tbody> - </table> - -<div><small><?php echo __('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></small></div> - - + </fieldset> </div> <script> require([ @@ -79,15 +82,15 @@ require([ ], function(jQuery, registry, mageTemplate){ registry.get('downloadable', function (Downloadable) { var linkTemplate = '<tr>'+ - '<td>'+ + '<td class="col-title">'+ '<input type="hidden" class="__delete__" name="downloadable[link][<%- data.id %>][is_delete]" value="" />'+ '<input type="hidden" name="downloadable[link][<%- data.id %>][link_id]" value="<%- data.link_id %>" />'+ - '<input type="text" class="required-entry input-text" name="downloadable[link][<%- data.id %>][title]" value="<%- data.title %>" />'+ + '<input type="text" class="required-entry input-text admin__control-text" name="downloadable[link][<%- data.id %>][title]" value="<%- data.title %>" />'+ '<?php echo $_product->getStoreId() ? '<input type="checkbox" id="downloadable_link_<%- data.id %>_title" name="downloadable[link][<%- data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_link_<%- data.id %>_title">Use Default Value</label>' : '' ?>'+ '</td>'+ <?php if ($block->getCanReadPrice() !== false) : ?> - '<td class="input-price">'+ - '<input type="text" id="downloadable_link_<%- data.id %>_price_value" class="input-text validate-number link-prices<?php if ($block->getCanEditPrice() === false) : ?> disabled<?php endif; ?>" name="downloadable[link][<%- data.id %>][price]" value="<%- data.price %>"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> ' + + '<td class="input-price col-price">'+ + '<input type="text" id="downloadable_link_<%- data.id %>_price_value" class="input-text admin__control-text validate-number link-prices<?php if ($block->getCanEditPrice() === false) : ?> disabled<?php endif; ?>" name="downloadable[link][<%- data.id %>][price]" value="<%- data.price %>"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> ' + '<label>[<?php echo $block->getBaseCurrencyCode($_product->getStoreId()) ?>]</label>' + <?php if ($_product->getStoreId() && $block->getIsPriceWebsiteScope()) : ?> '<br /><input type="checkbox" id="downloadable_link_<%- data.id %>_price" name="downloadable[link][<%- data.id %>][use_default_price]" value="1"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> <label for="downloadable_link_<%- data.id %>_price">Use Default Value</label>' + @@ -99,16 +102,16 @@ require([ '<input type="hidden" id="downloadable_link_<%- data.id %>_price" name="downloadable[link][<%- data.id %>][use_default_price]" value="1" />' + <?php endif; ?> <?php endif; ?> - '<td><input type="text" id="downloadable_link_<%- data.id %>_downloads" name="downloadable[link][<%- data.id %>][number_of_downloads]" class="input-text downloads" value="<%- data.number_of_downloads %>" />'+ + '<td class="col-limit"><input type="text" id="downloadable_link_<%- data.id %>_downloads" name="downloadable[link][<%- data.id %>][number_of_downloads]" class="input-text admin__control-text downloads" value="<%- data.number_of_downloads %>" />'+ '<p><input type="checkbox" class="checkbox" id="downloadable_link_<%- data.id %>_is_unlimited" name="downloadable[link][<%- data.id %>][is_unlimited]" value="1" <%- data.is_unlimited %> /> <label for="downloadable_link_<%- data.id %>_is_unlimited">Unlimited</label></p></td>'+ - '<td>'+ + '<td class="col-share">'+ '<select id="downloadable_link _<%- data.id %>_shareable" name="downloadable[link][<%- data.id %>][is_shareable]">'+ '<option value="1">Yes</option>'+ '<option value="0">No</option>'+ '<option value="2" selected="selected">Use config</option>'+ '</select>'+ '</td>'+ - '<td>'+ + '<td class="col-file">'+ '<div class="files">'+ '<div class="row">'+ '<label for="downloadable_link_<%- data.id %>_sample_file_type"><input type="radio" class="radio" id="downloadable_link_<%- data.id %>_sample_file_type" name="downloadable[link][<%- data.id %>][sample][type]" value="file"<%- data.sample_file_checked %> /> File:</label>'+ @@ -127,14 +130,14 @@ require([ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_link_<%- data.id %>_sample_url_type"><input type="radio" class="radio" id="downloadable_link_<%- data.id %>_sample_url_type" name="downloadable[link][<%- data.id %>][sample][type]" value="url"<%- data.sample_url_checked %> /> URL:</label><input type="text" class="input-text validate-downloadable-url validate-url" name="downloadable[link][<%- data.id %>][sample][url]" value="<%- data.sample_url %>" />'+ + '<label for="downloadable_link_<%- data.id %>_sample_url_type"><input type="radio" class="radio" id="downloadable_link_<%- data.id %>_sample_url_type" name="downloadable[link][<%- data.id %>][sample][type]" value="url"<%- data.sample_url_checked %> /> URL:</label><input type="text" class="input-text admin__control-text validate-downloadable-url validate-url" name="downloadable[link][<%- data.id %>][sample][url]" value="<%- data.sample_url %>" />'+ '</div>'+ '<div>'+ '<span id="downloadable_link_<%- data.id %>_sample_container"></span>'+ '</div>'+ '</div>'+ '</td>'+ - '<td>'+ + '<td class="col-file">'+ '<div class="files">'+ '<div class="row">'+ '<label for="downloadable_link_<%- data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%- data.id %>_file_type" name="downloadable[link][<%- data.id %>][type]" value="file"<%- data.file_checked %> /> File:</label>'+ @@ -153,16 +156,16 @@ require([ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_link_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%- data.id %>_url_type" name="downloadable[link][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label><input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[link][<%- data.id %>][link_url]" value="<%- data.link_url %>" />'+ + '<label for="downloadable_link_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%- data.id %>_url_type" name="downloadable[link][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label><input type="text" class="validate-downloadable-url validate-url input-text admin__control-text" name="downloadable[link][<%- data.id %>][link_url]" value="<%- data.link_url %>" />'+ '</div>'+ '<div>'+ '<span id="downloadable_link_<%- data.id %>_link_container"></span>'+ '</div>'+ '</div>'+ '</td>'+ - '<td><input type="text" name="downloadable[link][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text sort" /></td>'+ - '<td class="col-delete">'+ - '<button id="downloadable_link_<%- data.id %>_delete_button" type="button" class="action- scalable delete delete-link-item"><span><span><span><?php echo __('Delete'); ?></span></span></span></button>'+ + '<td class="col-sort"><input type="text" name="downloadable[link][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text admin__control-text sort" /></td>'+ + '<td class="col-action">'+ + '<button id="downloadable_link_<%- data.id %>_delete_button" type="button" class="action-remove"><span><?php echo __('Delete'); ?></span></button>'+ '</td>'+ '</tr>'; @@ -309,7 +312,7 @@ require([ } }, bindRemoveButtons : function(){ - var buttons = $$('tbody#link_items_body .delete-link-item'); + var buttons = $$('tbody#link_items_body .action-remove'); for(var i=0;i<buttons.length;i++){ if(!$(buttons[i]).binded && !$(buttons[i]).hasClassName('disabled')){ $(buttons[i]).binded = true; @@ -351,7 +354,7 @@ require([ if ($(id + ' .progressbar-container').length) { $(id + ' .progressbar-container').parent().remove(); } - + fileSize = typeof file.size == "undefined" ? $.mage.__('We could not detect a size.') : byteConvert(file.size); diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml index 525009f591747a531c55553aeb251e81cad8d6b4..85b099dd18a06cddb89a558f594cf399b3d4b7f3 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml @@ -15,40 +15,47 @@ $_product = $block->getProduct(); $block->getConfigJson(); ?> -<div class="form-inline"> - <div class="field"> - <label class="label" for="name"><span><?php echo __('Title')?></span></label> - <div class="control"> - <input type="text" class="input-text" name="product[samples_title]" value="<?php echo $block->getSamplesTitle() ?>" <?php echo($_product->getStoreId() && $block->getUsedDefault()) ? 'disabled="disabled"' : '' ?>> - <?php if ($_product->getStoreId()): ?> - <input id="sample_title_default" type="checkbox" name="use_default[]" value="samples_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $block->getUsedDefault() ? 'checked="checked"' : '' ?> /> - <label class="normal" for="sample_title_default">Use Default Value</label> - <?php endif; ?> +<div class="admin__scope"> + <fieldset class="admin__fieldset downloadable-form"> + <div class="admin__field"<?php echo !$block->isSingleStoreMode() ? ' data-config-scope="' . __('[STORE VIEW]') . '"' : ''; ?>> + <label class="admin__field-label" for="downloadable_samples_title"><span><?php echo __('Title')?></span></label> + <div class="admin__field-control"> + <input type="text" class="admin__control-text" id="downloadable_samples_title" name="product[samples_title]" value="<?php echo $block->getSamplesTitle() ?>" <?php echo($_product->getStoreId() && $block->getUsedDefault()) ? 'disabled="disabled"' : '' ?>> + <?php if ($_product->getStoreId()): ?> + <div class="admin__field admin__field-option"> + <input id="sample_title_default" class="admin__control-checkbox" type="checkbox" name="use_default[]" value="samples_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $block->getUsedDefault() ? 'checked="checked"' : '' ?> /> + <label class="admin__field-label" for="sample_title_default"><span>Use Default Value</span></label> + </div> + <?php endif; ?> + </div> </div> - <div class="field-service"> - <?php echo !$block->isSingleStoreMode() ? __('[STORE VIEW]') : ''; ?> + <div class="admin__field admin__field-wide"> + <div class="admin__field-control"> + <div class="admin__control-table-wrapper"> + <table cellspacing="0" class="admin__control-table"> + <thead> + <tr> + <th class="_required col-title"><span><?php echo __('Title') ?></span></th> + <th class="col-file"><span><?php echo __('File') ?></span></th> + <th class="col-sort"><span><?php echo __('Sort Order') ?></span></th> + <th class="col-actions"> </th> + </tr> + </thead> + <tfoot> + <tr> + <td colspan="4" class="col-actions"><?php echo $block->getAddButtonHtml() ?></td> + </tr> + </tfoot> + <tbody id="sample_items_body"> + </tbody> + </table> + </div> + <div class="admin__field-note"> + <span><?php echo __('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></span> + </div> + </div> </div> - </div> - - <table cellspacing="0" class="data-table"> - <thead> - <tr> - <th><?php echo __('Title') ?> <span class="required">*</span></th> - <th><?php echo __('File') ?></th> - <th><?php echo __('Sort Order') ?></th> - <th class="col-delete"> </th> - </tr> - </thead> - <tfoot> - <tr> - <td colspan="4" class="col-actions-add"><?php echo $block->getAddButtonHtml() ?></td> - </tr> - </tfoot> - <tbody id="sample_items_body"> - </tbody> - </table> - - <div><small><?php echo __('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></small></div> + </fieldset> </div> <script> require([ @@ -60,13 +67,13 @@ require([ ], function (jQuery, registry, mageTemplate) { registry.get('downloadable', function (Downloadable) { var sampleTemplate = '<tr>'+ - '<td>'+ + '<td class="col-title">'+ '<input type="hidden" class="__delete__" name="downloadable[sample][<%- data.id %>][is_delete]" value="" />'+ '<input type="hidden" name="downloadable[sample][<%- data.id %>][sample_id]" value="<%- data.sample_id %>" />'+ - '<input type="text" class="required-entry input-text" name="downloadable[sample][<%- data.id %>][title]" value="<%- data.title %>" />'+ + '<input type="text" class="required-entry input-text admin__control-text" name="downloadable[sample][<%- data.id %>][title]" value="<%- data.title %>" />'+ '<?php echo $_product->getStoreId() ? '<br /><input type="checkbox" id="downloadable_sample_<%- data.id %>_title" name="downloadable[sample][<%- data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_sample_<%- data.id %>_title">Use Default Value</label>' : '' ?>'+ '</td>'+ - '<td>'+ + '<td class="col-file">'+ '<div class="files-wide">'+ '<div class="row">'+ '<label for="downloadable_sample_<%- data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%- data.id %>_file_type" name="downloadable[sample][<%- data.id %>][type]" value="file"<%- data.file_checked %> /> File:</label>'+ @@ -87,7 +94,7 @@ require([ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_sample_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%- data.id %>_url_type" name="downloadable[sample][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label> <input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[sample][<%- data.id %>][sample_url]" value="<%- data.sample_url %>" />'+ + '<label for="downloadable_sample_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%- data.id %>_url_type" name="downloadable[sample][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label> <input type="text" class="validate-downloadable-url validate-url input-text admin__control-text" name="downloadable[sample][<%- data.id %>][sample_url]" value="<%- data.sample_url %>" />'+ '</div>'+ '<div>'+ '<span id="downloadable_sample_<%- data.id %>_container"></span>'+ @@ -95,9 +102,9 @@ require([ '</div>'+ '</td>'+ - '<td><input type="text" name="downloadable[sample][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text sort" /></td>'+ - '<td class="col-delete">'+ - '<button type="button" class="action- scalable delete icon-btn delete-sample-item"><span>Delete</span></button>'+ + '<td class="col-sort"><input type="text" name="downloadable[sample][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text sort admin__control-text" /></td>'+ + '<td class="col-actions">'+ + '<button type="button" class="action-remove"><span>Delete</span></button>'+ '</td>'+ '</tr>'; sampleItems = { @@ -178,7 +185,7 @@ require([ } }, bindRemoveButtons: function() { - var buttons = $$('tbody#sample_items_body .delete-sample-item'); + var buttons = $$('tbody#sample_items_body .action-remove'); for(var i=0;i<buttons.length;i++){ if(!$(buttons[i]).binded){ $(buttons[i]).binded = true; diff --git a/app/code/Magento/PageCache/etc/varnish3.vcl b/app/code/Magento/PageCache/etc/varnish3.vcl index 7fa9a30ec9ac5acdce849c445abfd8efa8cf496f..0b6651fbc0cd4d66748e7d68b683dc823ff574d2 100644 --- a/app/code/Magento/PageCache/etc/varnish3.vcl +++ b/app/code/Magento/PageCache/etc/varnish3.vcl @@ -54,7 +54,7 @@ sub vcl_recv { std.collect(req.http.Cookie); # static files are always cacheable. remove SSL flag and cookie - if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") { + if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") { unset req.http.Https; unset req.http.Cookie; } @@ -96,7 +96,7 @@ sub vcl_fetch { # images, css and js are cacheable by default so we have to remove cookie also if (beresp.ttl > 0s && (req.request == "GET" || req.request == "HEAD")) { unset beresp.http.set-cookie; - if (req.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") { + if (req.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") { set beresp.http.Pragma = "no-cache"; set beresp.http.Expires = "-1"; set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0"; diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 5936fcd69255d03dbc70e6e34bf60282bda2dca5..0f3dddb893d95d123a74ef618183ddb6c9e8bbe0 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -47,7 +47,7 @@ sub vcl_recv { std.collect(req.http.Cookie); # static files are always cacheable. remove SSL flag and cookie - if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") { + if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") { unset req.http.Https; unset req.http.Cookie; } @@ -90,7 +90,7 @@ sub vcl_backend_response { # images, css and js are cacheable by default so we have to remove cookie also if (beresp.ttl > 0s && (bereq.method == "GET" || bereq.method == "HEAD")) { unset beresp.http.set-cookie; - if (bereq.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") { + if (bereq.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") { set beresp.http.Pragma = "no-cache"; set beresp.http.Expires = "-1"; set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0"; diff --git a/app/code/Magento/Theme/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php index 5bd175abffc813c4117778c4420df3d3a509c452..177418d892ed452d2864c4327e4a837a62ba7b07 100644 --- a/app/code/Magento/Theme/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -7,6 +7,9 @@ namespace Magento\Theme\Block\Html; use Magento\Framework\View\Block\IdentityInterface; use Magento\Framework\View\Element\Template; +use Magento\Framework\Data\TreeFactory; +use Magento\Framework\Data\Tree\Node; +use Magento\Framework\Data\Tree\NodeFactory; /** * Html page top menu block @@ -28,13 +31,32 @@ class Topmenu extends Template implements IdentityInterface protected $_menu; /** - * Init top menu tree structure + * Core registry * - * @return void + * @var Registry */ - public function _construct() - { - $this->_menu = new \Magento\Framework\Data\Tree\Node([], 'root', new \Magento\Framework\Data\Tree()); + protected $registry; + + /** + * @param Template\Context $context + * @param NodeFactory $nodeFactory + * @param TreeFactory $treeFactory + * @param array $data + */ + public function __construct( + Template\Context $context, + NodeFactory $nodeFactory, + TreeFactory $treeFactory, + array $data = [] + ) { + parent::__construct($context, $data); + $this->_menu = $nodeFactory->create( + [ + 'data' => [], + 'idField' => 'root', + 'tree' => $treeFactory->create() + ] + ); } /** @@ -272,6 +294,8 @@ class Topmenu extends Template implements IdentityInterface if ($item->getIsActive()) { $classes[] = 'active'; + } elseif ($item->getHasActive()) { + $classes[] = 'has-active'; } if ($item->getIsLast()) { diff --git a/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ab2afb8ef4ea906040c419e4e04522f28013c09d --- /dev/null +++ b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php @@ -0,0 +1,141 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Theme\Test\Unit\Block\Html; + +use Magento\Theme\Block\Html\Topmenu; +use Magento\Framework\Registry; +use Magento\Framework\View\Element\Template\Context; +use Magento\Framework\Data\TreeFactory; +use Magento\Framework\Data\Tree\NodeFactory; + +class TopmenuTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Registry|\PHPUnit_Framework_MockObject_MockObject + */ + protected $registry; + + /** + * @var Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var NodeFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $nodeFactory; + + /** + * @var TreeFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $treeFactory; + + /** + * @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject + */ + protected $category; + + // @codingStandardsIgnoreStart + + /** @var string */ + protected $htmlWithoutCategory = <<<HTML +<li class="level0 nav-1 first"><a href="http://magento2/category-0.html" ><span></span></a></li><li class="level0 nav-2"><a href="http://magento2/category-1.html" ><span></span></a></li><li class="level0 nav-3"><a href="http://magento2/category-2.html" ><span></span></a></li><li class="level0 nav-4"><a href="http://magento2/category-3.html" ><span></span></a></li><li class="level0 nav-5"><a href="http://magento2/category-4.html" ><span></span></a></li><li class="level0 nav-6"><a href="http://magento2/category-5.html" ><span></span></a></li><li class="level0 nav-7"><a href="http://magento2/category-6.html" ><span></span></a></li><li class="level0 nav-8"><a href="http://magento2/category-7.html" ><span></span></a></li><li class="level0 nav-9"><a href="http://magento2/category-8.html" ><span></span></a></li><li class="level0 nav-10 last"><a href="http://magento2/category-9.html" ><span></span></a></li> +HTML; + + /** @var string */ + protected $htmlWithCategory = <<<HTML +<li class="level0 nav-1 first active"><a href="http://magento2/category-0.html" ><span></span></a></li><li class="level0 nav-2"><a href="http://magento2/category-1.html" ><span></span></a></li><li class="level0 nav-3"><a href="http://magento2/category-2.html" ><span></span></a></li><li class="level0 nav-4"><a href="http://magento2/category-3.html" ><span></span></a></li><li class="level0 nav-5"><a href="http://magento2/category-4.html" ><span></span></a></li><li class="level0 nav-6"><a href="http://magento2/category-5.html" ><span></span></a></li><li class="level0 nav-7"><a href="http://magento2/category-6.html" ><span></span></a></li><li class="level0 nav-8"><a href="http://magento2/category-7.html" ><span></span></a></li><li class="level0 nav-9"><a href="http://magento2/category-8.html" ><span></span></a></li><li class="level0 nav-10 last"><a href="http://magento2/category-9.html" ><span></span></a></li> +HTML; + + // @codingStandardsIgnoreEnd + + public function setUp() + { + $isCurrentItem = $this->getName() == 'testGetHtmlWithSelectedCategory' ? true : false; + $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + + $this->context = $objectManager->getObject('Magento\Framework\View\Element\Template\Context'); + + $this->nodeFactory = $this->getMock('Magento\Framework\Data\Tree\NodeFactory', [], [], '', false); + $this->treeFactory = $this->getMock('Magento\Framework\Data\TreeFactory', [], [], '', false); + + $tree = $this->getMock('Magento\Framework\Data\Tree', [], [], '', false); + + $container = $this->getMock('Magento\Catalog\Model\Resource\Category\Tree', [], [], '', false); + + $children = $this->getMock( + 'Magento\Framework\Data\Tree\Node\Collection', + ['count'], + ['container' => $container] + ); + + for ($i = 0; $i < 10; $i++) { + $id = "category-node-$i"; + $categoryNode = $this->getMock('Magento\Framework\Data\Tree\Node', ['getId', 'hasChildren'], [], '', false); + $categoryNode + ->expects($this->once()) + ->method('getId') + ->willReturn($id); + $categoryNode + ->expects($this->atLeastOnce()) + ->method('hasChildren') + ->willReturn(false); + $categoryNode->setData( + [ + 'name' => "Category $i", + 'id' => $id, + 'url' => "http://magento2/category-$i.html", + 'is_active' => $i == 0 ? $isCurrentItem : false, + 'is_current_item' => $i == 0 ? $isCurrentItem : false, + + ] + ); + $children->add($categoryNode); + } + + $children + ->expects($this->once()) + ->method('count') + ->willReturn(10); + + $node = $this->getMock('Magento\Framework\Data\Tree\Node', ['getChildren'], [], '', false); + $node + ->expects($this->once()) + ->method('getChildren') + ->willReturn($children); + $node + ->expects($this->any()) + ->method('__call') + ->with('getLevel', []) + ->willReturn(null); + + $this->nodeFactory + ->expects($this->once()) + ->method('create') + ->willReturn($node); + + $this->treeFactory + ->expects($this->once()) + ->method('create') + ->willReturn($tree); + } + + protected function getTopmenu() + { + return new Topmenu($this->context, $this->nodeFactory, $this->treeFactory); + } + + public function testGetHtmlWithoutSelectedCategory() + { + $this->assertEquals($this->htmlWithoutCategory, $this->getTopmenu()->getHtml()); + } + + public function testGetHtmlWithSelectedCategory() + { + $this->assertEquals($this->htmlWithCategory, $this->getTopmenu()->getHtml()); + } +} diff --git a/app/design/adminhtml/Magento/backend/Magento_Downloadable/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Downloadable/web/css/source/_module.less new file mode 100644 index 0000000000000000000000000000000000000000..af531ff02ac2067b0fc1d51bab40c460070df5a3 --- /dev/null +++ b/app/design/adminhtml/Magento/backend/Magento_Downloadable/web/css/source/_module.less @@ -0,0 +1,81 @@ +// /** +// * Copyright © 2015 Magento. All rights reserved. +// * See COPYING.txt for license details. +// */ + +// +// Variables +// _____________________________________________ + +// @todo ui - rebuilt with common classes for table control and file upload ui component + +// +// File uploads dynamic control +// --------------------------------------------- + +.downloadable-form { + .col-price, + .col-limit, + .col-share, + .col-sort { + width: 1%; + } + .col-action { + width: 1px; + } + td { + &.col-limit { + white-space: nowrap; + } + } + .admin__control-table { + .admin__control-text { + margin-bottom: .5rem; + min-width: 6rem; + } + } + .files, + .files-wide { + .row { + margin: .7rem 0; + > .admin__control-text { + margin-top: .7rem; + } + } + .uploader { + margin: .5rem 0; + } + .fileinput-button { + color: @link__color; + cursor: pointer; + display: inline-block; + float: none; + margin: .5rem 0; + text-decoration: none; + &:hover { + color: @link__hover__color; + text-decoration: underline; + } + } + + } + .action-remove { + .button-reset(); + .icon-font( + @icon-delete__content, + @icons-admin__font-name, + @_icon-font-size: 1.8rem, + @_icon-font-line-height: 16px, + @_icon-font-text-hide: true, + @_icon-font-position: after, + @_icon-font-color: @color-brown-darkie + ); + margin-top: .5rem; + } +} + +@-moz-document url-prefix() { // Firefox fieldset overflow bug fix + .downloadable-form { + display: table-column; + } +} diff --git a/app/design/adminhtml/Magento/backend/web/css/override.less b/app/design/adminhtml/Magento/backend/web/css/override.less index 1b6b674ec910a5e84f7ef66f0e1b05e4fae9768b..173fee2cef2b7c89dbb57e20e388ee32706d9451 100644 --- a/app/design/adminhtml/Magento/backend/web/css/override.less +++ b/app/design/adminhtml/Magento/backend/web/css/override.less @@ -328,7 +328,7 @@ nav ol { .admin__control-file:active + .admin__control-file-label:before, .admin__control-file:focus + .admin__control-file-label:before, .admin__control-textarea:focus, -.admin__control-addon [class*='admin__control-']:focus + label:before { +.admin__control-addon [class*='admin__control-']:focus + [class*='admin__addon-']:before { border-color: #007bdb; box-shadow: none; outline: 0; @@ -345,6 +345,7 @@ nav ol { opacity: .5; cursor: not-allowed; } +.admin__fieldset > .admin__field.admin__field-wide[class] > .admin__field-control, .address-item-edit-content .admin__field[class] > .admin__field-control, .page-layout-admin-login .admin__field[class] > .admin__field-control { float: none; @@ -352,6 +353,7 @@ nav ol { text-align: left; width: auto; } +.admin__fieldset > .admin__field.admin__field-wide[class]:not(.admin__field-option) > .admin__field-label, .address-item-edit-content .admin__field[class]:not(.admin__field-option) > .admin__field-label, .page-layout-admin-login .admin__field[class]:not(.admin__field-option) > .admin__field-label { text-align: left; @@ -361,20 +363,58 @@ nav ol { margin-bottom: 0.86rem; margin-top: -0.14rem; } +.admin__fieldset > .admin__field.admin__field-wide[class]:not(.admin__field-option) > .admin__field-label:before, .address-item-edit-content .admin__field[class]:not(.admin__field-option) > .admin__field-label:before, .page-layout-admin-login .admin__field[class]:not(.admin__field-option) > .admin__field-label:before { display: none; } +.admin__fieldset > .admin__field.admin__field-wide[class]:not(.admin__field-option)._required > .admin__field-label span, .address-item-edit-content .admin__field[class]:not(.admin__field-option)._required > .admin__field-label span, .page-layout-admin-login .admin__field[class]:not(.admin__field-option)._required > .admin__field-label span { padding-left: 1.5rem; } +.admin__fieldset > .admin__field.admin__field-wide[class]:not(.admin__field-option)._required > .admin__field-label span:after, .address-item-edit-content .admin__field[class]:not(.admin__field-option)._required > .admin__field-label span:after, .page-layout-admin-login .admin__field[class]:not(.admin__field-option)._required > .admin__field-label span:after { left: 0; margin-left: 30px; top: .2rem; } +.admin__control-table-wrapper { + max-width: 100%; + overflow-x: auto; + overflow-y: hidden; +} +.admin__control-table { + width: 100%; +} +.admin__control-table thead { + background: none; +} +.admin__control-table td, +.admin__control-table th { + background: #efefef; + border: 0; + border-bottom: 1px solid #ffffff; + padding: 1.3rem 2.5rem 1.3rem 0; + text-align: left; +} +.admin__control-table td:first-child, +.admin__control-table th:first-child { + padding-left: 1.5rem; +} +.admin__control-table th { + border: 0; + vertical-align: bottom; + color: #303030; + font-size: 1.4rem; + font-weight: 600; + padding-bottom: 0; +} +.admin__control-table th._required span:after { + color: #eb5202; + content: '*'; +} .admin__control-text { line-height: 3.3rem; width: 100%; @@ -684,9 +724,11 @@ option:empty { color: #808080; content: attr(data-config-scope); display: inline-block; - position: absolute; + font-size: 1.2rem; left: ~" calc( (100%) * 0.7777777777777778 - 30px )"; + line-height: 3.2rem; margin-left: 60px; + position: absolute; width: ~" calc( (100%) * 0.2222222222222222 - 30px )"; } .admin__field-control .admin__field[data-config-scope]:nth-child(n+2):before { @@ -3241,6 +3283,10 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger { font-size: 1.7rem; transition: color 0.1s linear; } +.admin__menu .submenu-close:hover { + cursor: pointer; + text-decoration: none; +} .admin__menu .submenu-close:hover:before { color: #ffffff; } @@ -4277,6 +4323,108 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger { font-size: 2.4rem; font-weight: 600; } +.downloadable-form .col-price, +.downloadable-form .col-limit, +.downloadable-form .col-share, +.downloadable-form .col-sort { + width: 1%; +} +.downloadable-form .col-action { + width: 1px; +} +.downloadable-form td.col-limit { + white-space: nowrap; +} +.downloadable-form .admin__control-table .admin__control-text { + margin-bottom: .5rem; + min-width: 6rem; +} +.downloadable-form .files .row, +.downloadable-form .files-wide .row { + margin: .7rem 0; +} +.downloadable-form .files .row > .admin__control-text, +.downloadable-form .files-wide .row > .admin__control-text { + margin-top: .7rem; +} +.downloadable-form .files .uploader, +.downloadable-form .files-wide .uploader { + margin: .5rem 0; +} +.downloadable-form .files .fileinput-button, +.downloadable-form .files-wide .fileinput-button { + color: #007bdb; + cursor: pointer; + display: inline-block; + float: none; + margin: .5rem 0; + text-decoration: none; +} +.downloadable-form .files .fileinput-button:hover, +.downloadable-form .files-wide .fileinput-button:hover { + color: #007bdb; + text-decoration: underline; +} +.downloadable-form .action-remove { + background-image: none; + background: none; + border: 0; + margin: 0; + padding: 0; + -moz-box-sizing: content-box; + box-shadow: none; + text-shadow: none; + line-height: inherit; + font-weight: 400; + display: inline-block; + text-decoration: none; + margin-top: .5rem; +} +.downloadable-form .action-remove:focus, +.downloadable-form .action-remove:active { + background: none; + border: none; +} +.downloadable-form .action-remove:hover { + background: none; + border: none; +} +.downloadable-form .action-remove.disabled, +.downloadable-form .action-remove[disabled], +fieldset[disabled] .downloadable-form .action-remove { + cursor: not-allowed; + pointer-events: none; + opacity: 0.5; +} +.downloadable-form .action-remove > span { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.downloadable-form .action-remove:after { + font-family: 'Admin Icons'; + content: '\e630'; + font-size: 1.8rem; + line-height: 16px; + color: #41362f; + overflow: hidden; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + display: inline-block; + vertical-align: middle; + text-align: center; +} +@-moz-document url-prefix() { + .downloadable-form { + display: table-column; + } +} .admin__section-nav { padding-bottom: 51px; } diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_control-table.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_control-table.less new file mode 100644 index 0000000000000000000000000000000000000000..50386e2ae44e46440fdb7fe4023e2efa3572e50b --- /dev/null +++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_control-table.less @@ -0,0 +1,54 @@ +// /** +// * Copyright © 2015 Magento. All rights reserved. +// * See COPYING.txt for license details. +// */ + +// +// Variables +// _____________________________________________ + +// @todo ui - rebuilt dynamic table control + +// +// Table control +// --------------------------------------------- + +.admin__control-table-wrapper { + max-width: 100%; + overflow-x: auto; + overflow-y: hidden; +} + +.admin__control-table { + width: 100%; + thead { + background: none; + } + td, + th { + background: @color-white-dark-smoke; + border: 0; + border-bottom: 1px solid @color-white; + padding: 1.3rem 2.5rem 1.3rem 0; + text-align: left; + &:first-child { + padding-left: 1.5rem; + } + } + th { + border: 0; + vertical-align: bottom; + color: @color-very-dark-gray-black; + font-size: @font-size__base; + font-weight: @font-weight__semibold; + padding-bottom: 0; + &._required { + span { + &:after { + color: @field-label__required__color; + content: '*'; + } + } + } + } +} diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_controls.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_controls.less index 987d5f6f39f406ed9f1b5aa1c89be49566bf78b8..8618dc7b82dbffb6800f314e4f65687a91f1bd9b 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_controls.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_controls.less @@ -4,6 +4,7 @@ // */ @import (reference) '_extends.less'; +@import '_control-table.less'; // // Variables @@ -288,7 +289,7 @@ option:empty { &[disabled] + [class*='admin__addon-']:before { &:extend(.__form-control-styles[disabled]); } - &:focus + label:before { + &:focus + [class*='admin__addon-']:before { &:extend(.__form-control-styles:focus); } } diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less index d1a4f148c350ea82dece47f8ad6055f22dfb1bf2..c7218ab8e50904e566c03b6c9591e617c6a5da3f 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less @@ -39,6 +39,9 @@ padding: 0; #mix-grid .row(); + &.admin__field-wide { + .extend__field-rows(); + } > .admin__field-control { #mix-grid .column(4,9); } @@ -138,9 +141,11 @@ color: @field-scope__color; content: attr(data-config-scope); display: inline-block; - position: absolute; + font-size: @font-size__s; left: @_length; + line-height: 3.2rem; margin-left: 2 * @temp_gutter; + position: absolute; & { #mix-grid .return_length(2,9); diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/_module.less index d4eee51f4323b613c79ad681dc0c5f1f7dd3ef86..9fd0cc27f492effdb869f17edc22b2f513cbf3de 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/_module.less @@ -153,6 +153,9 @@ .fieldset > .field > .label { font-weight: @font-weight__regular; } + .product-item-name { + margin: 0; + } } .data.table:extend(.abs-product-options-list all) { diff --git a/dev/tests/functional/bootstrap.php b/dev/tests/functional/bootstrap.php index b661b84d1ceccd96c2b4ceb28ee3ee9ff0d31dc2..5a4f9a7c490dee281665493f4eea214c77d2d4ca 100644 --- a/dev/tests/functional/bootstrap.php +++ b/dev/tests/functional/bootstrap.php @@ -4,7 +4,6 @@ * See COPYING.txt for license details. */ -session_start(); defined('MTF_BOOT_FILE') || define('MTF_BOOT_FILE', __FILE__); defined('MTF_BP') || define('MTF_BP', str_replace('\\', '/', (__DIR__))); require_once __DIR__ . '/../../../app/bootstrap.php'; diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 256e8f34c43778f4f2ff4f4feabb4b5c20547524..41482866c1b241dbf0feb2c100d029ed51e11d68 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,6 +1,6 @@ { "require": { - "magento/mtf": "1.0.0-rc20", + "magento/mtf": "1.0.0-rc21", "php": "~5.5.0|~5.6.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", diff --git a/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php index c4b2a9d7f85cc2649fbe9c95f71063f5c9de7115..ff02e15272bd9dc13e0a1c1f58e445024d06c469 100644 --- a/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php @@ -6,7 +6,7 @@ namespace Magento\Mtf\Util\Protocol\CurlTransport; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; @@ -40,7 +40,7 @@ class BackendDecorator implements CurlInterface /** * System config * - * @var Config + * @var DataInterface */ protected $configuration; @@ -48,9 +48,9 @@ class BackendDecorator implements CurlInterface * Constructor * * @param CurlTransport $transport - * @param Config $configuration + * @param DataInterface $configuration */ - public function __construct(CurlTransport $transport, Config $configuration) + public function __construct(CurlTransport $transport, DataInterface $configuration) { $this->transport = $transport; $this->configuration = $configuration; @@ -65,11 +65,10 @@ class BackendDecorator implements CurlInterface */ protected function authorize() { - $url = $_ENV['app_backend_url'] . - $this->configuration->getParameter('application/backendLoginUrl'); + $url = $_ENV['app_backend_url'] . $this->configuration->get('application/0/backendLoginUrl/0/value'); $data = [ - 'login[username]' => $this->configuration->getParameter('application/backendLogin'), - 'login[password]' => $this->configuration->getParameter('application/backendPassword'), + 'login[username]' => $this->configuration->get('application/0/backendLogin/0/value'), + 'login[password]' => $this->configuration->get('application/0/backendPassword/0/value'), ]; $this->transport->write(CurlInterface::POST, $url, '1.0', [], $data); $response = $this->read(); diff --git a/dev/tests/functional/phpunit.xml.dist b/dev/tests/functional/phpunit.xml.dist index 06b2ee9b0603d8fd6e602011e34ddbf2b131c00f..f99b813aa1073903e64d1495ea27d55440cd3547 100755 --- a/dev/tests/functional/phpunit.xml.dist +++ b/dev/tests/functional/phpunit.xml.dist @@ -26,7 +26,6 @@ </arguments> </listener> <listener class="Magento\Mtf\System\Event\StateListener" /> - <listener class="Magento\Mtf\System\JUnit"/> </listeners> <php> @@ -37,7 +36,6 @@ <env name="log_directory" value="var/log" /> <env name="events_preset" value="base" /> <env name="module_whitelist" value="Magento_Install,Magento_Core" /> - <env name="report_file_name" value="test-cases-report.xml"/> <env name="basedir" value="var/log" /> <env name="credentials_file_path" value="./credentials.xml.dist" /> </php> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php index fd1a66d884fbecb34528b214b112ad0afa7741ca..3d18543896556fd8cd86604348c2ce5da1650900 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php @@ -22,10 +22,10 @@ class SuperAdmin extends DataFixture $this->_data = [ 'fields' => [ 'username' => [ - 'value' => $this->_configuration->getParameter('application/backendLogin'), + 'value' => $this->_configuration->get('application/0/backendLogin/0/value'), ], 'password' => [ - 'value' => $this->_configuration->getParameter('application/backendPassword'), + 'value' => $this->_configuration->get('application/0/backendPassword/0/value'), ], ], ]; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml index e40e21c4fca28b00ba54d39c6bd30bd66f20f241..7b1c3f2aeac1d2d0f6e9be43c3dab50609066d32 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="globalSearch" module="Magento_Backend" class="Magento\Backend\Test\Fixture\GlobalSearch"> <dataset name="default"> <field name="query" xsi:type="string">catalogProductSimple::default::name</field> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php index 967d142da277c2cb30be1ff7927363b03caf93a5..3df57e717b29304175d27a3fc9c66f4cb3cd9456 100755 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php @@ -7,7 +7,6 @@ namespace Magento\Backend\Test\Handler; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -62,8 +61,8 @@ class Extractor */ public function getData() { - /** @var \Magento\Mtf\Config $config */ - $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config'); + /** @var \Magento\Mtf\Config\DataInterface $config */ + $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\DataInterface'); $url = $_ENV['app_backend_url'] . $this->url; $curl = new BackendDecorator(new CurlTransport(), $config); $curl->addOption(CURLOPT_HEADER, 1); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml index 6b345b542bb84bbdcfcfe6bd9ced8353fa68228f..b9f96e1cb55a7ff19150c846a5424c9b8a2c4414 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="bundleProduct" module="Magento_Bundle" type="eav" entity_type="catalog_product" product_type="bundle" collection="Magento\Catalog\Model\Resource\Product\Collection" identifier="sku" repository_class="Magento\Bundle\Test\Repository\BundleProduct" handler_interface="Magento\Bundle\Test\Handler\BundleProduct\BundleProductInterface" class="Magento\Bundle\Test\Fixture\BundleProduct"> <dataset name="default"> <field name="name" xsi:type="string">BundleProduct %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php index cbd47bd232e4ea5fd3f79bc667b3f73084b37eb2..6eeb06506c9cd342adeea36c2426cb964edaf6de 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php @@ -9,7 +9,8 @@ namespace Magento\Bundle\Test\Handler\BundleProduct; use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Create new bundle product via curl. @@ -25,11 +26,12 @@ class Curl extends ProductCurl implements BundleProductInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); $this->mappingData += [ 'selection_can_change_qty' => [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml index e30dafaff1c5a7eb1c90af347f40e670e8fe4b6e..20c3c831f6e627016d8ff8f74fff0f8d26485017 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogAttributeSet" module="Magento_Catalog" type="flat" entity_type="eav_attribute_set" collection="Magento\Catalog\Model\Resource\Product\Link\Product\Collection" repository_class="Magento\Catalog\Test\Repository\CatalogAttributeSet" handler_interface="Magento\Catalog\Test\Handler\CatalogAttributeSet\CatalogAttributeSetInterface" class="Magento\Catalog\Test\Fixture\CatalogAttributeSet"> <dataset name="default"> <field name="attribute_set_name" xsi:type="string">Default_attribute_set_%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml index 0a33bf96c60d635bad7e1cff10fa6da4f6f646b4..1e99a0752d4e407a6dfac02c519cf83d9f6ded54 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogProductAttribute" module="Magento_Catalog" type="composite" collection="Magento\Catalog\Model\Resource\Attribute" repository_class="Magento\Catalog\Test\Repository\CatalogProductAttribute" handler_interface="Magento\Catalog\Test\Handler\CatalogProductAttribute\CatalogProductAttributeInterface" class="Magento\Catalog\Test\Fixture\CatalogProductAttribute"> <dataset name="default"> <field name="frontend_label" xsi:type="string">attribute_label%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml index 1815359930d5d7827cd2ce06681b12c7da7f60a0..59bc10f7eeecdc84fcec704f0166306b479f60f5 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogProductSimple" module="Magento_Catalog" type="eav" entity_type="catalog_product" product_type="simple" collection="Magento\Catalog\Model\Resource\Product\Collection" identifier="sku" repository_class="Magento\Catalog\Test\Repository\CatalogProductSimple" handler_interface="Magento\Catalog\Test\Handler\CatalogProductSimple\CatalogProductSimpleInterface" class="Magento\Catalog\Test\Fixture\CatalogProductSimple"> <dataset name="default"> <field name="name" xsi:type="string">Test simple product %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php index 8ca245b0c1607022eb2da61b21028f5efd077404..7bc605d82acca354327d119a88a570982aec88a4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php @@ -9,7 +9,6 @@ namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Tax\Test\Fixture\TaxClass as FixtureTaxClass; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -89,7 +88,7 @@ class TaxClass implements FixtureInterface protected function setTaxClassId($taxClassName) { $url = $_ENV['app_backend_url'] . 'tax/rule/new/'; - $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->create('Magento\Mtf\Config'); + $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->create('Magento\Mtf\Config\DataInterface'); $curl = new BackendDecorator(new CurlTransport(), $config); $curl->addOption(CURLOPT_HEADER, 1); $curl->write(CurlInterface::POST, $url, '1.0', [], []); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml index fd551f743f338cc4b096d7085084070cc2a144a5..158e62ce41f722ec50d060011baf95da903f15f9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogProductVirtual" module="Magento_Catalog" type="eav" entity_type="catalog_product" product_type="virtual" collection="Magento\Catalog\Model\Resource\Product\Collection" identifier="sku" repository_class="Magento\Catalog\Test\Repository\CatalogProductVirtual" handler_interface="Magento\Catalog\Test\Handler\CatalogProductVirtual\CatalogProductVirtualInterface" class="Magento\Catalog\Test\Fixture\CatalogProductVirtual"> <dataset name="default"> <field name="name" xsi:type="string">Test virtual product %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml index 663a249b5da66e367bd8b0a953e622653aaa065e..9ea63b5e3616f573ba5385f127969f81779f8210 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="category" module="Magento_Catalog" type="eav" entity_type="catalog_category_entity" collection="Magento\Catalog\Model\Resource\Category\Collection" repository_class="Magento\Catalog\Test\Repository\Category" handler_interface="Magento\Catalog\Test\Handler\Category\CategoryInterface" class="Magento\Catalog\Test\Fixture\Category"> <dataset name="default"> <field name="name" xsi:type="string">Category%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php index 8c7e5905afb7339488389ab62caeedc929ecd784..b5f8585e01fe459e6f67529a6683c2c3281ddba8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php @@ -9,7 +9,6 @@ namespace Magento\Catalog\Test\Handler\CatalogAttributeSet; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; 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 123ef506c991ee390aedc790ce8f2e58fd8224e1..1e7ec99e39fe2fec29869f7faa934711cab988b0 100755 --- 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 @@ -405,7 +405,8 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { - throw new \Exception("Product creation by curl handler was not successful! Response: $response"); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception('Product creation by curl handler was not successful!'); } return $this->parseResponse($response); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php index 9770e6726048c6139631ba6022d8801484e1c108..e684946a46f47f152fdd1d4373f31a31b1142dd4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Catalog\Test\Handler\Category; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php index 6353c542d857e57541d700b0d9ad45d17e3a7a35..632de082cfe61df3dcfddd9ccf1359a9d3581638 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php @@ -9,7 +9,6 @@ namespace Magento\Catalog\Test\Handler\Curl; use Magento\Catalog\Test\Fixture\ProductAttribute; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml index 073335f8ab0ff6b5aa04801c6d30489a51ac9ba5..88c2147c46a54c83273e0ebe386af6f4e3bf39a9 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogRule" module="Magento_CatalogRule" type="eav" entity_type="catalog_rule" collection="Magento\CatalogRule\Model\Resource\Rule\Product\Price\Collection" repository_class="Magento\CatalogRule\Test\Repository\CatalogRule" handler_interface="Magento\CatalogRule\Test\Handler\CatalogRule\CatalogRuleInterface" class="Magento\CatalogRule\Test\Fixture\CatalogRule"> <dataset name="default"> <field name="name" xsi:type="string">CatalogPriceRule %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php index 1c6d9a58f87105e992b2e1572477ef0085f32b6c..43089928c2c50da39f1c589cdb05a31ba4b6dc96 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php @@ -9,7 +9,6 @@ namespace Magento\CatalogRule\Test\Handler\CatalogRule; use Magento\Backend\Test\Handler\Conditions; use Magento\CatalogRule\Test\Handler\CatalogRule; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml index 59b4b4ee904fa40efd1b4a71bc46a437543e8d74..940729a21995ef1db6dd3a718c6c92293ddbe299 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="catalogSearchQuery" module="Magento_CatalogSearch" type="flat" entity_type="search_query" collection="Magento\Search\Model\Resource\Query\Collection" repository_class="Magento\CatalogSearch\Test\Repository\CatalogSearchQuery" handler_interface="Magento\CatalogSearch\Test\Handler\CatalogSearchQuery\CatalogSearchQueryInterface" class="Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery"> <field name="query_id" is_required="1"> <default_value xsi:type="null"/> diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php index 049e2e77a7d47967f1cc79cb7339c9ac17d63b0c..3381fe268097374df309f6d511e2b8fa7750747f 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php @@ -8,7 +8,6 @@ namespace Magento\CatalogSearch\Test\Handler\CatalogSearchQuery; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml index 564e190e5f0f65b62786e16a4164e7e360617577..9c79804bfe3b25fd4bbe857f9f17c46fe9da2e08 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="cart" module="Magento_Checkout" type="flat" entity_type="quote" repository_class="Magento\Checkout\Test\Repository\Cart" handler_interface="Magento\Checkout\Test\Handler\Cart\CartInterface" class="Magento\Checkout\Test\Fixture\Cart"> <field name="entity_id" is_required="1"> <default_value xsi:type="null"/> diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml index 4a9a438e8460ae93d277273787204e0d78bfd333..d1f5018824ca4b96d33cf487ce339c285c1022f5 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="checkoutAgreement" module="Magento_CheckoutAgreements" type="flat" entity_type="checkout_agreement" collection="Magento\CheckoutAgreements\Model\Resource\Agreement\Collection" repository_class="Magento\CheckoutAgreements\Test\Repository\CheckoutAgreement" diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php index 426831f470e92ed668e07a121bdc21fe1f2f1d07..9c241ef1354cd41eea088125162a1fe2b80df565 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php @@ -8,7 +8,6 @@ namespace Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml index 36bb9cf39af0421b3a0bc9e6e25115cb312ad55e..5d1a718ff1178b9a4737c8bbcc3df08f9e79accf 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="cmsBlock" module="Magento_Cms" type="flat" entity_type="cms_block" collection="Magento\Cms\Model\Resource\Block\Grid\Collection" identifier="identifier" handler_interface="Magento\Cms\Test\Handler\CmsBlock\CmsBlockInterface" class="Magento\Cms\Test\Fixture\CmsBlock"> <dataset name="default"> diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml index 149bef091c83163e09710dbaa2cd7f4bc6930058..071897f0c5b13b72147ac1b674931f71e784f333 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="cmsPage" module="Magento_Cms" type="flat" entity_type="cms_page" collection="Magento\Cms\Model\Resource\Page\Grid\Collection" identifier="identifier" repository_class="Magento\Cms\Test\Repository\CmsPage" handler_interface="Magento\Cms\Test\Handler\CmsPage\CmsPageInterface" class="Magento\Cms\Test\Fixture\CmsPage"> <dataset name="default"> diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php index c3aefd941fc29abf6f5b823497131213d235f6ed..05564ee03f0572909f449a17b07910d1f4d54234 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Cms\Test\Handler\CmsBlock; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php index 4187350d28d7aead4044c949f745be6968cf1a17..a91b23ff28b1bba3b0802c4a3881a041e0517008 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php @@ -8,7 +8,8 @@ namespace Magento\Cms\Test\Handler\CmsPage; use Magento\Backend\Test\Handler\Conditions; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -55,12 +56,13 @@ class Curl extends Conditions implements CmsPageInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { $this->mappingData = array_merge($this->mappingData, $this->additionalMappingData); - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); } /** diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml index 839a00ef4a8074e7da8e5f7e59398ac5a578a3a7..6eb5ee6976ace67bf42136395b5894d354f7618c 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="configurableProduct" module="Magento_ConfigurableProduct" type="eav" diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProduct/Curl.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProduct/Curl.php index 1bed329a243d055bce4df0c0a5a19b997806a639..7e0813eca10a21cbce34254bfd1eb9e3dafecb20 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Handler/ConfigurableProduct/Curl.php @@ -10,7 +10,8 @@ use Magento\Catalog\Test\Fixture\CatalogProductAttribute; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct\ConfigurableAttributesData; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Class Curl @@ -21,11 +22,12 @@ class Curl extends ProductCurl implements ConfigurableProductInterface /** * Constructor * - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); $this->mappingData += [ 'is_percent' => [ diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml index 8bed37c9f9ba9a008e35327b901217acf596e00a..6b95f1c29ea9eac1be055d42985aeb2434aaecef 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="configData" module="Magento_Core" type="flat" diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.xml b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.xml index 01f5710dc7a3d13d105d0dfbfadf6c06406d55f2..ccb72344e985faaeb96b30a64cf2faa43c8cc27d 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.xml +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="systemVariable" module="Magento_Core" type="composite" diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php index 25be5b6e1ff02b819dc98d9fa7cc7467ce135eae..1a761f03046e6420cdef332767f73301ff55c0e5 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Core\Test\Handler\ConfigData; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -116,7 +115,8 @@ class Curl extends AbstractCurl implements ConfigDataInterface $curl->close(); if (strpos($response, 'data-ui-id="messages-message-success"') === false) { - throw new \Exception("Settings are not applied! Response: $response"); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception("Configuration settings are not applied! Url: $url"); } } @@ -128,7 +128,6 @@ class Curl extends AbstractCurl implements ConfigDataInterface */ protected function getUrl($section) { - return $_ENV['app_backend_url'] . - 'admin/system_config/save/section/' . $section; + return $_ENV['app_backend_url'] . 'admin/system_config/save/section/' . $section; } } diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php index 6c02a8ae428e78fb67e534d0d4b973f5d52417b9..0ded2518a3b8ff6f98febb4e8f24d851d007a664 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Core\Test\Handler\SystemVariable; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml index ad576cb9359802523e8db4a07f0c35d27626bf5f..9b37f90342b5b9e52c0a7b3fa232d85409f6c41f 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="currencySymbolEntity" module="Magento_CurrencySymbol" type="flat" entity_type="core_config_data" repository_class="Magento\CurrencySymbol\Test\Repository\CurrencySymbolEntity" handler_interface="Magento\CurrencySymbol\Test\Handler\CurrencySymbolEntity\CurrencySymbolEntityInterface" class="Magento\CurrencySymbol\Test\Fixture\CurrencySymbolEntity"> <dataset name="default"> <field name="inherit_custom_currency_symbol" xsi:type="string">Yes</field> diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php index d1b311772c5129904075f55be2f2137f21b0a3eb..34a5317bf187b7e1811371b985c8ecd962fa71b6 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php @@ -8,7 +8,6 @@ namespace Magento\CurrencySymbol\Test\Handler\CurrencySymbolEntity; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml index c092c7e6aa3102711ebab77769dc5a07d48f5c3e..09e93bbf76968ec5a9dc5cdcaec363c71607cb39 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="address" module="Magento_Customer" type="eav" entity_type="customer_address" collection="Magento\Customer\Model\Resource\Address\Collection" repository_class="Magento\Customer\Test\Repository\Address" handler_interface="Magento\Customer\Test\Handler\Address\AddressInterface" class="Magento\Customer\Test\Fixture\Address"> <dataset name="default"> <field name="firstname" xsi:type="string">John</field> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml index d5afd5538951e8d4ecddcfaaeb6820c742ce3e04..fe4bdb7814a700b02ed39663d62dc2b11379f814 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="customer" module="Magento_Customer" type="eav" entity_type="customer" collection="Magento\Customer\Model\Resource\Customer\Collection" identifier="email" repository_class="Magento\Customer\Test\Repository\Customer" handler_interface="Magento\Customer\Test\Handler\Customer\CustomerInterface" class="Magento\Customer\Test\Fixture\Customer"> <dataset name="default"> <field name="firstname" xsi:type="string">John</field> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml index b470b1c21b5e357d8532cecd566650cff0cb1a51..cec2cec3a74619acaa55ad468a50738441768df7 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="customerGroupInjectable" module="Magento_Customer" type="flat" entity_type="customer_group" collection="Magento\Customer\Model\Resource\Group\Collection" repository_class="Magento\Customer\Test\Repository\CustomerGroupInjectable" handler_interface="Magento\Customer\Test\Handler\CustomerGroupInjectable\CustomerGroupInjectableInterface" class="Magento\Customer\Test\Fixture\CustomerGroupInjectable"> <dataset name="default"> <field name="customer_group_code" xsi:type="string">customer_code_%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php index e9860e68c44a4e346ab2a85c02021ae3c29992b2..cad3c992efa4681f8bf0851d50fa211c22aad7cc 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php @@ -8,7 +8,6 @@ namespace Magento\Customer\Test\Handler\Curl; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php index 22410354e5802ef983d6e3429696c464b086abf4..dadc4e66523bbc76d77a1ba8cbb52bba1fa744ff 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php @@ -8,7 +8,6 @@ namespace Magento\Customer\Test\Handler\Curl; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php index 1831cdcbd2168ecca66ec836b256511705db838a..67d98b313afe2c576d620daed3c0dfd392d40315 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php @@ -179,6 +179,7 @@ class Curl extends AbstractCurl implements CustomerInterface $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { + $this->_eventManager->dispatchEvent(['curl_failed', [$response]]); throw new \Exception('Failed to update customer!'); } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php index 4ca4adb67291be8c6fcaf88c6d694c73419a5a65..f2f7c1b52e6d809286919606322486f1421ee6bc 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php @@ -9,7 +9,6 @@ namespace Magento\Customer\Test\Handler\CustomerGroupInjectable; use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php index 0087460d6e6f69ae0212096882fe0d40b5e06852..af06e68b03ef85b14d92d27f4044803de10e059b 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php @@ -24,7 +24,7 @@ class CreateCustomer extends Webapi */ public function persist(FixtureInterface $fixture = null) { - $configuration = $this->_configuration->getParameter('handler/webapi'); + $configuration = $this->_configuration->get('handler/0/webapi/0/value'); $soap = new SoapTransport($configuration['soap']); return $soap->call('customerCustomerList', $fixture->getData()); diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml index 546ccb6cda264b3d7100c471dd0489427a3d87cf..1afdae4142c3ca241c73666e9d8c9e310be9b530 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml @@ -9,27 +9,27 @@ <repository class="Magento\Core\Test\Repository\ConfigData"> <dataset name="config_currency_symbols_usd_and_uah"> <field path="currency/options/allow" scope="currency" scope_id="1" xsi:type="array"> - <item label="US Dollar" xsi:type="string">USD</item> - <item label="Ukrainian Hryvnia" xsi:type="string">UAH</item> + <item name="US Dollar" xsi:type="string">USD</item> + <item name="Ukrainian Hryvnia" xsi:type="string">UAH</item> </field> </dataset> <dataset name="config_currency_symbols_usd_and_uah_rollback"> <field path="currency/options/allow" scope="currency" scope_id="1" xsi:type="array"> - <item label="US Dollar" xsi:type="string">USD</item> + <item name="US Dollar" xsi:type="string">USD</item> </field> </dataset> <dataset name="config_currency_symbols_usd_and_chf"> <field path="currency/options/allow" scope="currency" scope_id="1" xsi:type="array"> - <item label="US Dollar" xsi:type="string">USD</item> - <item label="Swiss Franc" xsi:type="string">CHF</item> + <item name="US Dollar" xsi:type="string">USD</item> + <item name="Swiss Franc" xsi:type="string">CHF</item> </field> </dataset> <dataset name="config_currency_symbols_usd"> <field path="currency/options/allow" scope="currency" scope_id="1" label="" xsi:type="array"> - <item label="US Dollar" xsi:type="string">USD</item> + <item name="US Dollar" xsi:type="string">USD</item> </field> </dataset> </repository> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml index 572574f962f25db2eff34e2a52855ec760a87e7a..7c7caf2f5c2495c7e0fdf71340026c83ad3e7bb3 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="downloadableProduct" module="Magento_Downloadable" type="eav" entity_type="catalog_product" product_type="downloadable" collection="Magento\Catalog\Model\Resource\Product\Collection" identifier="sku" repository_class="Magento\Downloadable\Test\Repository\DownloadableProduct" handler_interface="Magento\Downloadable\Test\Handler\DownloadableProduct\DownloadableProductInterface" class="Magento\Downloadable\Test\Fixture\DownloadableProduct"> <dataset name="default"> <field name="name" xsi:type="string">DownloadableProduct_%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php index 9812c5b6aca7e4266eebc0c6e8a99c5ac2c64155..7d05456656c3ccb3c46190a06b19c26c6cd02950 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php @@ -8,7 +8,8 @@ namespace Magento\Downloadable\Test\Handler\DownloadableProduct; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -22,11 +23,12 @@ class Curl extends ProductCurl implements DownloadableProductInterface /** * Constructor * - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); $this->mappingData += [ 'links_purchased_separately' => [ diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml index be06e0300b46846747b71fd0a6b99c1d621277a3..d11995d1e7dc6baef8dc65be2371f688ec1c73dc 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="giftMessage" module="Magento_GiftMessage" type="flat" entity_type="gift_message" collection="Magento\GiftMessage\Model\Resource\Message\Collection" identifier="gift_message_id" repository_class="Magento\GiftMessage\Test\Repository\GiftMessage" class="Magento\GiftMessage\Test\Fixture\GiftMessage"> <dataset name="default"> <field name="allow_gift_options" xsi:type="string">Yes</field> diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml index 61944b24eed8fafc0154028a32cd80db5d596d75..b33b9b5cc9eb62b3c8ae87cebeb824634d22db03 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="googleShoppingAttribute" module="Magento_GoogleShopping" type="flat" entity_type="googleshopping_types" collection="Magento\GoogleShopping\Model\Resource\Attribute\Collection" repository_class="Magento\GoogleShopping\Test\Repository\GoogleShoppingAttribute" handler_interface="Magento\GoogleShopping\Test\Handler\GoogleShoppingAttribute\GoogleShoppingAttributeInterface" class="Magento\GoogleShopping\Test\Fixture\GoogleShoppingAttribute"> <dataset name="default"> <field name="target_country" xsi:type="string">United States</field> diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml index 22c825f3680670eb388bd767c7f79efbdf545bcf..5fc47bd6a0c653287b86c7ccc4ecd29838839f8d 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="groupedProduct" module="Magento_GroupedProduct" type="eav" entity_type="catalog_product" product_type="grouped" collection="Magento\Catalog\Model\Resource\Product\Collection" identifier="sku" repository_class="Magento\GroupedProduct\Test\Repository\GroupedProduct" handler_interface="Magento\GroupedProduct\Test\Handler\GroupedProduct\GroupedProductInterface" class="Magento\GroupedProduct\Test\Fixture\GroupedProduct"> <dataset name="default"> <field name="name" xsi:type="string">GroupedProduct_%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml index 08b3dd3c556210d2efd6bc3a25a85e048a209413..01f5463b5f052fac98c49d795f3ac38e4979139f 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="importExport" module="Magento_ImportExport" type="flat" entity_type="importexport_importdata" class="Magento\ImportExport\Test\Fixture\ImportExport"> <dataset name="default"> <field name="entity" xsi:type="string">Products</field> diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php index 7bf6181d89616a2c86b5b08b108f19e4c6086aa6..2f7039d86953e8694ebe824973be8225edac004c 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php @@ -52,6 +52,11 @@ class AssertSuccessInstall extends AbstractConstraint $dbData = $installPage->getInstallBlock()->getDbInfo(); $allData = array_merge($user->getData(), $installConfig->getData()); + + foreach ($installConfig->getData() as $key => $value) { + $allData[$key] = isset($value['value']) ? $value['value'] : $value; + } + $allData['admin'] = $allData['web'] . $allData['admin'] . '/'; foreach ($this->adminFieldsList as $field) { diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml index f2d6025c12beb22e083405f5592bf2a209e53985..d846de8f0bd45b0ed71068f8146e171994d682f6 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="install" module="Magento_Install" type="virtual" entity_type="install" repository_class="Magento\Install\Test\Repository\Install" handler_interface="Magento\Install\Test\Handler\Install\InstallInterface" class="Magento\Install\Test\Fixture\Install"> <field name="dbHost"/> <field name="dbUser"/> diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php index 96e18ffc8452ce74121d887ac3290f17842f1277..74ec107e09a60690f1292e847fbc0a5c289f41b0 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php @@ -10,10 +10,9 @@ use Magento\Cms\Test\Page\CmsIndex; use Magento\Install\Test\Page\Install; use Magento\Install\Test\Fixture\Install as InstallConfig; use Magento\User\Test\Fixture\User; -use Magento\Mtf\Config; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\TestCase\Injectable; -use Magento\Mtf\Config\GlobalConfig; +use Magento\Mtf\Config\DataInterface; use Magento\Install\Test\Constraint\AssertAgreementTextPresent; use Magento\Install\Test\Constraint\AssertSuccessfulReadinessCheck; use Magento\Mtf\ObjectManagerFactory; @@ -68,14 +67,14 @@ class InstallTest extends Injectable */ public function __prepare() { - $config = ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\GlobalConfig'); + $config = ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\DataInterface'); // Prepare config data - $configData['dbHost'] = $config->get('install/host'); - $configData['dbUser'] = $config->get('install/user'); - $configData['dbPassword'] = $config->get('install/password'); - $configData['dbName'] = $config->get('install/dbName'); - $configData['web'] = $config->get('install/baseUrl'); - $configData['admin'] = $config->get('install/backendName'); + $configData['dbHost'] = $config->get('install/0/host/0'); + $configData['dbUser'] = $config->get('install/0/user/0'); + $configData['dbPassword'] = $config->get('install/0/password/0'); + $configData['dbName'] = $config->get('install/0/dbName/0'); + $configData['web'] = $config->get('install/0/baseUrl/0'); + $configData['admin'] = $config->get('install/0/backendName/0'); return ['configData' => $configData]; } diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml index 3e58557ff604b5282f1e552fd95d3f0ad6bf65de..30c8310ea5534bdabf634e3e4e005c1ac71a87ca 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="integration" module="Magento_Integration" type="composite" entity_type="integration" collection="Magento\Integration\Model\Resource\Integration\Collection" repository_class="Magento\Integration\Test\Repository\Integration" handler_interface="Magento\Integration\Test\Handler\Integration\IntegrationInterface" class="Magento\Integration\Test\Fixture\Integration"> <dataset name="default"> <field name="name" xsi:type="string">default_integration_%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php index d8047148bec4461e4396776c0cb3a1b2d5621957..900572434e6de4e5719fabe54f620e87053ce375 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Integration\Test\Handler\Integration; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml index 9d216c522278f6d9ac793770a231c61ed446e108..6311e64c6602a507e3da61125c06670429df3af5 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="template" module="Magento_Newsletter" type="flat" entity_type="newsletter_template" collection="Magento\Newsletter\Model\Resource\Template\Collection" identifier="template_id" repository_class="Magento\Newsletter\Test\Repository\Template" handler_interface="Magento\Newsletter\Test\Handler\Template\TemplateInterface" class="Magento\Newsletter\Test\Fixture\Template"> <dataset name="default"> <field name="code" xsi:type="string">TemplateName%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php index 7578ea44254810996850a51e69d5b37d0377670b..8d94f60cda0c41ae9a9c18434edb8780d9165db6 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Newsletter\Test\Handler\Template; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml index 0e2819446d17c536bc36b2f20dc6444b5f102429..a6eb9d9e85ee49354c799e5b7d254786b5198c5c 100644 --- a/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml @@ -19,7 +19,7 @@ <field path="payment/cashondelivery/active" scope="payment" scope_id="1" label="Yes" xsi:type="string">1</field> <field path="payment/cashondelivery/allowspecific" scope="payment" scope_id="1" label="Specific Countries" xsi:type="string">1</field> <field path="payment/cashondelivery/specificcountry" scope="payment" scope_id="1" xsi:type="array"> - <item label="United Kingdom" xsi:type="string">GB</item> + <item name="United Kingdom" xsi:type="string">GB</item> </field> </dataset> @@ -40,7 +40,7 @@ <field path="payment/checkmo/active" scope="payment" scope_id="1" label="Yes" xsi:type="string">1</field> <field path="payment/checkmo/allowspecific" scope="payment" scope_id="1" label="Specific Countries" xsi:type="string">1</field> <field path="payment/checkmo/specificcountry" scope="payment" scope_id="1" xsi:type="array"> - <item label="United Kingdom" xsi:type="string">GB</item> + <item name="United Kingdom" xsi:type="string">GB</item> </field> </dataset> @@ -61,7 +61,7 @@ <field path="payment/banktransfer/active" scope="payment" scope_id="1" label="Yes" xsi:type="string">1</field> <field path="payment/banktransfer/allowspecific" scope="payment" scope_id="1" label="Specific Countries" xsi:type="string">1</field> <field path="payment/banktransfer/specificcountry" scope="payment" scope_id="1" xsi:type="array"> - <item label="United Kingdom" xsi:type="string">GB</item> + <item name="United Kingdom" xsi:type="string">GB</item> </field> </dataset> @@ -82,7 +82,7 @@ <field path="payment/purchaseorder/active" scope="payment" scope_id="1" label="Yes" xsi:type="string">1</field> <field path="payment/purchaseorder/allowspecific" scope="payment" scope_id="1" label="Specific Countries" xsi:type="string">1</field> <field path="payment/purchaseorder/specificcountry" scope="payment" scope_id="1" xsi:type="array"> - <item label="United Kingdom" xsi:type="string">GB</item> + <item name="United Kingdom" xsi:type="string">GB</item> </field> </dataset> diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml index 99e16141dcdfc1ce45c3b9c890d6aac75a1e05ab..d551947d8c420dd84ac3396c240ec9bf0d140a76 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="rating" module="Magento_Review" type="flat" entity_type="rating" collection="Magento\Review\Model\Resource\Rating\Collection" identifier="rating_code" repository_class="Magento\Review\Test\Repository\Rating" handler_interface="Magento\Review\Test\Handler\Rating\RatingInterface" class="Magento\Review\Test\Fixture\Rating"> <dataset name="default"> <field name="rating_code" xsi:type="string">Rating %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml index 50ede32fea8d7b74f06a6395941376ef155ef70f..a118552b4f5c6c97ee8523795f77d6e8b4d79d5b 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="review" module="Magento_Review" type="composite" collection="Magento\Review\Model\Resource\Review\Collection" repository_class="Magento\Review\Test\Repository\Review" handler_interface="Magento\Review\Test\Handler\Review\ReviewInterface" class="Magento\Review\Test\Fixture\Review"> <dataset name="default"> <field name="status_id" xsi:type="string">Approved</field> diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php index 58206282eb611641755d1f42f2e8c4667a1e4a97..ea7b1d6bad431f6814c07c6c5d97c553071dfe71 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php @@ -9,7 +9,6 @@ namespace Magento\Review\Test\Handler\Rating; use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php index df3c3004b7c979c7a2f84efc3588c373ad89038d..986d1f4883123d27e8f743e5473346c9948f9399 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php @@ -6,7 +6,6 @@ namespace Magento\Review\Test\Handler\Review; -use Magento\Mtf\Config; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml index dc51c43e5dd1f27e7789fbe1da1972a324120885..6927691a7aa8e27bc0be0ff11dd70d694724a917 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="sitemap" module="Magento_Sitemap" type="flat" entity_type="sitemap" collection="Magento\Sitemap\Model\Resource\Sitemap\Collection" repository_class="Magento\Sitemap\Test\Repository\Sitemap" handler_interface="Magento\Sitemap\Test\Handler\Sitemap\SitemapInterface" class="Magento\Sitemap\Test\Fixture\Sitemap"> <dataset name="default"> <field name="sitemap_filename" xsi:type="string">sitemap.xml</field> diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php index c8b09124666bd8ab70c40b40bdf1f93affca8550..e78e858ded474e8669a7dc19f81afd22fe245ee8 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php @@ -10,7 +10,6 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Sitemap\Test\Handler\Sitemap; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml index b9be593561d7c588beb8de9f6aff896b262a5270..3a95b594d8400494d3809ae19d53599b063821f8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="store" module="Magento_Store" type="flat" entity_type="store" collection="Magento\Store\Model\Resource\Store\Collection" repository_class="Magento\Store\Test\Repository\Store" handler_interface="Magento\Store\Test\Handler\Store\StoreInterface" class="Magento\Store\Test\Fixture\Store"> <dataset name="default"> <field name="group_id" xsi:type="array"> diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml index fcd43ace417f90fc83a88a6d89d96a3eb24db03f..7b6a5ad692b1add59ad8803aa85e8832e8b6db9a 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="storeGroup" module="Magento_Store" type="flat" entity_type="store_group" collection="Magento\Store\Model\Resource\Group\Collection" identifier="" repository_class="Magento\Store\Test\Repository\StoreGroup" handler_interface="Magento\Store\Test\Handler\StoreGroup\StoreGroupInterface" class="Magento\Store\Test\Fixture\StoreGroup"> <dataset name="default"> <field name="website_id" xsi:type="array"> diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml index 261b506e96a6127b5de859597b3ca13bd6d717ef..0878f90e302a1d1594eac5f1d8af895f8fd4e418 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="website" module="Magento_Store" type="flat" entity_type="store_website" collection="Magento\Store\Model\Resource\Website\Collection" identifier="code" repository_class="Magento\Store\Test\Repository\Website" handler_interface="Magento\Store\Test\Handler\Website\WebsiteInterface" class="Magento\Store\Test\Fixture\Website"> <dataset name="default"> <field name="name" xsi:type="string">Main Website</field> diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php index aaa0e84ce103a1a2813086a88aca122f793eddb1..d6293b08cd50a9f0773b6bf4b9c8680033b36553 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Store\Test\Handler\Store; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php index 9922064088af8416f8e7d3adde471a174448a789..71faf510eed5e5886c59a8a19398f28cad987ed5 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Store\Test\Handler\StoreGroup; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php index 4de491270189098448ffb31ad31bfb2a87a4485b..bbd183601e4ef3697021b64745bad2b0bdadb64f 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Store\Test\Handler\Website; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml index 13e6c00c52879193a38fb344bba0ccf716eab9b1..30710bb5b2f81fc5e2f5f53025b9f6d5dc225476 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="taxClass" module="Magento_Tax" type="flat" entity_type="tax_class" collection="Magento\Tax\Model\Resource\TaxClass\Collection" identifier="" repository_class="Magento\Tax\Test\Repository\TaxClass" handler_interface="Magento\Tax\Test\Handler\TaxClass\TaxClassInterface" class="Magento\Tax\Test\Fixture\TaxClass"> <dataset name="default"> <field name="class_name" xsi:type="string">Tax Class %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml index a344ad905106d0f0b6b363d9fc83fabb103d0779..b9a4a30142690008bd8b142c8e8a74692b19307a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="taxRate" module="Magento_Tax" type="flat" entity_type="tax_calculation_rate" collection="Magento\Tax\Model\Resource\Calculation\Rate\Collection" identifier="code" repository_class="Magento\Tax\Test\Repository\TaxRate" handler_interface="Magento\Tax\Test\Handler\TaxRate\TaxRateInterface" class="Magento\Tax\Test\Fixture\TaxRate"> <dataset name="default"> <field name="code" xsi:type="string">Tax Rate %isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml index 82d0dc07793aeef0b07f4e2186b8bdb19830b146..b53f3f1eba5d9b4c3f29653c282cf1b7af82820a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="taxRule" module="Magento_Tax" type="flat" entity_type="tax_calculation_rule" collection="Magento\Tax\Model\Resource\Calculation\Rule\Collection" identifier="code" repository_class="Magento\Tax\Test\Repository\TaxRule" handler_interface="Magento\Tax\Test\Handler\TaxRule\TaxRuleInterface" class="Magento\Tax\Test\Fixture\TaxRule"> <dataset name="default"> <field name="code" xsi:type="string">TaxIdentifier%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php index 28e77379db72e1010f28e6bf0212e34ac8a2feea..b6d6072bcb5a13ebcaba872d5465f00ed29681e8 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Tax\Test\Handler\TaxClass; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php index 6cc269c5525d86bd6d4d7b854a4a3231d4dd8fbf..e1b370a6e44f8463404f512142f91449412b9903 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Tax\Test\Handler\TaxRate; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php index 2d47e8b3bdb62090385ef7b15d2bbff156bbc80f..872f49ae0387a92bd9bd19ad7a6b0ccbdfe6ee0b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php @@ -8,7 +8,6 @@ namespace Magento\Tax\Test\Handler\TaxRule; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml index a6d197824433ed7cae1e7ede9e230d4b6defe362..6c8afa0db50de401e34b56f1bd04c938e74a9016 100644 --- a/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml @@ -29,17 +29,17 @@ <field path="carriers/ups/tracking_xml_url" scope="carriers" scope_id="1" label="" xsi:type="string">https://wwwcie.ups.com/ups.app/xml/Track</field> <field path="carriers/ups/unit_of_measure" scope="carriers" scope_id="1" label="LBS" xsi:type="string">LBS</field> <field path="carriers/ups/allowed_methods" scope="carriers" scope_id="1" xsi:type="array"> - <item label="UPS Standard" xsi:type="string">11</item> - <item label="UPS Three-Day Select" xsi:type="string">12</item> - <item label="UPS Next Day Air Early A.M." xsi:type="string">14</item> - <item label="UPS Worldwide Express Plus" xsi:type="string">54</item> - <item label="UPS Second Day Air A.M." xsi:type="string">59</item> - <item label="UPS Worldwide Saver" xsi:type="string">65</item> - <item label="UPS Next Day Air" xsi:type="string">01</item> - <item label="UPS Second Day Air" xsi:type="string">02</item> - <item label="UPS Ground" xsi:type="string">03</item> - <item label="UPS Worldwide Express" xsi:type="string">07</item> - <item label="UPS Worldwide Expedited" xsi:type="string">08</item> + <item name="UPS Standard" xsi:type="string">11</item> + <item name="UPS Three-Day Select" xsi:type="string">12</item> + <item name="UPS Next Day Air Early A.M." xsi:type="string">14</item> + <item name="UPS Worldwide Express Plus" xsi:type="string">54</item> + <item name="UPS Second Day Air A.M." xsi:type="string">59</item> + <item name="UPS Worldwide Saver" xsi:type="string">65</item> + <item name="UPS Next Day Air" xsi:type="string">01</item> + <item name="UPS Second Day Air" xsi:type="string">02</item> + <item name="UPS Ground" xsi:type="string">03</item> + <item name="UPS Worldwide Express" xsi:type="string">07</item> + <item name="UPS Worldwide Expedited" xsi:type="string">08</item> </field> <field path="carriers/ups/sallowspecific" scope="carriers" scope_id="1" label="All Allowed Countries" xsi:type="string">0</field> <field path="carriers/ups/showmethod" scope="carriers" scope_id="1" label="No" xsi:type="string">0</field> diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml index a73037a6417cea31f404c94f66c3f1fd72b0a6af..f0fda4e5442de3338d518ecad3cc758bfa82f5db 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="urlRewrite" module="Magento_UrlRewrite" type="virtual" entity_type="url_rewrite" collection="Magento\UrlRewrite\Model\Resource\UrlRewriteCollection" identifier="request_path" repository_class="Magento\UrlRewrite\Test\Repository\UrlRewrite" handler_interface="Magento\UrlRewrite\Test\Handler\UrlRewrite\UrlRewriteInterface" class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"> <dataset name="default"> <field name="store_id" xsi:type="string">Main Website/Main Website Store/Default Store View</field> diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php index ccc680aab72bdac4600300aaf370b56e22e1bc66..ab9aaa6a50f976b8b03880fb2a6c9bb6d25c4db1 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php @@ -8,7 +8,6 @@ namespace Magento\UrlRewrite\Test\Handler\UrlRewrite; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml index 671556ced60023e557fce39be0f51dd6fef2d5d9..39ac5778e0cc30e30d6d8edeca2824949954327d 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="role" module="Magento_User" type="flat" entity_type="authorization_role" collection="Magento\User\Model\Resource\Role\User\Collection" repository_class="Magento\User\Test\Repository\Role" handler_interface="Magento\User\Test\Handler\Role\RoleInterface" class="Magento\User\Test\Fixture\Role"> <dataset name="default"> <field name="rolename" xsi:type="string">AdminRole%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml index 1044838fb45f6ee3a9bb9f0467e8425451130790..80c969cf4bbfe3c393e25e8abae8066e552ec028 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> <fixture name="user" module="Magento_User" type="flat" entity_type="admin_user" collection="Magento\User\Model\Resource\User\Collection" repository_class="Magento\User\Test\Repository\User" handler_interface="Magento\User\Test\Handler\User\UserInterface" class="Magento\User\Test\Fixture\User"> <dataset name="default"> <field name="username" xsi:type="string">AdminUser%isolation%</field> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php index 31ab14a90355b4a9ed4f4cf01dcc246adc61c417..7c7e8bc1d8a073e2c3c848ab0390e2e97232af14 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php @@ -36,10 +36,10 @@ class CurrentPassword implements FixtureInterface public function __construct(array $params, $data = '') { $this->params = $params; - /** @var \Magento\Mtf\Config $systemConfig */ + /** @var \Magento\Mtf\Config\DataInterface $systemConfig */ if ($data == '%current_password%') { - $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\Config'); - $data = $systemConfig->getParameter('application/backendPassword'); + $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\Config\DataInterface'); + $data = $systemConfig->get('application/0/backendPassword/0/value'); } $this->data = $data; } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php index 857ae696219497fb2ac8c399047066dfae8e7a40..9fa901fa7027177a1a174971b08b21a6eb416bec 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php @@ -9,7 +9,8 @@ namespace Magento\User\Test\Handler\Role; use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -28,15 +29,16 @@ class Curl extends AbstractCurl implements RoleInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { $this->mappingData = array_merge( (null !== $this->mappingData) ? $this->mappingData : [], $this->additionalMappingData ); - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); } /** diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php index 1026e872f89221e111761229063be05f2bf2e24e..a1b5ea977ca197f908052e708db8a0619e796f2f 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php @@ -9,7 +9,6 @@ namespace Magento\User\Test\Handler\User; use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php index c70148b0ffcdf0a06f2076da845c4d17349ac51f..30d0ee18b96e64b214d3819cd7e58fb6f3dbb940 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php @@ -5,51 +5,67 @@ */ namespace Magento\Multishipping\Controller; -use Magento\TestFramework\Helper\Bootstrap; +use \Magento\Multishipping\Model\Checkout\Type\Multishipping\State; /** * Test class for \Magento\Multishipping\Controller\Checkout * * @magentoAppArea frontend + * @magentoDataFixture Magento/Sales/_files/quote.php + * @magentoDataFixture Magento/Customer/_files/customer.php */ class CheckoutTest extends \Magento\TestFramework\TestCase\AbstractController { /** - * Covers app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php - * and app/code/Magento/Checkout/Block/Multishipping/Overview.php + * @var \Magento\Quote\Model\Quote + */ + protected $quote; + + /** + * @var \Magento\Checkout\Model\Session + */ + protected $checkoutSession; + + /** + * @inheritdoc + */ + public function setUp() + { + parent::setUp(); + $this->quote = $this->_objectManager->create('Magento\Quote\Model\Quote'); + $this->checkoutSession = $this->_objectManager->get('Magento\Checkout\Model\Session'); + + $this->quote->load('test01', 'reserved_order_id'); + $this->checkoutSession->setQuoteId($this->quote->getId()); + $this->checkoutSession->setCartWasUpdated(false); + } + + /** + * Covers \Magento\Multishipping\Block\Checkout\Payment\Info and \Magento\Multishipping\Block\Checkout\Overview * - * @magentoDataFixture Magento/Sales/_files/quote.php - * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoConfigFixture current_store multishipping/options/checkout_multiple 1 */ public function testOverviewAction() { - /** @var $quote \Magento\Quote\Model\Quote */ - $quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote'); - $quote->load('test01', 'reserved_order_id'); - - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Checkout\Model\Session') - ->setQuoteId($quote->getId()); - + /** @var \Magento\Framework\Data\Form\FormKey $formKey */ $formKey = $this->_objectManager->get('Magento\Framework\Data\Form\FormKey'); $logger = $this->getMock('Psr\Log\LoggerInterface', [], [], '', false); - - /** @var $session \Magento\Customer\Model\Session */ - $session = Bootstrap::getObjectManager()->create('Magento\Customer\Model\Session', [$logger]); - - /** @var \Magento\Customer\Api\AccountManagementInterface $service */ - $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Customer\Api\AccountManagementInterface'); + /** @var \Magento\Customer\Api\AccountManagementInterface $service */ + $service = $this->_objectManager->create('Magento\Customer\Api\AccountManagementInterface'); $customer = $service->authenticate('customer@example.com', 'password'); + /** @var \Magento\Customer\Model\Session $customerSession */ + $customerSession = $this->_objectManager->create('Magento\Customer\Model\Session', [$logger]); + $customerSession->setCustomerDataAsLoggedIn($customer); + $this->checkoutSession->setCheckoutState(State::STEP_BILLING); - $session->setCustomerDataAsLoggedIn($customer); $this->getRequest()->setPostValue('payment', ['method' => 'checkmo']); $this->dispatch('multishipping/checkout/overview'); $html = $this->getResponse()->getBody(); + $this->assertContains('<div class="box box-billing-method">', $html); $this->assertContains('<div class="box box-shipping-method">', $html); $this->assertContains( - '<dt class="title">' . $quote->getPayment()->getMethodInstance()->getTitle() . '</dt>', + '<dt class="title">' . $this->quote->getPayment()->getMethodInstance()->getTitle() . '</dt>', $html ); $this->assertContains('<span class="price">$10.00</span>', $html); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php index c3a9fe9933ee4948c40bbd5630eea75f0b46a1e0..b7c342c1fd4ecdc410a7558a1a3131d76193c125 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php @@ -36,6 +36,7 @@ class HhvmCompatibilityTest extends \PHPUnit_Framework_TestCase 'mime_magic.magicfile', 'display_errors', 'default_socket_timeout', + 'pcre.recursion_limit', ]; public function testAllowedIniGetSetDirectives() diff --git a/dev/tools/grunt/configs/watch.js b/dev/tools/grunt/configs/watch.js index f1a117ac8edb4dc079841f83c74edbb9c03f5b7f..ffe0fcc097e5216278f9c12f81455b7d63001ce9 100644 --- a/dev/tools/grunt/configs/watch.js +++ b/dev/tools/grunt/configs/watch.js @@ -25,6 +25,12 @@ var watchOptions = { "files": "<%= path.less.setup %>/**/*.less", "tasks": "less:setup" }, + "reload": { + "files": "<%= path.pub %>/**/*.css", + "options": { + livereload: true + } + }, "backendMigration": { "files": [ "<%= combo.autopath(\"backend\",\"pub\") %>/css/styles.css" diff --git a/dev/tools/performance-toolkit/benchmark.jmx b/dev/tools/performance-toolkit/benchmark.jmx index 1fe4919a59eb43c0f72910d7de13a1448d2b8ab8..7d3d7aef7fa0ab39b7dce61fa73f45e9972e59bd 100644 --- a/dev/tools/performance-toolkit/benchmark.jmx +++ b/dev/tools/performance-toolkit/benchmark.jmx @@ -316,7 +316,7 @@ props.put("category_name", vars.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol"></stringProp> <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> - <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/?limit=30&q=Simple</stringProp> + <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/index/?limit=30&q=Simple</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -340,7 +340,7 @@ props.put("category_name", vars.get("category_name"));</stri <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extract product url keys" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">simple_products_url_keys</stringProp> - <stringProp name="RegexExtractor.regex">${base_path}(index.php/)?(simple.*)${url_suffix}" title="[Ss]imple.*"</stringProp> + <stringProp name="RegexExtractor.regex"><a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Simple</stringProp> <stringProp name="RegexExtractor.template">$2$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">-1</stringProp> @@ -386,7 +386,7 @@ props.put("category_name", vars.get("category_name"));</stri <XPathExtractor guiclass="XPathExtractorGui" testclass="XPathExtractor" testname="XPath Extractor: Extarct product title" enabled="true"> <stringProp name="XPathExtractor.default"></stringProp> <stringProp name="XPathExtractor.refname">simple_product_title</stringProp> - <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title']/text()</stringProp> + <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title-wrapper']/text()</stringProp> <boolProp name="XPathExtractor.validate">false</boolProp> <boolProp name="XPathExtractor.tolerant">true</boolProp> <boolProp name="XPathExtractor.namespace">false</boolProp> @@ -471,7 +471,7 @@ productList.add(productMap); </stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol"></stringProp> <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> - <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/?limit=30&q=Configurable</stringProp> + <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/index/?limit=30&q=Configurable</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -495,7 +495,7 @@ productList.add(productMap); </stringProp> <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extract product url keys" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">configurable_products_url_keys</stringProp> - <stringProp name="RegexExtractor.regex">${base_path}(index.php/)?(configurable.*)${url_suffix}" title="[Cc]onfigurable.*"</stringProp> + <stringProp name="RegexExtractor.regex"><a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Configurable</stringProp> <stringProp name="RegexExtractor.template">$2$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">-1</stringProp> @@ -541,7 +541,7 @@ productList.add(productMap); </stringProp> <XPathExtractor guiclass="XPathExtractorGui" testclass="XPathExtractor" testname="XPath Extractor: Extarct product title" enabled="true"> <stringProp name="XPathExtractor.default"></stringProp> <stringProp name="XPathExtractor.refname">configurable_product_title</stringProp> - <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title']/text()</stringProp> + <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title-wrapper']/text()</stringProp> <boolProp name="XPathExtractor.validate">false</boolProp> <boolProp name="XPathExtractor.tolerant">true</boolProp> <boolProp name="XPathExtractor.namespace">false</boolProp> @@ -550,7 +550,7 @@ productList.add(productMap); </stringProp> <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extarct product attribute id" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">configurable_product_attribute_id</stringProp> - <stringProp name="RegexExtractor.regex">"spConfig":\{"attributes":\{"(\d+)"</stringProp> + <stringProp name="RegexExtractor.regex">"attributes":\{"(\d+)"</stringProp> <stringProp name="RegexExtractor.template">$1$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">1</stringProp> @@ -1401,6 +1401,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1431,6 +1451,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1439,7 +1473,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1468,17 +1502,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1516,6 +1539,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1546,6 +1589,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1554,7 +1611,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1583,17 +1640,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1631,6 +1677,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1668,6 +1734,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1676,7 +1756,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1705,17 +1785,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> </hashTree> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Guest Checkout" enabled="true"> @@ -1882,6 +1951,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1912,6 +2001,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1920,7 +2023,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1949,17 +2052,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1997,6 +2089,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2027,6 +2139,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2035,7 +2161,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2064,17 +2190,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2112,6 +2227,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2149,6 +2284,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2157,7 +2306,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2186,17 +2335,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2932,6 +3070,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2962,6 +3120,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2970,7 +3142,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2999,17 +3171,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3047,6 +3208,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3077,6 +3258,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -3085,7 +3280,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3114,17 +3309,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3162,6 +3346,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3199,6 +3403,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -3207,7 +3425,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3236,17 +3454,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> diff --git a/dev/tools/performance-toolkit/generate.php b/dev/tools/performance-toolkit/generate.php index 43a4d61cc09621160a16435766c723f5fbabb5b2..861abee07ef81a10ceee9e80fc2aa9ef91ccb20d 100644 --- a/dev/tools/performance-toolkit/generate.php +++ b/dev/tools/performance-toolkit/generate.php @@ -41,6 +41,18 @@ try { echo ' |- ' . $label . ': ' . $config->getValue($configKey) . PHP_EOL; } + /** @var $config \Magento\Indexer\Model\Config */ + $config = $application->getObjectManager()->get('Magento\Indexer\Model\Config'); + $indexerListIds = $config->getIndexers(); + /** @var $indexerRegistry \Magento\Indexer\Model\IndexerRegistry */ + $indexerRegistry = $application->getObjectManager()->create('Magento\Indexer\Model\IndexerRegistry'); + $indexersState = []; + foreach ($indexerListIds as $key => $indexerId) { + $indexer = $indexerRegistry->get($indexerId['indexer_id']); + $indexersState[$indexerId['indexer_id']] = $indexer->isScheduled(); + $indexer->setScheduled(true); + } + foreach ($application->getFixtures() as $fixture) { echo $fixture->getActionTitle() . '... '; $startTime = microtime(true); @@ -50,6 +62,12 @@ try { echo ' done in ' . gmdate('H:i:s', $resultTime) . PHP_EOL; } + foreach ($indexerListIds as $indexerId) { + /** @var $indexer \Magento\Indexer\Model\Indexer */ + $indexer = $indexerRegistry->get($indexerId['indexer_id']); + $indexer->setScheduled($indexersState[$indexerId['indexer_id']]); + } + $application->reindex(); $totalEndTime = microtime(true); $totalResultTime = $totalEndTime - $totalStartTime; diff --git a/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php b/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php index dddf0a6e4c00605e256cb9e1f349ea9c050df343..e1d4d01942333670ac1799df0820c589520b8118 100644 --- a/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php +++ b/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php @@ -11,6 +11,11 @@ use Magento\Framework\Code\Minifier\AdapterInterface; class CssMinifier implements AdapterInterface { + /** + * 'pcre.recursion_limit' value for CSSMin minification + */ + const PCRE_RECURSION_LIMIT = 1000; + /** * @var CSSmin */ @@ -32,6 +37,10 @@ class CssMinifier implements AdapterInterface */ public function minify($content) { - return $this->cssMinifier->run($content); + $pcreRecursionLimit = ini_get('pcre.recursion_limit'); + ini_set('pcre.recursion_limit', self::PCRE_RECURSION_LIMIT); + $result = $this->cssMinifier->run($content); + ini_set('pcre.recursion_limit', $pcreRecursionLimit); + return $result; } } diff --git a/lib/internal/Magento/Framework/Data/Tree/NodeFactory.php b/lib/internal/Magento/Framework/Data/Tree/NodeFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..0fa561adbd7aa9f6f0bf7fe1720d47f85b9a5c40 --- /dev/null +++ b/lib/internal/Magento/Framework/Data/Tree/NodeFactory.php @@ -0,0 +1,54 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Data\Tree; + +use Magento\Framework\ObjectManagerInterface; + +/** + * Factory class for @see \Magento\Framework\Data\Tree\Node + */ +class NodeFactory +{ + /** + * Object Manager instance + * + * @var ObjectManagerInterface + */ + protected $objectManager; + + /** + * Instance name to create + * + * @var string + */ + protected $instanceName; + + /** + * Factory constructor + * + * @param ObjectManagerInterface $objectManager + * @param string $instanceName + */ + public function __construct( + ObjectManagerInterface $objectManager, + $instanceName = '\Magento\Framework\Data\Tree\Node' + ) { + $this->objectManager = $objectManager; + $this->instanceName = $instanceName; + } + + /** + * Create class instance with specified parameters + * + * @param array $data + * @return \Magento\Framework\Data\Tree\Node + */ + public function create(array $data = []) + { + return $this->objectManager->create($this->instanceName, $data); + } +} diff --git a/lib/internal/Magento/Framework/Data/TreeFactory.php b/lib/internal/Magento/Framework/Data/TreeFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..ad3a41304b09fd8472a590d639df80984188807e --- /dev/null +++ b/lib/internal/Magento/Framework/Data/TreeFactory.php @@ -0,0 +1,54 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Data; + +use Magento\Framework\ObjectManagerInterface; + +/** + * Factory class for @see \Magento\Framework\Data\Tree + */ +class TreeFactory +{ + /** + * Object Manager instance + * + * @var ObjectManagerInterface + */ + protected $objectManager = null; + + /** + * Instance name to create + * + * @var string + */ + protected $instanceName = null; + + /** + * Factory constructor + * + * @param ObjectManagerInterface $objectManager + * @param string $instanceName + */ + public function __construct( + ObjectManagerInterface $objectManager, + $instanceName = '\Magento\Framework\Data\Tree' + ) { + $this->objectManager = $objectManager; + $this->instanceName = $instanceName; + } + + /** + * Create class instance with specified parameters + * + * @param array $data + * @return \Magento\Framework\Data\Tree + */ + public function create(array $data = []) + { + return $this->objectManager->create($this->instanceName, $data); + } +} diff --git a/lib/web/css/source/lib/_navigation.less b/lib/web/css/source/lib/_navigation.less index d56bd79f32c59e9ef806be17b8acaddd2d013288..6cf85b4ba0474fb65c4b07309445e12d85a5263f 100644 --- a/lib/web/css/source/lib/_navigation.less +++ b/lib/web/css/source/lib/_navigation.less @@ -8,6 +8,7 @@ // _____________________________________________ .main-navigation( + @_nav__indent-side: 15px, @_nav-background-color: @navigation__background, @_nav-border: @navigation__border, @_nav-level0-font-size: @navigation-level0-item__font-size, @@ -23,16 +24,21 @@ @_nav-level0-item-text-decoration: @navigation-level0-item__text-decoration, @_nav-level0-item-background-color-active: @navigation-level0-item__active__background, - @_nav-level0-item-border-active: @navigation-level0-item__active__border, + @_nav-level0-item__active__border-color: @navigation-level0-item__active__border-color, + @_nav-level0-item__active__border-style: @navigation-level0-item__active__border-style, + @_nav-level0-item__active__border-width: @navigation-level0-item__active__border-width, @_nav-level0-item-color-active: @navigation-level0-item__active__color, @_nav-level0-item-text-decoration-active: @navigation-level0-item__active__text-decoration, @_submenu-background-color: @submenu__background, @_submenu-border: @submenu__border, - @_submenu-padding: @submenu__padding, @_submenu-font-size: @submenu__font-size, @_submenu-font-weight: @submenu__font-weight, - @_submenu-item-padding: @submenu-item__padding, + @_submenu-line-height: @submenu-item__line-height, + @_submenu-item__padding-top: @submenu__padding-top, + @_submenu-item__padding-right: @submenu__padding-right, + @_submenu-item__padding-bottom: @submenu__padding-bottom, + @_submenu-item__padding-left: @submenu__padding-left, @_submenu-item-background-color: @submenu-item__background, @_submenu-item-border: @submenu-item__border, @@ -40,7 +46,10 @@ @_submenu-item-text-decoration: @submenu-item__text-decoration, @_submenu-item-background-color-active: @submenu-item__active__background, - @_submenu-item-border-active: @submenu-item__active__border, + @_submenu-item__active__border: @submenu-item__active__border, + @_submenu-item__active__border-color: @submenu-item__active__border-color, + @_submenu-item__active__border-style: @submenu-item__active__border-style, + @_submenu-item__active__border-width: @submenu-item__active__border-width, @_submenu-item-color-active: @submenu-item__active__color, @_submenu-item-text-decoration-active: @submenu-item__active__text-decoration ) { @@ -52,6 +61,16 @@ margin: 0; padding: 0; } + li { + margin: 0; + } + a { + display: block; + .css(padding-top, @_submenu-item__padding-top); + .css(padding-right, @_submenu-item__padding-right); + .css(padding-bottom, @_submenu-item__padding-bottom); + .css(padding-left, @_submenu-item__padding-left); + } a, a:hover { .css(color, @_nav-level0-item-color); @@ -60,22 +79,47 @@ .level0 { .font-size(@_nav-level0-font-size); .css(border-top, @_nav-level0-item-border); - margin: 0; > .level-top { .css(background, @_nav-level0-item-background-color); .css(font-weight, @_nav-level0-font-weight); .css(line-height, @_nav-level0-item-line-height); .css(padding, @_nav-level0-item-padding); .css(text-transform, @_nav-level0-text-transform); - display: block; word-break: break-all; } - &.active > a { - .css(background, @_nav-level0-item-background-color-active); - .css(border, @_nav-level0-item-border-active); - .css(color, @_nav-level0-item-color-active); - .css(text-decoration, @_nav-level0-item-text-decoration-active); + &.active { + .all-category { + .ui-state-focus { + .css(background, @_nav-level0-item-background-color-active); + .css(border-color, @_nav-level0-item__active__border-color); + .css(border-style, @_nav-level0-item__active__border-style); + .css(border-width, @_nav-level0-item__active__border-width); + .css(color, @_nav-level0-item-color-active); + .css(padding-left, @_nav__indent-side - @_submenu-item__active__border); + .css(text-decoration, @_nav-level0-item-text-decoration-active); + display: inline-block; + } + } + } + > .level1 { + font-weight: @font-weight__semibold; } + &.active, + &.has-active { // ToDo UI: remove "has_active" here, when mobile navigation default open state is implemented + > a:not(.ui-state-active) { + .css(background, @_nav-level0-item-background-color-active); + .css(border-color, @_nav-level0-item__active__border-color); + .css(border-style, @_nav-level0-item__active__border-style); + .css(border-width, @_nav-level0-item__active__border-width); + .css(color, @_nav-level0-item-color-active); + .css(text-decoration, @_nav-level0-item-text-decoration-active); + span:not(.ui-menu-icon) { + margin-left: -@_submenu-item__active__border; + } + } + } + } + li.level0 { &:last-child { .css(border-bottom, @_nav-level0-item-border); } @@ -89,25 +133,33 @@ .css(border, @_submenu-border); .css(font-size, @_submenu-font-size); .css(font-weight, @_submenu-font-weight); + .css(line-height, @_submenu-line-height); + left: auto !important; overflow-x: hidden; + padding: 0; position: relative; - transition: left .3s ease-out 0; top: auto !important; - left: auto !important; - padding: 10px 20px; - > ul { + transition: left .3s ease-out; + > li { + > a { + padding-left: @_nav__indent-side; + } + &:last-child { + margin-bottom: 0; + } + } + ul { display: block; - .css(padding, @_submenu-padding); + .css(padding-left, @_submenu-item__padding-left); > li { margin: 0; a { .css(background, @_submenu-item-background-color); .css(border, @_submenu-item-border); .css(color, @_submenu-item-color); - .css(text-decoration, @_submenu-item-text-decoration); display: block; line-height: normal; - .css(padding, @_submenu-item-padding); + .css(text-decoration, @_submenu-item-text-decoration); } } } @@ -116,11 +168,23 @@ top: 0 !important; padding-right: 0; } - .active > a { - .css(background, @_submenu-item-background-color-active); - .css(border, @_submenu-item-border-active); - .css(color, @_submenu-item-color-active); - .css(text-decoration, @_submenu-item-text-decoration-active); + .active { + > a { + .css(background, @_submenu-item-background-color-active); + .css(border-color, @_submenu-item__active__border-color); + .css(border-style, @_submenu-item__active__border-style); + .css(border-width, @_submenu-item__active__border-width); + .css(color, @_submenu-item-color-active); + .css(padding-left, @_nav__indent-side - @_submenu-item__active__border); + .css(text-decoration, @_submenu-item-text-decoration-active); + } + } + .level1 { + &.active { + > a { + padding-left: @_nav__indent-side - @_submenu-item__active__border; + } + } } } } @@ -152,7 +216,9 @@ @_nav-level0-item-text-decoration-hover: @navigation-desktop-level0-item__hover__text-decoration, @_nav-level0-item-background-color-active: @navigation-desktop-level0-item__active__background, - @_nav-level0-item-border-active: @navigation-desktop-level0-item__active__border, + @_nav-level0-item__active__border-color: @navigation-desktop-level0-item__active__border-color, + @_nav-level0-item__active__border-style: @navigation-desktop-level0-item__active__border-style, + @_nav-level0-item__active__border-width: @navigation-desktop-level0-item__active__border-width, @_nav-level0-item-color-active: @navigation-desktop-level0-item__active__color, @_nav-level0-item-text-decoration-active: @navigation-desktop-level0-item__active__text-decoration, @@ -182,7 +248,9 @@ @_submenu-item-text-decoration-hover: @submenu-desktop-item__hover__text-decoration, @_submenu-item-background-color-active: @submenu-desktop-item__active__background, - @_submenu-item-border-active: @submenu-desktop-item__active__border, + @_submenu-item__active__border-color: @submenu-desktop-item__active__border-color, + @_submenu-item__active__border-style: @submenu-desktop-item__active__border-style, + @_submenu-item__active__border-width: @submenu-desktop-item__active__border-width, @_submenu-item-color-active: @submenu-desktop-item__active__color, @_submenu-item-text-decoration-active: @submenu-desktop-item__active__text-decoration ) { @@ -237,12 +305,16 @@ .css(text-decoration, @_nav-level0-item-text-decoration-hover); } } - &.active { + &.active, + &.has-active { > .level-top { .css(background, @_nav-level0-item-background-color-active); - .css(border, @_nav-level0-item-border-active); + .css(border-color, @_nav-level0-item__active__border-color); + .css(border-style, @_nav-level0-item__active__border-style); + .css(border-width, @_nav-level0-item__active__border-width); .css(color, @_nav-level0-item-color-active); .css(text-decoration, @_nav-level0-item-text-decoration-active); + display: inline-block; } } &.parent:hover > .submenu { @@ -288,7 +360,9 @@ } .active > a { .css(background, @_submenu-item-background-color-active); - .css(border, @_submenu-item-border-active); + .css(border-color, @_submenu-item__active__border-color); + .css(border-style, @_submenu-item__active__border-style); + .css(border-width, @_submenu-item__active__border-width); .css(color, @_submenu-item-color-active); .css(text-decoration, @_submenu-item-text-decoration-active); } @@ -365,7 +439,7 @@ .css(margin-top, -@_size); > ul { .css(margin-top, @_size); - &:before{ + &:before { .css(color, @_bg); content: ''; display: block; @@ -382,7 +456,7 @@ .css(margin-top, -@_size); > ul { .css(margin-top, @_size); - &:before{ + &:before { .css(color, @_border); content: ''; display: block; diff --git a/lib/web/css/source/lib/variables/_colors.less b/lib/web/css/source/lib/variables/_colors.less index 603a465151215b6ad4b766484de0edba7c25479f..95374e5802e6db799efd9467872db5928d19fbec 100644 --- a/lib/web/css/source/lib/variables/_colors.less +++ b/lib/web/css/source/lib/variables/_colors.less @@ -33,6 +33,7 @@ @color-gray94: #f0f0f0; @color-gray95: #f2f2f2; @color-white-smoke: #f5f5f5; +@color-white-dark-smoke: #efefef; @color-white-fog: #f8f8f8; @color-gray-light0: #f6f6f6; diff --git a/lib/web/css/source/lib/variables/_navigation.less b/lib/web/css/source/lib/variables/_navigation.less index eb1840348a47677eabd5fd15fb314e0bb2e8c766..73d1ad71cb3e4e69fe9f26a6553e8cae1e77bab8 100644 --- a/lib/web/css/source/lib/variables/_navigation.less +++ b/lib/web/css/source/lib/variables/_navigation.less @@ -14,7 +14,7 @@ @navigation-level0-item__font-weight: @font-weight__bold; @navigation-level0-item__line-height: false; @navigation-level0-item__margin: 0; -@navigation-level0-item__padding: 8px @indent__xl 8px @indent__base; +@navigation-level0-item__padding: 8px @indent__xl 8px 15px; @navigation-level0-item__text-transform: uppercase; @navigation-level0-item__background: ''; @@ -23,24 +23,32 @@ @navigation-level0-item__text-decoration: none; @navigation-level0-item__active__background: ''; -@navigation-level0-item__active__border: ''; +@navigation-level0-item__active__border-color: @color-orange-red1; +@navigation-level0-item__active__border-style: solid; +@navigation-level0-item__active__border-width: 0 0 0 8px; @navigation-level0-item__active__color: ''; @navigation-level0-item__active__text-decoration: ''; @submenu__background: ''; @submenu__border: ''; -@submenu__padding: 0 0 0 @indent__base; +@submenu__padding-top: @indent__s; +@submenu__padding-right: 0; +@submenu__padding-bottom: @indent__s; +@submenu__padding-left: 15px; @submenu__font-size: ''; @submenu__font-weight: @font-weight__regular; +@submenu-item__line-height: 1.3; -@submenu-item__padding: 8px 0; @submenu-item__background: ''; @submenu-item__border: ''; @submenu-item__color: @color-gray34; @submenu-item__text-decoration: ''; @submenu-item__active__background: ''; -@submenu-item__active__border: ''; +@submenu-item__active__border: 8px; +@submenu-item__active__border-color: @color-orange-red1; +@submenu-item__active__border-style: solid; +@submenu-item__active__border-width: 0 0 0 @submenu-item__active__border; @submenu-item__active__color: ''; @submenu-item__active__text-decoration: ''; @@ -68,7 +76,9 @@ @navigation-desktop-level0-item__hover__text-decoration: @navigation-desktop-level0-item__text-decoration; @navigation-desktop-level0-item__active__background: ''; -@navigation-desktop-level0-item__active__border: ''; +@navigation-desktop-level0-item__active__border-color: @color-orange-red1; +@navigation-desktop-level0-item__active__border-style: solid; +@navigation-desktop-level0-item__active__border-width: 0 0 3px; @navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__hover__color; @navigation-desktop-level0-item__active__text-decoration: @navigation-desktop-level0-item__text-decoration; @@ -98,6 +108,8 @@ @submenu-desktop-item__hover__text-decoration: @navigation-desktop-level0-item__text-decoration; @submenu-desktop-item__active__background: ''; -@submenu-desktop-item__active__border: ''; +@submenu-desktop-item__active__border-color: @color-orange-red1; +@submenu-desktop-item__active__border-style: solid; +@submenu-desktop-item__active__border-width: 0 0 0 3px; @submenu-desktop-item__active__color: ''; @submenu-desktop-item__active__text-decoration: '';