Skip to content

Commit c1f3f36

Browse files
committed
Merge remote-tracking branch 'mainline/2.2-develop' into 2.2-develop-PR-port-20913
2 parents 11cafc3 + 994348f commit c1f3f36

File tree

77 files changed

+1535
-3830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1535
-3830
lines changed

app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\System\Design;
88

9+
/**
10+
* Save design action.
11+
*/
912
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
1013
{
1114
/**
@@ -26,6 +29,8 @@ protected function _filterPostData($data)
2629
}
2730

2831
/**
32+
* Save design action.
33+
*
2934
* @return \Magento\Backend\Model\View\Result\Redirect
3035
*/
3136
public function execute()
@@ -54,10 +59,10 @@ public function execute()
5459
} catch (\Exception $e) {
5560
$this->messageManager->addErrorMessage($e->getMessage());
5661
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setDesignData($data);
57-
return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
62+
return $resultRedirect->setPath('*/*/edit', ['id' => $design->getId()]);
5863
}
5964
}
6065

61-
return $resultRedirect->setPath('adminhtml/*/');
66+
return $resultRedirect->setPath('*/*/');
6267
}
6368
}

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminMainActionsSection">
1212
<element name="save" type="button" selector="#save" timeout="30"/>
13-
<element name="saveAndContinue" type="button" selector="button[id*=save_and_]" timeout="30"/>
14-
<element name="delete" type="button" selector="#delete"/>
13+
<element name="delete" type="button" selector="#delete" timeout="30"/>
1514
<element name="add" type="button" selector="#add" timeout="30"/>
1615
<element name="back" type="button" selector="#back" timeout="30"/>
16+
<element name="saveAndContinue" type="button" selector="button[id*=save_and_]" timeout="30"/>
1717
</section>
1818
</sections>

app/code/Magento/Catalog/Model/CategoryList.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Magento\Framework\Api\SearchCriteriaInterface;
1616
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
1717

18+
/**
19+
* Class for getting category list.
20+
*/
1821
class CategoryList implements CategoryListInterface
1922
{
2023
/**
@@ -64,7 +67,7 @@ public function __construct(
6467
}
6568

6669
/**
67-
* {@inheritdoc}
70+
* @inheritdoc
6871
*/
6972
public function getList(SearchCriteriaInterface $searchCriteria)
7073
{
@@ -75,8 +78,8 @@ public function getList(SearchCriteriaInterface $searchCriteria)
7578
$this->collectionProcessor->process($searchCriteria, $collection);
7679

7780
$items = [];
78-
foreach ($collection->getAllIds() as $id) {
79-
$items[] = $this->categoryRepository->get($id);
81+
foreach ($collection->getItems() as $category) {
82+
$items[] = $this->categoryRepository->get($category->getId());
8083
}
8184

8285
/** @var CategorySearchResultsInterface $searchResult */

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,8 @@
295295
<data key="quantity">1</data>
296296
<requiredEntity type="product_extension_attribute">EavStock1</requiredEntity>
297297
</entity>
298+
<entity name="ApiSimpleWithQty100" extends="ApiSimpleOne">
299+
<data key="quantity">100</data>
300+
<requiredEntity type="product_extension_attribute">EavStock100</requiredEntity>
301+
</entity>
298302
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductExtensionAttributeData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
<entity name="EavStock1" type="product_extension_attribute">
1515
<requiredEntity type="stock_item">Qty_1</requiredEntity>
1616
</entity>
17+
<entity name="EavStock100" type="product_extension_attribute">
18+
<requiredEntity type="stock_item">Qty_100</requiredEntity>
19+
</entity>
1720
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/StockItemData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
<data key="qty">1</data>
1717
<data key="is_in_stock">true</data>
1818
</entity>
19+
<entity name="Qty_100" type="stock_item">
20+
<data key="qty">100</data>
21+
<data key="is_in_stock">true</data>
22+
</entity>
1923
</entities>

app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ public function testGetList()
8686
$categoryIdSecond = 2;
8787

8888
$categoryFirst = $this->getMockBuilder(Category::class)->disableOriginalConstructor()->getMock();
89+
$categoryFirst->expects($this->atLeastOnce())->method('getId')->willReturn($categoryIdFirst);
8990
$categorySecond = $this->getMockBuilder(Category::class)->disableOriginalConstructor()->getMock();
91+
$categorySecond->expects($this->atLeastOnce())->method('getId')->willReturn($categoryIdSecond);
9092

9193
/** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteria */
9294
$searchCriteria = $this->createMock(SearchCriteriaInterface::class);
9395

9496
$collection = $this->getMockBuilder(Collection::class)->disableOriginalConstructor()->getMock();
9597
$collection->expects($this->once())->method('getSize')->willReturn($totalCount);
96-
$collection->expects($this->once())->method('getAllIds')->willReturn([$categoryIdFirst, $categoryIdSecond]);
98+
$collection->expects($this->once())->method('getItems')->willReturn([$categoryFirst, $categorySecond]);
9799

98100
$this->collectionProcessorMock->expects($this->once())
99101
->method('process')

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Catalog\Model\Config\Source\Product\Options\Price as ProductOptionsPrice;
1212
use Magento\Framework\UrlInterface;
1313
use Magento\Framework\Stdlib\ArrayManager;
14+
use Magento\Ui\Component\Form\Element\Hidden;
1415
use Magento\Ui\Component\Modal;
1516
use Magento\Ui\Component\Container;
1617
use Magento\Ui\Component\DynamicRows;
@@ -867,10 +868,9 @@ protected function getPositionFieldConfig($sortOrder)
867868
'data' => [
868869
'config' => [
869870
'componentType' => Field::NAME,
870-
'formElement' => Input::NAME,
871+
'formElement' => Hidden::NAME,
871872
'dataScope' => static::FIELD_SORT_ORDER_NAME,
872873
'dataType' => Number::NAME,
873-
'visible' => false,
874874
'sortOrder' => $sortOrder,
875875
],
876876
],

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,10 @@ protected function customizeNameListeners(array $meta)
361361
'allowImport' => !$this->locator->getProduct()->getId(),
362362
];
363363

364-
if (!in_array($listener, $textListeners)) {
365-
$importsConfig['elementTmpl'] = 'ui/form/element/input';
364+
if (in_array($listener, $textListeners)) {
365+
$importsConfig['cols'] = 15;
366+
$importsConfig['rows'] = 2;
367+
$importsConfig['elementTmpl'] = 'ui/form/element/textarea';
366368
}
367369

368370
$meta = $this->arrayManager->merge($listenerPath . static::META_CONFIG_PATH, $meta, $importsConfig);

app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@
190190
<label translate="true">Websites</label>
191191
</settings>
192192
</column>
193+
<column name="cost" class="Magento\Catalog\Ui\Component\Listing\Columns\Price" sortOrder="120">
194+
<settings>
195+
<addField>true</addField>
196+
<filter>textRange</filter>
197+
<label translate="true">Cost</label>
198+
</settings>
199+
</column>
193200
<actionsColumn name="actions" class="Magento\Catalog\Ui\Component\Listing\Columns\ProductActions" sortOrder="200">
194201
<settings>
195202
<indexField>entity_id</indexField>

0 commit comments

Comments
 (0)