Skip to content

Commit 6306061

Browse files
Merge branch '2.4-develop' into spartans_pr_26112025
2 parents 0f405e8 + bda7a1d commit 6306061

File tree

15 files changed

+876
-13
lines changed

15 files changed

+876
-13
lines changed

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

Lines changed: 218 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/Catalog/Test/Mftf/test-dependency-allowlist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ AdminSetQuantityToEachSkusConfigurableProductActionGroup
4343
SelectStorefrontSideBarAttributeOption
4444
AdminAddProductVideoWithPreviewActionGroup
4545
AdminSetBaseCurrencyActionGroup
46-
AdminSetDefaultCurrencyActionGroup
46+
AdminSetDefaultCurrencyActionGroup
47+
ChangeConfigurableProductChildProductPriceActionGroup
48+
SaveConfigurableProductAddToCurrentAttributeSetActionGroup

app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest/CheckCheckoutSuccessPageAsRegisterCustomerTest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@
135135
<waitForElementVisible selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="waitVisiblePrint"/>
136136
<seeElement selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="seeVisiblePrint2"/>
137137

138-
<!-- See print page -->
139-
<click selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="clickPrintLink"/>
140-
<waitForPageLoad stepKey="waitForPrintOrderPageLoad"/>
141-
<seeElement selector="{{StorefrontCustomerOrderViewSection.orderTitle}}" stepKey="seeOrderTitleOnPrint"/>
142-
<switchToWindow stepKey="switchToWindow2"/>
138+
<!-- Validate print page URL -->
139+
<grabAttributeFrom selector="{{CheckoutSuccessMainSection.printLink}}" userInput="href" stepKey="orderIdFromPrintUrl"/>
140+
<assertRegExp message="Assert print order url has correct format" stepKey="assertPrintUrlHasCorrectFormat">
141+
<expectedResult type="string">/^.+\/sales\/order\/print\/order_id\/\d+\/$/</expectedResult>
142+
<actualResult type="variable">orderIdFromPrintUrl</actualResult>
143+
</assertRegExp>
143144
</test>
144145
</tests>

app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutCMSPageContentActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_duplicatedCMSPage.title}}" stepKey="fillFieldTitle"/>
1717
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/>
18+
<waitForElementVisible selector="{{CmsNewPagePageContentSection.contentHeading}}" stepKey="waitForContentHeading"/>
1819
<fillField selector="{{CmsNewPagePageContentSection.contentHeading}}" userInput="{{_duplicatedCMSPage.content_heading}}" stepKey="fillFieldContentHeading"/>
1920
<scrollTo selector="{{CmsNewPagePageContentSection.content}}" stepKey="scrollToPageContent"/>
2021
<fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="{{_duplicatedCMSPage.content}}" stepKey="fillFieldContent"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithChineseLocaleTest.xml

