Skip to content

Commit a44c925

Browse files
committed
Merge remote-tracking branch 'upstream/2.4-develop' into 2.4-develop
2 parents a33d5b6 + af12fe6 commit a44c925

File tree

520 files changed

+18856
-6357
lines changed

Some content is hidden

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

520 files changed

+18856
-6357
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/Data/BraintreeData.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
<data key="value">sandbox</data>
5454
</entity>
5555
<entity name="MerchantId" type="merchant_id">
56-
<data key="value">MERCH_ID</data>
56+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_merchant_id}}</data>
5757
</entity>
5858
<entity name="PublicKey" type="public_key">
59-
<data key="value">PUBLIC_KEY</data>
59+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_public_key}}</data>
6060
</entity>
6161
<entity name="PrivateKey" type="private_key">
62-
<data key="value">PRIVATE_KEY</data>
62+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_private_key}}</data>
6363
</entity>
6464

6565
<!-- default configuration used to restore Magento config -->
@@ -141,6 +141,16 @@
141141
<data key="cardNumberEnding">5100</data>
142142
<data key="cardExpire">12/2020</data>
143143
</entity>
144+
<entity name="VisaDefaultCard" type="data">
145+
<data key="cardNumber">4111111111111111</data>
146+
<data key="month">01</data>
147+
<data key="year">30</data>
148+
<data key="cvv">123</data>
149+
</entity>
150+
<entity name="VisaDefaultCardInfo">
151+
<data key="cardNumberEnding">1111</data>
152+
<data key="cardExpire">01/2030</data>
153+
</entity>
144154

145155
<entity name="BraintreeConfigurationData" type="data">
146156
<data key="title">Credit Card (Braintree)</data>

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"/>

0 commit comments

Comments
 (0)