Skip to content

Commit 01fb63e

Browse files
committed
Merge remote-tracking branch 'origin/2.2.8-develop' into MAGETWO-95378
2 parents f666c13 + 2419159 commit 01fb63e

File tree

28 files changed

+475
-39
lines changed

28 files changed

+475
-39
lines changed

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected function _toHtml()
139139
}
140140

141141
/**
142-
* Field dependences JSON map generator
142+
* Field dependencies JSON map generator
143143
* @return string
144144
*/
145145
protected function _getDependsJson()

app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio
281281
* @param float $basePriceValue
282282
* @param Product $bundleProduct
283283
* @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
284-
* @param null|bool|string|arrayy $exclude
284+
* @param null|bool|string|array $exclude
285285
* @return \Magento\Framework\Pricing\Amount\AmountInterface
286286
*/
287287
protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude)

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function testSaveData($skus, $bunch, $allowImport)
242242
'price_type' => 'fixed',
243243
'shipment_type' => '1',
244244
'default_qty' => '1',
245-
'is_defaul' => '1',
245+
'is_default' => '1',
246246
'position' => '1',
247247
'option_id' => '1']
248248
]
@@ -264,7 +264,7 @@ public function testSaveData($skus, $bunch, $allowImport)
264264
'price_type' => 'percent',
265265
'shipment_type' => 0,
266266
'default_qty' => '2',
267-
'is_defaul' => '1',
267+
'is_default' => '1',
268268
'position' => '6',
269269
'option_id' => '6']
270270
]
@@ -324,7 +324,7 @@ public function saveDataProvider()
324324
. 'price_type=fixed,'
325325
. 'shipment_type=separately,'
326326
. 'default_qty=1,'
327-
. 'is_defaul=1,'
327+
. 'is_default=1,'
328328
. 'position=1,'
329329
. 'option_id=1 | name=Bundle2,'
330330
. 'type=dropdown,'
@@ -333,7 +333,7 @@ public function saveDataProvider()
333333
. 'price=10,'
334334
. 'price_type=fixed,'
335335
. 'default_qty=1,'
336-
. 'is_defaul=1,'
336+
. 'is_default=1,'
337337
. 'position=2,'
338338
. 'option_id=2'
339339
],

app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,20 @@ protected function _updateTemporaryTableByStoreValues(
352352
}
353353

