Skip to content

Commit f95ff26

Browse files
authored
Merge branch '2.4-develop' into replace-deprecated-escaper
2 parents 3f7f1f5 + a6933f3 commit f95ff26

File tree

42 files changed

+4031
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4031
-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]

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@
5252
<element name="radioButtonQuantityValidation" type="input" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field qty qty-holder']//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
5353
<element name="dropDrownOptionQuantity" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div//div//div//input" parameterized="true"/>
5454
<element name="selectOptionError" type="text" selector="//div[contains(@class, 'field')]//div[contains(@class, 'mage-error')]"/>
55+
<element name="radioButton" type="select" selector="//label//span[contains(text(), '{{productName}}')]/ancestor::div//div[@class='control']//div[@class='field choice'][{{productNumber}}]/input" parameterized="true"/>
56+
<element name="radioOptionQty" type="input" selector="//div[@class='control']//div[@class='field qty qty-holder']//input"/>
5557
</section>
5658
</sections>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontEditBundleProductUserDefinedQtyFromCartTest">
10+
<annotations>
11+
<features value="Bundle Product"/>
12+
<stories value="Editing bundle product from cart with user-defined quantities"/>
13+
<title value="Edit bundle product from cart with user-defined quantities"/>
14+
<description value="Test verifies that user-defined are retained when editing a bundle product from the shopping cart"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-4271"/>
17+
<group value="catalog"/>
18+
</annotations>
19+
<before>
20+
<!-- Precondition1: Create two simple product with category -->
21+
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
22+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct2"/>
24+
<!-- Precondition2: Create bundle product with radio option -->
25+
<createData entity="ApiBundleProduct" stepKey="createBundleProduct">
26+
<requiredEntity createDataKey="createSubCategory"/>
27+
</createData>
28+
<createData entity="RadioButtonsOption" stepKey="bundleOption">
29+
<requiredEntity createDataKey="createBundleProduct"/>
30+
<field key="required">true</field>
31+
</createData>
32+
<createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct">
33+
<requiredEntity createDataKey="createBundleProduct"/>
34+
<requiredEntity createDataKey="bundleOption"/>
35+
<requiredEntity createDataKey="createSimpleProduct1"/>
36+
<field key="qty">3</field>
37+
</createData>
38+
<createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct">
39+
<requiredEntity createDataKey="createBundleProduct"/>
40+
<requiredEntity createDataKey="bundleOption"/>
41+
<requiredEntity createDataKey="createSimpleProduct2"/>
42+
<field key="qty">3</field>
43+
</createData>
44+
<!-- Login as admin -->
45+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
46+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openBundleEditPage">
47+
<argument name="productId" value="$$createBundleProduct.id$$"/>
48+
</actionGroup>
49+
<checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantityOption0Product0"/>
50+
<checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '1')}}" stepKey="userDefinedQuantityOption0Product1"/>
51+
<!-- Save product -->
52+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
53+
</before>
54+
<after>
55+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
56+
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
57+
<deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/>
58+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
59+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
60+
</after>
61+
<!-- Step1: Open Bundled product on storefront -->
62+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToBundleProductDetailsPage">
63+
<argument name="product" value="$createBundleProduct$"/>
64+
</actionGroup>
65+
<!-- Step2: Click on Customize and Add to cart-->
66+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickButtonToCustomize"/>
67+
<checkOption selector="{{StorefrontBundledSection.radioButton('$$createSimpleProduct1.name$$', '1')}}" stepKey="selectOption1"/>
68+
<waitForElementVisible selector="{{StorefrontBundledSection.radioOptionQty}}" stepKey="waitForUpdateQty"/>
69+
<!-- Step3: Update qty and add product to cart -->
70+
<fillField selector="{{StorefrontBundledSection.radioOptionQty}}" userInput="10" stepKey="updateQty"/>
71+
<actionGroup ref="StorefrontAddToTheCartButtonActionGroup" stepKey="addToTheCartBundleProduct"/>
72+
<!-- Step4: Open Mini Cart and click on edit item icon and verify qty -->
73+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/>
74+
<click selector="{{StorefrontMinicartSection.editMiniCartItem}}" stepKey="clickEditCartItem"/>
75+
<waitForPageLoad stepKey="waitForPageToLoad"/>
76+
<seeInField selector="{{StorefrontBundledSection.radioOptionQty}}" userInput="010" stepKey="VerifyQty"/>
77+
</test>
78+
</tests>
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: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminProductMultiselectAttributeUncheckAllOptionsTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Save Product Multiselect attribute without selecting any options"/>
14+
<title value="Product Attribute of multiselect type can be saved with all options unchecked"/>
15+
<description
16+
value="Verify that a product attribute of multiselect type can be saved with all options unchecked in the admin product edit page."/>
17+
<testCaseId value="AC-4856"/>
18+
<severity value="MAJOR"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<!-- Login as admin -->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
<!-- Pre-condition Step-1 Multiselect attribute is created with three options: 1, 2, 3 -->
25+
<createData entity="multiSelectAttributeWithThreeOptions" stepKey="createMultiSelectProductAttributeWith2Options"/>
26+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/>
27+
<actionGroup ref="NavigateToCreatedProductAttributeActionGroup" stepKey="openAttributeFromGrid">
28+
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWith2Options$$"/>
29+
</actionGroup>
30+
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption1">
31+
<argument name="adminName" value="{{multiSelectAttributeWithThreeOptions.option1}}"/>
32+
<argument name="frontName" value="{{multiSelectAttributeWithThreeOptions.option1}}"/>
33+
<argument name="row" value="{{multiSelectAttributeWithThreeOptions.option1}}"/>
34+
</actionGroup>
35+
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption2">
36+
<argument name="adminName" value="{{multiSelectAttributeWithThreeOptions.option2}}"/>
37+
<argument name="frontName" value="{{multiSelectAttributeWithThreeOptions.option2}}"/>
38+
<argument name="row" value="{{multiSelectAttributeWithThreeOptions.option2}}"/>
39+
</actionGroup>
40+
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption3">
41+
<argument name="adminName" value="{{multiSelectAttributeWithThreeOptions.option3}}"/>
42+
<argument name="frontName" value="{{multiSelectAttributeWithThreeOptions.option3}}"/>
43+
<argument name="row" value="{{multiSelectAttributeWithThreeOptions.option3}}"/>
44+
</actionGroup>
45+
<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
46+
<actionGroup ref="AdminSaveProductAttributeActionGroup" stepKey="saveMultiSelectAttribute"/>
47+
<!-- Pre-condition Step-2 Multiselect Attribute added to default Attribute set -->
48+
<actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/>
49+
<actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/>
50+
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup">
51+
<argument name="group" value="Product Details"/>
52+
<argument name="attribute" value="$$createMultiSelectProductAttributeWith2Options.attribute_code$$"/>
53+
</actionGroup>
54+
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
55+
<!-- Pre-condition Step-3 Product is created based on default attribute set. Value of multiselect attribute set to 1 and 2 for this product -->
56+
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
57+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
58+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
59+
<argument name="product" value="$$createSimpleProduct$$"/>
60+
</actionGroup>
61+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
62+
<argument name="product" value="$$createSimpleProduct$$"/>
63+
</actionGroup>
64+
<waitForElementVisible
65+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
66+
stepKey="waitForMultiSelectAttributeToSelect"/>
67+
<selectOption
68+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
69+
parameterArray="['1','2']" stepKey="selectFirstAndSecondOptions"/>
70+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
71+
</before>
72+
<after>
73+
<!-- Delete product -->
74+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
75+
<!-- Delete attribute -->
76+
<actionGroup ref="NavigateToCreatedProductAttributeActionGroup" stepKey="openAttributeFromGrid">
77+
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWith2Options$$"/>
78+
</actionGroup>
79+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
80+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
81+
</after>
82+
<!-- Step 2 & 3 - Navigate: Products > Catalog and Open created product -->
83+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
84+
<argument name="productId" value="$createSimpleProduct.id$"/>
85+
</actionGroup>
86+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
87+
<!-- Step 4 - Uncheck all options of multiselect attribute -->
88+
<waitForElement
89+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
90+
stepKey="waitForMultiSelectAttributeToUnSelect"/>
91+
<unselectOption
92+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
93+
parameterArray="['1','2']" stepKey="uncheckAllOptions"/>
94+
<!-- Step 5 - Save product -->
95+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductFormAfterUncheck"/>
96+
<!-- Assert multiselect attribute has all options unchecked -->
97+
<dontSeeOptionIsSelected
98+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
99+
userInput="1" stepKey="assertOption1NotChecked"/>
100+
<dontSeeOptionIsSelected
101+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
102+
userInput="2" stepKey="assertOption2NotChecked"/>
103+
<dontSeeOptionIsSelected
104+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
105+
userInput="3" stepKey="assertOption3NotChecked"/>
106+
</test>
107+
</tests>
108+

0 commit comments

Comments
 (0)