Skip to content

Commit a61d92a

Browse files
author
Vasilii Burlacu
committed
Merge remote-tracking branch 'origin/2.4-develop' into 26708-order-by-sql-select-duplicated
2 parents b816334 + 5112f27 commit a61d92a

File tree

303 files changed

+6760
-1535
lines changed

Some content is hidden

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

303 files changed

+6760
-1535
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class MassSchedule
5353
private $logger;
5454

5555
/**
56-
* @var OperationRepository
56+
* @var OperationRepositoryInterface
5757
*/
5858
private $operationRepository;
5959

@@ -75,7 +75,7 @@ class MassSchedule
7575
* @param AsyncResponseInterfaceFactory $asyncResponseFactory
7676
* @param BulkManagementInterface $bulkManagement
7777
* @param LoggerInterface $logger
78-
* @param OperationRepository $operationRepository
78+
* @param OperationRepositoryInterface $operationRepository
7979
* @param UserContextInterface $userContext
8080
* @param Encryptor $encryptor
8181
*/
@@ -85,7 +85,7 @@ public function __construct(
8585
AsyncResponseInterfaceFactory $asyncResponseFactory,
8686
BulkManagementInterface $bulkManagement,
8787
LoggerInterface $logger,
88-
OperationRepository $operationRepository,
88+
OperationRepositoryInterface $operationRepository,
8989
UserContextInterface $userContext,
9090
Encryptor $encryptor
9191
) {
@@ -137,7 +137,7 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $
137137
$requestItem = $this->itemStatusInterfaceFactory->create();
138138

139139
try {
140-
$operation = $this->operationRepository->createByTopic($topicName, $entityParams, $groupId);
140+
$operation = $this->operationRepository->create($topicName, $entityParams, $groupId, $key);
141141
$operations[] = $operation;
142142
$requestItem->setId($key);
143143
$requestItem->setStatus(ItemStatusInterface::STATUS_ACCEPTED);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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\AsynchronousOperations\Model;
9+
10+
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
11+
12+
/**
13+
* Repository interface to create operation
14+
*/
15+
interface OperationRepositoryInterface
16+
{
17+
/**
18+
* Create operation by topic, parameters and group ID
19+
*
20+
* @param string $topicName
21+
* @param array $entityParams
22+
* format: array(
23+
* '<arg1-name>' => '<arg1-value>',
24+
* '<arg2-name>' => '<arg2-value>',
25+
* )
26+
* @param string $groupId
27+
* @param int $operationId
28+
* @return OperationInterface
29+
*/
30+
public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface;
31+
}

app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
1212
use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
13+
use Magento\AsynchronousOperations\Model\OperationRepositoryInterface;
1314
use Magento\Framework\MessageQueue\MessageValidator;
1415
use Magento\Framework\MessageQueue\MessageEncoder;
1516
use Magento\Framework\Serialize\Serializer\Json;
@@ -18,10 +19,10 @@
1819
/**
1920
* Create operation for list of bulk operations.
2021
*/
21-
class OperationRepository
22+
class OperationRepository implements OperationRepositoryInterface
2223
{
2324
/**
24-
* @var \Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory
25+
* @var OperationInterfaceFactory
2526
*/
2627
private $operationFactory;
2728

@@ -67,10 +68,14 @@ public function __construct(
6768
}
6869

6970
/**
70-
* @param $topicName
71-
* @param $entityParams
72-
* @param $groupId
73-
* @return mixed
71+
* Create operation by topic, parameters and group ID
72+
*
73+
* @param string $topicName
74+
* @param array $entityParams
75+
* @param string $groupId
76+
* @return OperationInterface
77+
* @deprecated No longer used.
78+
* @see create()
7479
*/
7580
public function createByTopic($topicName, $entityParams, $groupId)
7681
{
@@ -91,8 +96,16 @@ public function createByTopic($topicName, $entityParams, $groupId)
9196
],
9297
];
9398

94-
/** @var \Magento\AsynchronousOperations\Api\Data\OperationInterface $operation */
99+
/** @var OperationInterface $operation */
95100
$operation = $this->operationFactory->create($data);
96101
return $this->entityManager->save($operation);
97102
}
103+
104+
/**
105+
* @inheritDoc
106+
*/
107+
public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface
108+
{
109+
return $this->createByTopic($topicName, $entityParams, $groupId);
110+
}
98111
}

