Skip to content

Commit 3641e45

Browse files
authored
Merge pull request #9891 from magento-gl/ACQE-functional-deployment-v1
2 parents 03340a1 + 98af839 commit 3641e45

14 files changed

+227
-26
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
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="priceAsLowAsLabelByProductId" type="text" selector="div[data-product-id='{{id}}'] p.minimal-price span.price-container > span.price-label" parameterized="true"/>
15+
<element name="priceAsLowAsFinalPriceByProductId" type="text" selector="div[data-product-id='{{id}}'] p.minimal-price span.price-container > span.price-wrapper > span.price" parameterized="true"/>
16+
<element name="oldPriceByProductId" type="text" selector="div[data-product-id='{{id}}'] .old-price" parameterized="true"/>
1417
<element name="priceToByProductSku" type="text" selector="//li[.//form[@data-product-sku='{{sku}}']]//p[contains(@class,'price-to')]" parameterized="true"/>
1518
</section>
1619
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="priceTo" type="text" selector=".product-info-price .price-to"/>
1414
<element name="minPrice" type="text" selector="span[data-price-type='minPrice']"/>
1515
<element name="maxPrice" type="text" selector="span[data-price-type='minPrice']"/>
16+
<element name="asLowAsFinalPriceLabel" type="text" selector="div.price-box.price-final_price p.minimal-price > span.price-final_price span.price-label"/>
1617
<element name="asLowAsFinalPrice" type="text" selector="div.price-box.price-final_price p.minimal-price > span.price-final_price span.price"/>
1718
<element name="fixedFinalPrice" type="text" selector="div.price-box.price-final_price span.price-final_price span.price-wrapper span.price"/>
1819
<element name="productBundleOptionsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{childName}}')]/../input" parameterized="true" timeout="30"/>
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
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="StorefrontCheckPriceForFixedBundleProductWithCatalogRuleTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="View bundle product price"/>
15+
<title value="Check prices for bundle product with catalog rule"/>
16+
<description value="To Verify Catalog Rules Prices for Fixed Bundle Product on Storefront"/>
17+
<testCaseId value="AC-3973"/>
18+
<severity value="MAJOR"/>
19+
</annotations>
20+
<before>
21+
<!-- Precondition step1,2: create category, catalog rule price with data and apply to products -->
22+
<createData entity="_defaultCategory" stepKey="category1"/>
23+
<!-- login to backend -->
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="clearExistingCatalogPriceRules"/>
26+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="openNewCatalogPriceRulePage"/>
27+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForCatalogPriceRule"/>
28+
<actionGroup ref="AdminFillCatalogRuleConditionActionGroup" stepKey="fillConditionsForCatalogPriceRule">
29+
<argument name="conditionValue" value="$category1.id$"/>
30+
</actionGroup>
31+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForCatalogPriceRule">
32+
<argument name="apply" value="by_percent"/>
33+
<argument name="discountAmount" value="10"/>
34+
</actionGroup>
35+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyFirstPriceRule"/>
36+
<!-- Precondition step3: create 6 simple products -->
37+
<!-- Precondition step3.1: create first product -->
38+
<createData entity="_defaultProduct" stepKey="firstProduct">
39+
<field key="price">10.25</field>
40+
<field key="quantity">100</field>
41+
<requiredEntity createDataKey="category1"/>
42+
</createData>
43+
<!-- Precondition step3.2: create second product -->
44+
<createData entity="_defaultProduct" stepKey="secondProduct">
45+
<field key="price">15.50</field>
46+
<field key="status">0</field>
47+
<field key="quantity">100</field>
48+
<requiredEntity createDataKey="category1"/>
49+
</createData>
50+
<!-- Precondition step3.3: create third product -->
51+
<createData entity="_defaultProduct" stepKey="thirdProduct">
52+
<field key="price">20.75</field>
53+
<field key="quantity">100</field>
54+
<requiredEntity createDataKey="category1"/>
55+
</createData>
56+
<!-- Precondition step3.4: create fourth product -->
57+
<createData entity="_defaultProduct" stepKey="fourthProduct">
58+
<field key="price">25.15</field>
59+
<field key="quantity">100</field>
60+
<requiredEntity createDataKey="category1"/>
61+
</createData>
62+
<!-- Precondition step3.5: create fifth product -->
63+
<createData entity="_defaultProduct" stepKey="fifthProduct">
64+
<field key="price">30.45</field>
65+
<field key="status">0</field>
66+
<field key="quantity">100</field>
67+
<requiredEntity createDataKey="category1"/>
68+
</createData>
69+
<!-- Precondition step3.6: create sixth product -->
70+
<createData entity="_defaultProduct" stepKey="sixthProduct">
71+
<field key="price">35.65</field>
72+
<field key="quantity">100</field>
73+
<requiredEntity createDataKey="category1"/>
74+
</createData>
75+
<!-- Precondition step4: Create Bundle product -->
76+
<createData entity="FixedBundleProduct" stepKey="createFixedBundleProduct">
77+
<requiredEntity createDataKey="category1"/>
78+
<field key="price">110.25</field>
79+
</createData>
80+
<!-- Precondition step4.6: Add options to the product -->
81+
<createData entity="MultipleSelectOption" stepKey="createBundleOption1_1">
82+
<requiredEntity createDataKey="createFixedBundleProduct"/>
83+
<field key="required">true</field>
84+
</createData>
85+
<createData entity="DropDownBundleOption" stepKey="createBundleOption1_2">
86+
<requiredEntity createDataKey="createFixedBundleProduct"/>
87+
<field key="required">false</field>
88+
</createData>
89+
<!-- Precondition step4.6.1: add products to multiselect option -->
90+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToFirstProduct">
91+
<requiredEntity createDataKey="createFixedBundleProduct"/>
92+
<requiredEntity createDataKey="createBundleOption1_1"/>
93+
<requiredEntity createDataKey="firstProduct"/>
94+
<field key="qty">2</field>
95+
<field key="price">25.15</field>
96+
</createData>
97+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToSecondProduct">
98+
<requiredEntity createDataKey="createFixedBundleProduct"/>
99+
<requiredEntity createDataKey="createBundleOption1_1"/>
100+
<requiredEntity createDataKey="secondProduct"/>
101+
<field key="qty">5</field>
102+
<field key="price">5</field>
103+
<field key="price_type">1</field>
104+
</createData>
105+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToThirdProduct">
106+
<requiredEntity createDataKey="createFixedBundleProduct"/>
107+
<requiredEntity createDataKey="createBundleOption1_1"/>
108+
<requiredEntity createDataKey="thirdProduct"/>
109+
<field key="qty">2</field>
110+
<field key="price">30</field>
111+
<field key="price_type">1</field>
112+
</createData>
113+
<!-- Precondition step4.6.2: add products to single select option -->
114+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToFourthProduct">
115+
<requiredEntity createDataKey="createFixedBundleProduct"/>
116+
<requiredEntity createDataKey="createBundleOption1_2"/>
117+
<requiredEntity createDataKey="fourthProduct"/>
118+
<field key="qty">2</field>
119+
<field key="price">10</field>
120+
<field key="price_type">1</field>
121+
</createData>
122+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToFifthProduct">
123+
<requiredEntity createDataKey="createFixedBundleProduct"/>
124+
<requiredEntity createDataKey="createBundleOption1_2"/>
125+
<requiredEntity createDataKey="fifthProduct"/>
126+
<field key="qty">5</field>
127+
<field key="price">20.55</field>
128+
</createData>
129+
<createData entity="ApiBundleLinkFixed" stepKey="linkOptionToSixthProduct">
130+
<requiredEntity createDataKey="createFixedBundleProduct"/>
131+
<requiredEntity createDataKey="createBundleOption1_2"/>
132+
<requiredEntity createDataKey="sixthProduct"/>
133+
<field key="qty">1</field>
134+
<field key="price">45</field>
135+
<field key="price_type">1</field>
136+
</createData>
137+
</before>
138+
<after>
139+
<!-- delete created product data -->
140+
<deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/>
141+
<deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/>
142+
<deleteData createDataKey="thirdProduct" stepKey="deleteThirdProduct"/>
143+
<deleteData createDataKey="fourthProduct" stepKey="deleteFourthProduct"/>
144+
<deleteData createDataKey="fifthProduct" stepKey="deleteFifthProduct"/>
145+
<deleteData createDataKey="sixthProduct" stepKey="deleteSixthProduct"/>
146+
<!-- delete created bundle product and catalog rule -->
147+
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/>
148+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteCatalogPriceRules"/>
149+
<!-- logout admin -->
150+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
151+
</after>
152+
<!-- check product prices on category and product page -->
153+
<!-- step1: Go to storefront category page -->
154+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="amOnCategoryPage">
155+
<argument name="category" value="$$category1$$"/>
156+
</actionGroup>
157+
<!-- step2: check price for fixed bundled on category page -->
158+
<grabTextFrom selector="{{StorefrontCategoryProductSection.priceAsLowAsFinalPriceByProductId($$createFixedBundleProduct.id$$)}}" stepKey="grabProductFinalPriceOnCategory"/>
159+
<assertEquals message="ExpectedFinalPriceOnCategory" stepKey="assertBundleProductFinalPriceOnCategory">
160+
<actualResult type="variable">grabProductFinalPriceOnCategory</actualResult>
161+
<expectedResult type="string">$149.53</expectedResult>
162+
</assertEquals>
163+
<grabTextFrom selector="{{StorefrontCategoryProductSection.oldPriceByProductId($$createFixedBundleProduct.id$$)}}" stepKey="grabProductOldPriceOnCategory"/>
164+
<assertEquals message="ExpectedOldPriceOnCategory" stepKey="assertBundleProductOldPriceOnCategory">
165+
<actualResult type="variable">grabProductOldPriceOnCategory</actualResult>
166+
<expectedResult type="string">Regular Price $160.55</expectedResult>
167+
</assertEquals>
168+
<grabTextFrom selector="{{StorefrontCategoryProductSection.priceAsLowAsLabelByProductId($$createFixedBundleProduct.id$$)}}" stepKey="grabProductFinalPriceLabelOnCategory"/>
169+
<assertEquals message="ExpectedFinalPriceLabelOnCategory" stepKey="assertBundleProductFinalPriceLabelOnCategory">
170+
<actualResult type="variable">grabProductFinalPriceLabelOnCategory</actualResult>
171+
<expectedResult type="string">As low as</expectedResult>
172+
</assertEquals>
173+
<!-- step3: Go to fixed bundled product page -->
174+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openBundleProductPage">
175+
<argument name="productUrl" value="$$createFixedBundleProduct.custom_attributes[url_key]$$"/>
176+
</actionGroup>
177+
<!-- step4: check price for fixed Bundle on product page -->
178+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.oldPrice}}" stepKey="grabProductOldPrice"/>
179+
<assertEquals message="ExpectedOldPrice" stepKey="assertBundleProductOldPrice">
180+
<actualResult type="variable">grabProductOldPrice</actualResult>
181+
<expectedResult type="string">Regular Price $160.55</expectedResult>
182+
</assertEquals>
183+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.asLowAsFinalPrice}}" stepKey="grabProductFinalPrice"/>
184+
<assertEquals message="ExpectedFinalPrice" stepKey="assertBundleProductPrice">
185+
<actualResult type="variable">grabProductFinalPrice</actualResult>
186+
<expectedResult type="string">$149.53</expectedResult>
187+
</assertEquals>
188+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.asLowAsFinalPriceLabel}}" stepKey="grabProductPriceLabel"/>
189+
<assertEquals message="ExpectedPriceLabel" stepKey="assertProductPriceLabel">
190+
<actualResult type="variable">grabProductPriceLabel</actualResult>
191+
<expectedResult type="string">As low as</expectedResult>
192+
</assertEquals>
193+
</test>
194+
</tests>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/CreatePayPalOrderWithSelectedPaymentMethodActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2019 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

