Skip to content

Commit 198f790

Browse files
Merge pull request #10228 from magento-gl/ACQE-functional-deployment-version21
Bengals Functional Mainline deployment
2 parents 2687b48 + 30b1104 commit 198f790

13 files changed

+2145
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertFotoramaImageAvailabilityActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<arguments>
1313
<argument name="fileName" type="string" defaultValue="magento-logo"/>
1414
</arguments>
15-
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="seeActiveImageDefault"/>
15+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="waitForImageInFotorama"/>
16+
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="seeImageInFotorama"/>
1617
</actionGroup>
1718
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<element name="optionQty" type="text" selector=".filter-options-content .item .count"/>
1616
<element name="filterOptionByLabel" type="button" selector=" div.filter-options-item div[data-option-label='{{optionLabel}}']" parameterized="true"/>
1717
<element name="removeFilter" type="button" selector="div.filter-current .remove" timeout="30"/>
18+
<element name="removeAllFilters" type="button" selector="//a[@class='action clear filter-clear']" timeout="30"/>
1819
<element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
1920
<element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true" timeout="30"/>
2021
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[contains(@class, 'filter-options')]//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</actionGroup>
108108
<!-- Add images for ChildProduct1 -->
109109
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1ProductImage">
110-
<argument name="image" value="TestImageNew"/>
110+
<argument name="image" value="ProductImage"/>
111111
</actionGroup>
112112
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1Magento2">
113113
<argument name="image" value="Magento2"/>
@@ -127,8 +127,8 @@
127127
<argument name="storeViewName" value="'Default Store View'"/>
128128
</actionGroup>
129129
<!-- Add image for ChildProduct2 -->
130-
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2TestImageNew">
131-
<argument name="image" value="TestImageNew"/>
130+
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2ProductImage">
131+
<argument name="image" value="ProductImage"/>
132132
</actionGroup>
133133
<!-- Save changes fot ChildProduct2 -->
134134
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct2Product"/>
@@ -161,16 +161,18 @@
161161
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
162162
<argument name="optionLabel" value="$$getConfigAttributeOption1.label$$"/>
163163
</actionGroup>
164+
<waitForAjaxLoad stepKey="waitForAjaxLoadForOption1"/>
165+
<waitForElementNotVisible selector="{{StorefrontProductMediaSection.gallerySpinner}}" stepKey="waitForGallerySpinnerDisappearForOption1"/>
164166
<!-- Check fotorama thumbnail images (first option selected) -->
167+
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption">
168+
<argument name="fileName" value="{{ProductImage.filename}}"/>
169+
</actionGroup>
165170
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForFirstOption">
166171
<argument name="fileName" value="{{Magento3.filename}}"/>
167172
</actionGroup>
168173
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForFirstOption">
169174
<argument name="fileName" value="{{TestImageAdobe.filename}}"/>
170175
</actionGroup>
171-
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption">
172-
<argument name="fileName" value="{{TestImageNew.filename}}"/>
173-
</actionGroup>
174176
<!-- Check active fotorama thumbnail image (first option selected) -->
175177
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveMagento2ForFirstOption">
176178
<argument name="fileName" value="{{Magento2.filename}}"/>
@@ -180,6 +182,8 @@
180182
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
181183
<argument name="optionLabel" value="$$getConfigAttributeOption2.label$$"/>
182184
</actionGroup>
185+
<waitForAjaxLoad stepKey="waitForAjaxLoadForOption2"/>
186+
<waitForElementNotVisible selector="{{StorefrontProductMediaSection.gallerySpinner}}" stepKey="waitForGallerySpinnerDisappearForOption2"/>
183187
<!-- Check fotorama thumbnail images (second option selected) -->
184188
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForSecondOption">
185189
<argument name="fileName" value="{{Magento3.filename}}"/>
@@ -188,8 +192,8 @@
188192
<argument name="fileName" value="{{TestImageAdobe.filename}}"/>
189193
</actionGroup>
190194
<!-- Check active fotorama thumbnail image (second option selected) -->
191-
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveTestImageNewForSecondOption">
192-
<argument name="fileName" value="{{TestImageNew.filename}}"/>
195+
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveProductImageForSecondOption">
196+
<argument name="fileName" value="{{ProductImage.filename}}"/>
193197
</actionGroup>
194198
</test>
195199
</tests>
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="StorefrontSimpleProductsDisplayedAfterSwatchFilteringTest">
12+
<annotations>
13+
<features value="LayeredNavigation"/>
14+
<stories value="Simple products are displayed after search"/>
15+
<title value="Simple products are displayed after search with visual and text swatch filters"/>
16+
<description value="Creates visual and text swatch attributes, assigns values to products and verifies storefront filtering and visibility"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4386"/>
19+
<group value="layeredNavigation"/>
20+
</annotations>
21+
<before>
22+
<!-- Create category, products and assign to category-->
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
<createData entity="_defaultProduct" stepKey="createProduct1">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
<createData entity="_defaultProduct" stepKey="createProduct2">
28+
<requiredEntity createDataKey="createCategory" />
29+
</createData>
30+
<!-- Step 1: Create visual swatch attribute -->
31+
<createData entity="VisualSwatchProductAttributeForm" stepKey="createVisualSwatchAttribute"/>
32+
<createData entity="SwatchProductAttributeOption1" stepKey="createVisualOption1">
33+
<field key="label">visual1</field>
34+
<requiredEntity createDataKey="createVisualSwatchAttribute"/>
35+
</createData>
36+
<createData entity="SwatchProductAttributeOption2" stepKey="createVisualOption2">
37+
<field key="label">visual2</field>
38+
<requiredEntity createDataKey="createVisualSwatchAttribute"/>
39+
</createData>
40+
<!-- Read persisted visual swatch option labels -->
41+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getVisualOption1">
42+
<requiredEntity createDataKey="createVisualSwatchAttribute"/>
43+
</getData>
44+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getVisualOption2">
45+
<requiredEntity createDataKey="createVisualSwatchAttribute"/>
46+
</getData>
47+
<!-- Step 1:Create text swatch attribute -->
48+
<createData entity="TextSwatchProductAttributeForm" stepKey="createTextSwatchAttribute"/>
49+
<createData entity="SwatchProductAttributeOption1" stepKey="createTextOption1">
50+
<field key="label">text1</field>
51+
<requiredEntity createDataKey="createTextSwatchAttribute"/>
52+
</createData>
53+
<createData entity="SwatchProductAttributeOption2" stepKey="createTextOption2">
54+
<field key="label">text2</field>
55+
<requiredEntity createDataKey="createTextSwatchAttribute"/>
56+
</createData>
57+
<!-- Read persisted text swatch option labels -->
58+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getTextOption1">
59+
<requiredEntity createDataKey="createTextSwatchAttribute"/>
60+
</getData>
61+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getTextOption2">
62+
<requiredEntity createDataKey="createTextSwatchAttribute"/>
63+
</getData>
64+
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
65+
<!--Step 1: Set use in layered navigation for visual swatch attribute -->
66+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualAttributeFromGrid">
67+
<argument name="productAttributeCode" value="$createVisualSwatchAttribute.attribute_code$"/>
68+
</actionGroup>
69+
<actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setVisualUseInLayeredNavigation">
70+
<argument name="useInLayeredNavigationValue" value="Filterable (with results)"/>
71+
</actionGroup>
72+
<!-- Step 1: Set Use in layered navigation for text swatch attribute -->
73+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openTextAttributeFromGrid">
74+
<argument name="productAttributeCode" value="$createTextSwatchAttribute.attribute_code$"/>
75+
</actionGroup>
76+
<actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setTextUseInLayeredNavigation">
77+
<argument name="useInLayeredNavigationValue" value="Filterable (with results)"/>
78+
</actionGroup>
79+
<!--Step 2: Assign visual swatch option1 to Product 1 -->
80+
<actionGroup ref="NavigateToCreatedProductEditPageActionGroup" stepKey="openProduct1ForEdit">
81+
<argument name="product" value="$$createProduct1$$"/>
82+
</actionGroup>
83+
<actionGroup ref="AdminAddCustomAttributeToSelectedProductActionGroup" stepKey="addVisualAttrToProduct1">
84+
<argument name="attributeCode" value="$createVisualSwatchAttribute.attribute_code$"/>
85+
<argument name="adminOption1" value="$getVisualOption1.label$"/>
86+
</actionGroup>
87+
<!--Step 3: Assign text swatch option2 to Product 2 -->
88+
<actionGroup ref="NavigateToCreatedProductEditPageActionGroup" stepKey="openProduct2ForEdit">
89+
<argument name="product" value="$$createProduct2$$"/>
90+
</actionGroup>
91+
<actionGroup ref="AdminAddCustomAttributeToSelectedProductActionGroup" stepKey="addTextAttrToProduct2">
92+
<argument name="attributeCode" value="$createTextSwatchAttribute.attribute_code$"/>
93+
<argument name="adminOption1" value="$getTextOption2.label$"/>
94+
</actionGroup>
95+
</before>
96+
<after>
97+
<!-- Delete products, swatch attributes, category and logout from admin-->
98+
<deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/>
99+
<deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/>
100+
<deleteData createDataKey="createVisualSwatchAttribute" stepKey="deleteVisualAttribute"/>
101+
<deleteData createDataKey="createTextSwatchAttribute" stepKey="deleteTextAttribute"/>
102+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
103+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
104+
</after>
105+
<!-- Step 4: Open Frontend application with layered navigation of products-->
106+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategory">
107+
<argument name="category" value="$createCategory$"/>
108+
</actionGroup>
109+
<waitForElementClickable selector="{{StorefrontCategorySidebarSection.filterOptionsTitle('$createVisualSwatchAttribute.frontend_label[0]$')}}" stepKey="waitToClickVisualFilter"/>
110+
<click selector="{{StorefrontCategorySidebarSection.filterOptionsTitle('$createVisualSwatchAttribute.frontend_label[0]$')}}" stepKey="expandVisualFilter"/>
111+
<!-- Step 5: Search by visual swatch attribute with option1 in layered navigation and verify product1 is displayed-->
112+
<waitForElementClickable selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getVisualOption1.label$')}}" stepKey="waitToFilterVisualOption1"/>
113+
<click selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getVisualOption1.label$')}}" stepKey="filterVisualOption1"/>
114+
<waitForPageLoad stepKey="waitAfterSelectingVisualOption"/>
115+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertProduct1Visible">
116+
<argument name="productName" value="$createProduct1.name$"/>
117+
</actionGroup>
118+
<!-- Step 6: Verify visual swatch option2 is not visible -->
119+
<waitForElementNotVisible selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getVisualOption2.label$')}}" stepKey="verifyVisualOption2IsNotVisible"/>
120+
<!-- Step 7: Verify text swatch option1 is not visible -->
121+
<waitForElementClickable selector="{{StorefrontCategorySidebarSection.removeFilter}}" stepKey="waitToRemoveTheFilter"/>
122+
<click selector="{{StorefrontCategorySidebarSection.removeFilter}}" stepKey="removeTheFilter"/>
123+
<waitForElementClickable selector="{{StorefrontCategorySidebarSection.filterOptionsTitle('$createTextSwatchAttribute.frontend_label[0]$')}}" stepKey="waitToExpandTextFilter"/>
124+
<click selector="{{StorefrontCategorySidebarSection.filterOptionsTitle('$createTextSwatchAttribute.frontend_label[0]$')}}" stepKey="expandTextFilter"/>
125+
<waitForElementNotVisible selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getTextOption1.label$')}}" stepKey="verifyTextOption1IsNotVisible"/>
126+
<!-- Step 8: Search by text swatch attribute with option2 in layered navigation and verify product2 is displayed-->
127+
<waitForElementClickable selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getTextOption2.label$')}}" stepKey="waitToFilterTextOption2"/>
128+
<click selector="{{StorefrontLayeredNavigationSection.layeredNavigationNthSwatch('$getTextOption2.label$')}}" stepKey="filterTextOption2"/>
129+
<waitForPageLoad stepKey="waitAfterTextOptionSelection" />
130+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertProduct2Visible">
131+
<argument name="productName" value="$createProduct2.name$"/>
132+
</actionGroup>
133+
</test>
134+
</tests>