app/code/Magento/AsynchronousOperations/etc/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" />
1919
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" />
2020
<preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" />
21+
<preference for="Magento\AsynchronousOperations\Model\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\ResourceModel\Operation\OperationRepository" />
2122
<type name="Magento\Framework\EntityManager\MetadataPool">
2223
<arguments>
2324
<argument name="metadata" xsi:type="array">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminNavigateToPersistentShoppingCartSettingsActionGroup">
12+
<amOnPage url="{{AdminConfigurationPersistentShoppingCartPage.url}}" stepKey="navigateToPersistencePage"/>
13+
<conditionalClick selector="{{AdminPersistentShoppingCartSection.DefaultLayoutsTab}}" dependentSelector="{{AdminPersistentShoppingCartSection.CheckIfTabExpand}}" visible="true" stepKey="clickTab"/>
14+
</actionGroup>
15+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup">
12+
<seeElement stepKey="seeLifetimeInput" selector="{{AdminPersistentShoppingCartSection.persistenceLifeTime}}"/>
13+
<seeElement stepKey="seeRememberMeEnableInput" selector="{{AdminPersistentShoppingCartSection.rememberMeEnable}}"/>
14+
<seeElement stepKey="seeRememberMeDefaultInput" selector="{{AdminPersistentShoppingCartSection.rememberMeDefault}}"/>
15+
<seeElement stepKey="seeClearPersistence" selector="{{AdminPersistentShoppingCartSection.clearPersistenceOnLogout}}"/>
16+
<seeElement stepKey="seePersistShoppingCart" selector="{{AdminPersistentShoppingCartSection.persistShoppingCart}}"/>
17+
</actionGroup>
18+
</actionGroups>
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminConfigurationPersistentShoppingCartPage" url="admin/system_config/edit/section/persistent/" module="Customers" area="admin">
12+
<section name="AdminPersistentShoppingCartSection"/>
13+
</page>
14+
</pages>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminLoginFailedTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Login on the Admin Login page"/>
15+
<title value="Admin should not be able to log into the backend with invalid credentials"/>
16+
<description value="Admin should not be able to log into the backend with invalid credentials"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-71572"/>
19+
<group value="example"/>
20+
<group value="login"/>
21+
</annotations>
22+
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin">
24+
<argument name="password" value="INVALID!{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
25+
</actionGroup>
26+
<actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="assertErrorMessage"/>
27+
</test>
28+
</tests>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminLoginSuccessfulTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Login on the Admin Login page"/>
15+
<title value="Admin should be able to log into the Magento Admin backend successfully"/>
16+
<description value="Admin should be able to log into the Magento Admin backend successfully"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-71572"/>
19+
<group value="example"/>
20+
<group value="login"/>
21+
</annotations>
22+
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
26+
</test>
27+
</tests>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminLoginTest">
11+
<test name="AdminLoginTest" deprecated="Replaced with AdminLoginSuccessfulTest">
1212
<annotations>
1313
<features value="Backend"/>
1414
<stories value="Login on the Admin Login page"/>
@@ -20,7 +20,7 @@
2020
<group value="login"/>
2121
</annotations>
2222

23-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2424
<seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/>
2525
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
2626
</test>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminPersistentShoppingCartSettingsTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Enable Persistent Shopping cart"/>
15+
<title value="Admin should be able to manage persistent shopping cart settings"/>
16+
<description value="Admin should be able to enable persistent shopping cart in Magento Admin backend and see additional options"/>
17+
<group value="backend"/>
18+
</annotations>
19+
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
<magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 1"/>
23+
<magentoCLI stepKey="cacheClean" command="cache:clean config"/>
24+
</before>
25+
<after>
26+
<magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/>
27+
<magentoCLI stepKey="cacheClean" command="cache:clean config"/>
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
29+
</after>
30+
31+
<actionGroup ref="AdminNavigateToPersistentShoppingCartSettingsActionGroup" stepKey="navigateToPersistenceSettings"/>
32+
<actionGroup ref="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup" stepKey="assertOptions"/>
33+
</test>
34+
</tests>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml renamed to app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="CreateAnAdminOrderUsingBraintreePaymentTest1">
11+
<test name="CreateAnAdminOrderUsingBraintreePaymentTest1Test">
1212
<annotations>
1313
<features value="Backend"/>
1414
<stories value="Creation an admin order using Braintree payment"/>

app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml renamed to app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
11+
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscountTest">
1212
<annotations>
1313
<features value="Braintree"/>
1414
<stories value="Get access to a New Credit Memo Page from Invoice for Order payed with online payment via Admin"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
<!-- Verify Url Key after changing -->
128128
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
129-
<argument name="productUrl" value="{{ApiBundleProduct.name}}"/>
129+
<argument name="productUrl" value="{{ApiBundleProduct.urlKey}}"/>
130130
</actionGroup>
131131

132132
<!-- Assert product design settings "Layout empty" -->

app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml renamed to app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminDeleteABundleProduct">
11+
<test name="AdminDeleteABundleProductTest">
1212
<annotations>
1313
<features value="Bundle"/>
1414
<stories value="Admin list bundle products"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml renamed to app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminFilterProductListByBundleProduct">
11+
<test name="AdminFilterProductListByBundleProductTest">
1212
<annotations>
1313
<features value="Bundle"/>
1414
<stories value="Admin list bundle products"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml renamed to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontBundleProductShownInCategoryListAndGrid">
11+
<test name="StorefrontBundleProductShownInCategoryListAndGridTest">
1212
<annotations>
1313
<features value="Bundle"/>
1414
<stories value="Bundle products list on Storefront"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml renamed to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontCheckBundleProductOptionTierPrices">
11+
<test name="StorefrontCheckBundleProductOptionTierPricesTest">
1212
<annotations>
1313
<features value="Bundle"/>
1414
<stories value="View bundle products"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontGoToDetailsPageWhenAddingToCart">
11+
<test name="StorefrontGoToDetailsPageWhenAddingToCartTest">
1212
<annotations>
1313
<features value="Bundle"/>
1414
<stories value="Bundle products list on Storefront"/>

app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<scrollToTopOfPage stepKey="ScrollToTop"/>
6666
<click selector="{{CaptchaFormsDisplayingSection.captcha}}" stepKey="ClickToCloseCaptcha"/>
6767
</test>
68-
<test name="CaptchaWithDisabledGuestCheckout">
68+
<test name="CaptchaWithDisabledGuestCheckoutTest">
6969
<annotations>
7070
<features value="Captcha"/>
7171
<stories value="MC-5602 - CAPTCHA doesn't appear in login popup after refreshing page."/>

app/code/Magento/Catalog/Block/Product/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @method string getHeight()
1515
* @method string getLabel()
1616
* @method float getRatio()
17-
* @method string getCustomAttributes()
17+
* @method array getCustomAttributes()
1818
* @method string getClass()
1919
* @since 100.0.2
2020
*/

0 commit comments

Comments
 (0)