Skip to content

Commit d052e8c

Browse files
committed
Resolve merge conflicts
2 parents 6f6c628 + fa00ff7 commit d052e8c

File tree

1,500 files changed

+25137
-14589
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,500 files changed

+25137
-14589
lines changed

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

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,24 @@
88

99
namespace Magento\AsynchronousOperations\Model;
1010

11-
use Magento\Framework\Serialize\Serializer\Json;
1211
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
13-
use Magento\Framework\Bulk\OperationManagementInterface;
1412
use Magento\AsynchronousOperations\Model\ConfigInterface as AsyncConfig;
15-
use Magento\Framework\MessageQueue\MessageValidator;
16-
use Magento\Framework\MessageQueue\MessageEncoder;
17-
use Magento\Framework\Exception\NoSuchEntityException;
18-
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
19-
use Psr\Log\LoggerInterface;
20-
use Magento\Framework\Exception\LocalizedException;
21-
use Magento\Framework\Exception\TemporaryStateExceptionInterface;
13+
use Magento\Framework\Bulk\OperationManagementInterface;
14+
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
2215
use Magento\Framework\DB\Adapter\ConnectionException;
2316
use Magento\Framework\DB\Adapter\DeadlockException;
2417
use Magento\Framework\DB\Adapter\LockWaitException;
18+
use Magento\Framework\Exception\LocalizedException;
19+
use Magento\Framework\Exception\NoSuchEntityException;
20+
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
21+
use Magento\Framework\MessageQueue\MessageEncoder;
22+
use Magento\Framework\MessageQueue\MessageValidator;
23+
use Magento\Framework\Serialize\Serializer\Json;
2524
use Magento\Framework\Webapi\ServiceOutputProcessor;
26-
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
25+
use Psr\Log\LoggerInterface;
2726

2827
/**
29-
* Class OperationProcessor
28+
* Proccess operation
3029
*
3130
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3231
*/
@@ -80,9 +79,9 @@ class OperationProcessor
8079
* @param ConsumerConfigurationInterface $configuration
8180
* @param Json $jsonHelper
8281
* @param OperationManagementInterface $operationManagement
83-
* @param LoggerInterface $logger
8482
* @param \Magento\Framework\Webapi\ServiceOutputProcessor $serviceOutputProcessor
8583
* @param \Magento\Framework\Communication\ConfigInterface $communicationConfig
84+
* @param LoggerInterface $logger
8685
*/
8786
public function __construct(
8887
MessageValidator $messageValidator,
@@ -137,7 +136,9 @@ public function process(string $encodedMessage)
137136
$result = $this->executeHandler($callback, $entityParams);
138137
$status = $result['status'];
139138
$errorCode = $result['error_code'];
139+
// phpcs:disable Magento2.Performance.ForeachArrayMerge
140140
$messages = array_merge($messages, $result['messages']);
141+
// phpcs:enable Magento2.Performance.ForeachArrayMerge
141142
$outputData = $result['output_data'];
142143
}
143144
}
@@ -174,8 +175,8 @@ public function process(string $encodedMessage)
174175
/**
175176
* Execute topic handler
176177
*
177-
* @param $callback
178-
* @param $entityParams
178+
* @param callable $callback
179+
* @param array $entityParams
179180
* @return array
180181
*/
181182
private function executeHandler($callback, $entityParams)
@@ -187,7 +188,9 @@ private function executeHandler($callback, $entityParams)
187188
'output_data' => null
188189
];
189190
try {
191+
// phpcs:disable Magento2.Functions.DiscouragedFunction
190192
$result['output_data'] = call_user_func_array($callback, $entityParams);
193+
// phpcs:enable Magento2.Functions.DiscouragedFunction
191194
$result['messages'][] = sprintf('Service execution success %s::%s', get_class($callback[0]), $callback[1]);
192195
} catch (\Zend_Db_Adapter_Exception $e) {
193196
$this->logger->critical($e->getMessage());
@@ -206,9 +209,7 @@ private function executeHandler($callback, $entityParams)
206209
}
207210
} catch (NoSuchEntityException $e) {
208211
$this->logger->error($e->getMessage());
209-
$result['status'] = ($e instanceof TemporaryStateExceptionInterface) ?
210-
OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED :
211-
OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
212+
$result['status'] = OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
212213
$result['error_code'] = $e->getCode();
213214
$result['messages'][] = $e->getMessage();
214215
} catch (LocalizedException $e) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<comment userInput="Add product to the shopping cart" stepKey="addProductToCart"/>
5555
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/>
5656
<waitForPageLoad stepKey="waitForProductPageLoad"/>
57-
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage">
57+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
5858
<argument name="productName" value="$$createProduct.name$$"/>
5959
</actionGroup>
6060
<!--Go to Checkout-->
@@ -76,7 +76,7 @@
7676
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
7777
<!-- Search for Order in the order grid -->
7878
<comment userInput="Search for Order in the order grid" stepKey="searchOrderInGrid"/>
79-
<actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById">
79+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
8080
<argument name="orderId" value="$grabOrderNumber"/>
8181
</actionGroup>
8282
<waitForLoadingMaskToDisappear stepKey="waitForSearchingOrder"/>

