Skip to content

Commit 30b1104

Browse files
Merge branch '2.4-develop' into ACQE-functional-deployment-version21
2 parents 478043f + 2687b48 commit 30b1104

File tree

24 files changed

+889
-37
lines changed

24 files changed

+889
-37
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>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminAddAttributeOptionInIFrameActionGroup">
11+
<annotations>
12+
<description>Adds a single option to an attribute in the iframe (during attribute creation)</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="optionLabel" type="string"/>
16+
<argument name="optionIndex" type="string"/>
17+
</arguments>
18+
<click selector="{{AttributePropertiesSection.dropdownAddOptions}}" stepKey="clickAddOption"/>
19+
<fillField selector="{{AttributePropertiesSection.dropdownNthOptionAdmin(optionIndex)}}"
20+
userInput="{{optionLabel}}" stepKey="fillOption"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="AdminCreateAttributeValueInConfigurationWizardActionGroup">
12+
<annotations>
13+
<description>Creates a new attribute value/option in the configurable product configuration wizard
14+
</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="attributeLabel" type="string"/>
18+
<argument name="optionValue" type="string"/>
19+
</arguments>
20+
<click selector="{{AdminCreateProductConfigurationsPanel.createNewValueForAttribute(attributeLabel)}}"
21+
stepKey="clickCreateNewValue"/>
22+
<waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.attributeName}}"
23+
stepKey="waitForInput"/>
24+
<fillField selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" userInput="{{optionValue}}"
25+
stepKey="fillValue"/>
26+
<click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveValue"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,36 @@
4545
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
4646
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
4747
</entity>
48+
<!-- Color Attribute Options -->
49+
<entity name="ColorOptionBlack" type="attribute_option">
50+
<data key="label">black</data>
51+
</entity>
52+
<entity name="ColorOptionRed" type="attribute_option">
53+
<data key="label">red</data>
54+
</entity>
55+
<entity name="ColorOptionBlue" type="attribute_option">
56+
<data key="label">blue</data>
57+
</entity>
58+
<entity name="ColorOptionPink" type="attribute_option">
59+
<data key="label">pink</data>
60+
</entity>
61+
<entity name="ColorOptionWhite" type="attribute_option">
62+
<data key="label">white</data>
63+
</entity>
64+
<!-- Size Attribute Options -->
65+
<entity name="SizeOption8" type="attribute_option">
66+
<data key="label">8</data>
67+
</entity>
68+
<entity name="SizeOption10" type="attribute_option">
69+
<data key="label">10</data>
70+
</entity>
71+
<entity name="SizeOption12" type="attribute_option">
72+
<data key="label">12</data>
73+
</entity>
74+
<entity name="SizeOption14" type="attribute_option">
75+
<data key="label">14</data>
76+
</entity>
77+
<entity name="SizeOption16" type="attribute_option">
78+
<data key="label">16</data>
79+
</entity>
4880
</entities>

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@
2323
<element name="defaultLabel" type="text" selector="//div[contains(text(), '{{arg}}')]/ancestor::tr//td[3]/div[@class='data-grid-cell-content']" parameterized="true"/>
2424

2525
<element name="selectAll" type="button" selector=".action-select-all"/>
26+
<element name="deSelectAllByAttribute" type="button" selector="//div[@data-attribute-title='{{attr}}']//button[contains(@class, 'action-deselect-all')]" parameterized="true"/>
2627
<element name="selectAllByAttribute" type="button" selector="//div[@data-attribute-title='{{attr}}']//button[contains(@class, 'action-select-all')]" parameterized="true"/>
2728
<element name="createNewValue" type="input" selector=".action-create-new" timeout="30"/>
29+
<element name="createNewValueForAttribute" type="button"
30+
selector="//div[contains(@class,'attribute-entity') and @data-attribute-title='{{attrLabel}}']//button[contains(@class,'action-create-new')]"
31+
parameterized="true"
32+
timeout="30"/>
2833
<element name="attributeNameInTitle" type="input" selector="//div[contains(@class,'attribute-entity-title-block')]/div[contains(@class,'attribute-entity-title')]"/>
2934
<element name="attributeName" type="input" selector="li[data-attribute-option-title=''] .admin__field-create-new .admin__control-text"/>
3035
<element name="attributeNameWithError" type="text" selector="//li[@data-attribute-option-title='']/div[contains(@class,'admin__field admin__field-create-new _error')]"/>

0 commit comments

Comments
 (0)