Skip to content

Commit aea1d8e

Browse files
authored
Merge branch '2.4-develop' into fix-CategoryWithOverriddenUrlKey
2 parents 54457b4 + 2841088 commit aea1d8e

File tree

1,147 files changed

+34826
-5720
lines changed

Some content is hidden

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

1,147 files changed

+34826
-5720
lines changed

app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/TierPrice.php

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,25 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
710

811
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
12+
use Magento\CatalogImportExport\Model\Import\Product;
913
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
14+
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
15+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
16+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice;
17+
use Magento\Customer\Api\GroupRepositoryInterface;
18+
use Magento\Framework\Api\SearchCriteriaBuilder;
19+
use Magento\Framework\Exception\LocalizedException;
1020

11-
class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice
21+
class TierPrice extends AbstractPrice
1222
{
1323
/**
14-
* @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver
24+
* @var StoreResolver
1525
*/
1626
protected $storeResolver;
1727

@@ -27,21 +37,26 @@ class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Valida
2737
];
2838

2939
/**
30-
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
31-
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
32-
* @param \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
40+
* @param GroupRepositoryInterface $groupRepository
41+
* @param SearchCriteriaBuilder $searchCriteriaBuilder
42+
* @param StoreResolver $storeResolver
3343
*/
3444
public function __construct(
35-
\Magento\Customer\Api\GroupRepositoryInterface $groupRepository,
36-
\Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
37-
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
45+
GroupRepositoryInterface $groupRepository,
46+
SearchCriteriaBuilder $searchCriteriaBuilder,
47+
StoreResolver $storeResolver
3848
) {
3949
$this->storeResolver = $storeResolver;
4050
parent::__construct($groupRepository, $searchCriteriaBuilder);
4151
}
4252

4353
/**
44-
* {@inheritdoc}
54+
* Initialize method
55+
*
56+
* @param Product $context
57+
*
58+
* @return RowValidatorInterface|AbstractImportValidator|void
59+
* @throws LocalizedException
4560
*/
4661
public function init($context)
4762
{
@@ -52,7 +67,10 @@ public function init($context)
5267
}
5368

5469
/**
70+
* Add decimal error
71+
*
5572
* @param string $attribute
73+
*
5674
* @return void
5775
*/
5876
protected function addDecimalError($attribute)
@@ -83,12 +101,12 @@ public function getCustomerGroups()
83101
}
84102