app/code/Magento/Sales/Test/Mftf/Data/OrderStateData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<data key="holded">On Hold</data>
1818
<data key="new">Pending</data>
1919
<data key="pending_payment">Pending Payment</data>
20+
<data key="refund">Refunded</data>
2021
</entity>
2122
</entities>

app/code/Magento/Sales/Test/Mftf/Test/AdminOrderEmailsConfirmationMessageTest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
<!-- Step 5: Create invoice, shipment, and credit memo -->
5858
<actionGroup ref="AdminCreateInvoiceAndShipmentActionGroup" stepKey="createInvoiceAndShipment"/>
5959
<actionGroup ref="AdminCreateCreditMemoWithReturnToStockActionGroup" stepKey="createCreditMemo"/>
60+
<!-- Reload order page to clear form state -->
61+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="reloadOrderBeforeInvoice">
62+
<argument name="orderId" value="{$orderNumber}"/>
63+
</actionGroup>
6064
<!-- Step 6: In the order page, click on invoice under the information tab -->
6165
<click selector="{{AdminOrderDetailsMainActionsSection.invoiceTab}}" stepKey="goToInvoiceTab"/>
6266
<!-- Steps 7: Click on view button under action. -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminSelectTextSwatchAttributeOptionActionGroup">
11+
<annotations>
12+
<description>Selects an option for a text swatch attribute on the product edit form.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="attributeCode" type="string"/>
16+
<argument name="optionValue" type="string"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{AdminProductAttributesSection.attributeDropdownByCode(attributeCode)}}" stepKey="waitForAttributeDropdown"/>
19+
<selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(attributeCode)}}" userInput="{{optionValue}}" stepKey="selectAttributeOption"/>
20+
<waitForPageLoad stepKey="waitAfterSelection"/>
21+
</actionGroup>
22+
</actionGroups>
23+

app/code/Magento/Swatches/Test/Mftf/Data/SwatchOptionData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,16 @@
1717
<data key="admin_label" unique="suffix">VisualOpt2</data>
1818
<data key="default_label" unique="suffix">VisualOpt2</data>
1919
</entity>
20+
<entity name="textSwatchOption1" type="SwatchOption">
21+
<data key="admin_label">textSwatchOption1</data>
22+
<data key="default_label">textSwatchOption1</data>
23+
</entity>
24+
<entity name="textSwatchOption2" type="SwatchOption">
25+
<data key="admin_label">textSwatchOption2</data>
26+
<data key="default_label">textSwatchOption2</data>
27+
</entity>
28+
<entity name="textSwatchOption3" type="SwatchOption">
29+
<data key="admin_label">textSwatchOption3</data>
30+
<data key="default_label">textSwatchOption3</data>
31+
</entity>
2032
</entities>

0 commit comments

Comments
 (0)