Skip to content

Commit 508ffec

Browse files
committed
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-93120
2 parents ec751ae + 7be2b8c commit 508ffec

File tree

154 files changed

+2612
-236
lines changed

Some content is hidden

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

154 files changed

+2612
-236
lines changed

app/code/Magento/Catalog/Block/Product/ImageBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function getRatio(\Magento\Catalog\Helper\Image $helper)
122122
public function create()
123123
{
124124
/** @var \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface $simpleOption */
125-
$simpleOption = $this->product->getCustomOption('simple_product');
125+
$simpleOption = $this->product->getOptionById('simple_product');
126126

127127
if ($simpleOption !== null) {
128128
$optionProduct = $simpleOption->getProduct();

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
<entity name="CustomAttributeProductAttribute" type="custom_attribute">
2424
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
2525
<var key="value" entityKey="value" entityType="ProductAttributeOption"/>
26-
<data key="value">test product attribute</data>
27-
<data key="attribute_code">test_product_attribute</data>
2826
</entity>
2927
<entity name="ApiProductDescription" type="custom_attribute">
3028
<data key="attribute_code">description</data>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@
8686
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
8787
<requiredEntity type="custom_attributes">CustomAttributeProductAttribute</requiredEntity>
8888
</entity>
89+
<entity name="SimpleOption" type="product2">
90+
<data key="sku" unique="suffix">SimpleOne</data>
91+
<data key="type_id">simple</data>
92+
<data key="attribute_set_id">4</data>
93+
<data key="name" unique="suffix">SimpleProductOption</data>
94+
<data key="price">10.00</data>
95+
<data key="visibility">4</data>
96+
<data key="status">1</data>
97+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
98+
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
99+
</entity>
89100
<entity name="ProductImage" type="uploadImage">
90101
<data key="title" unique="suffix">Image1</data>
91102
<data key="price">1.00</data>

app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<section name="StorefrontProductPageSection"/>
1313
<section name="StorefrontProductAdditionalInformationSection"/>
1414
<section name="StorefrontProductMediaSection"/>
15+
<section name="StorefrontProductInfoMainSection"/>
1516
</page>
1617
</pages>

app/code/Magento/Catalog/Test/Unit/Block/Product/ImageBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function testCreateWithSimpleProduct($data, $expected)
306306
$simpleOptionMock = $this->createMock(\Magento\Wishlist\Model\Item\Option::class);
307307
$simpleProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
308308

309-
$productMock->expects($this->once())->method('getCustomOption')
309+
$productMock->expects($this->once())->method('getOptionById')
310310
->with('simple_product')->willReturn($simpleOptionMock);
311311

312312
$simpleOptionMock->expects($this->once())->method('getProduct')->willReturn($simpleProductMock);

app/code/Magento/CatalogRule/Model/Rule/Job.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* See COPYING.txt for license details.
99
*/
1010

11+
namespace Magento\CatalogRule\Model\Rule;
12+
13+
use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor;
14+
1115
/**
1216
* Catalog Rule job model
1317
*
@@ -18,13 +22,8 @@
1822
* @method bool hasSuccess()
1923
* @method bool hasError()
2024
*
21-
* @author Magento Core Team <core@magentocommerce.com>
22-
*/
23-
namespace Magento\CatalogRule\Model\Rule;
24-
25-
use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor;
26-
27-
/**
25+
* @author Magento Core Team <core@magentocommerce.com>
26+
*
2827
* @api
2928
* @since 100.0.2
3029
*/
@@ -39,10 +38,14 @@ class Job extends \Magento\Framework\DataObject
3938
* Basic object initialization
4039
*
4140
* @param RuleProductProcessor $ruleProcessor
41+
* @param array $data
4242
*/
43-
public function __construct(RuleProductProcessor $ruleProcessor)
44-
{
43+
public function __construct(
44+
RuleProductProcessor $ruleProcessor,
45+
array $data = []
46+
) {
4547
$this->ruleProcessor = $ruleProcessor;
48+
parent::__construct($data);
4649
}
4750

4851
/**

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="CheckoutCartSummarySection">
12+
<element name="subtotal" type="text" selector="#cart-totals tr.totals.sub span.price"/>
1213
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
13-
<element name="subtotal" type="text" selector="span.price[data-th='Subtotal']"/>
1414
<element name="total" type="text" selector=".amount[data-th='Order Total'] span"/>
15+
<element name="country" type="select" selector="#block-summary select[name='country_id']" timeout="30"/>
16+
<element name="region" type="select" selector="#block-summary select[name='region_id']" timeout="30"/>
17+
<element name="postcode" type="text" selector="#block-summary input[name='postcode']" timeout="30"/>
18+
<element name="estimateShippingAndTax" type="text" selector="#block-shipping-heading" timeout="5"/>
19+
<element name="flatRateShippingMethod" type="radio" selector="#s_method_flatrate_flatrate" timeout="30"/>
1520
</section>
1621
</sections>

app/code/Magento/Cms/Controller/Adminhtml/Block/Delete.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ public function execute()
2626
$model->load($id);
2727
$model->delete();
2828
// display success message
29-
$this->messageManager->addSuccess(__('You deleted the block.'));
29+
$this->messageManager->addSuccessMessage(__('You deleted the block.'));
3030
// go to grid
3131
return $resultRedirect->setPath('*/*/');
3232
} catch (\Exception $e) {
3333
// display error message
34-
$this->messageManager->addError($e->getMessage());
34+
$this->messageManager->addErrorMessage($e->getMessage());
3535
// go back to edit form
3636
return $resultRedirect->setPath('*/*/edit', ['block_id' => $id]);
3737
}
3838
}
3939
// display error message
40-
$this->messageManager->addError(__('We can\'t find a block to delete.'));
40+
$this->messageManager->addErrorMessage(__('We can\'t find a block to delete.'));
4141
// go to grid
4242
return $resultRedirect->setPath('*/*/');
4343
}

app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function execute()
4242
if ($id) {
4343
$model->load($id);
4444
if (!$model->getId()) {
45-
$this->messageManager->addError(__('This block no longer exists.'));
45+
$this->messageManager->addErrorMessage(__('This block no longer exists.'));
4646
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
4747
$resultRedirect = $this->resultRedirectFactory->create();
4848
return $resultRedirect->setPath('*/*/');

app/code/Magento/Cms/Controller/Adminhtml/Block/InlineEdit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function __construct(
4646

4747
/**
4848
* @return \Magento\Framework\Controller\ResultInterface
49+
* @throws \Magento\Framework\Exception\LocalizedException
4950
*/
5051
public function execute()
5152
{

0 commit comments

Comments
 (0)