Skip to content

Commit d451209

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into mtf-eol
2 parents 4f53474 + 1514eeb commit d451209

File tree

70 files changed

+1376
-386
lines changed

Some content is hidden

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

70 files changed

+1376
-386
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
113113
<label>Debug</label>
114114
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
115-
<label>Enabled Template Path Hints for Storefront</label>
115+
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118118
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
@@ -132,7 +132,7 @@
132132
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
133133
</field>
134134
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
135-
<label>Enabled Template Path Hints for Admin</label>
135+
<label>Enable Template Path Hints for Admin</label>
136136
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
137137
</field>
138138
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,10 +644,11 @@ public function delete(ProductInterface $product)
644644
unset($this->instancesById[$product->getId()]);
645645
$this->resourceModel->delete($product);
646646
} catch (ValidatorException $e) {
647-
throw new CouldNotSaveException(__($e->getMessage()));
647+
throw new CouldNotSaveException(__($e->getMessage()), $e);
648648
} catch (\Exception $e) {
649649
throw new \Magento\Framework\Exception\StateException(
650-
__('The "%1" product couldn\'t be removed.', $sku)
650+
__('The "%1" product couldn\'t be removed.', $sku),
651+
$e
651652
);
652653
}
653654
$this->removeProductFromLocalCache($sku);

app/code/Magento/Catalog/Pricing/Price/MinimalTierPriceCalculator.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public function __construct(CalculatorInterface $calculator)
2929
}
3030

3131
/**
32-
* Get raw value of "as low as" as a minimal among tier prices
33-
* {@inheritdoc}
32+
* Get raw value of "as low as" as a minimal among tier prices{@inheritdoc}
33+
*
34+
* @param SaleableInterface $saleableItem
35+
* @return float|null
3436
*/
3537
public function getValue(SaleableInterface $saleableItem)
3638
{
@@ -49,15 +51,17 @@ public function getValue(SaleableInterface $saleableItem)
4951
}
5052

5153
/**
52-
* Return calculated amount object that keeps "as low as" value
53-
* {@inheritdoc}
54+
* Return calculated amount object that keeps "as low as" value{@inheritdoc}
55+
*
56+
* @param SaleableInterface $saleableItem
57+
* @return AmountInterface|null
5458
*/
5559
public function getAmount(SaleableInterface $saleableItem)
5660
{
5761
$value = $this->getValue($saleableItem);
5862

5963
return $value === null
6064
? null
61-
: $this->calculator->getAmount($value, $saleableItem);
65+
: $this->calculator->getAmount($value, $saleableItem, 'tax');
6266
}
6367
}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,4 +889,21 @@
889889
<data key="attributeGroupId">13</data>
890890
<data key="sortOrder">0</data>
891891
</entity>
892+
<entity name="simpleProductDefault" type="product">
893+
<data key="sku" unique="suffix">sku_simple_product_</data>
894+
<data key="type_id">simple</data>
895+
<data key="attribute_set_id">4</data>
896+
<data key="visibility">4</data>
897+
<data key="name" unique="suffix">Simple Product </data>
898+
<data key="price">560</data>
899+
<data key="urlKey" unique="suffix">simple-product-</data>
900+
<data key="status">1</data>
901+
<data key="quantity">25</data>
902+
<data key="weight">1</data>
903+
<data key="product_has_weight">1</data>
904+
<data key="is_in_stock">1</data>
905+
<data key="tax_class_id">2</data>
906+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
907+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
908+
</entity>
892909
</entities>

app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
$label = $block->getChildData($alias, 'title');
2323
?>
2424
<div class="data item title"
25-
aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
2625
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
2726
<a class="data switch"
2827
tabindex="-1"
29-
data-toggle="switch"
28+
data-toggle="trigger"
3029
href="#<?= /* @escapeNotVerified */ $alias ?>"
3130
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
3231
<?= /* @escapeNotVerified */ $label ?>
3332
</a>
3433
</div>
35-
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
34+
<div class="data item content"
35+
aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
3636
<?= /* @escapeNotVerified */ $html ?>
3737
</div>
3838
<?php endforeach;?>

