Skip to content

Commit 326e0b3

Browse files
merge magento/2.3-develop into magento-honey-badgers/MC-17015
2 parents b8c8791 + 80ae9bd commit 326e0b3

File tree

34 files changed

+951
-115
lines changed

34 files changed

+951
-115
lines changed

app/code/Magento/Backend/Block/Page/RequireJs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function __construct(
2929
\Magento\Framework\Data\Form\FormKey $formKey,
3030
array $data = []
3131
) {
32-
$this->formKey = $formKey;
3332
parent::__construct(
3433
$context,
3534
$data
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Bundle\Setup\Patch\Schema;
9+
10+
use Magento\Framework\Setup\Patch\SchemaPatchInterface;
11+
use Magento\Framework\Setup\SchemaSetupInterface;
12+
13+
/**
14+
* Change engine for temporary tables to InnoDB.
15+
*/
16+
class ChangeTmpTablesEngine implements SchemaPatchInterface
17+
{
18+
/**
19+
* @var SchemaSetupInterface
20+
*/
21+
private $schemaSetup;
22+
23+
/**
24+
* @param SchemaSetupInterface $schemaSetup
25+
*/
26+
public function __construct(SchemaSetupInterface $schemaSetup)
27+
{
28+
$this->schemaSetup = $schemaSetup;
29+
}
30+
31+
/**
32+
* @inheritdoc
33+
*/
34+
public function apply()
35+
{
36+
$this->schemaSetup->startSetup();
37+
38+
$tables = [
39+
'catalog_product_index_price_bundle_tmp',
40+
'catalog_product_index_price_bundle_sel_tmp',
41+
'catalog_product_index_price_bundle_opt_tmp',
42+
];
43+
foreach ($tables as $table) {
44+
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
45+
}
46+
47+
$this->schemaSetup->endSetup();
48+
}
49+
50+
/**
51+
* @inheritdoc
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* @inheritdoc
60+
*/
61+
public function getAliases()
62+
{
63+
return [];
64+
}
65+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Catalog\Setup\Patch\Schema;
9+
10+
use Magento\Framework\Setup\Patch\SchemaPatchInterface;
11+
use Magento\Framework\Setup\SchemaSetupInterface;
12+
13+
/**
14+
* Change engine for temporary tables to InnoDB.
15+
*/
16+
class ChangeTmpTablesEngine implements SchemaPatchInterface
17+
{
18+
/**
19+
* @var SchemaSetupInterface
20+
*/
21+
private $schemaSetup;
22+
23+
/**
24+
* @param SchemaSetupInterface $schemaSetup
25+
*/
26+
public function __construct(SchemaSetupInterface $schemaSetup)
27+
{
28+
$this->schemaSetup = $schemaSetup;
29+
}
30+
31+
/**
32+
* @inheritdoc
33+
*/
34+
public function apply()
35+
{
36+
$this->schemaSetup->startSetup();
37+
38+
$tables = [
39+
'catalog_product_index_price_cfg_opt_agr_tmp',
40+
'catalog_product_index_price_cfg_opt_tmp',
41+
'catalog_product_index_price_final_tmp',
42+
'catalog_product_index_price_opt_tmp',
43+
'catalog_product_index_price_opt_agr_tmp',
44+
'catalog_product_index_eav_tmp',
45+
'catalog_product_index_eav_decimal_tmp',
46+
'catalog_product_index_price_tmp',
47+
'catalog_category_product_index_tmp',
48+
];
49+
foreach ($tables as $table) {
50+
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
51+
}
52+
53+
$this->schemaSetup->endSetup();
54+
}
55+
56+
/**
57+
* @inheritdoc
58+
*/
59+
public static function getDependencies()
60+
{
61+
return [];
62+
}
63+
64+
/**
65+
* @inheritdoc
66+
*/
67+
public function getAliases()
68+
{
69+
return [];
70+
}
71+
}

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2323
<createData entity="SimpleProduct2" stepKey="simpleProduct0"/>
2424
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
25+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
26+
<createData entity="SimpleProduct2" stepKey="simpleProduct3"/>
27+
<createData entity="SimpleProduct2" stepKey="simpleProduct4"/>
28+
<createData entity="SimpleProduct2" stepKey="simpleProduct5"/>
29+
<createData entity="SimpleProduct2" stepKey="simpleProduct6"/>
2530
</before>
2631
<after>
2732
<!-- Delete simple product -->
@@ -31,6 +36,11 @@
3136
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
3237
<deleteData createDataKey="simpleProduct0" stepKey="deleteSimpleProduct0"/>
3338
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
39+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
40+
<deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/>
41+
<deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/>
42+
<deleteData createDataKey="simpleProduct5" stepKey="deleteSimpleProduct5"/>
43+
<deleteData createDataKey="simpleProduct6" stepKey="deleteSimpleProduct6"/>
3444
</after>
3545

3646
<!--Create product-->
@@ -69,6 +79,28 @@
6979
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee"/>
7080
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct1.sku$$" stepKey="seeRelatedProduct"/>
7181

82+
<!--See more related products in admin-->
83+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct2">
84+
<argument name="sku" value="$$simpleProduct2.sku$$"/>
85+
</actionGroup>
86+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct3">
87+
<argument name="sku" value="$$simpleProduct3.sku$$"/>
88+
</actionGroup>
89+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct4">
90+
<argument name="sku" value="$$simpleProduct4.sku$$"/>
91+
</actionGroup>
92+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct5">
93+
<argument name="sku" value="$$simpleProduct5.sku$$"/>
94+
</actionGroup>
95+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct6">
96+
<argument name="sku" value="$$simpleProduct6.sku$$"/>
97+
</actionGroup>
98+
<scrollTo selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" stepKey="scrollTo2"/>
99+
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee2"/>
100+
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct6.sku$$" stepKey="seeSixthRelatedProduct"/>
101+
<selectOption selector=".admin__collapsible-block-wrapper[data-index='related'] .admin__control-select" userInput="5" stepKey="selectFivePerPage"/>
102+
<dontSee selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct6.sku$$" stepKey="dontSeeSixthRelatedProduct"/>
103+
72104
<!--See related product in storefront-->
73105
<amOnPage url="{{SimpleProduct3.sku}}.html" stepKey="goToStorefront"/>
74106
<waitForPageLoad stepKey="waitForStorefront"/>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CatalogInventory\Setup\Patch\Schema;
9+
10+
use Magento\Framework\Setup\Patch\SchemaPatchInterface;
11+
use Magento\Framework\Setup\SchemaSetupInterface;
12+
13+
/**
14+
* Change engine for temporary tables to InnoDB.
15+
*/
16+
class ChangeTmpTablesEngine implements SchemaPatchInterface
17+
{
18+
/**
19+
* @var SchemaSetupInterface
20+
*/
21+
private $schemaSetup;
22+
23+
/**
24+
* @param SchemaSetupInterface $schemaSetup
25+
*/
26+
public function __construct(SchemaSetupInterface $schemaSetup)
27+
{
28+
$this->schemaSetup = $schemaSetup;
29+
}
30+
31+
/**
32+
* @inheritdoc
33+
*/
34+
public function apply()
35+
{
36+
$this->schemaSetup->startSetup();
37+
38+
$this->schemaSetup->getConnection()->changeTableEngine('cataloginventory_stock_status_tmp', 'InnoDB');
39+
40+
$this->schemaSetup->endSetup();
41+
}
42+
43+
/**
44+
* @inheritdoc
45+
*/
46+
public static function getDependencies()
47+
{
48+
return [];
49+
}
50+
51+
/**
52+
* @inheritdoc
53+
*/
54+
public function getAliases()
55+
{
56+
return [];
57+
}
58+
}

app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
<settings>
308308
<validation>
309309
<rule name="required-entry" xsi:type="boolean">true</rule>
310+
<rule name="validate-number-range" xsi:type="string">0.00-100.00</rule>
310311
</validation>
311312
<dataType>text</dataType>
312313
<label translate="true">Discount Amount</label>

app/code/Magento/Checkout/Model/DefaultConfigProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ public function getConfig()
343343
)
344344
)
345345
];
346+
$output['useQty'] = $this->scopeConfig->isSetFlag(
347+
'checkout/cart_link/use_qty',
348+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
349+
);
346350
$output['activeCarriers'] = $this->getActiveCarriers();
347351
$output['originCountryCode'] = $this->getOriginCountryCode();
348352
$output['paymentMethods'] = $this->getPaymentMethods();