85103
/**
86-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
87104
* Validation
88105
*
89106
* @param mixed $value
90107
* @return bool
91108
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
109+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
92110
*/
93111
public function isValid($value)
94112
{
@@ -133,6 +151,7 @@ public function isValid($value)
133151
* Check if at list one value and length are valid
134152
*
135153
* @param array $value
154+
*
136155
* @return bool
137156
*/
138157
protected function isValidValueAndLength(array $value)
@@ -150,6 +169,7 @@ protected function isValidValueAndLength(array $value)
150169
* Check if value has empty columns
151170
*
152171
* @param array $value
172+
*
153173
* @return bool
154174
*/
155175
protected function hasEmptyColumns(array $value)

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/TierPriceType.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,24 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
810

911
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
1012
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
13+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
1114

1215
/**
1316
* Class TierPriceType validates tier price type.
1417
*/
15-
class TierPriceType extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator
18+
class TierPriceType extends AbstractImportValidator
1619
{
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function init($context)
21-
{
22-
return parent::init($context);
23-
}
24-
2520
/**
2621
* Validate tier price type.
2722
*
2823
* @param array $value
24+
*
2925
* @return bool
3026
*/
3127
public function isValid($value)

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/Website.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,47 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
710

811
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
9-
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
1012
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
13+
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
14+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
15+
use Magento\Store\Model\Website as WebsiteModel;
1116

1217
class Website extends AbstractImportValidator implements RowValidatorInterface
1318
{
1419
/**
15-
* @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver
20+
* @var StoreResolver
1621
*/
1722
protected $storeResolver;
1823

1924
/**
20-
* @var \Magento\Store\Model\Website
25+
* @var WebsiteModel
2126
*/
2227
protected $websiteModel;
2328

2429
/**
25-
* @param \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
26-
* @param \Magento\Store\Model\Website $websiteModel
30+
* @param StoreResolver $storeResolver
31+
* @param WebsiteModel $websiteModel
2732
*/
2833
public function __construct(
29-
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver,
30-
\Magento\Store\Model\Website $websiteModel
34+
StoreResolver $storeResolver,
35+
WebsiteModel $websiteModel
3136
) {
3237
$this->storeResolver = $storeResolver;
3338
$this->websiteModel = $websiteModel;
3439
}
3540

36-
/**
37-
* {@inheritdoc}
38-
*/
39-
public function init($context)
40-
{
41-
return parent::init($context);
42-
}
43-
4441
/**
4542
* Validate by website type
4643
*
4744
* @param array $value
4845
* @param string $websiteCode
46+
*
4947
* @return bool
5048
*/
5149
protected function isWebsiteValid($value, $websiteCode)
@@ -62,7 +60,8 @@ protected function isWebsiteValid($value, $websiteCode)
6260
/**
6361
* Validate value
6462
*
65-
* @param mixed $value
63+
* @param array $value
64+
*
6665
* @return bool
6766
*/
6867
public function isValid($value)
@@ -85,6 +84,7 @@ public function isValid($value)
8584
*/
8685
public function getAllWebsitesValue()
8786
{
88-
return AdvancedPricing::VALUE_ALL_WEBSITES . ' ['.$this->websiteModel->getBaseCurrency()->getCurrencyCode().']';
87+
return AdvancedPricing::VALUE_ALL_WEBSITES .
88+
' [' . $this->websiteModel->getBaseCurrency()->getCurrencyCode() . ']';
8989
}
9090
}

app/code/Magento/AsynchronousOperations/Model/MassConsumer.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,19 @@ public function process($maxNumberOfMessages = null)
6969
$this->registry->register('isSecureArea', true, true);
7070

7171
$queue = $this->configuration->getQueue();
72+
$maxIdleTime = $this->configuration->getMaxIdleTime();
73+
$sleep = $this->configuration->getSleep();
7274

7375
if (!isset($maxNumberOfMessages)) {
7476
$queue->subscribe($this->getTransactionCallback($queue));
7577
} else {
76-
$this->invoker->invoke($queue, $maxNumberOfMessages, $this->getTransactionCallback($queue));
78+
$this->invoker->invoke(
79+
$queue,
80+
$maxNumberOfMessages,
81+
$this->getTransactionCallback($queue),
82+
$maxIdleTime,
83+
$sleep
84+
);
7785
}
7886

7987
$this->registry->unregister('isSecureArea');

app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testSaveRelNoResources()
182182
/**
183183
* Test LocalizedException throw case.
184184
*/
185-
public function testLocalizedExceptionOccurance()
185+
public function testLocalizedExceptionOccurrence()
186186
{
187187
$this->expectException(LocalizedException::class);
188188
$this->expectExceptionMessage("TestException");
@@ -212,7 +212,7 @@ public function testLocalizedExceptionOccurance()
212212
/**
213213
* Test generic exception throw case.
214214
*/
215-
public function testGenericExceptionOccurance()
215+
public function testGenericExceptionOccurrence()
216216
{
217217
$exception = new \Exception('GenericException');
218218

app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
1818
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
1919
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
20-
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
21-
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
22-
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
23-
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
24-
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
20+
<element name="dashboard" type="button" selector="#menu-magento-backend-dashboard"/>
21+
<element name="sales" type="button" selector="#menu-magento-sales-sales"/>
22+
<element name="marketing" type="button" selector="#menu-magento-backend-marketing"/>
23+
<element name="system" type="button" selector="#menu-magento-backend-system"/>
24+
<element name="findPartners" type="button" selector="#menu-magento-marketplace-partners"/>
2525

2626
<!-- Navigate menu selectors -->
2727
<element name="menuItem" type="button" selector="li[data-ui-id='menu-{{dataUiId}}']" parameterized="true" timeout="30"/>

app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@
9494
</actionGroup>
9595

9696
<!--Navigate to Product attribute page-->
97-
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
98-
<waitForPageLoad stepKey="waitForPageLoad"/>
97+
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>
9998
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
10099
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
101100
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>

app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@
8989
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
9090
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
9191
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
92-
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
92+
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
9393
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessInvoiceMessage"/>
9494
<!--Create Shipment for the order-->
9595
<comment userInput="Create Shipment for the order" stepKey="createShipmentForOrder"/>
96-
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage2"/>
97-
<waitForPageLoad time="30" stepKey="waitForOrderListPageLoading"/>
96+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrdersPage2"/>
9897
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="openOrderPageForShip"/>
9998
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
10099
<waitForPageLoad stepKey="waitForShipmentPagePage"/>
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+
<actionGroup name="AssertStorefrontBundleValidationMessageActionGroup">
12+
<annotations>
13+
<description>Check error message in validation message box</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="message" type="string"/>
17+
</arguments>
18+
19+
<waitForPageLoad stepKey="waitForPageLoad"/>
20+
<see selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="{{message}}" stepKey="seeErrorHoldMessage"/>
21+
</actionGroup>
22+
</actionGroups>
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+
<actionGroup name="AssertStorefrontBundleValidationMessagesCountActionGroup">
12+
<annotations>
13+
<description>Check if there's a validation message box on page and asserts the validation messages number</description>
14+
</annotations>
15+
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<seeElement selector="{{StorefrontBundledSection.validationMessageBox}}" stepKey="seeErrorBox"/>
18+
<seeNumberOfElements selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="1" stepKey="seeOneErrorBox"/>
19+
</actionGroup>
20+
</actionGroups>
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+
<actionGroup name="StorefrontAddToTheCartButtonActionGroup">
12+
<annotations>
13+
<description>Clicks 'Add to Cart' on a Storefront Bundled Product page.</description>
14+
</annotations>
15+
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="waitForAddToCartButton"/>
18+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickOnAddToCartButton"/>
19+
</actionGroup>
20+
</actionGroups>

0 commit comments

Comments
 (0)