Skip to content

Commit 33ac06b

Browse files
authored
Merge branch '2.4-develop' into AC-2751-upgrade-symfony-to-latest-lts
2 parents 6c18f2e + 9c3a50c commit 33ac06b

File tree

23 files changed

+427
-16
lines changed

23 files changed

+427
-16
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</actionGroup>
3333
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSave"/>
3434
<actionGroup ref="AssertAdminValidationErrorAppearedForPriceFieldOnProductEditPageActionGroup" stepKey="seePriceValidationError">
35-
<argument name="errorMessage" value="Please enter a number 0 or greater in this field."/>
35+
<argument name="errorMessage" value="Please enter a number 0 or greater, without comma in this field."/>
3636
</actionGroup>
3737
</test>
3838
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontSelectionOfOutOfStockChildProductsOfConfigurableProductDisabledTest">
12+
<annotations>
13+
<features value="CatalogInventory"/>
14+
<stories value="Storefront selection of out of stock child products of configurable product"/>
15+
<title value="Storefront selection of out of stock child products of configurable Product disabled"/>
16+
<description value="Storefront selection of out of stock child products of configurable are disabled on storefront when display of out of stock options are enabled"/>
17+
<severity value="MAJOR"/>
18+
<group value="catalogInventory"/>
19+
</annotations>
20+
21+
<before>
22+
<!--Set Display out of stock product-->
23+
<magentoCLI stepKey="setDisplayOutOfStockProduct" command="config:set cataloginventory/options/show_out_of_stock 1" />
24+
<!-- Create category -->
25+
<createData entity="SimpleSubCategory" stepKey="simplecategory"/>
26+
<!-- Create configurable product with two options -->
27+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
28+
<requiredEntity createDataKey="simplecategory"/>
29+
</createData>
30+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
31+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
32+
<requiredEntity createDataKey="createConfigProductAttribute"/>
33+
</createData>
34+
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
35+
<requiredEntity createDataKey="createConfigProductAttribute"/>
36+
</createData>
37+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
38+
<requiredEntity createDataKey="createConfigProductAttribute"/>
39+
</createData>
40+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
41+
<requiredEntity createDataKey="createConfigProductAttribute"/>
42+
</getData>
43+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
44+
<requiredEntity createDataKey="createConfigProductAttribute"/>
45+
</getData>
46+
<!-- Create child products -->
47+
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
48+
<requiredEntity createDataKey="createConfigProductAttribute"/>
49+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
50+
</createData>
51+
<createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
52+
<requiredEntity createDataKey="createConfigProductAttribute"/>
53+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
54+
</createData>
55+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
56+
<requiredEntity createDataKey="createConfigProduct"/>
57+
<requiredEntity createDataKey="createConfigProductAttribute"/>
58+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
59+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
60+
</createData>
61+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
62+
<requiredEntity createDataKey="createConfigProduct"/>
63+
<requiredEntity createDataKey="createConfigChildProduct1"/>
64+
</createData>
65+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
66+
<requiredEntity createDataKey="createConfigProduct"/>
67+
<requiredEntity createDataKey="createConfigChildProduct2"/>
68+
</createData>
69+
<magentoCron groups="index" stepKey="reindex"/>
70+
</before>
71+
72+
<after>
73+
<magentoCLI stepKey="setDisplayOutOfStockProduct" command="config:set cataloginventory/options/show_out_of_stock 0" />
74+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
75+
<deleteData createDataKey="simplecategory" stepKey="deleteSimpleCategory"/>
76+
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
77+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
78+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
79+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
80+
</after>
81+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
82+
<amOnPage url="{{AdminProductEditPage.url($$createConfigChildProduct1.id$$)}}" stepKey="openProductEditPageToSetStatus"/>
83+
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="selectOutOfStockStatus"/>
84+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveProductWithSetOutOfStockStatus"/>
85+
<!-- Go to configurable product page -->
86+
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/>
87+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
88+
<!-- Assert the out of stock child product option is disabled on storefront -->
89+
<seeElement selector="#product-options-wrapper .super-attribute-select option:disabled" stepKey="assertConfigAttributeOption1Disabled"/>
90+
</test>
91+
</tests>