app/code/Magento/Checkout/Test/Mftf/Data/ConfigData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,16 @@
8888
<data key="label">No</data>
8989
<data key="value">0</data>
9090
</entity>
91+
92+
<!-- Checkout Config: Display Cart Summary -->
93+
<entity name="DisplayItemsQuantities">
94+
<data key="path">checkout/cart_link/use_qty</data>
95+
<data key="label">Display items quantities</data>
96+
<data key="value">1</data>
97+
</entity>
98+
<entity name="DisplayUniqueItems">
99+
<data key="path">checkout/cart_link/use_qty</data>
100+
<data key="label">Display number of items in cart</data>
101+
<data key="value">0</data>
102+
</entity>
91103
</entities>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<!-- Assert Product Count in Mini Cart -->
101101
<actionGroup ref="StorefrontAssertMiniCartItemCountActionGroup" stepKey="assertProductCountAndTextInMiniCart">
102102
<argument name="productCount" value="2"/>
103-
<argument name="productCountText" value="1 Item in Cart"/>
103+
<argument name="productCountText" value="2 Item in Cart"/>
104104
</actionGroup>
105105

106106
<!--Assert Product Items in Mini cart-->
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontCartItemsCountDisplayItemsQuantities">
11+
<annotations>
12+
<stories value="Checkout order summary has wrong item count"/>
13+
<title value="Checkout order summary has wrong item count - display items quantities"/>
14+
<description value="Items count in shopping cart and on checkout page should be consistent with settings 'checkout/cart_link/use_qty'"/>
15+
<testCaseId value="MC-18281"/>
16+
<severity value="CRITICAL"/>
17+
<group value="checkout"/>
18+
</annotations>
19+
20+
<before>
21+
<!--Set Display Cart Summary to display items quantities-->
22+
<magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="setDisplayCartSummary"/>
23+
<!--Create simple product-->
24+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
25+
<!--Create simple product-->
26+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
27+
</before>
28+
<after>
29+
<deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
30+
<deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/>
31+
<magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="resetDisplayCartSummary"/>
32+
</after>
33+
34+
<!-- Add simpleProduct1 to cart -->
35+
<amOnPage url="{{StorefrontProductPage.url($$simpleProduct1.custom_attributes[url_key]$)}}" stepKey="amOnProduct1Page"/>
36+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPage" stepKey="addProduct1ToCart">
37+
<argument name="productName" value="$$simpleProduct1.name$$"/>
38+
<argument name="productQty" value="2"/>
39+
</actionGroup>
40+
<!-- Add simpleProduct2 to cart -->
41+
<amOnPage url="{{StorefrontProductPage.url($$simpleProduct2.custom_attributes[url_key]$)}}" stepKey="amOnProduct2Page"/>
42+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPage" stepKey="addProduct2ToCart">
43+
<argument name="productName" value="$$simpleProduct2.name$$"/>
44+
<argument name="productQty" value="1"/>
45+
</actionGroup>
46+
47+
<!-- Open Mini Cart -->
48+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/>
49+
50+
<!-- Assert Products Count in Mini Cart -->
51+
<actionGroup ref="StorefrontAssertMiniCartItemCountActionGroup" stepKey="assertProductCountAndTextInMiniCart">
52+
<argument name="productCount" value="3"/>
53+
<argument name="productCountText" value="3 Items in Cart"/>
54+
</actionGroup>
55+
<!-- Assert Products Count on checkout page -->
56+
<actionGroup ref="StorefrontCheckoutAndAssertOrderSummaryDisplayActionGroup" stepKey="assertProductCountOnCheckoutPage">
57+
<argument name="itemsText" value="3 Items in Cart"/>
58+
</actionGroup>
59+
</test>
60+
<test name="StorefrontCartItemsCountDisplayUniqueItems" extends="StorefrontCartItemsCountDisplayItemsQuantities">
61+
<annotations>
62+
<stories value="Checkout order summary has wrong item count"/>
63+
<title value="Checkout order summary has wrong item count - display unique items"/>
64+
<description value="Items count in shopping cart and on checkout page should be consistent with settings 'checkout/cart_link/use_qty'"/>
65+
<testCaseId value="MC-18281"/>
66+
<severity value="CRITICAL"/>
67+
<group value="checkout"/>
68+
</annotations>
69+
70+
<!-- Assert Products Count in Mini Cart -->
71+
<actionGroup ref="StorefrontAssertMiniCartItemCountActionGroup" stepKey="assertProductCountAndTextInMiniCart">
72+
<argument name="productCount" value="2"/>
73+
<argument name="productCountText" value="2 Items in Cart"/>
74+
</actionGroup>
75+
<!-- Assert Products Count on checkout page -->
76+
<actionGroup ref="StorefrontCheckoutAndAssertOrderSummaryDisplayActionGroup" stepKey="assertProductCountOnCheckoutPage">
77+
<argument name="itemsText" value="2 Items in Cart"/>
78+
</actionGroup>
79+
80+
<before>
81+
<!--Set Display Cart Summary to display items quantities-->
82+
<magentoCLI command="config:set {{DisplayUniqueItems.path}} {{DisplayUniqueItems.value}}" stepKey="setDisplayCartSummary"/>
83+
</before>
84+
</test>
85+
</tests>

0 commit comments

Comments
 (0)