app/code/Magento/Paypal/Test/Mftf/ActionGroup/DummyDataActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<waitForPageLoad stepKey="waitForPayPalPageToLoad"/>
1717
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForEmailField" />
1818
<fillField selector="{{PayPalPaymentSection.email}}" userInput="[email protected]" stepKey="fillEmail"/>
19+
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
1920
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordFieldToBeVisible" />
2021
<fillField selector="{{PayPalPaymentSection.password}}" userInput="123123qQ1" stepKey="fillPassword"/>
2122
<waitForElementClickable selector="{{PayPalPaymentSection.loginBtn}}" stepKey="waitForLoginField"/>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalExpressCheckoutPayFlowEditionActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -19,6 +19,7 @@
1919
<waitForPageLoad stepKey="waitForPayPalPageToLoad"/>
2020
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForEmailField" />
2121
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/>
22+
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
2223
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordFieldToBeVisible" />
2324
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>
2425
<waitForElementClickable selector="{{PayPalPaymentSection.loginBtn}}" stepKey="waitForLoginField"/>

app/code/Magento/Paypal/Test/Mftf/Section/CheckoutPaymentSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<element name="productQuantityInCartBlock" type="text" selector="//div[@class='details-qty']/span[@class='value']" />
7575
<element name="productChargedFor" type="text" selector="tr.totals.charge span.price"/>
7676
<element name="productCharged" type="text" selector="//tr[@class='grand totals']//span[@class='price' and contains(text(),'HK$')]"/>
77-
<element name="reviewOrder" type="button" selector="//div//button[text()='Continue to Review Order']"/>
77+
<element name="reviewOrder" type="button" selector="//button[.//span[normalize-space(text())='Review Order']]"/>
7878
<element name="checkoutWithPaypal" type="button" selector="(//div[@class='cart-container']//input[@data-action='checkout-form-submit'])[1]" timeout="30"/>
7979
</section>
8080
</sections>

0 commit comments

Comments
 (0)