Skip to content

Commit 15c5cee

Browse files
committed
Merge branch '2.4-develop' of https://github.com/magento-commerce/magento2ce into ACP2E-4194
2 parents f835179 + b1846f1 commit 15c5cee

14 files changed

+511
-20
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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="AdminVerifySubTotalRoundingForDecimalQuantityEnabledTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Decimal quantity product subtotal and order total validation"/>
15+
<title value="Verify subtotal and order total for decimal enabled product"/>
16+
<description value="Checks that subtotal and order total are correct for a product with decimal quantity and no rounding issues."/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-10575"/>
19+
<group value="catalog"/>
20+
</annotations>
21+
<before>
22+
<!--Pre-condition 1: Create customer -->
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
24+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
25+
<argument name="Customer" value="$$createCustomer$$"/>
26+
</actionGroup>
27+
<!-- Admin login -->
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
<!--Step1: Set notify for quantity below = 0.5 in config -->
30+
<actionGroup ref="AdminNavigateToProductStockOptionsFeatureActionGroup" stepKey="navigateToProductStockOptions"/>
31+
<actionGroup ref="AdminInProductStockOptionsFeatureSetNotifyForQuantityBelowActionGroup" stepKey="setNotifyQtyBelow">
32+
<argument name="quantityValue" value="0.5"/>
33+
</actionGroup>
34+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
35+
<!-- Step 2: Create product with price 20.67 -->
36+
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
37+
<field key="price">20.67</field>
38+
</createData>
39+
</before>
40+
<after>
41+
<!-- Logout from storefront -->
42+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
43+
<!-- Delete customer,product -->
44+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
45+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
46+
<!-- Reset notify for quantity below -->
47+
<actionGroup ref="AdminNavigateToProductStockOptionsFeatureActionGroup" stepKey="navigateToProductStockOption"/>
48+
<actionGroup ref="AdminInProductStockOptionsFeatureResetNotifyForQuantityBelowActionGroup" stepKey="resetNotifyForQuantityBelow"/>
49+
<!-- Admin logout -->
50+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
51+
</after>
52+
<!-- Open Product page by id -->
53+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
54+
<argument name="productId" value="$$createSimpleProduct.id$$"/>
55+
</actionGroup>
56+
<!-- Step 2: Add quantity of product with 1.5 -->
57+
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="1.5" stepKey="seeProductQuantity"/>
58+
<!--Step 2: Open advanced inventory Section -->
59+
<actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/>
60+
<!-- Step 2: Set decimal quantity to yes -->
61+
<actionGroup ref="AdminSetQtyUsesDecimalsConfigActionGroup" stepKey="setQtyUsesDecimalsConfig">
62+
<argument name="value" value="Yes"/>
63+
</actionGroup>
64+
<!-- Step 2: Set minimum allowed quantity as 0.5 -->
65+
<actionGroup ref="AdminSetMinAllowedQtyForProductActionGroup" stepKey="fillMiniAllowedQty">
66+
<argument name="qty" value="0.5"/>
67+
</actionGroup>
68+
<!-- Step 2: Click on done button -->
69+
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/>
70+
<!-- Step 2: Click on save button -->
71+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/>
72+
<!-- Step 3: Navigate to product page on storefront -->
73+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
74+
<argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/>
75+
</actionGroup>
76+
<!-- Step 3: Add product to cart -->
77+
<actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToCart">
78+
<argument name="productName" value="$$createSimpleProduct.name$$"/>
79+
</actionGroup>
80+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="amOnPageShoppingCart"/>
81+
<!-- Step 3: Assert subtotal and grand total -->
82+
<waitForPageLoad stepKey="waitForPriceLoad"/>
83+
<waitForText selector="{{StorefrontProductPageSection.subTotal}}" userInput="$10.34" stepKey="seeSubTotal"/>
84+
<waitForText selector="{{StorefrontProductPageSection.orderTotal}}" userInput="$12.84" stepKey="seeOrderTotal"/>
85+
<!-- Step 4: Proceed to checkout, place order and verify order placed successfully -->
86+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
87+
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
88+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToPaymentPage"/>
89+
<waitForPageLoad stepKey="waitForPaymentPageToLoad"/>
90+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
91+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder">
92+
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
93+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
94+
</actionGroup>
95+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
96+
<!-- Step 5: In admin check order details total in created order and verify no subtotal rounding issues for decimal enabled product -->
97+
<actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="addFilterToGridAndOpenOrder">
98+
<argument name="entityId" value="{$grabOrderNumber}"/>
99+
</actionGroup>
100+
<actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal">
101+
<argument name="subtotal" value="$10.34"/>
102+
<argument name="shippingAndHandling" value="$2.50"/>
103+
<argument name="grandTotal" value="$12.84"/>
104+
</actionGroup>
105+
</test>
106+
</tests>

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,26 @@
112112

