Skip to content

Commit b4c23c4

Browse files
author
Alexander Akimov
authored
Merge pull request #2823 from magento-tsg/2.2-develop-pr34
[TSG] Backporting for 2.2 (pr34) (2.2.6)
2 parents 24d21b6 + 7a53042 commit b4c23c4

File tree

10 files changed

+50
-15
lines changed

10 files changed

+50
-15
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1">
4545
<argument name="product" value="$$createSimpleProduct$$"/>
4646
</actionGroup>
47+
<scrollToTopOfPage stepKey="scrollToTopOfPage1"/>
4748
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton1"/>
4849
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton1"/>
4950
<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="addCustomerGroupAllGroupsQty1PriceDiscountAnd10percent"/>
@@ -73,6 +74,7 @@
7374
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
7475
<argument name="product" value="$$createSimpleProduct$$"/>
7576
</actionGroup>
77+
<scrollToTopOfPage stepKey="scrollToTopOfPage2"/>
7678
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton2"/>
7779
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForcustomerGroupPriceAddButton2"/>
7880
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" time="30" stepKey="waitForSelectCustomerGroupNameAttribute1"/>
@@ -97,6 +99,7 @@
9799
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct3">
98100
<argument name="product" value="$$createSimpleProduct$$"/>
99101
</actionGroup>
102+
<scrollToTopOfPage stepKey="scrollToTopOfPage3"/>
100103
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton3"/>
101104
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForcustomerGroupPriceAddButton3"/>
102105
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect('0')}}" stepKey="waitForSelectCustomerGroupNameAttribute2"/>
@@ -162,6 +165,7 @@
162165
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct4">
163166
<argument name="product" value="$$createSimpleProduct$$"/>
164167
</actionGroup>
168+
<scrollToTopOfPage stepKey="scrollToTopOfPage4"/>
165169
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton4"/>
166170
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForcustomerGroupPriceAddButton4"/>
167171
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('1')}}" userInput="25" stepKey="selectProductTierPricePercentageValue2"/>
@@ -229,12 +233,14 @@
229233
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct5">
230234
<argument name="product" value="$$createSimpleProduct$$"/>
231235
</actionGroup>
236+
<scrollToTopOfPage stepKey="scrollToTopOfPage5"/>
232237
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton5"/>
233238
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceDeleteButton}}" stepKey="waitForcustomerGroupPriceDeleteButton"/>
234239
<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceDeleteButton}}" stepKey="deleteFirstRowOfCustomerGroupPrice"/>
235240
<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceDeleteButton}}" stepKey="deleteSecondRowOfCustomerGroupPrice"/>
236241
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton5"/>
237242
<actionGroup ref="SaveProductOnProductPageOnAdmin" stepKey="saveProduct5"/>
243+
<scrollToTopOfPage stepKey="scrollToTopOfPage6"/>
238244
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton6"/>
239245
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForcustomerGroupPriceAddButton5"/>
240246
<dontSeeElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceQtyInput('0')}}" stepKey="dontSeeQtyInputOfFirstRow"/>

app/code/Magento/Catalog/etc/widget.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
</parameters>
293293
<containers>
294294
<container name="sidebar.main">
295-
<template name="default" value="list" />
295+
<template name="default" value="sidebar" />
296296
</container>
297297
<container name="content">
298298
<template name="grid" value="grid" />

app/code/Magento/Catalog/view/frontend/templates/product/widget/compared/sidebar.phtml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
'listing' => [
1818
'displayMode' => 'grid'
1919
],
20-
'column' => [
21-
'image' => [
22-
'imageCode' => 'recently_compared_products_images_names_widget'
23-
]
20+
'image' => [
21+
'imageCode' => 'recently_compared_products_images_names_widget'
2422
]
2523
]
2624
);

app/code/Magento/Checkout/view/frontend/web/js/view/cart/shipping-estimation.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ define(
4747
checkoutDataResolver.resolveEstimationAddress();
4848
address = quote.isVirtual() ? quote.billingAddress() : quote.shippingAddress();
4949

50+
if (!address && quote.isVirtual()) {
51+
address = addressConverter.formAddressDataToQuoteAddress(
52+
checkoutData.getSelectedBillingAddress()
53+
);
54+
}
55+
5056
if (address) {
5157
estimatedAddress = address.isEditable() ?
5258
addressConverter.quoteAddressToFormAddressData(address) :

app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if ($block->isLoggedIn()) {
1313
$dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
1414
}
1515
?>
16-
<li class="authorization-link" data-label="<?= $block->escapeHtmlAttr(__('or')) ?>">
16+
<li class="authorization-link" data-label="<?= $block->escapeHtml(__('or')) ?>">
1717
<a <?= /* @noEscape */ $block->getLinkAttributes() ?><?= /* @noEscape */ $dataPostParam ?>>
1818
<?= $block->escapeHtml($block->getLabel()) ?>
1919
</a>

app/code/Magento/Customer/view/frontend/templates/form/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
id="login-form"
2020
data-mage-init='{"validation":{}}'>
2121
<?= $block->getBlockHtml('formkey') ?>
22-
<fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
22+
<fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtml(__('* Required Fields')) ?>">
2323
<div class="field note"><?= $block->escapeHtml(__('If you have an account, sign in with your email address.')) ?></div>
2424
<div class="field email required">
2525
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
<label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for Our Newsletter:')) ?></span></label>
2323
<div class="control">
2424
<input name="email" type="email" id="newsletter"
25-
placeholder="<?= $block->escapeHtmlAttr(__('Enter your email address')) ?>"
26-
data-mage-init='{"mage/trim-input":{}}'
25+
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
2726
data-validate="{required:true, 'validate-email':true}"/>
2827
</div>
2928
</div>

app/code/Magento/Ui/Model/Export/MetadataProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ public function getHeaders(UiComponentInterface $component)
118118
foreach ($this->getColumns($component) as $column) {
119119
$row[] = $column->getData('config/label');
120120
}
121+
122+
array_walk($row, function (&$header) {
123+
if (mb_strpos($header, 'ID') === 0) {
124+
$header = '"' . $header . '"';
125+
}
126+
});
127+
121128
return $row;
122129
}
123130

app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,37 @@ protected function setUp()
4040
);
4141
}
4242

43-
public function testGetHeaders()
43+
/**
44+
* @param array $columnLabels
45+
* @param array $expected
46+
* @return void
47+
* @dataProvider getColumnsDataProvider
48+
*/
49+
public function testGetHeaders(array $columnLabels, array $expected)
4450
{
4551
$componentName = 'component_name';
4652
$columnName = 'column_name';
47-
$columnLabel = 'column_label';
48-
49-
$component = $this->prepareColumns($componentName, $columnName, $columnLabel);
5053

54+
$component = $this->prepareColumns($componentName, $columnName, $columnLabels[0]);
5155
$result = $this->model->getHeaders($component);
5256
$this->assertTrue(is_array($result));
5357
$this->assertCount(1, $result);
54-
$this->assertEquals($columnLabel, $result[0]);
58+
$this->assertEquals($expected, $result);
59+
}
60+
61+
/**
62+
* @return array
63+
*/
64+
public function getColumnsDataProvider(): array
65+
{
66+
return [
67+
[['ID'],['"ID"']],
68+
[['Name'],['Name']],
69+
[['Id'],['Id']],
70+
[['id'],['id']],
71+
[['IDTEST'],['"IDTEST"']],
72+
[['ID TEST'],['"ID TEST"']],
73+
];
5574
}
5675

5776
public function testGetFields()

0 commit comments

Comments
 (0)