Skip to content

Commit 9df21f6

Browse files
Merge branch 'ACQE-8196' into ACQE-functional-deployment-version8
2 parents e995df2 + 0e850cc commit 9df21f6

File tree

6 files changed

+166
-12
lines changed

6 files changed

+166
-12
lines changed

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>
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>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="AddDownloadableDomainActionGroup">
11+
<annotations>
12+
<description>Whitelist downloadable product creation through Api domain</description>
13+
</annotations>
14+
<magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add static.magento.com"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="RemoveDownloadableDomainActionGroup">
11+
<annotations>
12+
<description>Disable downloadable product creation Api domain</description>
13+
</annotations>
14+
<magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove static.magento.com"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
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 2025 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
8-
98
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1110
<actionGroup name="StorefrontCustomerUpdateWishlistItemActionGroup">
@@ -19,7 +18,7 @@
1918
<waitForElementVisible selector="{{StorefrontCustomerWishlistProductSection.ProductInfoByName(productName)}}" stepKey="waitForProductInfo"/>
2019
<scrollTo selector="{{StorefrontCustomerWishlistProductSection.ProductInfoByName(productName)}}" stepKey="scrollToProduct"/>
2120
<moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.ProductInfoByName(productName)}}" stepKey="mouseOverOnProduct"/>
22-
<click selector="{{StorefrontCustomerWishlistProductSection.editProduct}}" stepKey="clickEditButton"/>
21+
<click selector="{{StorefrontCustomerWishlistProductSection.editProduct(productName)}}" stepKey="clickEditButton"/>
2322
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productAddToWishlist}}" stepKey="waitForProductPageLoad"/>
2423
</actionGroup>
2524
</actionGroups>

app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
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 2025 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
8-
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1110
<section name="StorefrontCustomerWishlistProductSection">
@@ -26,7 +25,7 @@
2625
<element name="pager" type="block" selector=".toolbar .pager"/>
2726
<element name="wishlistEmpty" type="block" selector=".form-wishlist-items .message.info.empty"/>
2827
<element name="removeProduct" type="button" selector=".products-grid a.btn-remove" timeout="30"/>
29-
<element name="editProduct" type="button" selector=".products-grid a.action.edit" timeout="30"/>
28+
<element name="editProduct" type="button" selector="//main//li[.//a[contains(@title, '{{productName}}')]]//div[@class='product-item-actions']//a[@class='action-edit' or (contains(@class, 'action') and contains(@class, 'edit'))]" parameterized="true"/>
3029
<element name="productSeeDetailsByName" type="block" selector="//a[contains(text(), '{{productName}}')]/ancestor::div/div[contains(@class, 'product-item-tooltip')]" parameterized="true"/>
3130
<element name="productSeeDetailsLabelByName" type="block" selector="//a[contains(text(), '{{productName}}')]/ancestor::div/div[contains(@class, 'product-item-tooltip')]//dt[@class='label']" parameterized="true"/>
3231
<element name="productSeeDetailsValueByName" type="block" selector="//a[contains(text(), '{{productName}}')]/ancestor::div/div[contains(@class, 'product-item-tooltip')]//dd[@class='values']" parameterized="true"/>

0 commit comments

Comments
 (0)