Skip to content

Commit f7d7116

Browse files
author
Leonid Poluianov
committed
Merge remote-tracking branch 'mainline/2.4-develop' into MC-32792
2 parents 2f66890 + def8a07 commit f7d7116

File tree

1,403 files changed

+37027
-39379
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,403 files changed

+37027
-39379
lines changed

app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="LoginAdminWithCredentialsActionGroup" deprecated="Use AdminLoginActionGroup instead">
11+
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
12+
</actionGroup>
13+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead">
11+
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
12+
</actionGroup>
13+
</actionGroups>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
<waitForPageLoad time="30" stepKey="wait2"/>
3636
<seeInField selector="{{AdminEditUserSection.usernameTextField}}" userInput="$$noReportUser.username$$" stepKey="seeUsernameInField"/>
3737
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillCurrentPassword"/>
38-
<click selector="{{AdminEditUserSection.userRoleTab}}" stepKey="clickUserRoleTab"/>
38+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
3939

40+
<click selector="{{AdminEditUserSection.userRoleTab}}" stepKey="clickUserRoleTab"/>
4041
<fillField selector="{{AdminEditUserSection.roleNameFilterTextField}}" userInput="$$noReportUserRole.rolename$$" stepKey="fillRoleNameSearch"/>
4142
<click selector="{{AdminEditUserSection.searchButton}}" stepKey="clickSearchButtonUserRole"/>
4243
<waitForPageLoad time="10" stepKey="wait3"/>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api;
10+
11+
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
12+
13+
/**
14+
* Interface for saving multiple operations
15+
*
16+
* @api
17+
*/
18+
interface SaveMultipleOperationsInterface
19+
{
20+
/**
21+
* Save Operations for Bulk
22+
*
23+
* @param OperationInterface[] $operations
24+
* @return void
25+
*/
26+
public function execute(array $operations): void;
27+
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public function scheduleBulk($bulkUuid, array $operations, $description, $userId
117117
$bulkSummary->setUserId($userId);
118118
$bulkSummary->setUserType($userType);
119119
$bulkSummary->setOperationCount((int)$bulkSummary->getOperationCount() + count($operations));
120-
121120
$this->entityManager->save($bulkSummary);
122121

123122
$connection->commit();

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\Framework\Bulk\BulkManagementInterface;
1717
use Magento\Framework\DataObject\IdentityGeneratorInterface;
1818
use Magento\Framework\Encryption\Encryptor;
19+
use Magento\AsynchronousOperations\Api\SaveMultipleOperationsInterface;
1920
use Magento\Framework\Exception\BulkException;
2021
use Magento\Framework\Exception\LocalizedException;
2122
use Psr\Log\LoggerInterface;
@@ -67,6 +68,11 @@ class MassSchedule
6768
*/
6869
private $encryptor;
6970

71+
/**
72+
* @var SaveMultipleOperationsInterface
73+
*/
74+
private $saveMultipleOperations;
75+
7076
/**
7177
* Initialize dependencies.
7278
*
@@ -78,6 +84,7 @@ class MassSchedule
7884
* @param OperationRepositoryInterface $operationRepository
7985
* @param UserContextInterface $userContext
8086
* @param Encryptor $encryptor
87+
* @param SaveMultipleOperationsInterface $saveMultipleOperations
8188
*/
8289
public function __construct(
8390
IdentityGeneratorInterface $identityService,
@@ -87,7 +94,8 @@ public function __construct(
8794
LoggerInterface $logger,
8895
OperationRepositoryInterface $operationRepository,
8996
UserContextInterface $userContext,
90-
Encryptor $encryptor
97+
Encryptor $encryptor,
98+
SaveMultipleOperationsInterface $saveMultipleOperations
9199
) {
92100
$this->identityService = $identityService;
93101
$this->itemStatusInterfaceFactory = $itemStatusInterfaceFactory;
@@ -97,6 +105,7 @@ public function __construct(
97105
$this->operationRepository = $operationRepository;
98106
$this->userContext = $userContext;
99107
$this->encryptor = $encryptor;
108+
$this->saveMultipleOperations = $saveMultipleOperations;
100109
}
101110

102111
/**
@@ -159,6 +168,7 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $
159168
}
160169
}
161170

171+
$this->saveMultipleOperations->execute($operations);
162172
if (!$this->bulkManagement->scheduleBulk($groupId, $operations, $bulkDescription, $userId)) {
163173
throw new LocalizedException(
164174
__('Something went wrong while processing the request.')

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\Framework\EntityManager\EntityManager;
1111

1212
/**
13-
* Class OperationManagement
13+
* Class for managing Bulk Operations
1414
*/
1515
class OperationManagement implements \Magento\Framework\Bulk\OperationManagementInterface
1616
{
@@ -45,7 +45,7 @@ public function __construct(
4545
$this->operationFactory = $operationFactory;
4646
$this->logger = $logger;
4747
}
48-
48+
4949
/**
5050
* @inheritDoc
5151
*/

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@
77
namespace Magento\AsynchronousOperations\Model\ResourceModel;
88

99
/**
10-
* Class Operation
10+
* Resource class for Bulk Operations
1111
*/
1212
class Operation extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
1313
{
14+
15+
public const TABLE_NAME = "magento_operation";
16+
public const TABLE_PRIMARY_KEY = "id";
17+
1418
/**
1519
* Initialize banner sales rule resource model
1620
*
1721
* @return void
1822
*/
1923
protected function _construct()
2024
{
21-
$this->_init('magento_operation', 'id');
25+
$this->_init(self::TABLE_NAME, self::TABLE_PRIMARY_KEY);
2226
}
2327
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function createByTopic($topicName, $entityParams, $groupId)
9898

9999
/** @var OperationInterface $operation */
100100
$operation = $this->operationFactory->create($data);
101-
return $this->entityManager->save($operation);
101+
return $operation;
102102
}
103103

104104
/**

0 commit comments

Comments
 (0)