-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'mainline/2.4-develop' into wishlist-gql…
…-ce-248
- Loading branch information
Showing
171 changed files
with
9,064 additions
and
678 deletions.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
...f/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutWithCustomerGroupTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?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="StorefrontCustomerCheckoutWithCustomerGroupTest"> | ||
<annotations> | ||
<features value="Customer Checkout"/> | ||
<stories value="Customer checkout with Customer Group assigned"/> | ||
<title value="Place order by Customer with Customer Group assigned"/> | ||
<description value="Customer Group should be assigned to Order when setting Auto Group Assign is enabled for Customer"/> | ||
<testCaseId value="MC-37259"/> | ||
<severity value="MAJOR"/> | ||
<group value="checkout"/> | ||
<group value="customer"/> | ||
</annotations> | ||
<before> | ||
|
||
<magentoCLI command="config:set customer/create_account/auto_group_assign 1" stepKey="enableAutoGroupAssign"/> | ||
|
||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="createSimpleProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
|
||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
|
||
<actionGroup ref="AdminUpdateCustomerGroupByEmailActionGroup" stepKey="updateCustomerGroup"> | ||
<argument name="emailAddress" value="$$createCustomer.email$$"/> | ||
<argument name="customerGroup" value="Retail"/> | ||
</actionGroup> | ||
|
||
</before> | ||
<after> | ||
<magentoCLI command="config:set customer/create_account/auto_group_assign 0" stepKey="disableAutoGroupAssign"/> | ||
|
||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteUsCustomer"/> | ||
<actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="resetCustomerFilters"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteSimpleCategory"/> | ||
</after> | ||
|
||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> | ||
<argument name="Customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> | ||
<argument name="category" value="$$createCategory$$"/> | ||
</actionGroup> | ||
|
||
<waitForPageLoad stepKey="waitForCatalogPageLoad"/> | ||
|
||
<actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="addProductToCart"> | ||
<argument name="product" value="$$createSimpleProduct$$"/> | ||
<argument name="productCount" value="CONST.one"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> | ||
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/> | ||
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/> | ||
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> | ||
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"> | ||
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> | ||
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> | ||
</actionGroup> | ||
|
||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/> | ||
|
||
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="addFilterToGridAndOpenOrder"> | ||
<argument name="orderId" value="{$orderNumber}"/> | ||
</actionGroup> | ||
|
||
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="verifyOrderStatus"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Customer" stepKey="verifyAccountInformation"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="$$createCustomer.email$$" stepKey="verifyCustomerEmail"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Retail" stepKey="verifyCustomerGroup"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyBillingAddress"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyShippingAddress"/> | ||
<see selector="{{AdminOrderDetailsInformationSection.itemsOrdered}}" userInput="$$createSimpleProduct.name$$" stepKey="verifyProductName"/> | ||
|
||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminOpentCmsBlockActionGroup.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
app/code/Magento/MediaContentSynchronization/Model/SynchronizeIdentities.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaContentSynchronization\Model; | ||
|
||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\FlagManager; | ||
use Magento\Framework\Stdlib\DateTime\DateTimeFactory; | ||
use Magento\MediaContentSynchronizationApi\Api\SynchronizeIdentitiesInterface; | ||
use Magento\MediaContentSynchronizationApi\Model\SynchronizeIdentitiesPool; | ||
use Psr\Log\LoggerInterface; | ||
|
||
/** | ||
* Batch Synchronize content with assets | ||
*/ | ||
class SynchronizeIdentities implements SynchronizeIdentitiesInterface | ||
{ | ||
/** | ||
* @var LoggerInterface | ||
*/ | ||
private $log; | ||
|
||
/** | ||
* @var SynchronizeIdentitiesPool | ||
*/ | ||
private $synchronizeIdentitiesPool; | ||
|
||
/** | ||
* @param LoggerInterface $log | ||
* @param SynchronizeIdentitiesPool $synchronizeIdentitiesPool | ||
*/ | ||
public function __construct( | ||
LoggerInterface $log, | ||
SynchronizeIdentitiesPool $synchronizeIdentitiesPool | ||
) { | ||
$this->log = $log; | ||
$this->synchronizeIdentitiesPool = $synchronizeIdentitiesPool; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function execute(array $mediaContentIdentities): void | ||
{ | ||
$failed = []; | ||
|
||
foreach ($this->synchronizeIdentitiesPool->get() as $name => $synchronizer) { | ||
try { | ||
$synchronizer->execute($mediaContentIdentities); | ||
} catch (\Exception $exception) { | ||
$this->log->critical($exception); | ||
$failed[] = $name; | ||
} | ||
} | ||
|
||
if (!empty($failed)) { | ||
throw new LocalizedException( | ||
__( | ||
'Failed to execute the following content synchronizers: %synchronizers', | ||
[ | ||
'synchronizers' => implode(', ', $failed) | ||
] | ||
) | ||
); | ||
} | ||
} | ||
} |
Oops, something went wrong.