Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.4-develop' into 26708-order-by…
Browse files Browse the repository at this point in the history
…-sql-select-duplicated
  • Loading branch information
Vasilii Burlacu committed Mar 19, 2020
2 parents b816334 + 5112f27 commit a61d92a
Show file tree
Hide file tree
Showing 303 changed files with 6,760 additions and 1,535 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MassSchedule
private $logger;

/**
* @var OperationRepository
* @var OperationRepositoryInterface
*/
private $operationRepository;

Expand All @@ -75,7 +75,7 @@ class MassSchedule
* @param AsyncResponseInterfaceFactory $asyncResponseFactory
* @param BulkManagementInterface $bulkManagement
* @param LoggerInterface $logger
* @param OperationRepository $operationRepository
* @param OperationRepositoryInterface $operationRepository
* @param UserContextInterface $userContext
* @param Encryptor $encryptor
*/
Expand All @@ -85,7 +85,7 @@ public function __construct(
AsyncResponseInterfaceFactory $asyncResponseFactory,
BulkManagementInterface $bulkManagement,
LoggerInterface $logger,
OperationRepository $operationRepository,
OperationRepositoryInterface $operationRepository,
UserContextInterface $userContext,
Encryptor $encryptor
) {
Expand Down Expand Up @@ -137,7 +137,7 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $
$requestItem = $this->itemStatusInterfaceFactory->create();

try {
$operation = $this->operationRepository->createByTopic($topicName, $entityParams, $groupId);
$operation = $this->operationRepository->create($topicName, $entityParams, $groupId, $key);
$operations[] = $operation;
$requestItem->setId($key);
$requestItem->setStatus(ItemStatusInterface::STATUS_ACCEPTED);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\AsynchronousOperations\Model;

use Magento\AsynchronousOperations\Api\Data\OperationInterface;

/**
* Repository interface to create operation
*/
interface OperationRepositoryInterface
{
/**
* Create operation by topic, parameters and group ID
*
* @param string $topicName
* @param array $entityParams
* format: array(
* '<arg1-name>' => '<arg1-value>',
* '<arg2-name>' => '<arg2-value>',
* )
* @param string $groupId
* @param int $operationId
* @return OperationInterface
*/
public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Magento\AsynchronousOperations\Api\Data\OperationInterface;
use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
use Magento\AsynchronousOperations\Model\OperationRepositoryInterface;
use Magento\Framework\MessageQueue\MessageValidator;
use Magento\Framework\MessageQueue\MessageEncoder;
use Magento\Framework\Serialize\Serializer\Json;
Expand All @@ -18,10 +19,10 @@
/**
* Create operation for list of bulk operations.
*/
class OperationRepository
class OperationRepository implements OperationRepositoryInterface
{
/**
* @var \Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory
* @var OperationInterfaceFactory
*/
private $operationFactory;

Expand Down Expand Up @@ -67,10 +68,14 @@ public function __construct(
}

/**
* @param $topicName
* @param $entityParams
* @param $groupId
* @return mixed
* Create operation by topic, parameters and group ID
*
* @param string $topicName
* @param array $entityParams
* @param string $groupId
* @return OperationInterface
* @deprecated No longer used.
* @see create()
*/
public function createByTopic($topicName, $entityParams, $groupId)
{
Expand All @@ -91,8 +96,16 @@ public function createByTopic($topicName, $entityParams, $groupId)
],
];

/** @var \Magento\AsynchronousOperations\Api\Data\OperationInterface $operation */
/** @var OperationInterface $operation */
$operation = $this->operationFactory->create($data);
return $this->entityManager->save($operation);
}

/**
* @inheritDoc
*/
public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface
{
return $this->createByTopic($topicName, $entityParams, $groupId);
}
}
1 change: 1 addition & 0 deletions app/code/Magento/AsynchronousOperations/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" />
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" />
<preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" />
<preference for="Magento\AsynchronousOperations\Model\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\ResourceModel\Operation\OperationRepository" />
<type name="Magento\Framework\EntityManager\MetadataPool">
<arguments>
<argument name="metadata" xsi:type="array">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminNavigateToPersistentShoppingCartSettingsActionGroup">
<amOnPage url="{{AdminConfigurationPersistentShoppingCartPage.url}}" stepKey="navigateToPersistencePage"/>
<conditionalClick selector="{{AdminPersistentShoppingCartSection.DefaultLayoutsTab}}" dependentSelector="{{AdminPersistentShoppingCartSection.CheckIfTabExpand}}" visible="true" stepKey="clickTab"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup">
<seeElement stepKey="seeLifetimeInput" selector="{{AdminPersistentShoppingCartSection.persistenceLifeTime}}"/>
<seeElement stepKey="seeRememberMeEnableInput" selector="{{AdminPersistentShoppingCartSection.rememberMeEnable}}"/>
<seeElement stepKey="seeRememberMeDefaultInput" selector="{{AdminPersistentShoppingCartSection.rememberMeDefault}}"/>
<seeElement stepKey="seeClearPersistence" selector="{{AdminPersistentShoppingCartSection.clearPersistenceOnLogout}}"/>
<seeElement stepKey="seePersistShoppingCart" selector="{{AdminPersistentShoppingCartSection.persistShoppingCart}}"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminConfigurationPersistentShoppingCartPage" url="admin/system_config/edit/section/persistent/" module="Customers" area="admin">
<section name="AdminPersistentShoppingCartSection"/>
</page>
</pages>
28 changes: 28 additions & 0 deletions app/code/Magento/Backend/Test/Mftf/Test/AdminLoginFailedTest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminLoginFailedTest">
<annotations>
<features value="Backend"/>
<stories value="Login on the Admin Login page"/>
<title value="Admin should not be able to log into the backend with invalid credentials"/>
<description value="Admin should not be able to log into the backend with invalid credentials"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-71572"/>
<group value="example"/>
<group value="login"/>
</annotations>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin">
<argument name="password" value="INVALID!{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
</actionGroup>
<actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="assertErrorMessage"/>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminLoginSuccessfulTest">
<annotations>
<features value="Backend"/>
<stories value="Login on the Admin Login page"/>
<title value="Admin should be able to log into the Magento Admin backend successfully"/>
<description value="Admin should be able to log into the Magento Admin backend successfully"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-71572"/>
<group value="example"/>
<group value="login"/>
</annotations>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</test>
</tests>
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminPersistentShoppingCartSettingsTest">
<annotations>
<features value="Backend"/>
<stories value="Enable Persistent Shopping cart"/>
<title value="Admin should be able to manage persistent shopping cart settings"/>
<description value="Admin should be able to enable persistent shopping cart in Magento Admin backend and see additional options"/>
<group value="backend"/>
</annotations>

<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 1"/>
<magentoCLI stepKey="cacheClean" command="cache:clean config"/>
</before>
<after>
<magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/>
<magentoCLI stepKey="cacheClean" command="cache:clean config"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<actionGroup ref="AdminNavigateToPersistentShoppingCartSettingsActionGroup" stepKey="navigateToPersistenceSettings"/>
<actionGroup ref="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup" stepKey="assertOptions"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="CreateAnAdminOrderUsingBraintreePaymentTest1">
<test name="CreateAnAdminOrderUsingBraintreePaymentTest1Test">
<annotations>
<features value="Backend"/>
<stories value="Creation an admin order using Braintree payment"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscountTest">
<annotations>
<features value="Braintree"/>
<stories value="Get access to a New Credit Memo Page from Invoice for Order payed with online payment via Admin"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

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

<!-- Assert product design settings "Layout empty" -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminDeleteABundleProduct">
<test name="AdminDeleteABundleProductTest">
<annotations>
<features value="Bundle"/>
<stories value="Admin list bundle products"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminFilterProductListByBundleProduct">
<test name="AdminFilterProductListByBundleProductTest">
<annotations>
<features value="Bundle"/>
<stories value="Admin list bundle products"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontBundleProductShownInCategoryListAndGrid">
<test name="StorefrontBundleProductShownInCategoryListAndGridTest">
<annotations>
<features value="Bundle"/>
<stories value="Bundle products list on Storefront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontCheckBundleProductOptionTierPrices">
<test name="StorefrontCheckBundleProductOptionTierPricesTest">
<annotations>
<features value="Bundle"/>
<stories value="View bundle products"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontGoToDetailsPageWhenAddingToCart">
<test name="StorefrontGoToDetailsPageWhenAddingToCartTest">
<annotations>
<features value="Bundle"/>
<stories value="Bundle products list on Storefront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<scrollToTopOfPage stepKey="ScrollToTop"/>
<click selector="{{CaptchaFormsDisplayingSection.captcha}}" stepKey="ClickToCloseCaptcha"/>
</test>
<test name="CaptchaWithDisabledGuestCheckout">
<test name="CaptchaWithDisabledGuestCheckoutTest">
<annotations>
<features value="Captcha"/>
<stories value="MC-5602 - CAPTCHA doesn't appear in login popup after refreshing page."/>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @method string getHeight()
* @method string getLabel()
* @method float getRatio()
* @method string getCustomAttributes()
* @method array getCustomAttributes()
* @method string getClass()
* @since 100.0.2
*/
Expand Down
Loading

0 comments on commit a61d92a

Please sign in to comment.