Skip to content

Commit de1a642

Browse files
merge magento/2.3-develop into magento-tsg/2.3-develop-pr59
2 parents 82d539e + cf0bfb3 commit de1a642

File tree

60 files changed

+783
-656
lines changed

Some content is hidden

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

60 files changed

+783
-656
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@
8585
</field>
8686
<field id="min_order_total" translate="label" type="text" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="0">
8787
<label>Minimum Order Total</label>
88+
<validate>validate-number validate-zero-or-greater</validate>
8889
</field>
8990
<field id="max_order_total" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0">
9091
<label>Maximum Order Total</label>
92+
<validate>validate-number validate-zero-or-greater</validate>
9193
</field>
9294
<field id="sort_order" translate="label" type="text" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0">
9395
<label>Sort Order</label>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,12 @@
120120
<field id="min_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
121121
<label>Minimum Order Total</label>
122122
<config_path>payment/authorizenet_acceptjs/min_order_total</config_path>
123+
<validate>validate-number validate-zero-or-greater</validate>
123124
</field>
124125
<field id="max_order_total" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0">
125126
<label>Maximum Order Total</label>
126127
<config_path>payment/authorizenet_acceptjs/max_order_total</config_path>
128+
<validate>validate-number validate-zero-or-greater</validate>
127129
</field>
128130
<field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
129131
<label>Sort Order</label>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<!--Click save button and see message-->
12+
<actionGroup name="ClickSaveButtonActionGroup">
13+
<arguments>
14+
<argument name="message" type="string"/>
15+
</arguments>
16+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
17+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitMessage" />
18+
<see userInput="{{message}}" selector="{{AdminMessagesSection.success}}" stepKey="verifyMessage" />
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Bundle/Setup/Patch/Data/ApplyAttributesUpdate.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use Magento\Eav\Setup\EavSetupFactory;
1515

1616
/**
17-
* Class ApplyAttributesUpdate
18-
* @package Magento\Bundle\Setup\Patch
17+
* Class \Magento\Bundle\Setup\Patch\ApplyAttributesUpdate
1918
*/
2019
class ApplyAttributesUpdate implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -44,7 +43,7 @@ public function __construct(
4443
}
4544