113113
<!-- Click on reviews and add 2 reviews with current user -->
114114
<actionGroup ref="StorefrontAddProductReviewActionGroup" stepKey="addFirstReview"/>
115+
<wait time="10" stepKey="waitBeforeAddSecondReview"/>
115116
<actionGroup ref="StorefrontAddProductReviewActionGroup" stepKey="addSecondReview"/>
116117

117118
<!-- Go to Pending reviews page and clear filters -->
118119
<actionGroup ref="AdminOpenPendingReviewsPageActionGroup" stepKey="openReviewsPage"/>
119120
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/>
120-
121121
<!-- Moderate first product reviews: change review status from pending to approved, save -->
122-
<actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openFirstCustomerReviews"/>
122+
<actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openFirstCustomerReviews">
123+
<argument name="nickname" value="{{simpleProductReview.nickname}}"/>
124+
</actionGroup>
123125
<actionGroup ref="AdminChangeReviewStatusActionGroup" stepKey="changeFirstReviewStatus"/>
124126
<actionGroup ref="AdminSaveReviewActionGroup" stepKey="saveModeratedFirstReview"/>
125127
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cacheClean">
126128
<argument name="tags" value="config"/>
127129
</actionGroup>
128-
129130
<!-- Moderate second product reviews: change review status from pending to approved, save -->
130131
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
131-
<actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openSecondCustomerReviews"/>
132+
<actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openSecondCustomerReviews">
133+
<argument name="nickname" value="{{simpleProductReview.nickname}}"/>
134+
</actionGroup>
132135
<actionGroup ref="AdminChangeReviewStatusActionGroup" stepKey="changeSecondReviewStatus"/>
133136
<actionGroup ref="AdminSaveReviewActionGroup" stepKey="saveModeratedSecondReview"/>
134137

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@
138138
<generateDate date="-1 day" format="m/d/Y" stepKey="generateYesterdayDate"/>
139139
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageToEditProduct1"/>
140140
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/>
141+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct1">
142+
<argument name="product" value="$$createSimpleProduct1$$"/>
143+
</actionGroup>
141144
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditSimpleProduct1">
142145
<argument name="product" value="$$createSimpleProduct1$$"/>
143146
</actionGroup>
@@ -149,6 +152,9 @@
149152
<conditionalClick selector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','1')}}" dependentSelector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','1')}}" visible="true" stepKey="selectNoForCustomYesNoAttributeForSimpleProduct1"/>
150153
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct1"/>
151154
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageToEditProduct2"/>
155+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct2">
156+
<argument name="product" value="$$createSimpleProduct2$$"/>
157+
</actionGroup>
152158
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditSimpleProduct2">
153159
<argument name="product" value="$$createSimpleProduct2$$"/>
154160
</actionGroup>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminInProductStockOptionsFeatureResetNotifyForQuantityBelowActionGroup">
12+
<annotations>
13+
<description>In product stock options feature reset notify for quantity below</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="quantityValue" type="string" defaultValue="1"/>
17+
</arguments>
18+
<scrollTo selector="{{AdminInventoryProductStockOptionsConfigSection.notifyQty}}" x="0" y="-80" stepKey="scrollToNotifyQuantityField"/>
19+
<fillField selector="{{AdminInventoryProductStockOptionsConfigSection.notifyQty}}" userInput="{{quantityValue}}" stepKey="resetNotifyForQtyBelow"/>
20+
<checkOption selector="{{AdminInventoryProductStockOptionsConfigSection.systemValue}}" stepKey="checkUseDefaultValue"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminInProductStockOptionsFeatureSetNotifyForQuantityBelowActionGroup">
12+
<annotations>
13+
<description>In product stock options feature set notify for quantity below</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="quantityValue" type="string" defaultValue="1"/>
17+
</arguments>
18+
<scrollTo selector="{{AdminInventoryProductStockOptionsConfigSection.notifyQty}}" x="0" y="-80" stepKey="scrollToNotifyQuantityFieldToSetValue"/>
19+
<uncheckOption selector="{{AdminInventoryProductStockOptionsConfigSection.systemValue}}" stepKey="uncheckUseDefaultValue"/>
20+
<fillField selector="{{AdminInventoryProductStockOptionsConfigSection.notifyQty}}" userInput="{{quantityValue}}" stepKey="setNotifyForQtyBelow"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AdminNavigateToProductStockOptionsFeatureActionGroup">
12+
<annotations>
13+
<description>In admin navigate to product stock options feature</description>
14+
</annotations>
15+
<amOnPage url="{{AdminInventoryProductStockOptionsConfigPage.url}}" stepKey="openProductStockOptions"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminEnableDisableLoginOnCheckoutActionGroup">
12+
<annotations>
13+
<description>Enable or disable customer login on the checkout page by passing the value 1 to enable and 0 to disable.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="enableDisableValue" type="string"/>
17+
</arguments>
18+
<magentoCLI command="config:set checkout/options/enable_guest_checkout_login {{enableDisableValue}}" stepKey="disableGuestCheckoutLogin"/>
19+
</actionGroup>
20+
</actionGroups>

0 commit comments

Comments
 (0)