Skip to content

Commit 784c3aa

Browse files
[Magento Community Engineering] Community Contributions - 2.4-develop
- merged latest code from mainline branch
2 parents a4e1f3d + 5e225d6 commit 784c3aa

File tree

38 files changed

+700
-156
lines changed

38 files changed

+700
-156
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<after>
2323
<!-- 6. Restore default configuration settings. -->
2424
<magentoCLI command="config:set {{DefaultWebCookieLifetimeConfigData.path}} {{DefaultWebCookieLifetimeConfigData.value}}" stepKey="setDefaultCookieLifetime"/>
25+
<!-- Customer Log Out -->
26+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
2527
<!-- Delete data -->
2628
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
2729
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
</before>
4949

5050
<after>
51+
<!-- Customer Log Out -->
52+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
5153
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
5254
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
5355
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
@@ -70,7 +72,7 @@
7072
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductGridPage"/>
7173
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/>
7274
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
73-
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
75+
<comment userInput="BIC workaround" stepKey="customerLogoutStorefront"/>
7476
</after>
7577

7678
<!-- Open Product Grid, Filter product and open -->

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
3232
</before>
3333
<after>
34+
<!-- Logout customer -->
35+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
3436
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
3537
<!-- Delete product and category -->
3638
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3739
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
3840
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderListingFilters"/>
3941
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
40-
<!-- Logout customer -->
41-
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
42+
<comment userInput="BIC workaround" stepKey="customerLogoutStorefront"/>
4243
</after>
4344

4445
<!-- Login Customer Storefront -->

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
3434
</before>
3535
<after>
36+
<!-- Customer Log Out -->
37+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
3638
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
3739
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3840
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/PriceRange.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ public function resolve(
6363
$product = $value['model'];
6464
$product->unsetData('minimal_price');
6565

66+
if ($context) {
67+
$customerGroupId = $context->getExtensionAttributes()->getCustomerGroupId();
68+
if ($customerGroupId !== null) {
69+
$product->setCustomerGroupId($customerGroupId);
70+
}
71+
}
72+
6673
$requestedFields = $info->getFieldSelection(10);
6774
$returnArray = [];
6875

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
<!-- Delete products and category -->
3939
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
4040
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
41-
41+
<!-- Customer Log Out -->
42+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
43+
4244
<!-- Delete customer -->
4345
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4446

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckSelectedShippingAddressInCheckoutActionGroup.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
<argument name="customerVar"/>
1717
<argument name="customerAddressVar"/>
1818
</arguments>
19-
2019
<waitForElement selector="{{CheckoutShippingSection.shippingTab}}" time="30" stepKey="waitForShippingSectionLoaded"/>
21-
<see stepKey="VerifyFirstNameInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.firstname}}"/>
22-
<see stepKey="VerifyLastNameInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.lastname}}"/>
23-
<see stepKey="VerifyStreetInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.street[0]}}"/>
24-
<see stepKey="VerifyCityInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}"/>
25-
<see stepKey="VerifyZipInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.postcode}}"/>
26-
<see stepKey="VerifyPhoneInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.telephone}}"/>
20+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.firstname}}" stepKey="VerifyFirstNameInSelectedAddress"/>
21+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.lastname}}" stepKey="VerifyLastNameInSelectedAddress"/>
22+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.street[0]}}" stepKey="VerifyStreetInSelectedAddress"/>
23+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}" stepKey="VerifyCityInSelectedAddress"/>
24+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.postcode}}" stepKey="VerifyZipInSelectedAddress"/>
25+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.telephone}}" stepKey="VerifyPhoneInSelectedAddress"/>
2726
</actionGroup>
2827
</actionGroups>
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="StorefrontCheckSelectedBillingAddressInCheckoutWithSearchActionGroup">
12+
<annotations>
13+
<description>Validates that the provided Customer and Address details are listed on the Storefront Checkout page under the 'Billing Address' section when multiple Addresses are present for a Customer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customerVar"/>
17+
<argument name="customerAddressVar"/>
18+
</arguments>
19+
<waitForElement selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" time="30" stepKey="waitForBillingSectionLoaded"/>
20+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.firstname}}" stepKey="verifyFirstNameInSelectedAddress"/>
21+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.lastname}}" stepKey="verifyLastNameInSelectedAddress"/>
22+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.street[0]}}" stepKey="verifyStreetInSelectedAddress"/>
23+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.city}}" stepKey="verifyCityInSelectedAddress"/>
24+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.postcode}}" stepKey="verifyZipInSelectedAddress"/>
25+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.telephone}}" stepKey="verifyPhoneInSelectedAddress"/>
26+
</actionGroup>
27+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontCheckoutClickSaveAddressButtonActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
<annotations>
1313
<description>Click Save Address button on checkout.</description>
1414
</annotations>
15-
16-
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="saveAddress"/>
15+
<waitForElementVisible selector="{{CheckoutShippingSection.saveAddress}}" stepKey="waitForSaveButton"/>
16+
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="clickSaveButton"/>
1717
<waitForPageLoad stepKey="waitForAddressSaved"/>
18+
<waitForElementNotVisible selector="{{CheckoutShippingSection.newAddressForm}}" stepKey="waitForNewAddressFormGone"/>
1819
</actionGroup>
1920
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="StorefrontClickAddNewAddressButtonFromCheckoutShippingActionGroup">
12+
<annotations>
13+
<description>Clicks the New Address button on the storefront Checkout Shipping page</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="waitForAddNewAddressButton"/>
16+
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="clickAddNewAddressButton"/>
17+
<waitForPageLoad stepKey="waitForPageToLoad"/>
18+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressForm}}" stepKey="waitForNewAddressForm"/>
19+
</actionGroup>
20+
</actionGroups>

0 commit comments

Comments
 (0)