app/code/Magento/CatalogUrlRewrite/Observer/ProductProcessUrlRewriteSavingObserver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ private function deleteObsoleteRewrites(Product $product): void
144144
}
145145
$storesToRemove = array_unique($storesToRemove);
146146
}
147+
$storesToRemove = array_filter($storesToRemove);
147148
if ($storesToRemove) {
148149
$this->urlPersist->deleteByData(
149150
[

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,8 @@
4646
<element name="textFieldAttrRequireMessage" type="text" selector="//input[@name='custom_attributes[{{attribute}}]']/ancestor::div[contains(@class, 'control')]/div/span" parameterized="true" timeout="30"/>
4747
<element name="textFieldAttribute" type="input" selector="[name*='custom_attributes[{{attribute}}]']" parameterized="true" timeout="30"/>
4848
<element name="shippingAddressRequiredField" type="text" selector="//div[@id='shipping-new-address-form']//div[contains(@class, 'field _required') and contains(@name, 'shippingAddress.{{fieldName}}')]" parameterized="true" timeout="30"/>
49+
<element name="stateProvince" type="text" selector="//div[@name='shippingAddress.region_id']//span[contains(text(),'State/Province')]" timeout="30"/>
50+
<element name="stateProvinceWithoutAsterisk" type="text" selector="//div[@class='field' and @name='shippingAddress.region_id']" timeout="30"/>
51+
<element name="stateProvinceWithAsterisk" type="text" selector="//div[@class='field _required' and @name='shippingAddress.region_id']" timeout="30"/>
4952
</section>
5053
</sections>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="VerifyStateOptionApplicableForCheckoutFlowTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Option State_is_Required_for is applicable for checkout flow"/>
15+
<title value="Verify that option State_is_Required_for is applicable for checkout flow"/>
16+
<description value="Verify that option State_is_Required_for is applicable for checkout flow"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-27422"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
22+
<!-- Create category and product -->
23+
<before>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminArea"/>
25+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
26+
<createData entity="SimpleProduct" stepKey="createProduct">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
30+
<!--Unselect France from State is Required for listing & allow to choose State if it is optional for Country-->
31+
<actionGroup ref="SelectCountriesWithRequiredRegionActionGroup" stepKey="setCustomCountryWithRequiredRegion">
32+
<argument name="countries" value="CustomCountryWithRequiredRegion"/>
33+
</actionGroup>
34+
</before>
35+
36+
<!--Goto storefront add the product into cart -->
37+
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="onCategoryPage"/>
38+
<waitForPageLoad stepKey="waitForOpenStorefront"/>
39+
<actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/>
40+
<actionGroup ref="StorefrontClickAddToCartButtonActionGroup" stepKey="addToCart"/>
41+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/>
42+
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/>
43+
<see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/>
44+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" />
45+
46+
<!--Fill shipping details of France-->
47+
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{France_Address.country_id}}"/>
48+
<waitForPageLoad stepKey="waitFormToReload"/>
49+
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/>
50+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="enterFirstName"/>
51+
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="enterLastName"/>
52+
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{France_Address.street[0]}}" stepKey="enterStreet"/>
53+
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{France_Address.city}}" stepKey="enterCity"/>
54+
<seeElement selector="{{CheckoutShippingSection.stateProvince}}" stepKey="validateStateProvince"/>
55+
<seeElement selector="{{CheckoutShippingSection.stateProvinceWithoutAsterisk}}" stepKey="validateStateProvinceWithoutAsteriskIsDisplayed"/>
56+
<dontSeeElement selector="{{CheckoutShippingSection.stateProvinceWithAsterisk}}" stepKey="validateStateProvinceWithAsteriskIsNotDisplayed"/>
57+
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{France_Address.postcode}}" stepKey="enterPostcode"/>
58+
<waitForPageLoad time="30" stepKey="waitForReload"/>
59+
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{France_Address.telephone}}" stepKey="enterTelephone"/>
60+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
61+
<click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
62+
63+
<!--Do the payment and place the order-->
64+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
65+
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
66+
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
67+
<waitForElementVisible selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
68+
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
69+
<seeElement selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="seeOrderNumber"/>
70+
<seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="seeEmailYou"/>
71+
72+
<!-- order number is captured for future validation -->
73+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="getOrderNumber"/>
74+
75+
<!--Delete created category and product-->
76+
<after>
77+
<actionGroup ref="SelectCountriesWithRequiredRegionActionGroup" stepKey="setDefaultCountriesWithRequiredRegion">
78+
<argument name="countries" value="DefaultCountriesWithRequiredRegions"/>
79+
</actionGroup>
80+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
81+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
82+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
83+
</after>
84+
</test>
85+
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminAddOptionsToAttributeWithDefaultLayeredNavigationActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<argument name="option3" defaultValue="colorProductAttribute3"/>
2020
</arguments>
2121

