Skip to content

Commit e434bad

Browse files
Merge branch '2.4-develop' into spartans_pr_19112025
2 parents 66fb419 + 5044c28 commit e434bad

File tree

31 files changed

+1945
-20
lines changed

31 files changed

+1945
-20
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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="AdminDisableJsBundlingAndCreateProductTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Preconditions for JS Bundling and Product"/>
15+
<title value="Disable JS bundling and create simple product along with/without custom options"/>
16+
<description value="Check the product price on product and cart page when JS bundling is disabled via CLI"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4401"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition Step 1: Enable JS Bundling and related settings via CLI -->
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
24+
<createData entity="_defaultCategory" stepKey="createCategory"/>
25+
<!-- Precondition Step 2: Create two Simple products -->
26+
<createData entity="ApiSimpleProduct" stepKey="createSimpleNoOptions"/>
27+
<createData entity="ApiSimpleProductWithCustomPrice" stepKey="createProduct">
28+
<requiredEntity createDataKey="createCategory"/>
29+
</createData>
30+
<!-- Update product to have custom options -->
31+
<updateData createDataKey="createProduct" entity="productWithCustomOptions" stepKey="updateProductWithOptions"/>
32+
<!-- Login as Admin -->
33+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
34+
</before>
35+
<after>
36+
<!--Logout from customer account-->
37+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
38+
<!-- Admin Logout -->
39+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
40+
<!-- Delete Customer -->
41+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
42+
<!-- Delete created products and category -->
43+
<deleteData createDataKey="createProduct" stepKey="deleteSimpleWithOptionsBase"/>
44+
<deleteData createDataKey="createSimpleNoOptions" stepKey="deleteSimpleNoOptions"/>
45+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
46+
</after>
47+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
48+
<argument name="Customer" value="$$createCustomer$$"/>
49+
</actionGroup>
50+
<!-- Step 1: Go to product page on Storefront -->
51+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
52+
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
53+
</actionGroup>
54+
<!-- Step 2: Select product with custom options -->
55+
<actionGroup ref="StorefrontSelectCustomOptionDropDownAndAssertPricesActionGroup" stepKey="selectDropdownAssertPrice">
56+
<argument name="customOption" value="OptionValueDropDown1"/>
57+
<argument name="productPrice" value="$100.01"/>
58+
<argument name="productFinalPrice" value="$100.01"/>
59+
</actionGroup>
60+
<!-- Step 3: Add product to cart -->
61+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
62+
<argument name="product" value="$$createProduct$$"/>
63+
<argument name="productCount" value="1"/>
64+
</actionGroup>
65+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openAgainStorefrontProductPage">
66+
<argument name="productUrl" value="$$createSimpleNoOptions.custom_attributes[url_key]$$"/>
67+
</actionGroup>
68+
<actionGroup ref="StorefrontAddSimpleProductToShoppingCartActionGroup" stepKey="addAnotherProductToCart">
69+
<argument name="product" value="$createSimpleNoOptions$"/>
70+
</actionGroup>
71+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
72+
<!-- Step 4: Check product price in cart -->
73+
<waitForText userInput="$100.01" selector="{{CheckoutCartProductSection.ProductPriceByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/>
74+
<waitForText userInput="$123.00" selector="{{CheckoutCartProductSection.ProductPriceByName($$createSimpleNoOptions.name$$)}}" stepKey="assertProductPriceInCart"/>
75+
<!-- Step 5: Click Proceed to Checkout button -->
76+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/>
77+
<!-- Step 6: Select Flat Rate shipping method and click *Next* button -->
78+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
79+
<!-- Step 7: Select Check/Money Order as a payment method -->
80+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
81+
<!-- Step 8: Click Place order button -->
82+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
83+
</test>
84+
</tests>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminEnableJsBundlingAndCreateProductTest" extends="AdminDisableJsBundlingAndCreateProductTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Preconditions for JS Bundling and Product Matrix"/>
15+
<title value="Enable JS bundling and create simple product across types with/without custom options"/>
16+
<description value="Check the product price on product and cart page when JS bundling is enabled via CLI"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4128"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition Step 1: Enable JS Bundling and related settings via CLI -->
23+
<magentoCLI command="config:set" arguments="dev/js/enable_js_bundling 1" stepKey="enableJsBundling" before="createCustomer"/>
24+
</before>
25+
<after>
26+
<!-- Revert JS bundling settings -->
27+
<magentoCLI command="config:set" arguments="dev/js/enable_js_bundling 0" stepKey="disableJsBundling" after="logoutAsAdmin"/>
28+
</after>
29+
</test>
30+
</tests>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutFillEstimateShippingAndTaxActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{address.state}}" stepKey="selectState"/>
1919
<waitForElementVisible selector="{{CheckoutCartSummarySection.postcode}}" stepKey="waitForPostCodeVisible"/>
2020
<fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{address.postcode}}" stepKey="selectPostCode"/>
21-
<waitForPageLoad stepKey="waitForLoadingMaskToDiappear"/>
21+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDiappear"/>
22+
<waitForAjaxLoad stepKey="waitForAjax"/>
2223
</actionGroup>
2324
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<element name="orderNumberText" type="text" selector=".checkout-success > p:nth-child(1)"/>
1919
<element name="continueShoppingButton" type="button" selector=".action.primary.continue" timeout="30"/>
2020
<element name="createAnAccount" type="button" selector="a[class='action primary'] [data-bind*=&quot;i18n: 'Create an Account'&quot;]" timeout="30"/>
21+
<element name="orderEmailAddress" type="text" selector="span[data-bind*=&quot;text: getEmailAddress()&quot;]" timeout="30"/>
2122
<element name="printLink" type="button" selector=".print" timeout="30"/>
2223
<element name="orderNumberWithoutLink" type="text" selector="//div[contains(@class, 'checkout-success')]//p/span"/>
2324
<element name="orderLinkByOrderNumber" type="text" selector="//div[contains(@class,'success')]//a[contains(.,'{{orderNumber}}')]" parameterized="true" timeout="30"/>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="AdminVerifyCustomerGroupNotLoggedInForGuestOrderTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Order view shows customer group for guest orders"/>
15+
<title value="Admin sees 'NOT LOGGED IN' customer group on guest order view"/>
16+
<description value="Place a guest order on storefront and verify the customer group is NOT LOGGED IN"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-6430"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition Step 1:Create Simple Product and Customer -->
23+
<createData entity="SimpleProduct_100" stepKey="simpleProductOne"/>
24+
</before>
25+
<after>
26+
<!-- Admin log out -->
27+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
28+
<!-- Delete created product -->
29+
<deleteData createDataKey="simpleProductOne" stepKey="deleteSimpleProduct"/>
30+
</after>
31+
<!-- Step 1: Navigate to Frontend > place an order through check money with guest checkout. -->
32+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStorefrontPage"/>
33+
<!-- Add Simple Product to cart -->
34+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory">
35+
<argument name="productUrlKey" value="$simpleProductOne.custom_attributes[url_key]$"/>
36+
</actionGroup>
37+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
38+
<argument name="product" value="$$simpleProductOne$$"/>
39+
<argument name="productCount" value="1"/>
40+
</actionGroup>
41+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
42+
<!-- Guest Checkout Process-->
43+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection">
44+
<argument name="customerVar" value="CustomerEntityOne"/>
45+
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
46+
</actionGroup>
47+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment"/>
48+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="checkoutPlaceOrder"/>
49+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
50+
<!-- Step 2: Navigate to admin panel > sales > orders > check customer group -->
51+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
52+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById">
53+
<argument name="orderId" value="$grabOrderNumber"/>
54+
</actionGroup>
55+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
56+
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.customerGroup}}" stepKey="waitForCustomerGroupFieldOnOrderView"/>
57+
<waitForText selector="{{AdminOrderDetailsInformationSection.customerGroup}}" userInput="{{SimpleCatalogPriceRule.customerGroups}}" stepKey="assertCustomerGroupIsNotLoggedIn"/>
58+
</test>
59+
</tests>

0 commit comments

Comments
 (0)