Skip to content

Commit eab5e9b

Browse files
authored
Merge branch '2.4-develop' into fix-validate-emails-rule
2 parents 5616ea7 + a6933f3 commit eab5e9b

File tree

34 files changed

+3461
-157
lines changed

34 files changed

+3461
-157
lines changed

.github/app-projects-boards-automation.config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright 2025 Adobe
2+
# All Rights Reserved.
3+
14
automations:
25

36
############################################################################################################
@@ -401,3 +404,10 @@ automations:
401404
]
402405
actions:
403406
- addLabelsToRelated: ['${modifiedLabel.name}']
407+
408+
- trigger: issues.closed
409+
actions:
410+
- removeFromProject: [18]
411+
- removeFromProject: [21]
412+
- removeFromProject: [20]
413+
- removeFromProject: [19]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<actionGroups
10+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
12+
<actionGroup name="StorefrontVerifyErrorMessageDisplayedWhileAddingProductWithEmptyFileToCartActionGroup" extends="AddToCartFromStorefrontProductPageActionGroup">
13+
<arguments>
14+
<argument name="productName" type="string"/>
15+
</arguments>
16+
<remove keyForRemoval="waitForSuccessMessage"/>
17+
<remove keyForRemoval="seeAddToCartSuccessMessage"/>
18+
<waitForText selector="{{StorefrontProductInfoMainSection.customEmptyFileValidationMessage}}" userInput="{{EmptyFileValidationMessage.fileValidationMessage}}" stepKey="verifyEmptyFileValidationMessage"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,4 +450,21 @@
450450
<entity name="ProductRadioButtonType" type="product_option">
451451
<data key="type">Radio Buttons</data>
452452
</entity>
453+
<entity name="ProductOptionTextFile" type="product_option">
454+
<var key="product_sku" entityType="product" entityKey="sku" />
455+
<data key="title">OptionFile</data>
456+
<data key="type">file</data>
457+
<data key="is_require">true</data>
458+
<data key="sort_order">3</data>
459+
<data key="price">9.99</data>
460+
<data key="price_type">fixed</data>
461+
<data key="file_extension">txt</data>
462+
</entity>
463+
<entity name="EmptyFiles">
464+
<data key="file1">emptyTxtFile.txt</data>
465+
<data key="file2">emptyPngFile.png</data>
466+
</entity>
467+
<entity name="EmptyFileValidationMessage">
468+
<data key="fileValidationMessage">The file is empty. Select another file and try again.</data>
469+
</entity>
453470
</entities>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,6 @@
117117
<element name="productCalenderButton" type="button" selector="//*[@id='product-options-wrapper']/div/div/fieldset/div/button" />
118118
<element name="productCalenderGoToday" type="button" selector="//*[@id='ui-datepicker-div']/div[2]/button[1]" />
119119
<element name="customDateField" type="text" selector='//*[@class="product-custom-option datetime-picker input-text _has-datepicker"]' />
120+
<element name="customEmptyFileValidationMessage" type="text" selector="//div[@data-ui-id='message-error']/div"/>
120121
</section>
121122
</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 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<tests
10+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
12+
<test name="StoreFrontUseEmptyFileAsACustomOptionOfFileTypeTest">
13+
<annotations>
14+
<features value="Catalog"/>
15+
<stories value="Empty file as a custom option for the file type"/>
16+
<title value="Product custom options"/>
17+
<description value="Verify the validation of an empty file as a custom option for the file type."/>
18+
<severity value="MAJOR"/>
19+
<testCaseId value="AC-3848"/>
20+
<group value="catalog"/>
21+
</annotations>
22+
<before>
23+
<!-- Pre-condition 1:Create Simple Product -->
24+
<createData entity="defaultSimpleProduct" stepKey="initialSimpleProduct"/>
25+
</before>
26+
<after>
27+
<!-- Delete product, Logout from Admin -->
28+
<deleteData createDataKey="initialSimpleProduct" stepKey="deleteSimpleProduct"/>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
30+
</after>
31+
<!-- Login As Admin -->
32+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
33+
<!-- Step1: Open a product page in Admin and Open Customizable options tab.-->
34+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductForEdit">
35+
<argument name="productId" value="$initialSimpleProduct.id$"/>
36+
</actionGroup>
37+
<!-- Open custom option panel -->
38+
<click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomizableOptions"/>
39+
<waitForPageLoad stepKey="waitForCustomOptionsOpen"/>
40+
<!-- Step2: Add Custom file option -->
41+
<actionGroup ref="AddProductCustomOptionFileActionGroup" stepKey="addFileOption">
42+
<argument name="option" value="ProductOptionTextFile"/>
43+
</actionGroup>
44+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
45+
<!-- Step3: Open the product on Storefront -->
46+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
47+
<argument name="productUrl" value="$$initialSimpleProduct.custom_attributes[url_key]$$"/>
48+
</actionGroup>
49+
<!-- Step4: Upload an empty file -->
50+
<actionGroup ref="StorefrontAttachOptionFileActionGroup" stepKey="selectAndAttachFile">
51+
<argument name="file" value="EmptyFiles.file1" />
52+
</actionGroup>
53+
<!--Step4 Assertion: Verify An error should be displayed when adding to cart -->
54+
<actionGroup ref="StorefrontVerifyErrorMessageDisplayedWhileAddingProductWithEmptyFileToCartActionGroup" stepKey="addProductToCart">
55+
<argument name="productName" value="$initialSimpleProduct.name$"/>
56+
</actionGroup>
57+
<!-- Open product in admin and delete existing custom option-->
58+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage">
59+
<argument name="productId" value="$initialSimpleProduct.id$"/>
60+
</actionGroup>
61+
<!-- Open custom option panel -->
62+
<click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomizableOption"/>
63+
<waitForPageLoad stepKey="waitForCustomOptionOpen"/>
64+
<actionGroup ref="AdminDeleteProductCustomOptionActionGroup" stepKey="deleteCustomOptionFile">
65+
<argument name="option" value="ProductOptionTextFile"/>
66+
</actionGroup>
67+
<!-- Step5: Add a new custom option of File type that accepts only images-->
68+
<actionGroup ref="AddProductCustomOptionFileActionGroup" stepKey="addFileOptions">
69+
<argument name="option" value="ProductOptionFile"/>
70+
</actionGroup>
71+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveTheProduct"/>
72+
<!-- Step6: Open Product page in storeFront -->
73+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openTheProductPage">
74+
<argument name="productUrl" value="$$initialSimpleProduct.custom_attributes[url_key]$$"/>
75+
</actionGroup>
76+
<!--Step7: Upload an empty image -->
77+
<actionGroup ref="StorefrontAttachOptionFileActionGroup" stepKey="selectAndAttachTheFile">
78+
<argument name="file" value="EmptyFiles.file2" />
79+
</actionGroup>
80+
<!-- Step7 Assertion: Verify An error should be displayed when adding to cart -->
81+
<actionGroup ref="StorefrontVerifyErrorMessageDisplayedWhileAddingProductWithEmptyFileToCartActionGroup" stepKey="addTheProductToCart">
82+
<argument name="productName" value="$initialSimpleProduct.name$"/>
83+
</actionGroup>
84+
</test>
85+
</tests>

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,10 +1688,11 @@ protected function _saveProducts()
16881688
}
16891689
$rowScope = $this->getRowScope($rowData);
16901690
$urlKey = $this->getUrlKey($rowData);
1691+
$rowSku = $rowData[self::COL_SKU];
16911692
if (!empty($rowData[self::URL_KEY])) {
16921693
// If url_key column and its value were in the CSV file
16931694
$rowData[self::URL_KEY] = $urlKey;
1694-
} elseif ($this->isNeedToChangeUrlKey($rowData)) {
1695+
} elseif ($this->isNeedToChangeUrlKey($rowData, isset($entityRowsIn[strtolower($rowSku)]))) {
16951696
// If url_key column was empty or even not declared in the CSV file but by the rules it needs
16961697
// to be settled. In case when url_key is generating from name column we have to ensure that
16971698
// the bunch of products will pass for the event with url_key column.
@@ -1701,7 +1702,6 @@ protected function _saveProducts()
17011702
// remove null byte character
17021703
$rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]);
17031704
}
1704-
$rowSku = $rowData[self::COL_SKU];
17051705
if (null === $rowSku) {
17061706
$this->getErrorAggregator()->addRowToSkip($rowNum);
17071707
continue;
@@ -3275,15 +3275,16 @@ protected function getResource()
32753275
* Whether a url key needs to change.
32763276
*
32773277
* @param array $rowData
3278+
* @param bool $hasParentRow
32783279
* @return bool
32793280
*/
3280-
private function isNeedToChangeUrlKey(array $rowData): bool
3281+
private function isNeedToChangeUrlKey(array $rowData, bool $hasParentRow = false): bool
32813282
{
32823283
$urlKey = $this->getUrlKey($rowData);
32833284
$productExists = $this->isSkuExist($rowData[self::COL_SKU]);
32843285
$markedToEraseUrlKey = isset($rowData[self::URL_KEY]);
32853286
// The product isn't new and the url key index wasn't marked for change.
3286-
if (!$urlKey && $productExists && !$markedToEraseUrlKey) {
3287+
if ($hasParentRow && empty($rowData[self::URL_KEY]) || !$urlKey && $productExists && !$markedToEraseUrlKey) {
32873288
// Seems there is no need to change the url key
32883289
return false;
32893290
}

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontProcessCheckoutToPaymentActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="enterPostcode"/>
2727
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="enterTelephone"/>
2828
<waitForLoadingMaskToDisappear stepKey="waitForShippingMethods"/>
29+
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('')}}" stepKey="waitForSelectShippingMethod"/>
2930
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('')}}" stepKey="selectShippingMethod"/>
3031
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForTheNextButton"/>
3132
<waitForElementNotVisible selector=".loading-mask" time="300" stepKey="waitForProcessShippingMethod"/>