Lines changed: 161 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalExpressCheckoutWithDiscountCouponTest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@
3434
</createData>
3535
</before>
3636
<after>
37-
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
38-
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
37+
<!-- Logout customer first -->
38+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
39+
<!-- Delete via Admin UI instead of API -->
40+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
41+
<argument name="customerEmail" value="$$createCustomer.email$$"/>
42+
</actionGroup>
43+
<actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteProduct" />
3944
<!-- Delete Cart Price Rule -->
4045
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>
4146
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontRewardPointsAppliedAfterApplyingCouponTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@
5353
<after>
5454
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
5555
<magentoCLI command="config:set {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.path}} {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.value}}" stepKey="setPaymentAction"/>
56+
<!-- Logout customer first -->
5657
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
57-
<actionGroup ref="AdminDeleteAllCustomerActionGroup" stepKey="deleteCustomer"/>
58-
<actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteProduct"/>
58+
<!-- Delete via Admin UI instead of API -->
59+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
60+
<argument name="customerEmail" value="$$createCustomer.email$$"/>
61+
</actionGroup>
62+
<actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteProduct" />
5963
<!--Delete cart price rule-->
6064
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule">
6165
<argument name="ruleName" value="{{_defaultCoupon.code}}"/>
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminUpdateAttributeUsedInProductListingActionGroup">
12+
<annotations>
13+
<description>Set used in product listing for a product attribute on the admin attribute edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="usedInProductListing" type="string" defaultValue="Yes"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="waitToNavigateToStorefrontPropertiesTab"/>
19+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="navigateToStorefrontPropertiesTab"/>
20+
<waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" stepKey="waitForUseInProductListing"/>
21+
<selectOption selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" userInput="{{usedInProductListing}}" stepKey="setUsedInProductListing"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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="StorefrontVerifySwatchesDisplayedInSearchResultsTest">
12+
<annotations>
13+
<features value="Swatches"/>
14+
<stories value="Swatches are displayed when using search"/>
15+
<title value="Swatches displayed in search results"/>
16+
<description value="This test case verifies whether the swatches are displayed when using search"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4126"/>
19+
<group value="swatch"/>
20+
</annotations>
21+
<before>
22+
<!-- Pre-condition 2: Create swatch attribute visual with options -->
23+
<createData entity="visualSwatchProductAttribute" stepKey="swatchAttribute"/>
24+
<createData entity="SwatchProductAttributeOption1" stepKey="swatchOption1">
25+
<requiredEntity createDataKey="swatchAttribute"/>
26+
</createData>
27+
<createData entity="SwatchProductAttributeOption2" stepKey="swatchOption2">
28+
<requiredEntity createDataKey="swatchAttribute"/>
29+
</createData>
30+
<createData entity="AddToDefaultSet" stepKey="addAttrToDefaultSet">
31+
<requiredEntity createDataKey="swatchAttribute"/>
32+
</createData>
33+
<!-- Resolve option data for use in products and assertions -->
34+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getSwatchOption1">
35+
<requiredEntity createDataKey="swatchAttribute"/>
36+
</getData>
37+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getSwatchOption2">
38+
<requiredEntity createDataKey="swatchAttribute"/>
39+
</getData>
40+
<!-- Pre-condition 1: Create configurable product -->
41+
<createData entity="BaseConfigurableProduct" stepKey="configProduct"/>
42+
<!-- Two child simples assigned attribute value -->
43+
<createData entity="ApiSimpleOne" stepKey="child1">
44+
<requiredEntity createDataKey="swatchAttribute"/>
45+
<requiredEntity createDataKey="getSwatchOption1"/>
46+
</createData>
47+
<createData entity="ApiSimpleTwo" stepKey="child2">
48+
<requiredEntity createDataKey="swatchAttribute"/>
49+
<requiredEntity createDataKey="getSwatchOption2"/>
50+
</createData>
51+
<!-- Apply configurable attribute and add children -->
52+
<createData entity="ConfigurableProductTwoOptions" stepKey="configOptions">
53+
<requiredEntity createDataKey="configProduct"/>
54+
<requiredEntity createDataKey="swatchAttribute"/>
55+
<requiredEntity createDataKey="getSwatchOption1"/>
56+
<requiredEntity createDataKey="getSwatchOption2"/>
57+
</createData>
58+
<createData entity="ConfigurableProductAddChild" stepKey="addChild1">
59+
<requiredEntity createDataKey="configProduct"/>
60+
<requiredEntity createDataKey="child1"/>
61+
</createData>
62+
<createData entity="ConfigurableProductAddChild" stepKey="addChild2">
63+
<requiredEntity createDataKey="configProduct"/>
64+
<requiredEntity createDataKey="child2"/>
65+
</createData>
66+
<!-- Pre-condition 3,4: Ensure Used in product listing is enabled for the swatch attribute -->
67+
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
68+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="openAttrGrid"/>
69+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openSwatchAttribute">
70+
<argument name="productAttributeCode" value="$$swatchAttribute.attribute_code$$"/>
71+
</actionGroup>
72+
<actionGroup ref="AdminUpdateAttributeUsedInProductListingActionGroup" stepKey="setUsedInProductListingToYes"/>
73+
<actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveForYesNoAttribute"/>
74+
</before>
75+
<after>
76+
<!-- Delete products, swatches and logout from admin -->
77+
<deleteData createDataKey="configProduct" stepKey="deleteConfig"/>
78+
<deleteData createDataKey="child1" stepKey="deleteChild1"/>
79+
<deleteData createDataKey="child2" stepKey="deleteChild2"/>
80+
<deleteData createDataKey="swatchAttribute" stepKey="deleteAttribute"/>
81+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
82+
</after>
83+
<!-- Step 1: Go to storefront -->
84+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openHome"/>
85+
<!-- Step 2: Use basic search to find product-->
86+
<actionGroup ref="StoreFrontFillSearchActionGroup" stepKey="fillSearch">
87+
<argument name="query" value="$$configProduct.name$$"/>
88+
</actionGroup>
89+
<waitForElementClickable selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="waitToSubmitSearch"/>
90+
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="submitSearch"/>
91+
<waitForPageLoad stepKey="waitSearchResults"/>
92+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="waitListBasic"/>
93+
<!--Step 2: Assert product is displayed with swatches -->
94+
<waitForText selector="{{StorefrontCategoryMainSection.productName}}" userInput="$$configProduct.name$$" stepKey="seeProductBasic"/>
95+
<waitForElementVisible selector="{{StorefrontCategoryPageProductInfoSection.visualSwatchOption($$configProduct.id$$, $$getSwatchOption1.label$$)}}" stepKey="seeListingSwatchBasic"/>
96+
<waitForElementVisible selector="{{StorefrontCategoryPageProductInfoSection.visualSwatchOption($$configProduct.id$$, $$getSwatchOption2.label$$)}}" stepKey="seeListingSwatch"/>
97+
<!-- Step 3: Use advance search to find product-->
98+
<actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="openAdvancedSearch"/>
99+
<actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="fillAdvancedForm">
100+
<argument name="productName" value="$$configProduct.name$$"/>
101+
<argument name="sku" value="$$configProduct.sku$$"/>
102+
</actionGroup>
103+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="waitListAdvanced"/>
104+
<!-- Step 3: Assert product is displayed with swatches -->
105+
<waitForText selector="{{StorefrontCategoryMainSection.productName}}" userInput="$$configProduct.name$$" stepKey="seeProductAdvanced"/>
106+
<waitForElementVisible selector="{{StorefrontCategoryPageProductInfoSection.visualSwatchOption($$configProduct.id$$, $$getSwatchOption2.label$$)}}" stepKey="seeListingSwatchAdvanced"/>
107+
<waitForElementVisible selector="{{StorefrontCategoryPageProductInfoSection.visualSwatchOption($$configProduct.id$$, $$getSwatchOption1.label$$)}}" stepKey="seeListing1SwatchBasic"/>
108+
</test>
109+
</tests>

app/code/Magento/Swatches/Test/Mftf/test-dependency-allowlist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ ImportProductSimple1_Configurable
99
CatalogWidgetSection
1010
AdminFillCatalogProductsListWidgetCategoryActionGroup
1111
textSwatch1
12+
StoreFrontFillSearchActionGroup
13+
StorefrontOpenAdvancedSearchActionGroup
14+
StorefrontFillFormAdvancedSearchActionGroup

0 commit comments

Comments
 (0)