354354
//Update not simple attributes (eg. dropdown)
355-
if (isset($flatColumns[$attributeCode . $valueFieldSuffix])) {
356-
$select = $this->_connection->select()->joinInner(
357-
['t' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
358-
't.option_id = et.' . $attributeCode . ' AND t.store_id=' . $storeId,
359-
[$attributeCode . $valueFieldSuffix => 't.value']
360-
);
355+
$columnName = $attributeCode . $valueFieldSuffix;
356+
if (isset($flatColumns[$columnName])) {
357+
$select = $this->_connection->select();
358+
$select->joinLeft(
359+
['t0' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
360+
't0.option_id = et.' . $attributeCode . ' AND t0.store_id = 0',
361+
[]
362+
)->joinLeft(
363+
['ts' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
364+
'ts.option_id = et.' . $attributeCode . ' AND ts.store_id = ' . $storeId,
365+
[]
366+
)->columns(
367+
[$columnName => $this->_connection->getIfNullSql('ts.value', 't0.value')]
368+
)->where($attributeCode . ' IS NOT NULL');
361369
if (!empty($changedIds)) {
362370
$select->where($this->_connection->quoteInto('et.entity_id IN (?)', $changedIds));
363371
}
@@ -381,6 +389,8 @@ protected function _getTemporaryTableName($tableName)
381389
}
382390

383391
/**
392+
* Get MetadataPool
393+
*
384394
* @return \Magento\Framework\EntityManager\MetadataPool
385395
*/
386396
private function getMetadataPool()

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@
113113
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
114114
<requiredEntity type="custom_attributes">CustomAttributeProductAttribute</requiredEntity>
115115
</entity>
116+
<entity name="SimpleTwo" type="product2">
117+
<data key="sku" unique="suffix">SimpleTwo</data>
118+
<data key="type_id">simple</data>
119+
<data key="attribute_set_id">4</data>
120+
<data key="name" unique="suffix">SimpleProduct</data>
121+
<data key="price">1.23</data>
122+
<data key="visibility">4</data>
123+
<data key="status">1</data>
124+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
125+
<requiredEntity type="custom_attribute">CustomAttributeProductUrlKey</requiredEntity>
126+
</entity>
116127
<entity name="SimpleOption" type="product2">
117128
<data key="sku" unique="suffix">SimpleOne</data>
118129
<data key="type_id">simple</data>
@@ -124,6 +135,9 @@
124135
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
125136
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
126137
</entity>
138+
<entity name="SetProductVisibilityHidden" type="product2">
139+
<data key="visibility">1</data>
140+
</entity>
127141
<entity name="ProductImage" type="uploadImage">
128142
<data key="title" unique="suffix">Image1</data>
129143
<data key="price">1.00</data>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
// set the root node
8181
this.root = new Ext.tree.TreeNode({
8282
text: 'ROOT',
83-
allowDrug:false,
83+
allowDrag:false,
8484
allowDrop:true,
8585
id:'1'
8686
});

app/code/Magento/Checkout/CustomerData/Cart.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct(
8282
}
8383

8484
/**
85-
* {@inheritdoc}
85+
* @inheritdoc
8686
*/
8787
public function getSectionData()
8888
{
@@ -158,11 +158,10 @@ protected function getRecentItems()
158158
: $item->getProduct();
159159

160160
$products = $this->catalogUrl->getRewriteByProductStore([$product->getId() => $item->getStoreId()]);
161-
if (!isset($products[$product->getId()])) {
162-
continue;
161+
if (isset($products[$product->getId()])) {
162+
$urlDataObject = new \Magento\Framework\DataObject($products[$product->getId()]);
163+
$item->getProduct()->setUrlDataObject($urlDataObject);
163164
}
164-
$urlDataObject = new \Magento\Framework\DataObject($products[$product->getId()]);
165-
$item->getProduct()->setUrlDataObject($urlDataObject);
166165
}
167166
$items[] = $this->itemPoolInterface->getItemData($item);
168167
}

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskForNextButton"/>
2323
</actionGroup>
2424

25+
<!-- Go to checkout from cart -->
26+
<actionGroup name="GoToCheckoutFromCartActionGroup">
27+
<waitForElementNotVisible selector="{{StorefrontMinicartSection.emptyCart}}" stepKey="waitUpdateQuantity" />
28+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
29+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
30+
<seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertCheckoutCartUrl"/>
31+
<click selector="{{StorefrontCheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout"/>
32+
</actionGroup>
33+
2534
<!-- Checkout place order -->
2635
<actionGroup name="CheckoutPlaceOrderActionGroup">
2736
<arguments>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="clickViewAndEditCartFromMiniCart">
11+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
12+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
13+
<click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="viewAndEditCart"/>
14+
<seeInCurrentUrl url="checkout/cart" stepKey="seeInCurrentUrl"/>
15+
</actionGroup>
16+
<actionGroup name="assertOneProductNameInMiniCart">
17+
<arguments>
18+
<argument name="productName"/>
19+
</arguments>
20+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
21+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
22+
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{productName}}" stepKey="seeInMiniCart"/>
23+
</actionGroup>
24+
25+
<!--Remove an item from the cart using minicart-->
26+
<actionGroup name="removeProductFromMiniCart">
27+
<arguments>
28+
<argument name="productName" type="string"/>
29+
</arguments>
30+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
31+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForMiniCartOpen"/>
32+
<click selector="{{StorefrontMinicartSection.deleteMiniCartItemByName(productName)}}" stepKey="clickDelete"/>
33+
<waitForElementVisible selector="{{StoreFrontRemoveItemModalSection.message}}" stepKey="waitForConfirmationModal"/>
34+
<see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/>
35+
<click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/>
36+
<waitForPageLoad stepKey="waitForDeleteToFinish"/>
37+
</actionGroup>
38+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/>
2323
<element name="miniCartItemsText" type="text" selector=".minicart-items"/>
2424
<element name="miniCartSubtotalField" type="text" selector=".block-minicart .amount span.price"/>
25+
<element name="emptyCart" type="text" selector=".counter.qty.empty"/>
2526
</section>
2627
</sections>

0 commit comments

Comments
 (0)