Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into issue/37
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/code/Magento/QuoteGraphQl/etc/schema.graphqls
  • Loading branch information
naydav committed Feb 27, 2019
2 parents beec4a4 + 908ed15 commit 71ce4d5
Show file tree
Hide file tree
Showing 113 changed files with 2,208 additions and 954 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
<methods>
<method name="authorizenet_acceptjs">
<allow_multiple_address>1</allow_multiple_address>
<allow_multiple_address>0</allow_multiple_address>
</method>
</methods>
</payment>
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
*/

var config = {
shim: {
acceptjs: {
exports: 'Accept'
},
acceptjssandbox: {
exports: 'Accept'
map: {
'*': {
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept.js',
acceptjs: 'https://js.authorize.net/v1/Accept.js'
}
},
paths: {
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept',
acceptjs: 'https://js.authorize.net/v1/Accept'
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define([
dependency = 'acceptjssandbox';
}

require([dependency], function (accept) {
require([dependency], function () {
var $body = $('body');

/*
Expand All @@ -26,7 +26,16 @@ define([
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
*/
$body.on('handshake.acceptjs', function () {
deferred.resolve(accept);
/*
* Accept.js doesn't return the library when loading
* and requirejs "shim" can't be used because it only works with the "paths" config option
* and we can't use "paths" because require will try to load ".min.js" in production
* and that doesn't work because it doesn't exist
* and we can't add a query string to force a URL because accept.js will reject it
* and we can't include it locally because they check in the script before loading more scripts
* So, we use the global version as "shim" would
*/
deferred.resolve(window.Accept);
$body.off('handshake.acceptjs');
});
},
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Backup/Controller/Adminhtml/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
namespace Magento\Backup\Controller\Adminhtml;

use Magento\Backend\App\Action;
use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Backup\Helper\Data as Helper;
use Magento\Framework\App\ObjectManager;

Expand All @@ -18,7 +17,7 @@
* @since 100.0.2
* @SuppressWarnings(PHPMD.AllPurposeAction)
*/
abstract class Index extends Action implements HttpGetActionInterface
abstract class Index extends Action
{
/**
* Authorization level of a basic admin session
Expand Down
7 changes: 5 additions & 2 deletions app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Backup\Controller\Adminhtml\Index;

use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem;

class Create extends \Magento\Backup\Controller\Adminhtml\Index
/**
* Create backup controller
*/
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
{
/**
* Create backup action.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Catalog\Controller\Adminhtml\Product;

class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product
use Magento\Framework\App\Action\HttpGetActionInterface;

/**
* Get specified tab grid controller.
*/
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface
{
/**
* @var \Magento\Framework\Controller\Result\RawFactory
Expand Down Expand Up @@ -47,7 +51,7 @@ public function execute()
$this->productBuilder->build($this->getRequest());

$block = $this->getRequest()->getParam('gridOnlyBlock');
$blockClassSuffix = str_replace(' ', '_', ucwords(str_replace('_', ' ', $block)));
$blockClassSuffix = ucwords($block, '_');

/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
$resultRaw = $this->resultRawFactory->create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct2">
<argument name="product" value="SimpleProduct"/>
</actionGroup>
<actionGroup ref="NavigateToAndResetProductGridToDefaultView" stepKey="NavigateToAndResetProductGridToDefaultView"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductList"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

define([
'jquery',
'mage/mage'
'mage/mage',
'validation'
], function ($) {
'use strict';

return function (config, element) {

$(element).mage('form').mage('validation', {
$(element).mage('form').validation({
validationUrl: config.validationUrl
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected function getCurrentRewritesMocks($currentRewrites)
->disableOriginalConstructor()->getMock();
foreach ($urlRewrite as $key => $value) {
$url->expects($this->any())
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
->method('get' . str_replace('_', '', ucwords($key, '_')))
->will($this->returnValue($value));
}
$rewrites[] = $url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected function getCurrentRewritesMocks($currentRewrites)
->disableOriginalConstructor()->getMock();
foreach ($urlRewrite as $key => $value) {
$url->expects($this->any())
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
->method('get' . str_replace('_', '', ucwords($key, '_')))
->will($this->returnValue($value));
}
$rewrites[] = $url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ protected function currentUrlRewritesRegeneratorGetCurrentRewritesMocks($current
->disableOriginalConstructor()->getMock();
foreach ($urlRewrite as $key => $value) {
$url->expects($this->any())
->method('get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))))
->method('get' . str_replace('_', '', ucwords($key, '_')))
->will($this->returnValue($value));
}
$rewrites[] = $url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/
define([
'ko',
'underscore'
'underscore',
'domReady!'
], function (ko, _) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cms/Test/Mftf/Page/CmsPageEditPage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="CmsPageEditPage" area="admin" url="admin/cms_page/edit/page_id/{{var}}" module="Magento_Cms" parameterized="true">
<page name="CmsPageEditPage" area="admin" url="admin/cms_page/edit/page_id/{{var}}" parameterized="true" module="Magento_Cms">
<section name="CmsNewPagePageActionsSection"/>
<section name="CmsNewPagePageBasicFieldsSection"/>
<section name="CmsNewPagePageContentSection"/>
Expand Down
5 changes: 5 additions & 0 deletions app/code/Magento/Config/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ protected function _processGroup(
if (!isset($fieldData['value'])) {
$fieldData['value'] = null;
}

if ($field->getType() == 'multiline' && is_array($fieldData['value'])) {
$fieldData['value'] = trim(implode(PHP_EOL, $fieldData['value']));
}

$data = [
'field' => $fieldId,
'groups' => $groups,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<element name="confProductSkuMessage" type="text" selector="//*[@name='configurable-matrix[{{arg}}][sku]']/following-sibling::label" parameterized="true"/>
<element name="variationsSkuInputByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) input[name*='sku']" type="input" parameterized="true"/>
<element name="variationsSkuInputErrorByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) .admin__field-error" type="text" parameterized="true"/>
<element name="variationLabel" type="text" selector="//div[@data-index='configurable-matrix']/label"/>
</section>
<section name="AdminConfigurableProductFormSection">
<element name="productWeight" type="input" selector=".admin__control-text[name='product[weight]']"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
</actionGroup>

<!-- assert color configurations on the admin create product page -->
<dontSee selector="{{AdminProductFormConfigurationsSection.variationLabel}}" stepKey="seeLabelNotVisible"/>
<seeNumberOfElements selector="{{AdminProductFormConfigurationsSection.currentVariationsRows}}" userInput="3" stepKey="seeNumberOfRows"/>
<see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeAttributeName1InField"/>
<see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeAttributeName2InField"/>
Expand Down
9 changes: 0 additions & 9 deletions app/code/Magento/Customer/Block/Form/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ public function __construct(
$this->_customerSession = $customerSession;
}

/**
* @return $this
*/
protected function _prepareLayout()
{
$this->pageConfig->getTitle()->set(__('Customer Login'));
return parent::_prepareLayout();
}

/**
* Retrieve form posting url
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Customer Login</title>
</head>
<body>
<referenceContainer name="content">
<!-- customer.form.login.extra -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function modifyData(array $data)
{
Expand All @@ -101,7 +101,7 @@ public function modifyData(array $data)
}

/**
* {@inheritdoc}
* @inheritdoc
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function modifyMeta(array $meta)
Expand Down Expand Up @@ -160,6 +160,8 @@ public function modifyMeta(array $meta)
}

/**
* Returns configuration for dynamic rows
*
* @return array
*/
protected function getDynamicRows()
Expand All @@ -180,6 +182,8 @@ protected function getDynamicRows()
}

/**
* Returns Record column configuration
*
* @return array
*/
protected function getRecord()
Expand Down Expand Up @@ -221,6 +225,8 @@ protected function getRecord()
}

/**
* Returns Title column configuration
*
* @return array
*/
protected function getTitleColumn()
Expand All @@ -238,6 +244,7 @@ protected function getTitleColumn()
'componentType' => Form\Field::NAME,
'dataType' => Form\Element\DataType\Text::NAME,
'dataScope' => 'title',
'labelVisible' => false,
'validation' => [
'required-entry' => true,
],
Expand All @@ -247,6 +254,8 @@ protected function getTitleColumn()
}

/**
* Returns Price column configuration
*
* @return array
*/
protected function getPriceColumn()
Expand All @@ -265,6 +274,7 @@ protected function getPriceColumn()
'dataType' => Form\Element\DataType\Number::NAME,
'component' => 'Magento_Downloadable/js/components/price-handler',
'dataScope' => 'price',
'labelVisible' => false,
'addbefore' => $this->locator->getStore()->getBaseCurrency()
->getCurrencySymbol(),
'validation' => [
Expand All @@ -281,6 +291,8 @@ protected function getPriceColumn()
}

/**
* Returns File column configuration
*
* @return array
*/
protected function getFileColumn()
Expand All @@ -302,6 +314,7 @@ protected function getFileColumn()
'options' => $this->typeUpload->toOptionArray(),
'typeFile' => 'links_file',
'typeUrl' => 'link_url',
'labelVisible' => false,
];
$fileLinkUrl['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
Expand Down Expand Up @@ -344,6 +357,8 @@ protected function getFileColumn()
}

/**
* Returns Sample column configuration
*
* @return array
*/
protected function getSampleColumn()
Expand All @@ -363,6 +378,7 @@ protected function getSampleColumn()
'dataType' => Form\Element\DataType\Text::NAME,
'dataScope' => 'sample.type',
'options' => $this->typeUpload->toOptionArray(),
'labelVisible' => false,
'typeFile' => 'sample_file',
'typeUrl' => 'sample_url',
];
Expand All @@ -382,6 +398,7 @@ protected function getSampleColumn()
'component' => 'Magento_Downloadable/js/components/file-uploader',
'elementTmpl' => 'Magento_Downloadable/components/file-uploader',
'fileInputName' => 'link_samples',
'labelVisible' => false,
'uploaderConfig' => [
'url' => $this->urlBuilder->addSessionParam()->getUrl(
'adminhtml/downloadable_file/upload',
Expand All @@ -403,6 +420,8 @@ protected function getSampleColumn()
}

/**
* Returns Sharable columns configuration
*
* @return array
*/
protected function getShareableColumn()
Expand All @@ -420,6 +439,8 @@ protected function getShareableColumn()
}

/**
* Returns max downloads column configuration
*
* @return array
*/
protected function getMaxDownloadsColumn()
Expand All @@ -437,6 +458,7 @@ protected function getMaxDownloadsColumn()
'componentType' => Form\Field::NAME,
'dataType' => Form\Element\DataType\Number::NAME,
'dataScope' => 'number_of_downloads',
'labelVisible' => false,
'value' => 0,
'validation' => [
'validate-zero-or-greater' => true,
Expand Down
Loading

0 comments on commit 71ce4d5

Please sign in to comment.