Skip to content

Commit 2ce2683

Browse files
authored
Merge branch '2.4-develop' into issues/39513_fix-admin-grid-filter-backslash-escaping-issue
2 parents 8ff1ce9 + 536edc2 commit 2ce2683

19 files changed

+727
-26
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminCustomizableOptionWithFixedPriceActionGroup" extends="AdminCustomizableOptionWithOneOptionActionGroup">
12+
<remove keyForRemoval="clickPriceType"/>
13+
<remove keyForRemoval="selectPercent"/>
14+
</actionGroup>
15+
</actionGroups>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
<element name="dropdownProductSelection" type="select" selector="//div[@class='control']/select/option[contains(.,'{{productName}}')]" parameterized="true"/>
1616
<element name="customOptionField" type="select" selector="[class='input-text product-custom-option']"/>
1717
<element name="bundleOption" type="text" selector="//select[contains(@class, 'bundle-option')]/option[contains(text(),'{{productName}}')]" parameterized="true"/>
18+
<element name="updateWishList" type="button" selector="a.action.towishlist.updated" timeout="30"/>
19+
<element name="skuField" type="input" selector=".product.attribute.sku"/>
1820
</section>
1921
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontCategoryProductSection">
1212
<element name="priceToByProductId" type="text" selector="div[data-product-id='{{id}}'] .price-to" parameterized="true"/>
1313
<element name="priceFromByProductId" type="text" selector="div[data-product-id='{{id}}'] .price-from" parameterized="true"/>
14+
<element name="priceToByProductSku" type="text" selector="//li[.//form[@data-product-sku='{{sku}}']]//p[contains(@class,'price-to')]" parameterized="true"/>
1415
</section>
1516
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
/**
5+
* Copyright 2025 Adobe
6+
* All Rights Reserved.
7+
*/
8+
-->
9+
10+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
12+
<test name="StorefrontVerifyCatalogRuleOnFixedBundleProductWithCustomOptionsTest">
13+
<annotations>
14+
<features value="Bundle"/>
15+
<stories value="Catalog Price Rules on Bundle Products"/>
16+
<title value="Apply Catalog Rule to Fixed Bundle Product with Custom Options"/>
17+
<description value="Verify that a catalog price rule is correctly applied to a fixed-price bundle product that includes custom options and tier pricing"/>
18+
<severity value="MAJOR"/>
19+
<testCaseId value="AC-4474"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition Step: Create Category and Simple Product -->
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="_defaultProduct" stepKey="simpleProduct">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
<!-- Login as Admin -->
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
<!-- Create Bundle product via Admin -->
30+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
31+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
32+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
33+
<argument name="product" value="BundleProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="AdminToggleSwitchDynamicPriceOnProductEditPageActionGroup" stepKey="clickDynamicPriceSwitcher"/>
36+
<fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="110" stepKey="fillBundlePrice"/>
37+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/>
38+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainFieldsForBundle"/>
39+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption1">
40+
<argument name="x" value="0"/>
41+
<argument name="n" value="1"/>
42+
<argument name="prodOneSku" value="$simpleProduct.sku$"/>
43+
<argument name="prodTwoSku" value=""/>
44+
<argument name="optionTitle" value="Option1"/>
45+
<argument name="inputType" value="radio"/>
46+
</actionGroup>
47+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYPrice('0', '0')}}" userInput="5" stepKey="fillBundleOption1Price"/>
48+
<selectOption selector="{{AdminProductFormBundleSection.bundlePriceType}}" userInput="Fixed" stepKey="selectPercentPrice"/>
49+
<click selector="{{AdminProductFormBundleSection.isDefault('$$simpleProduct.name$$')}}" stepKey="clickIsDefault"/>
50+
<!-- fill customizable options -->
51+
<actionGroup ref="AdminCustomizableOptionWithFixedPriceActionGroup" stepKey="addCustomOption"/>
52+
<!--Save the product-->
53+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
54+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
55+
<argument name="message" value="You saved the product."/>
56+
</actionGroup>
57+
<!-- Begin creating a new catalog price rule -->
58+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="openNewCatalogPriceRulePage"/>
59+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForCatalogPriceRule">
60+
<argument name="groups" value="'NOT LOGGED IN'"/>
61+
</actionGroup>
62+
<actionGroup ref="AdminFillCatalogRuleConditionActionGroup" stepKey="fillConditionsForCatalogPriceRule">
63+
<argument name="conditionValue" value="$createCategory.id$"/>
64+
</actionGroup>
65+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForCatalogPriceRule">
66+
<argument name="apply" value="by_percent"/>
67+
<argument name="discountAmount" value="10"/>
68+
</actionGroup>
69+
<!-- Save Catalog rule -->
70+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
71+
</before>
72+
<after>
73+
<!-- Delete bundle product -->
74+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
75+
<argument name="product" value="BundleProduct"/>
76+
</actionGroup>
77+
<!-- Delete the catalog price rule -->
78+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogRulesAfterTest"/>
79+
<!-- Delete category, simple products -->
80+
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
81+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
82+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
83+
</after>
84+
<!-- Step 1: Navigate to the category page and verify the bundle product price -->
85+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToStorefrontCategoryPage">
86+
<argument name="category" value="$createCategory$"/>
87+
</actionGroup>
88+
<waitForText selector="{{StorefrontCategoryProductSection.priceToByProductSku(BundleProduct.sku)}}" userInput="$134.00" stepKey="seePriceOnCategoryPage"/>
89+
<!-- Step 2: Navigate to the product page and verify the bundle product price -->
90+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
91+
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
92+
</actionGroup>
93+
<waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$134.00" stepKey="seePriceOnProductPage"/>
94+
<!-- Step 3: Click the "Customize and Add to Cart" button -->
95+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
96+
<!-- Step 4: Enter the word "ok" in the option field, click the "Add to Cart" button, and verify the bundle product price -->
97+
<fillField selector="{{StorefrontBundleProductActionSection.customOptionField}}" userInput="ok" stepKey="fillCustomOption"/>
98+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickAddToCartButton"/>
99+
<waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$134.00" stepKey="verifyConfiguredPrice"/>
100+
</test>
101+
</tests>
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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="StorefrontVerifyBundleAndDownloadableProductPageLayoutTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Product Page Layout"/>
14+
<title value="Verify Bundle and Downloadable product pages layout"/>
15+
<description value="To verify Bundle and Downloadable product pages layout"/>
16+
<testCaseId value="AC-13423"/>
17+
<severity value="AVERAGE"/>
18+
<group value="catalog"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AddDownloadableDomainActionGroup" stepKey="addDownloadableDomain"/>
22+
<!-- Login as Admin -->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
<!-- Create customer on Storefront and bundle, downloadable product-->
25+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
26+
<createData entity="CustomerEntityOne" stepKey="createCustomerViaTheStorefront"/>
27+
<createData entity="_defaultProduct" stepKey="createSimpleProduct1">
28+
<requiredEntity createDataKey="createCategory"/>
29+
</createData>
30+
<createData entity="_defaultProduct" stepKey="createSimpleProduct2">
31+
<requiredEntity createDataKey="createCategory"/>
32+
</createData>
33+
<createData entity="ApiBundleProductPriceViewRange" stepKey="bundleProduct">
34+
<requiredEntity createDataKey="createCategory"/>
35+
</createData>
36+
<createData entity="ApiDownloadableProduct" stepKey="downloadableProduct"/>
37+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
38+
<requiredEntity createDataKey="downloadableProduct"/>
39+
</createData>
40+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
41+
<requiredEntity createDataKey="downloadableProduct"/>
42+
</createData>
43+
<!-- Create Attribute -->
44+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
45+
<requiredEntity createDataKey="bundleProduct"/>
46+
</createData>
47+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
48+
<requiredEntity createDataKey="bundleProduct"/>
49+
<requiredEntity createDataKey="bundleOption"/>
50+
<requiredEntity createDataKey="createSimpleProduct1"/>
51+
</createData>
52+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
53+
<requiredEntity createDataKey="bundleProduct"/>
54+
<requiredEntity createDataKey="bundleOption"/>
55+
<requiredEntity createDataKey="createSimpleProduct2"/>
56+
</createData>
57+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
58+
<argument name="productId" value="$$bundleProduct.id$$"/>
59+
</actionGroup>
60+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
61+
</before>
62+
<after>
63+
<!-- Delete created data -->
64+
<actionGroup ref="RemoveDownloadableDomainActionGroup" stepKey="removeDownloadableDomain"/>
65+
<createData entity="SimpleSubCategory" stepKey="deleteCreateCategory"/>
66+
<deleteData createDataKey="createCustomerViaTheStorefront" stepKey="deleteCustomerViaTheStorefront"/>
67+
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
68+
<deleteData createDataKey="downloadableProduct" stepKey="deleteDownloadableProduct"/>
69+
<!-- Log out -->
70+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
71+
</after>
72+
<!-- Pre-condition 1: Login to the storefront as customer -->
73+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
74+
<argument name="Customer" value="$$createCustomerViaTheStorefront$$"/>
75+
</actionGroup>
76+
<!-- Step 1: Open the bundle product page -->
77+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openBundleProductPage">
78+
<argument name="productUrl" value="$bundleProduct.custom_attributes[url_key]$"/>
79+
</actionGroup>
80+
<waitForPageLoad stepKey="waitForProductPage"/>
81+
<!-- Step 2: Add bundle product page to the wishlist -->
82+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
83+
<argument name="productVar" value="$$bundleProduct$$"/>
84+
</actionGroup>
85+
<!-- Click on the bundle product edit icon, and check the bundle product page layout -->
86+
<actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItem">
87+
<argument name="productName" value="$$bundleProduct.name$$"/>
88+
</actionGroup>
89+
<waitForPageLoad stepKey="waitForPageLoad"/>
90+
<scrollToTopOfPage stepKey="scrollToTop"/>
91+
<!-- Verify if bundle product page layout is not getting break with some element present on page -->
92+
<waitForElementVisible selector="{{StorefrontBundledSection.bundleProductName}}" stepKey="LookingForNameOfProduct" />
93+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.updateWishList}}" stepKey="waitForProductUpdateWishlistBtnVisible"/>
94+
<waitForElementVisible selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="LookingFoPriceOfProduct" />
95+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="waitForCustomizeAndAddToCartButton"/>
96+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.skuField}}" stepKey="LookingFoSkuOfProduct"/>
97+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.fixedFinalPrice}}" stepKey="seeBundleProductPrice"/>
98+
<!-- Step 3: Open the downloadable product page -->
99+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
100+
<argument name="productUrl" value="$downloadableProduct.custom_attributes[url_key]$"/>
101+
</actionGroup>
102+
<waitForPageLoad stepKey="waitForPageLoadAgain"/>
103+
<!-- Step 3.1: Add downloadable product page to the wishlist -->
104+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToDownloadableWishlistProduct">
105+
<argument name="productVar" value="$$downloadableProduct$$"/>
106+
</actionGroup>
107+
<!-- Click on the downloadable product edit icon, and check the downloadable product page layout -->
108+
<actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditDownloadableWishlistItem">
109+
<argument name="productName" value="$downloadableProduct.name$"/>
110+
</actionGroup>
111+
<waitForPageLoad stepKey="waitForPageLoadAgain2"/>
112+
<scrollToTopOfPage stepKey="scrollToTopAgain"/>
113+
<!-- Verify if downloadable product page layout is not getting break with some element present on page -->
114+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeStorefrontDownloadableProductsProductName"/>
115+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="seeStorefrontDownloadableProductsProductSku"/>
116+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.fixedFinalPrice}}" stepKey="seeDownloadableProductPrice"/>
117+
<!-- Check for Downloadable Links -->
118+
<actionGroup ref="AssertStorefrontLinkOnDownloadableProductPageActionGroup" stepKey="seeFirstLink">
119+
<argument name="linkTitle" value="{{ApiDownloadableLink.title}}"/>
120+
</actionGroup>
121+
</test>
122+
</tests>

0 commit comments

Comments
 (0)