4645
/**
47-
* {@inheritdoc}
46+
* @inheritdoc
4847
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
4948
*/
5049
public function apply()
@@ -66,8 +65,8 @@ public function apply()
6665
',',
6766
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to')
6867
);
69-
if (!in_array('bundle', $applyTo)) {
70-
$applyTo[] = 'bundle';
68+
if (!in_array(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $applyTo)) {
69+
$applyTo[] = \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE;
7170
$eavSetup->updateAttribute(
7271
\Magento\Catalog\Model\Product::ENTITY,
7372
$field,
@@ -78,7 +77,7 @@ public function apply()
7877
}
7978

8079
$applyTo = explode(',', $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'cost', 'apply_to'));
81-
unset($applyTo[array_search('bundle', $applyTo)]);
80+
unset($applyTo[array_search(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $applyTo)]);
8281
$eavSetup->updateAttribute(\Magento\Catalog\Model\Product::ENTITY, 'cost', 'apply_to', implode(',', $applyTo));
8382

8483
/**
@@ -106,7 +105,7 @@ public function apply()
106105
'visible_on_front' => false,
107106
'used_in_product_listing' => true,
108107
'unique' => false,
109-
'apply_to' => 'bundle'
108+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
110109
]
111110
);
112111

@@ -131,7 +130,7 @@ public function apply()
131130
'comparable' => false,
132131
'visible_on_front' => false,
133132
'unique' => false,
134-
'apply_to' => 'bundle'
133+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
135134
]
136135
);
137136

@@ -157,7 +156,7 @@ public function apply()
157156
'visible_on_front' => false,
158157
'used_in_product_listing' => true,
159158
'unique' => false,
160-
'apply_to' => 'bundle'
159+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
161160
]
162161
);
163162

@@ -184,7 +183,7 @@ public function apply()
184183
'visible_on_front' => false,
185184
'used_in_product_listing' => true,
186185
'unique' => false,
187-
'apply_to' => 'bundle'
186+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
188187
]
189188
);
190189

@@ -210,29 +209,29 @@ public function apply()
210209
'visible_on_front' => false,
211210
'used_in_product_listing' => true,
212211
'unique' => false,
213-
'apply_to' => 'bundle'
212+
'apply_to' => \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE
214213
]
215214
);
216215
}
217216

218217
/**
219-
* {@inheritdoc}
218+
* @inheritdoc
220219
*/
221220
public static function getDependencies()
222221
{
223222
return [];
224223
}
225224

226225
/**
227-
* {@inheritdoc}
226+
* @inheritdoc
228227
*/
229228
public static function getVersion()
230229
{
231230
return '2.0.0';
232231
}
233232

234233
/**
235-
* {@inheritdoc}
234+
* @inheritdoc
236235
*/
237236
public function getAliases()
238237
{

app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ public function apply()
4141
'catalog_product_index_price_bundle_opt_tmp',
4242
];
4343
foreach ($tables as $table) {
44-
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
44+
$tableName = $this->schemaSetup->getTable($table);
45+
if ($this->schemaSetup->getConnection()->isTableExists($tableName)) {
46+
$this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB');
47+
}
4548
}
4649

4750
$this->schemaSetup->endSetup();

app/code/Magento/CardinalCommerce/etc/config.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
99
<default>
10+
<dev>
11+
<js>
12+
<minify_exclude>
13+
<cardinal_commerce>/v1/songbird</cardinal_commerce>
14+
</minify_exclude>
15+
</js>
16+
</dev>
1017
<three_d_secure>
1118
<cardinal>
1219
<environment>production</environment>

app/code/Magento/Catalog/Model/Product/Type/Price.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ class Price
9393
*/
9494
private $tierPriceExtensionFactory;
9595

96-
/**
97-
* @var \Magento\CatalogRule\Model\RuleDateFormatterInterface
98-
*/
99-
private $ruleDateFormatter;
100-
10196
/**
10297
* Constructor
10398
*
@@ -111,7 +106,6 @@ class Price
111106
* @param \Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory $tierPriceFactory
112107
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
113108
* @param ProductTierPriceExtensionFactory|null $tierPriceExtensionFactory
114-
* @param \Magento\CatalogRule\Model\RuleDateFormatterInterface|null $ruleDateFormatter
115109
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
116110
*/
117111
public function __construct(
@@ -124,8 +118,7 @@ public function __construct(
124118
GroupManagementInterface $groupManagement,
125119
\Magento\Catalog\Api\Data\ProductTierPriceInterfaceFactory $tierPriceFactory,
126120
\Magento\Framework\App\Config\ScopeConfigInterface $config,
127-
ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null,
128-
\Magento\CatalogRule\Model\RuleDateFormatterInterface $ruleDateFormatter = null
121+
ProductTierPriceExtensionFactory $tierPriceExtensionFactory = null
129122
) {
130123
$this->_ruleFactory = $ruleFactory;
131124
$this->_storeManager = $storeManager;
@@ -138,8 +131,6 @@ public function __construct(
138131
$this->config = $config;
139132
$this->tierPriceExtensionFactory = $tierPriceExtensionFactory ?: ObjectManager::getInstance()
140133
->get(ProductTierPriceExtensionFactory::class);
141-
$this->ruleDateFormatter = $ruleDateFormatter ?: ObjectManager::getInstance()
142-
->get(\Magento\CatalogRule\Model\RuleDateFormatterInterface::class);
143134
}
144135

145136
/**
@@ -605,10 +596,7 @@ public function calculatePrice(
605596
) {
606597
\Magento\Framework\Profiler::start('__PRODUCT_CALCULATE_PRICE__');
607598
if ($wId instanceof Store) {
608-
$sId = $wId->getId();
609599
$wId = $wId->getWebsiteId();
610-
} else {
611-
$sId = $this->_storeManager->getWebsite($wId)->getDefaultGroup()->getDefaultStoreId();
612600
}
613601

614602
$finalPrice = $basePrice;
@@ -622,7 +610,7 @@ public function calculatePrice(
622610
);
623611

624612
if ($rulePrice === false) {
625-
$date = $this->ruleDateFormatter->getDate($sId);
613+
$date = $this->_localeDate->date(null, null, false);
626614
$rulePrice = $this->_ruleFactory->create()->getRulePrice($date, $wId, $gId, $productId);
627615
}
628616

app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public function apply()
4747
'catalog_category_product_index_tmp',
4848
];
4949
foreach ($tables as $table) {
50-
$this->schemaSetup->getConnection()->changeTableEngine($table, 'InnoDB');
50+
$tableName = $this->schemaSetup->getTable($table);
51+
if ($this->schemaSetup->getConnection()->isTableExists($tableName)) {
52+
$this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB');
53+
}
5154
}
5255

5356
$this->schemaSetup->endSetup();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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="AdminAssertProductsGridIsEmptyActionGroup">
12+
<see selector="{{AdminCategoryProductsGridSection.productsGridEmpty}}" userInput="We couldn't find any records" stepKey="assertGridEmpty"/>
13+
</actionGroup>
14+
</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="AdminCheckProductIsMissingInCategoryProductsGrid">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<dontSee selector="{{AdminCategoryProductsGridSection.nameColumn}}" userInput="{{productName}}" stepKey="dontSeeProduct"/>
16+
</actionGroup>
17+
<actionGroup name="AdminCheckProductPositionInCategoryProductsGrid">
18+
<arguments>
19+
<argument name="position" type="string"/>
20+
<argument name="productName" type="string"/>
21+
</arguments>
22+
<see selector="{{AdminCategoryProductsGridSection.rowProductName(position)}}" userInput="{{productName}}" stepKey="assertProductPosition"/>
23+
</actionGroup>
24+
</actionGroups>

0 commit comments

Comments
 (0)