app/code/Magento/Checkout/Controller/Cart/Addgroup.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Checkout\Controller\Cart;
89

910
use Magento\Checkout\Model\Cart as CustomerCart;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
1012
use Magento\Framework\Escaper;
1113
use Magento\Framework\App\ObjectManager;
1214
use Magento\Sales\Model\Order\Item;
1315

1416
/**
17+
* Add grouped items controller.
18+
*
1519
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1620
*/
17-
class Addgroup extends \Magento\Checkout\Controller\Cart
21+
class Addgroup extends \Magento\Checkout\Controller\Cart implements HttpPostActionInterface
1822
{
1923
/**
2024
* @var Escaper
@@ -44,6 +48,8 @@ public function __construct(
4448
}
4549

4650
/**
51+
* Add items in group.
52+
*
4753
* @return \Magento\Framework\Controller\Result\Redirect
4854
*/
4955
public function execute()
@@ -74,6 +80,8 @@ public function execute()
7480
}
7581
}
7682
$this->cart->save();
83+
} else {
84+
$this->messageManager->addErrorMessage(__('Please select at least one product to add to cart'));
7785
}
7886
return $this->_goBack();
7987
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.z
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="ClearShippingAddressActionGroup">
12+
<clearField selector="{{CheckoutShippingSection.firstName}}" stepKey="clearFieldFirstName"/>
13+
<clearField selector="{{CheckoutShippingSection.company}}" stepKey="clearFieldCompany"/>
14+
<clearField selector="{{CheckoutShippingSection.street}}" stepKey="clearFieldStreetAddress"/>
15+
<clearField selector="{{CheckoutShippingSection.city}}" stepKey="clearFieldCityName"/>
16+
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="" stepKey="clearFieldRegion"/>
17+
<clearField selector="{{CheckoutShippingSection.postcode}}" stepKey="clearFieldZip"/>
18+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="" stepKey="clearFieldCounty"/>
19+
<clearField selector="{{CheckoutShippingSection.telephone}}" stepKey="clearFieldPhoneNumber"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="FillShippingAddressOneStreetActionGroup">
12+
<arguments>
13+
<argument name="address" type="entity"/>
14+
</arguments>
15+
<fillField stepKey="fillFirstName" selector="{{CheckoutShippingSection.firstName}}" userInput="{{address.firstname}}"/>
16+
<fillField stepKey="fillLastName" selector="{{CheckoutShippingSection.lastName}}" userInput="{{address.lastname}}"/>
17+
<fillField stepKey="fillCompany" selector="{{CheckoutShippingSection.company}}" userInput="{{address.company}}"/>
18+
<fillField stepKey="fillPhoneNumber" selector="{{CheckoutShippingSection.telephone}}" userInput="{{address.telephone}}"/>
19+
<fillField stepKey="fillStreetAddress" selector="{{CheckoutShippingSection.street}}" userInput="{{address.street[0]}}"/>
20+
<fillField stepKey="fillCityName" selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}"/>
21+
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{address.country_id}}"/>
22+
<fillField stepKey="fillZip" selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!-- Add Product to Cart from the category page and check message -->
12+
<actionGroup name="StorefrontAddSimpleProductToCartActionGroup">
13+
<arguments>
14+
<argument name="product" type="entity"/>
15+
</arguments>
16+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
17+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
18+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage" />
19+
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>
20+
</actionGroup>
21+
</actionGroups>
22+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<element name="country" type="select" selector="select[name=country_id]"/>
2828
<element name="telephone" type="input" selector="input[name=telephone]"/>
2929
<element name="saveAddress" type="button" selector=".action-save-address"/>
30+
<element name="cancelChangeAddress" type="button" selector=".action-hide-popup"/>
3031
<element name="updateAddress" type="button" selector=".action-update"/>
3132
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
3233
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>

0 commit comments

Comments
 (0)