Skip to content

Commit 32a080a

Browse files
Merge branch 'ACQE-8191' into ACQE-functional-deployment-v7
2 parents 45a365d + 8b9bf3b commit 32a080a

File tree

4 files changed

+133
-2
lines changed

4 files changed

+133
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,4 +447,7 @@
447447
<requiredEntity type="product_option_value">ProductValueCheckbox1</requiredEntity>
448448
<requiredEntity type="product_option_value">ProductValueCheckbox2</requiredEntity>
449449
</entity>
450+
<entity name="ProductRadioButtonType" type="product_option">
451+
<data key="type">Radio Buttons</data>
452+
</entity>
450453
</entities>
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="AdminVerifySimpleProductCustomOptionPriceActionGroup" extends="AddSimpleProductToOrderActionGroup">
11+
<annotations>
12+
<description>Adds the provided Simple Product to an Order. Verify custom option price.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="priceAmount" defaultValue="$1,500.00" type="string"/>
16+
</arguments>
17+
<remove keyForRemoval="fillProductQty"/>
18+
<remove keyForRemoval="scrollToAddSelectedButton"/>
19+
<remove keyForRemoval="clickAddSelectedProducts"/>
20+
<waitForElementVisible selector="{{AdminOrderFormItemsSection.optionPrice(priceAmount)}}" stepKey="assertOptionPrice"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.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 2018 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -44,5 +44,6 @@
4444
<element name="productCompositeDatePicker" type="button" selector="//*[@id='product_composite_configure_fields_options']//div[{{row}}]//button[contains(@class, 'ui-datepicker-trigger')]" parameterized="true"/>
4545
<element name="datepickerGoToday" type="button" selector="#ui-datepicker-div button.ui-datepicker-current" timeout="30"/>
4646
<element name="datepickerClose" type="button" selector="#ui-datepicker-div button.ui-datepicker-close" timeout="30"/>
47+
<element name="optionPrice" type="text" selector="//span[@class='price-wrapper ' and contains(text(), '{{priceAmount}}')]" parameterized="true"/>
4748
</section>
4849
</sections>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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="AdminVerifyDifferentStoreCustomizableOptionPricesTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Create different stores"/>
15+
<title value="Create different stores with product customizable option price"/>
16+
<description value="Verify different stores with product customizable option price on order creation page."/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-13151"/>
19+
<group value="Sales"/>
20+
</annotations>
21+
<before>
22+
<!-- Create simple product and customer -->
23+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
24+
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
25+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26+
<!-- Create two store and storeViews -->
27+
<!-- Create first store and storeView -->
28+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewCustomStoreGroup">
29+
<argument name="website" value="{{_defaultWebsite.name}}"/>
30+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
31+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView">
34+
<argument name="StoreGroup" value="customStoreGroup"/>
35+
<argument name="customStore" value="customStore"/>
36+
</actionGroup>
37+
<!-- Create second store and storeView -->
38+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateNewStore">
39+
<argument name="website" value="{{_defaultWebsite.name}}"/>
40+
<argument name="storeGroupName" value="{{NewStoreData.name}}"/>
41+
<argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView">
44+
<argument name="StoreGroup" value="NewStoreData"/>
45+
<argument name="customStore" value="storeViewData"/>
46+
</actionGroup>
47+
</before>
48+
<after>
49+
<!-- Delete created data -->
50+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
51+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
52+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteFirstStoreGroup">
53+
<argument name="storeGroupName" value="customStoreGroup.name"/>
54+
</actionGroup>
55+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteSecondStoreGroup">
56+
<argument name="storeGroupName" value="NewStoreData.name"/>
57+
</actionGroup>
58+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
59+
</after>
60+
<!-- Open created product for edit -->
61+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
62+
<argument name="productId" value="$createSimpleProduct.id$"/>
63+
</actionGroup>
64+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
65+
<!-- Expand customizable options -->
66+
<scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOption"/>
67+
<conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/>
68+
<!-- Add Custom Options -->
69+
<actionGroup ref="AdminAddProductCustomOptionActionGroup" stepKey="addProductCustomRadiobuttonOption">
70+
<argument name="customOptionTitle" value="{{ProductOptionRadiobutton.title}}"/>
71+
<argument name="customOptionType" value="{{ProductRadioButtonType.type}}"/>
72+
</actionGroup>
73+
<actionGroup ref="AdminAddTitleAndPriceValueToCustomOptionActionGroup" stepKey="addTitleAndPriceValueToCustomRadiobuttonOption">
74+
<argument name="optionValue" value="ProductOptionValueRadioButtons1"/>
75+
</actionGroup>
76+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
77+
<!--Change Scope to first store view and change price of custom option-->
78+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="changeScopeToFirstStoreView">
79+
<argument name="storeViewName" value="{{customStore.name}}"/>
80+
</actionGroup>
81+
<scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOptionInFirstStoreView"/>
82+
<conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSectionInFirstStoreView"/>
83+
<fillField selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="1000" stepKey="fillInValuePriceInFirstStoreView"/>
84+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInFirstStoreView"/>
85+
<!--Change Scope to Default store view and change price of custom option-->
86+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="changeScopeToDefaultStoreView">
87+
<argument name="storeViewName" value="{{_defaultStore.name}}"/>
88+
</actionGroup>
89+
<scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOptionInDefaultStoreView"/>
90+
<conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSectionInDefaultStoreView"/>
91+
<fillField selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="1500" stepKey="fillInValuePriceInDefaultStoreView"/>
92+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInDefaultStoreView"/>
93+
<!-- Go to order page and select existing customer -->
94+
<actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage">
95+
<argument name="customer" value="$createCustomer$"/>
96+
</actionGroup>
97+
<actionGroup ref="AdminSelectStoreDuringOrderCreationActionGroup" stepKey="selectCustomStore">
98+
<argument name="storeView" value="customStore"/>
99+
</actionGroup>
100+
<!-- Assert created product custom option price -->
101+
<actionGroup ref="AdminVerifySimpleProductCustomOptionPriceActionGroup" stepKey="assertProductCustomPrice">
102+
<argument name="product" value="$createSimpleProduct$"/>
103+
</actionGroup>
104+
</test>
105+
</tests>

0 commit comments

Comments
 (0)