app/code/Magento/Customer/view/adminhtml/ui_component/customer_listing.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2015 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
99
<argument name="data" xsi:type="array">
@@ -226,7 +226,6 @@
226226
<column name="dob" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date" sortOrder="170">
227227
<settings>
228228
<timezone>false</timezone>
229-
<dateFormat>MMM d, y</dateFormat>
230229
<skipTimeZoneConversion>true</skipTimeZoneConversion>
231230
<filter>dateRange</filter>
232231
<dataType>date</dataType>

app/code/Magento/Indexer/etc/crontab.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2011 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
@@ -14,7 +14,7 @@
1414
<schedule>* * * * *</schedule>
1515
</job>
1616
<job name="indexer_clean_all_changelogs" instance="Magento\Indexer\Cron\ClearChangelog" method="execute">
17-
<schedule>0 * * * *</schedule>
17+
<schedule>*/5 * * * *</schedule>
1818
</job>
1919
</group>
2020
</config>

app/code/Magento/Paypal/Model/Payflow/Transparent.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ protected function createPaymentToken(Payment $payment, $token)
284284
*/
285285
private function getExpirationDate(Payment $payment)
286286
{
287-
$expDate = new \DateTime(
287+
$cardExpDate = new \DateTime(
288288
$payment->getCcExpYear()
289289
. '-'
290290
. $payment->getCcExpMonth()
@@ -294,8 +294,13 @@ private function getExpirationDate(Payment $payment)
294294
. '00:00:00',
295295
new \DateTimeZone('UTC')
296296
);
297-
$expDate->add(new \DateInterval('P1M'));
298-
return $expDate->format('Y-m-d 00:00:00');
297+
$cardExpDate->add(new \DateInterval('P1M'));
298+
$oneYearFromNow = new \DateTime('now', new \DateTimeZone('UTC'));
299+
$oneYearFromNow->add(new \DateInterval('P1Y'));
300+
if ($cardExpDate <= $oneYearFromNow) {
301+
return $cardExpDate->format('Y-m-d 00:00:00');
302+
}
303+
return $oneYearFromNow->format('Y-m-d 00:00:00');
299304
}
300305

301306
/**

0 commit comments

Comments
 (0)