22+
<scrollTo selector="//div/strong[@class='admin__collapsible-title']/span[contains(text(),'Configurations')]" stepKey="scrollToConfigurableProductButton"/>
23+
<waitForElementVisible selector="button[data-index='create_configurable_products_button']" time="30" stepKey="waitForELementVisible"/>
2224
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
2325
<click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickOnNewAttribute"/>
2426
<waitForPageLoad stepKey="waitForIFrame"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminGotoSelectValueAttributePageActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<argument name="defaultLabelAttribute" type="string" defaultValue="{{colorProductAttribute.default_label}}"/>
1818
</arguments>
1919

20+
<switchToIFrame stepKey="switchOutOfIFrame"/>
21+
<waitForPageLoad stepKey="waitForFilters"/>
2022
<click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickOnFilters"/>
2123
<fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="{{defaultLabelAttribute}}" stepKey="fillFilterAttributeCodeField"/>
2224
<click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/CreateNewAttributeActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<!--Click Save Attribute button-->
5050
<click selector="{{NewProduct.saveAttributeButton}}" stepKey="clickSaveAttributeButton"/>
5151
<waitForPageLoad stepKey="waitForSavingSettings"/>
52+
<switchToIFrame stepKey="switchOutOfIFrame"/>
5253

5354
<!--Select created Attribute -->
5455
<click selector="{{ConfigurableProductSection.selectCreatedAttribute}}" stepKey="selectCreatedAttribute"/>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,15 @@
435435
<data key="default_billing">true</data>
436436
<data key="region_qty">66</data>
437437
</entity>
438+
<entity name="France_Address" type="address">
439+
<array key="street">
440+
<item>1234 Some France address</item>
441+
<item>113</item>
442+
</array>
443+
<data key="city">City</data>
444+
<data key="country_id">FR</data>
445+
<data key="country">France</data>
446+
<data key="postcode">12345</data>
447+
<data key="telephone">512-345-6789</data>
448+
</entity>
438449
</entities>

app/code/Magento/Dhl/Model/Carrier.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,7 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
14041404
* @param \Magento\Framework\DataObject $request
14051405
* @return $this|\Magento\Framework\DataObject|boolean
14061406
* @deprecated 100.2.3
1407+
* @see use processAdditionalValidation method instead
14071408
*/
14081409
public function proccessAdditionalValidation(\Magento\Framework\DataObject $request)
14091410
{
@@ -1580,8 +1581,13 @@ protected function _doRequest()
15801581
* Shipment bill to account – required if Shipping PaymentType is other than 'S'
15811582
*/
15821583
$nodeBilling->addChild('BillingAccountNumber', (string)$this->getConfigData('account'));
1583-
$nodeBilling->addChild('DutyPaymentType', 'S');
1584-
$nodeBilling->addChild('DutyAccountNumber', (string)$this->getConfigData('account'));
1584+
if ($this->isDutiable(
1585+
$rawRequest->getShipperAddressCountryCode(),
1586+
$rawRequest->getRecipientAddressCountryCode()
1587+
)) {
1588+
$nodeBilling->addChild('DutyPaymentType', 'S');
1589+
$nodeBilling->addChild('DutyAccountNumber', (string)$this->getConfigData('account'));
1590+
}
15851591

15861592
/** Receiver */
15871593
$nodeConsignee = $xml->addChild('Consignee', '', '');
@@ -1789,7 +1795,10 @@ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '')
17891795
$contentType = isset($package['params']['container']) ? $package['params']['container'] : '';
17901796
$packageType = $contentType === self::DHL_CONTENT_TYPE_NON_DOC ? 'CP' : 'EE';
17911797
$nodeShipmentDetails->addChild('PackageType', $packageType);
1792-
if ($this->isDutiable($rawRequest->getOrigCountryId(), $rawRequest->getDestCountryId())) {
1798+
if ($this->isDutiable(
1799+
$rawRequest->getShipperAddressCountryCode(),
1800+
$rawRequest->getRecipientAddressCountryCode()
1801+
)) {
17931802
$nodeShipmentDetails->addChild('IsDutiable', 'Y');
17941803
}
17951804
$nodeShipmentDetails->addChild(
@@ -2044,9 +2053,8 @@ protected function _checkDomesticStatus($origCountryCode, $destCountryCode)
20442053

20452054
$origCountry = (string)$this->getCountryParams($origCountryCode)->getData('name');
20462055
$destCountry = (string)$this->getCountryParams($destCountryCode)->getData('name');
2047-
$isDomestic = (string)$this->getCountryParams($destCountryCode)->getData('domestic');
20482056

2049-
if (($origCountry == $destCountry && $isDomestic)
2057+
if (($origCountry == $destCountry)
20502058
|| (
20512059
$this->_carrierHelper->isCountryInEU($origCountryCode)
20522060
&& $this->_carrierHelper->isCountryInEU($destCountryCode)

0 commit comments

Comments
 (0)