app/code/Magento/Backup/Test/Mftf/ActionGroup/CreateBackupActionGroup.xml

Lines changed: 0 additions & 64 deletions
This file was deleted.
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CreateDatabaseBackupActionGroup">
12+
<annotations>
13+
<description>Creates a Database Backup using provided Backup Entity.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="backup" defaultValue="DatabaseBackup"/>
17+
</arguments>
18+
19+
<click selector="{{AdminMainActionsSection.databaseBackup}}" stepKey="clickCreateBackupButton"/>
20+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
21+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
22+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
23+
<waitForPageLoad time="120" stepKey="waitForBackupProcess"/>
24+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the database backup." stepKey="seeSuccessMessage"/>
25+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
26+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
27+
</actionGroup>
28+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CreateMediaBackupActionGroup">
12+
<annotations>
13+
<description>Creates a Media Backup using provided Backup Entity.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="backup" defaultValue="MediaBackup"/>
17+
</arguments>
18+
19+
<click selector="{{AdminMainActionsSection.mediaBackup}}" stepKey="clickCreateBackupButton"/>
20+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
21+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
22+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
23+
<waitForPageLoad time="120" stepKey="waitForBackupProcess"/>
24+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the database and media backup." stepKey="seeSuccessMessage"/>
25+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
26+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
27+
</actionGroup>
28+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CreateSystemBackupActionGroup">
12+
<annotations>
13+
<description>Creates a System Backup using provided Backup Entity.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="backup" defaultValue="SystemBackup"/>
17+
</arguments>
18+
19+
<click selector="{{AdminMainActionsSection.systemBackup}}" stepKey="clickCreateBackupButton"/>
20+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
21+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
22+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
23+
<waitForElementNotVisible selector=".loading-mask" time="300" stepKey="waitForBackupProcess"/>
24+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the system backup." stepKey="seeSuccessMessage"/>
25+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
26+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
<waitForPageLoad stepKey="waitForBackupPage"/>
3131

3232
<!--Create system backup-->
33-
<actionGroup ref="createSystemBackup" stepKey="createSystemBackup"/>
33+
<actionGroup ref="CreateSystemBackupActionGroup" stepKey="createSystemBackup"/>
3434

3535
<!--Create database/media backup-->
36-
<actionGroup ref="createMediaBackup" stepKey="createMediaBackup"/>
36+
<actionGroup ref="CreateMediaBackupActionGroup" stepKey="createMediaBackup"/>
3737

3838
<!--Create database backup-->
39-
<actionGroup ref="createDatabaseBackup" stepKey="createDatabaseBackup"/>
39+
<actionGroup ref="CreateDatabaseBackupActionGroup" stepKey="createDatabaseBackup"/>
4040

4141
<!--Delete system backup-->
4242
<actionGroup ref="deleteBackup" stepKey="deleteSystemBackup">
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AdminCreateNewRoleActionGroup">
12+
<annotations>
13+
<description>Creates a User Role using the provided Data.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="role" type="string" defaultValue=""/>
17+
<argument name="resource" type="string" defaultValue="All"/>
18+
<argument name="scope" type="string" defaultValue="Custom"/>
19+
<argument name="websites" type="string" defaultValue="Main Website"/>
20+
</arguments>
21+
22+
<click selector="{{AdminCreateRoleSection.create}}" stepKey="clickToAddNewRole"/>
23+
<fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{role.name}}" stepKey="setRoleName"/>
24+
<fillField stepKey="setPassword" selector="{{AdminCreateRoleSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
25+
<click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/>
26+
<waitForPageLoad stepKey="waitForRoleResourcePage" time="5"/>
27+
<click stepKey="checkSales" selector="//a[text()='Sales']"/>
28+
<click selector="{{AdminCreateRoleSection.save}}" stepKey="clickToSaveRole"/>
29+
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
30+
<see userInput="You saved the role." stepKey="seeSuccessMessage"/>
31+
</actionGroup>
32+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminDeleteRoleActionGroup">
12+
<annotations>
13+
<description>Deletes a User Role that contains the text 'Role'. PLEASE NOTE: The Action Group values are Hardcoded.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="role" defaultValue=""/>
17+
</arguments>
18+
19+
<click stepKey="clickOnRole" selector="{{AdminDeleteRoleSection.theRole}}"/>
20+
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteRoleSection.current_pass}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
21+
<click stepKey="clickToDeleteRole" selector="{{AdminDeleteRoleSection.delete}}"/>
22+
<waitForAjaxLoad stepKey="waitForDeleteConfirmationPopup" time="5"/>
23+
<click stepKey="clickToConfirm" selector="{{AdminDeleteRoleSection.confirm}}"/>
24+
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
25+
<see stepKey="seeSuccessMessage" userInput="You deleted the role."/>
26+
</actionGroup>
27+
</actionGroups>

0 commit comments

Comments
 (0)